showPage("PageNotFound", "view"); } else { if ( isset($_GET['pid'] )) { $has = has_page($_GET['pid']); if ( $has) { $psyhvel->showPage($_GET['pid']); //render_menu($_GET['pid']); } else { $psyhvel->showPage("PageNotFound", "view"); } } else if ( isset($_GET['rid'] )) { $mode = "view"; if ( isset($_GET['mode']) ) { $mode = $_GET['mode']; } $resp = $psyhvel->showObject($_GET['rid'], $mode); if ( $resp == 0 ) { //render_menu_rid($_GET['rid']); } else { if ( is_array($resp) ) { // redirect } else { $psyhvel->showPage("PageNotFound", "view"); } } } else { if ( !$psyhvel->isAnon() ) { if ( $user->hasRole("manager") ){ header("Location:index.php?pid=MyFolder"); } else { header("Location:index.php?pid=PsyhvelPlayer"); } } } } ?>