Inheritance: extends Controller_Template
Ejemplo n.º 1
0
 public function before()
 {
     parent::before();
     // Выводим в шаблон
     $this->template->title = 'Вход в пенель управления';
     $this->template->page_title = 'Авторизация';
 }
Ejemplo n.º 2
0
 public function action_index()
 {
     if (!Auth::instance()->logged_in('admin')) {
         $this->template->content = View::factory('admin/table_list_waitress');
     }
     parent::action_index();
 }
Ejemplo n.º 3
0
 public function after()
 {
     if ($this->auto_render) {
         $styles = array('assets/css/horoscope.css' => 'screen');
         $this->template->styles = array_reverse(array_merge($this->template->styles, $styles));
     }
     parent::after();
 }
Ejemplo n.º 4
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow(array('group.list'))) {
         $this->show_message("对不起,您没有权限执行该操作");
     }
     $this->template->layout = array('title' => '用户管理', 'action' => array('list' => array('url' => '/admin/user/list', 'text' => '用户列表'), 'group' => array('url' => '/admin/group/group', 'text' => '会员组管理')), 'current' => $this->request->action);
 }
Ejemplo n.º 5
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow('module.list')) {
         $this->show_message('对不起,您没有权限执行该操作');
     }
     $this->template->layout = array('title' => '评论管理', 'action' => array('article' => array('url' => '/admin/comments/booklist?app=article', 'text' => '图书评论'), 'img' => array('url' => '/admin/comments/booklist?app=img', 'text' => '相册评论'), 'img_subject' => array('url' => '/admin/comments/booklist?app=img_subject', 'text' => '专题评论')), 'current' => $this->getQuery('app'));
 }
Ejemplo n.º 6
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow('role.list')) {
         $this->show_message("对不起,您没有权限执行该操作");
     }
     $this->template->layout = array('title' => '缓存管理');
 }
Ejemplo n.º 7
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow('role.list')) {
         $this->show_message("对不起,您没有权限执行该操作");
     }
     $this->template->layout = array('title' => '积分管理', 'action' => array('index' => array('url' => '/admin/point', 'text' => '积分管理')), 'current' => $this->request->action);
 }
Ejemplo n.º 8
0
 /**
  * 控制器方法执行前
  */
 public function before()
 {
     parent::before();
     $this->template->layout = array('title' => '磁盘列表管理', 'action' => array('list' => array('url' => '/admin/disk/list', 'text' => '磁盘列表')), 'current' => $this->request->action);
     if (!Auth::getInstance()->hasAllow(array('disk.access'))) {
         $this->show_message("对不起,您没有权限执行该操作");
     }
 }
Ejemplo n.º 9
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow('books.list')) {
         $this->show_message('对不起,您没有权限执行该操作');
     }
     $this->template->layout = array('title' => '图书馆管理', 'action' => array('list' => array('url' => '/admin/article/list', 'text' => '图书列表')), 'current' => $this->request->action);
 }
Ejemplo n.º 10
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow('module.list')) {
         $this->show_message('对不起,您没有权限执行该操作');
     }
     $this->template->layout = array('title' => '模块管理', 'action' => array('index' => array('url' => '/admin/module', 'text' => '模块管理'), 'leaveSet' => array('url' => '/admin/privilege/list', 'text' => '权限管理')), 'current' => $this->request->action);
 }
Ejemplo n.º 11
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow('role.list')) {
         $this->show_message("对不起,您没有权限执行该操作");
     }
     try {
         $this->template->modName = $modName = trim($this->getQuery('mod_name'));
         $this->role = ORM::factory('acl_role')->setModule($modName);
     } catch (Exception $e) {
         $this->show_message('操作失败:' . $e->getMessage());
     }
     $this->template->layout = array('title' => $this->role->modDesc . ' - 角色管理');
 }
Ejemplo n.º 12
0
 /**
  * 控制器方法执行前
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow('privilege.assign')) {
         $this->show_message("对不起,您没有权限执行该操作");
     }
     $this->template->layout = array('title' => '权限指派');
     try {
         $this->template->modName = $modName = trim($this->getQuery('mod_name'));
         $this->acl = ORM::factory('acl')->setModule($modName);
         $this->role = ORM::factory('acl_role')->setModule($modName);
         $this->rule = ORM::factory('acl_rule')->setModule($modName);
     } catch (Exception $e) {
         $this->show_message('操作失败:' . $e->getMessage());
     }
 }
Ejemplo n.º 13
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     if (!Auth::getInstance()->isAllow('rule.list')) {
         $this->show_message("对不起,您没有权限执行该操作");
     }
     try {
         $this->template->modName = $modName = trim($this->getQuery('mod_name'));
         $this->rule = ORM::factory('acl_rule')->setModule($modName);
         $this->resource = ORM::factory('acl_resource')->setModule($modName);
     } catch (Exception $e) {
         $this->show_message('操作失败:' . $e->getMessage());
     }
     $action['list'] = array('url' => '/admin/rule/list?mod_name=' . $this->getQuery('mod_name'), 'text' => '规则管理');
     $action['add'] = array('url' => '/admin/rule/add?mod_name=' . $this->getQuery('mod_name'), 'text' => '添加规则');
     $this->template->layout = array('title' => '模块管理', 'action' => $action, 'current' => $this->request->action);
 }
Ejemplo n.º 14
0
 public function before()
 {
     parent::before();
     if (!Auth::instance()->logged_in('admin')) {
         $this->request->redirect('/admin/auth');
     }
     if (Auth::instance()->logged_in('admin')) {
         $admin_info = $this->user;
         $this->template->admin_info = $admin_info;
     }
     $admin_menu = View::factory('/admin/v_admin_menu');
     $this->template->admin_menu = $admin_menu;
     //Вывод в шаблон
     $this->template->title = 'Админисртрирование';
     $this->template->page_title = 'Главная страница админки';
     $this->template->scripts[] = 'js/jquery-1.7.1.min.js';
     $this->template->scripts[] = 'js/jquery.MultiFile.pack.js';
     $this->template->scripts[] = 'js/upload.js';
     $this->template->scripts[] = 'js/view_images.js';
     $this->template->styles[] = 'themes/admin_menu.css';
     $this->template->styles[] = 'themes/admin_style.css';
 }
Ejemplo n.º 15
0
 /**
  * 控制器方法执行前
  */
 public function before()
 {
     parent::before();
     $this->template->layout = array('title' => '图片列表管理', 'action' => array('list' => array('url' => '/admin/pics/list', 'text' => '图片列表')), 'current' => $this->request->action);
 }
Ejemplo n.º 16
0
 public function before()
 {
     parent::before();
 }
Ejemplo n.º 17
0
 public function before()
 {
     parent::before();
     $this->add_style('cms/css/tools.css');
     $this->add_script('cms/js/tools.js');
 }
Ejemplo n.º 18
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     $this->template->layout = array('title' => '举报管理');
 }
Ejemplo n.º 19
0
 /**
  * 控制器方法执行前
  */
 public function before()
 {
     parent::before();
     $this->template->layout = array('title' => '邮件模版管理', 'action' => array('email' => array('url' => '/admin/template/email', 'text' => '显示列表'), 'edit' => array('url' => '/admin/template/edit', 'text' => '添加信息')), 'current' => $this->request->action);
 }
Ejemplo n.º 20
0
 /**
  * 控制器方法执行前
  */
 public function before()
 {
     parent::before();
     $this->template->layout = array('title' => '帮助文档列表管理', 'action' => array('index' => array('url' => '/admin/help', 'text' => '文档列表'), 'add' => array('url' => '/admin/help/add', 'text' => '文档添加')), 'current' => $this->request->action);
 }
Ejemplo n.º 21
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     $this->template->layout = array('title' => '用户管理', 'action' => array('list' => array('url' => '/admin/user/list', 'text' => '用户列表'), 'group' => array('url' => '/admin/group/group', 'text' => '会员组管理')), 'current' => $this->request->action);
 }
Ejemplo n.º 22
0
 /**
  * 初始化
  */
 public function before()
 {
     parent::before();
     $this->template->layout = array('title' => '支付配置管理', 'action' => array('index' => array('url' => '/admin/payment/index', 'text' => '支付列表'), 'add' => array('url' => '/admin/payment/add', 'text' => '添加')), 'current' => $this->request->action);
 }
Ejemplo n.º 23
0
                            <p><?php 
    echo implode('</p><p>', (array) Session::get_flash('error'));
    ?>
</p>
                        </div>
                    <?php 
}
?>

                    <?php 
echo isset($content) ? $content : '';
?>
                </div>

            </div>

        </div>

        <!-- JS here-->
        <?php 
echo Asset::render('js');
?>
    </body>
    <?php 
$cache = Session::get_flash('cache');
if ($cache == 'del') {
    Controller_Admin_Base::delete_files(APPPATH . '/cache/auth/');
}
?>
</html>
Ejemplo n.º 24
0
 public function after()
 {
     parent::after();
     /* 		echo Debugtoolbar::render(); */
 }