fetchByUserid($_SESSION['user_id']); if (!isset($viewer->screenname)) { unset($viewer); } } $path = $_GET['path']; // FIXME: normalize? (trailing slashes, etc..) $mypath = $path; $list = explode('/', $path); $page_tree = array(); // find path to current document // starting with root element, which has ID 1. keep errors $weare=1; $error=0; $pathare="/"; $parentpath=""; $parentare=0; $curelem=0; for ($i=0; $i