. 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'); } }