['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; default: // error out through unset template } parent::__construct($pageCall, $pageParam); } protected function generateContent() { if (!$this->generator || function_exists($this->generator)) return; $this->{$this->generator}(); } private function handleConfig() { $this->addScript( [CSS_STRING, '.grid input[type=\'text\'], .grid input[type=\'number\'] { width:250px; text-align:left; }'], [CSS_STRING, '.grid input[type=\'button\'] { width:65px; padding:2px; }'], [CSS_STRING, '.grid a.tip { margin:0px 5px; opacity:0.8; }'], [CSS_STRING, '.grid a.tip:hover { opacity:1; }'], [CSS_STRING, '.grid tr { height:30px; }'], [CSS_STRING, '.grid .disabled { opacity:0.4 !important; }'], [CSS_STRING, '.grid .status { position:absolute; right:5px; }'], ); $head = '
| Key | Value | Options |
|---|---|---|
| new configuration | ||