public function admin() { /** * Folder permissions needed */ switch ($_REQUEST['fop']) { case 'open_file_manager': if (!Current_User::verifySaltedUrl()) { javascript('close_refresh'); Layout::nakedDisplay(); } return $this->openFileManager(); break; case 'fm_folders': return $this->folderView(); break; case 'fm_fld_contents': return $this->folderContentView(); break; case 'pick_file': $this->pickFile(); break; case 'resize_pick': $this->resizePick(); break; } }
/** * Works like authorized, but checks for a salted authkey * Won't work on posts yet. */ public static function secured($module, $subpermission = null, $item_id = 0, $itemname = null, $unrestricted_only = false) { if ($unrestricted_only && Current_User::isRestricted($module)) { return false; } if (!isset($_SESSION['User'])) { return false; } return Current_User::verifySaltedUrl() && $_SESSION['User']->allow($module, $subpermission, $item_id, $itemname); }