diff options
Diffstat (limited to 'h-source/Application/Controllers/SpecialController.php')
-rw-r--r-- | h-source/Application/Controllers/SpecialController.php | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php index 6f17c2c..6ef632a 100644 --- a/h-source/Application/Controllers/SpecialController.php +++ b/h-source/Application/Controllers/SpecialController.php @@ -40,17 +40,17 @@ class SpecialController extends BaseController { switch ($action) { - case 'modifications': - $data['title'] = 'last modifications - '.Website::$generalName; - - $whereClauseArray = array( - 'gr' => 'registered', - 'type' => 'hardware', - ); - - $viewFile = 'modifications'; - - break; +// case 'modifications': +// $data['title'] = 'last modifications - '.Website::$generalName; +// +// $whereClauseArray = array( +// 'gr' => 'registered', +// 'type' => 'hardware', +// ); +// +// $viewFile = 'modifications'; +// +// break; case 'modactions': $data['title'] = 'last moderations - '.Website::$generalName; $data['viewTitle'] = 'List of actions carried out by moderators'; @@ -99,7 +99,30 @@ class SpecialController extends BaseController { $this->shift(1); - $this->last($lang = 'en','modifications'); + $data['title'] = 'last modifications - '.Website::$generalName; + + $whereClauseArray = array( + 'gr' => 'registered', + 'type' => 'hardware', + 'approved' => 'yes', + ); + + $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); + + $this->m['HistoryModel']->clear()->inner('hardware')->on('hardware.id_hard=history.id')->select()->where($whereClauseArray)->orderBy('id_history desc'); + + $recordNumber = $this->m['HistoryModel']->rowNumber(); + $page = $this->viewArgs['page']; + + $this->m['HistoryModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30); + + $data['table'] = $this->m['HistoryModel']->send(); + + $data['pageList'] = $this->h['Pages']->render($page-5,11); + + $this->append($data); + $this->load('modifications'); + $this->right(); } public function modactions($lang = 'en') @@ -122,7 +145,7 @@ class SpecialController extends BaseController protected function pagelist($lang = 'en', $type) { - switch($type) + switch ($type) { case 'deleted': $whereArray = array('-deleted'=>'yes','approved'=>'yes'); |