Ejemplo n.º 1
0
 function before()
 {
     parent::before();
     $this->_seo['h1'] = 'Администраторы';
     $this->_seo['title'] = 'Администраторы';
     $this->setBreadcrumbs('Администраторы', 'backend/admins/index');
     $this->page = (int) Route::param('page') ? (int) Route::param('page') : 1;
     $this->limit = Config::get('limit_backend');
     $this->offset = ($this->page - 1) * $this->limit;
     $aroles = Roles::getBackendUsersRoles();
     foreach ($aroles as $obj) {
         $this->aroles[$obj->id] = $obj->name;
     }
 }
Ejemplo n.º 2
0
 function deleteAction()
 {
     $id = (int) Route::param('id');
     $page = Model::getRow($id);
     if (!$page) {
         Message::GetMessage(0, 'Данные не существуют!');
         HTTP::redirect('backend/' . Route::controller() . '/index');
     }
     Model::delete($id);
     Message::GetMessage(1, 'Данные удалены!');
     HTTP::redirect('backend/' . Route::controller() . '/index');
 }