diff options
Diffstat (limited to 'h-source/Application/Controllers/SpecialController.php')
-rw-r--r-- | h-source/Application/Controllers/SpecialController.php | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php index 1f13b69..6f17c2c 100644 --- a/h-source/Application/Controllers/SpecialController.php +++ b/h-source/Application/Controllers/SpecialController.php @@ -120,15 +120,23 @@ class SpecialController extends BaseController $this->last($lang = 'en','adminactions'); } - public function deleted($lang = 'en') + protected function pagelist($lang = 'en', $type) { - $this->shift(1); - - $this->s['registered']->check('admin'); - + switch($type) + { + case 'deleted': + $whereArray = array('-deleted'=>'yes','approved'=>'yes'); + $data['titleString'] = 'hidden device pages'; + break; + case 'notapproved': + $whereArray = array('approved'=>'no'); + $data['titleString'] = 'Device pages that have to be approved'; + break; + } + $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); - $this->m['HardwareModel']->clear()->select()->where(array('-deleted'=>'yes'))->orderBy('id_hard desc'); + $this->m['HardwareModel']->clear()->select()->where($whereArray)->orderBy('id_hard desc'); $recordNumber = $this->m['HardwareModel']->rowNumber(); $page = $this->viewArgs['page']; @@ -144,4 +152,22 @@ class SpecialController extends BaseController $this->right(); } + public function deleted($lang = 'en') + { + $this->shift(1); + + $this->s['registered']->check('admin'); + + $this->pagelist($lang,'deleted'); + } + + public function notapproved($lang = 'en') + { + $this->shift(1); + + $this->s['registered']->check('admin'); + + $this->pagelist($lang,'notapproved'); + } + }
\ No newline at end of file |