['filter' => FILTER_UNSAFE_RAW], 'type' => ['filter' => FILTER_CALLBACK, 'options' => 'GenericPage::checkInt'], 'typeid' => ['filter' => FILTER_CALLBACK, 'options' => 'GenericPage::checkInt'], 'user' => ['filter' => FILTER_CALLBACK, 'options' => 'urldecode'] ); private $generator = ''; public function __construct($pageCall, $pageParam) { switch ($pageParam) { case 'screenshots': $this->reqUGroup = U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SCREENSHOT; $this->generator = 'handleScreenshots'; $this->tpl = 'admin/screenshots'; array_push($this->path, 1, 5); $this->name = 'Screenshot Manager'; break; case 'phpinfo': $this->reqUGroup = U_GROUP_ADMIN | U_GROUP_DEV; $this->generator = 'handlePhpInfo'; $this->tpl = 'list-page-generic'; array_push($this->path, 2, 21); $this->name = 'PHP Information'; break; case 'siteconfig': $this->reqUGroup = U_GROUP_ADMIN | U_GROUP_DEV; $this->generator = 'handleConfig'; $this->tpl = 'admin/siteconfig'; array_push($this->path, 2, 18); $this->name = 'Site Configuration'; break; case 'weight-presets': $this->reqUGroup = U_GROUP_ADMIN | U_GROUP_DEV | U_GROUP_BUREAU; $this->generator = 'handleWeightPresets'; $this->tpl = 'admin/weight-presets'; array_push($this->path, 2, 16); $this->name = 'Weight Presets'; break; case 'guides': $this->reqUGroup = U_GROUP_STAFF; $this->generator = 'handleGuideApprove'; $this->tpl = 'list-page-generic'; array_push($this->path, 1, 25); $this->name = 'Pending Guides'; break; case 'out-of-date': $this->reqUGroup = U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_MOD; $this->generator = 'handleOutOfDate'; $this->tpl = 'list-page-generic'; array_push($this->path, 1, 23); $this->name = 'Out of Date Comments'; break; case 'reports': $this->reqUGroup = U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_EDITOR | U_GROUP_MOD | U_GROUP_LOCALIZER | U_GROUP_SCREENSHOT | U_GROUP_VIDEO; $this->generator = 'handleReports'; $this->tpl = 'admin/reports'; array_push($this->path, 5); $this->name = 'Reports'; break; default: // error out through unset template } parent::__construct($pageCall, $pageParam); } protected function generateContent() : void { if (!$this->generator || function_exists($this->generator)) return; $this->{$this->generator}(); } private function handleConfig() : void { $this->addScript( [SC_CSS_STRING, '.grid input[type=\'text\'], .grid input[type=\'number\'] { width:250px; text-align:left; }'], [SC_CSS_STRING, '.grid input[type=\'button\'] { width:65px; padding:2px; }'], [SC_CSS_STRING, '.grid a.tip { margin:0px 5px; opacity:0.8; }'], [SC_CSS_STRING, '.grid a.tip:hover { opacity:1; }'], [SC_CSS_STRING, '.grid tr { height:30px; }'], [SC_CSS_STRING, '.grid .disabled { opacity:0.4 !important; }'], [SC_CSS_STRING, '.grid .status { position:absolute; right:5px; }'] ); $head = '
| Key | Value | Options |
|---|---|---|
| new configuration | ||