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/AdminregusersController.php | 101 --------------------- 1 file changed, 101 deletions(-) delete mode 100644 h-source/admin/Application/Controllers/AdminregusersController.php (limited to 'h-source/admin/Application/Controllers/AdminregusersController.php') diff --git a/h-source/admin/Application/Controllers/AdminregusersController.php b/h-source/admin/Application/Controllers/AdminregusersController.php deleted file mode 100644 index b4ed6ed..0000000 --- a/h-source/admin/Application/Controllers/AdminregusersController.php +++ /dev/null @@ -1,101 +0,0 @@ -. - -if (!defined('EG')) die('Direct access not allowed!'); - -class AdminregusersController 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('UsersModel'); - - $this->modelName = 'UsersModel'; - - $this->helper('Menu','adminregusers','panel/main'); - -// $this->m['UsersModel']->setFields('username,e_mail,has_confirmed,deleted,creation_date','sanitizeAll'); - - $this->setArgKeys(array('page:forceNat'=>1,'has_confirmed:sanitizeAll'=>'undef','deleted:sanitizeAll'=>'undef','id_group: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( - 'has_confirmed' => $this->viewArgs['has_confirmed'], - 'deleted' => $this->viewArgs['deleted'], - 'id_group' => $this->viewArgs['id_group'], - ); - $this->scaffold->setWhereQueryClause($whereClauseArray); - - $this->scaffold->loadMain('regusers:id_user,regusers:username,regusers:e_mail,regusers:has_confirmed,regusers:deleted,smartDate|regusers:creation_date','regusers:id_user','link'); - $this->scaffold->setHead('USER ID,USERNAME,E-MAIL,HAS CONFIRMED?,DELETED?,DATE'); - $data['scaffold'] = $this->scaffold->render(); - $this->append($data); - $this->load('main'); - } - - public function associate() - { - $this->shift(0); - - $this->s['admin']->check(); - - if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..'); - - $this->m['UsersModel']->printAssError = 'yes'; - $this->m['UsersModel']->updateTable('associate,dissociate'); - - $data['notice'] = $this->m['UsersModel']->notice; - - $data['menu'] = $this->h['Menu']->render('back'); - - $data['action'] = $this->baseUrl.'/adminregusers/associate'.$this->viewStatus; - - $data['groups'] = $this->m['UsersModel']->getFieldArray('reggroups:id_group','reggroups:name'); - - //get the name of the user whose id is $_POST['id_user'] - $users = $this->m['UsersModel']->db->select('regusers','username','id_user='.(int)$_POST['id_user']); - $data['user'] = $users[0]['regusers']['username']; - - //get the groups inside which the user is inserted - $this->m['UsersModel']->setWhereQueryClause(array('id_user'=>(int)$_POST['id_user'])); - $this->m['UsersModel']->orderBy = 'reggroups.id_group desc'; - $data['groupsUser'] = $this->m['UsersModel']->getAll('Boxes'); -// echo $this->m['UsersModel']->getQuery(); - - $this->set($data); - $this->load('associate'); - } -} \ No newline at end of file -- cgit v1.2.3