From 07f5140771388c9e0c8a99b0dd2e5d950bdb173b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 14 Oct 2021 15:16:42 +1100 Subject: moving h-source subdir out. --- .../Controllers/AdmindeletionController.php | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 admin/Application/Controllers/AdmindeletionController.php (limited to 'admin/Application/Controllers/AdmindeletionController.php') diff --git a/admin/Application/Controllers/AdmindeletionController.php b/admin/Application/Controllers/AdmindeletionController.php new file mode 100644 index 0000000..d5ee6fc --- /dev/null +++ b/admin/Application/Controllers/AdmindeletionController.php @@ -0,0 +1,66 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class AdmindeletionController extends Controller { + + function __construct($model, $controller, $queryString) { + parent::__construct($model, $controller, $queryString); + + $this->load('header_back'); + $this->load('footer_back','last'); + + $this->session('admin'); + $this->model('DeletionModel'); + + $this->modelName = 'DeletionModel'; + +// $this->m['DeletionModel']->setFields('object,topic,status,priority,message,notice','sanitizeAll'); + + $this->setArgKeys(array('page:forceNat'=>1,'object:sanitizeAll'=>'undef','token:sanitizeAll'=>'token')); + } + + public function main() + { + $this->shift(); + + Params::$nullQueryValue = 'undef'; + + $this->s['admin']->check(); + + if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..'); + + $this->loadScaffold('main',array('popup'=>true,'popupType'=>'inclusive','mainMenu'=>'panel','recordPerPage'=>30)); + + $whereClauseArray = array( + 'object' => $this->viewArgs['object'], + ); + $this->scaffold->setWhereQueryClause($whereClauseArray); + + $this->scaffold->loadMain('deletion:id_del,deletion:object,deletion:id_duplicate,deletion:id_hard,getUserName|deletion:created_by,smartDate|deletion:creation_date','deletion:id_del',''); + $this->scaffold->setHead('DEL ID,OBJECT,DUPLICATED,HARDWARE ID,CREATED BY,DATE'); + $this->scaffold->update('del'); + $data['scaffold'] = $this->scaffold->render(); + $this->append($data); + $this->load('main'); + } + +} \ No newline at end of file -- cgit v1.2.3