当前位置: 首页>>代码示例>>PHP>>正文


PHP admin::main_tabs方法代码示例

本文整理汇总了PHP中admin::main_tabs方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::main_tabs方法的具体用法?PHP admin::main_tabs怎么用?PHP admin::main_tabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在admin的用法示例。


在下文中一共展示了admin::main_tabs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     // Load cache
     $this->cache = new Cache();
     // Load session
     $this->session = new Session();
     // Load database
     $this->db = new Database();
     $upgrade = new Upgrade();
     $this->auth = new Auth();
     $this->session = Session::instance();
     $this->auth->auto_login();
     if (!$this->auth->logged_in('login')) {
         url::redirect('login');
     }
     // Set Table Prefix
     $this->table_prefix = Kohana::config('database.default.table_prefix');
     //fetch latest release of ushahidi
     $this->release = $upgrade->_fetch_core_release();
     if (!empty($this->release)) {
         $this->template->version = $this->_get_release_version();
         $this->template->critical = $this->release->critical;
     }
     // Get Session Information
     $this->user = new User_Model($_SESSION['auth_user']->id);
     // Check if user has the right to see the admin panel
     if (admin::admin_access($this->user) == FALSE) {
         // This user isn't allowed in the admin panel
         url::redirect('/');
     }
     $this->template->admin_name = $this->user->name;
     // Retrieve Default Settings
     $this->template->site_name = Kohana::config('settings.site_name');
     $this->template->mapstraction = Kohana::config('settings.mapstraction');
     $this->template->api_url = Kohana::config('settings.api_url');
     // Javascript Header
     $this->template->map_enabled = FALSE;
     $this->template->flot_enabled = FALSE;
     $this->template->treeview_enabled = FALSE;
     $this->template->protochart_enabled = FALSE;
     $this->template->colorpicker_enabled = FALSE;
     $this->template->editor_enabled = FALSE;
     $this->template->js = '';
     $this->template->form_error = FALSE;
     // Initialize some variables for raphael impact charts
     $this->template->raphael_enabled = FALSE;
     $this->template->impact_json = '';
     // Generate main tab navigation list.
     $this->template->main_tabs = admin::main_tabs();
     // Generate sub navigation list (in default layout, sits on right side).
     $this->template->main_right_tabs = admin::main_right_tabs($this->user);
     $this->template->this_page = "";
     // Load profiler
     // $profiler = new Profiler;
 }
开发者ID:mewsop,项目名称:Ushahidi_Web,代码行数:56,代码来源:admin.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     // Load cache
     $this->cache = new Cache();
     // Load session
     $this->session = new Session();
     // Load database
     $this->db = new Database();
     $upgrade = new Upgrade();
     $this->auth = new Auth();
     $this->session = Session::instance();
     $this->auth->auto_login();
     if (!$this->auth->logged_in('login')) {
         url::redirect('login');
     }
     //fetch latest version of ushahidi
     $version_number = $upgrade->_fetch_core_version();
     $this->template->version = $version_number;
     // Get Session Information
     $this->user = new User_Model($_SESSION['auth_user']->id);
     $this->template->admin_name = $this->user->name;
     // Retrieve Default Settings
     $this->template->site_name = Kohana::config('settings.site_name');
     $this->template->mapstraction = Kohana::config('settings.mapstraction');
     $this->template->api_url = Kohana::config('settings.api_url');
     // Javascript Header
     $this->template->map_enabled = FALSE;
     $this->template->flot_enabled = FALSE;
     $this->template->treeview_enabled = FALSE;
     $this->template->protochart_enabled = FALSE;
     $this->template->colorpicker_enabled = FALSE;
     $this->template->editor_enabled = FALSE;
     $this->template->js = '';
     $this->template->form_error = FALSE;
     // Initialize some variables for raphael impact charts
     $this->template->raphael_enabled = FALSE;
     $this->template->impact_json = '';
     // Generate main tab navigation list.
     $this->template->main_tabs = admin::main_tabs();
     // Generate sub navigation list (in default layout, sits on right side).
     $this->template->main_right_tabs = admin::main_right_tabs($this->auth);
     // Load profiler
     // $profiler = new Profiler;
 }
开发者ID:Bridgeborn,项目名称:Ushahidi_Web,代码行数:45,代码来源:admin.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     // Load cache
     $this->cache = new Cache();
     // Load session
     $this->session = new Session();
     // Load database
     $this->db = new Database();
     $this->session = Session::instance();
     $this->auth = Auth::instance();
     // Themes Helper
     $this->themes = new Themes();
     $this->themes->admin = TRUE;
     // Admin is not logged in, or this is a member (not admin)
     if (!$this->auth->logged_in('login')) {
         url::redirect('login');
     }
     // Check if user has the right to see the admin panel
     if (!$this->auth->admin_access()) {
         // This user isn't allowed in the admin panel
         url::redirect('/');
     }
     // Get the authenticated user
     $this->user = $this->auth->get_user();
     // Set Table Prefix
     $this->table_prefix = Kohana::config('database.default.table_prefix');
     // Get the no. of items to display setting
     $this->items_per_page = (int) Kohana::config('settings.items_per_page_admin');
     $this->template->admin_name = $this->user->name;
     // Retrieve Default Settings
     $this->template->site_name = Kohana::config('settings.site_name');
     $this->template->mapstraction = Kohana::config('settings.mapstraction');
     $this->themes->api_url = Kohana::config('settings.api_url');
     // Javascript Header
     $this->themes->map_enabled = FALSE;
     $this->themes->datepicker_enabled = FALSE;
     $this->themes->flot_enabled = FALSE;
     $this->themes->treeview_enabled = FALSE;
     $this->themes->protochart_enabled = FALSE;
     $this->themes->colorpicker_enabled = FALSE;
     $this->themes->editor_enabled = FALSE;
     $this->themes->tablerowsort_enabled = FALSE;
     $this->themes->json2_enabled = FALSE;
     $this->themes->hovertip_enabled = TRUE;
     $this->themes->slider_enabled = TRUE;
     $this->themes->js = '';
     $this->template->form_error = FALSE;
     // Initialize some variables for raphael impact charts
     $this->themes->raphael_enabled = FALSE;
     $this->themes->impact_json = '';
     // Generate main tab navigation list.
     $this->template->main_tabs = admin::main_tabs();
     // Generate sub navigation list (in default layout, sits on right side).
     $this->template->main_right_tabs = admin::main_right_tabs($this->user);
     $this->template->this_page = "";
     // Header Nav
     $header_nav = new View('header_nav');
     $this->template->header_nav = $header_nav;
     $this->template->header_nav->loggedin_user = $this->user;
     $this->template->header_nav->loggedin_role = $this->user->dashboard();
     $this->template->header_nav->site_name = Kohana::config('settings.site_name');
     // Language switcher
     $this->template->languages = $this->themes->languages();
     Event::add('ushahidi_filter.view_pre_render.admin_layout', array($this, '_pre_render'));
 }
开发者ID:niiyatii,项目名称:crowdmap,代码行数:66,代码来源:admin.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     // Load cache
     $this->cache = new Cache();
     // Load session
     $this->session = new Session();
     // Load database
     $this->db = new Database();
     $this->session = Session::instance();
     // Themes Helper
     $this->themes = new Themes();
     // Admin is not logged in, or this is a member (not admin)
     if (!$this->auth->logged_in('login') or $this->auth->logged_in('member')) {
         url::redirect('login');
     }
     // Set Table Prefix
     $this->table_prefix = Kohana::config('database.default.table_prefix');
     // Get the no. of items to display setting
     $this->items_per_page = (int) Kohana::config('settings.items_per_page_admin');
     // Get Session Information
     $this->user = new User_Model($_SESSION['auth_user']->id);
     // Check if user has the right to see the admin panel
     if (admin::admin_access($this->user) == FALSE) {
         // This user isn't allowed in the admin panel
         url::redirect('/');
     }
     $this->template->admin_name = $this->user->name;
     // Retrieve Default Settings
     $this->template->site_name = Kohana::config('settings.site_name');
     $this->template->mapstraction = Kohana::config('settings.mapstraction');
     $this->template->api_url = Kohana::config('settings.api_url');
     // Javascript Header
     $this->template->map_enabled = FALSE;
     $this->template->datepicker_enabled = FALSE;
     $this->template->flot_enabled = FALSE;
     $this->template->treeview_enabled = FALSE;
     $this->template->protochart_enabled = FALSE;
     $this->template->colorpicker_enabled = FALSE;
     $this->template->editor_enabled = FALSE;
     $this->template->tablerowsort_enabled = FALSE;
     $this->template->json2_enabled = FALSE;
     $this->template->js = '';
     $this->template->form_error = FALSE;
     // Initialize some variables for raphael impact charts
     $this->template->raphael_enabled = FALSE;
     $this->template->impact_json = '';
     // Generate main tab navigation list.
     $this->template->main_tabs = admin::main_tabs();
     // Generate sub navigation list (in default layout, sits on right side).
     $this->template->main_right_tabs = admin::main_right_tabs($this->user);
     $this->template->this_page = "";
     // Load profiler
     // $profiler = new Profiler;
     // Header Nav
     $header_nav = new View('header_nav');
     $this->template->header_nav = $header_nav;
     $this->template->header_nav->loggedin_user = FALSE;
     if (isset(Auth::instance()->get_user()->id)) {
         // Load User
         $this->template->header_nav->loggedin_role = Auth::instance()->logged_in('member') ? "members" : "admin";
         $this->template->header_nav->loggedin_user = Auth::instance()->get_user();
     }
     $this->template->header_nav->site_name = Kohana::config('settings.site_name');
     // Header and Footer Blocks
     $this->template->header_block = $this->themes->admin_header_block();
     $this->template->footer_block = $this->themes->footer_block();
 }
开发者ID:nemmy,项目名称:Ushahidi_Web,代码行数:68,代码来源:admin.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     // Load cache
     $this->cache = new Cache();
     // Load session
     $this->session = new Session();
     // Load database
     $this->db = new Database();
     $upgrade = new Upgrade();
     $this->auth = new Auth();
     $this->session = Session::instance();
     $this->auth->auto_login();
     if (!$this->auth->logged_in('login')) {
         url::redirect('login');
     }
     // Set Table Prefix
     $this->table_prefix = Kohana::config('database.default.table_prefix');
     //fetch latest release of ushahidi
     $this->release = $upgrade->_fetch_core_release();
     if (!empty($this->release)) {
         $this->template->version = $this->_get_release_version();
         $this->template->critical = $this->release->critical;
     }
     // Get Session Information
     $this->user = new User_Model($_SESSION['auth_user']->id);
     $this->template->admin_name = $this->user->name;
     //make sure the user is supposed to be here:
     $group_id = groups::get_user_group($this->user);
     if (!$group_id) {
         url::redirect(url::site() . 'admin/simplegroups/nogroup');
     }
     //Get Group Info
     $groups = ORM::factory("simplegroups_groups")->join("simplegroups_groups_users", "simplegroups_groups.id", "simplegroups_groups_users.simplegroups_groups_id")->where("simplegroups_groups_users.users_id", $this->user->id)->find_all();
     foreach ($groups as $group) {
         $this->group = $group;
         $this->template->group_name = $group->name;
         $this->template->group_logo = $group->logo;
     }
     // Retrieve Default Settings
     $this->template->site_name = Kohana::config('settings.site_name');
     $this->template->mapstraction = Kohana::config('settings.mapstraction');
     $this->template->api_url = Kohana::config('settings.api_url');
     // Javascript Header
     $this->template->map_enabled = FALSE;
     $this->template->flot_enabled = FALSE;
     $this->template->treeview_enabled = FALSE;
     $this->template->protochart_enabled = FALSE;
     $this->template->colorpicker_enabled = FALSE;
     $this->template->editor_enabled = FALSE;
     $this->template->js = '';
     $this->template->form_error = FALSE;
     // Initialize some variables for raphael impact charts
     $this->template->raphael_enabled = FALSE;
     $this->template->impact_json = '';
     // Generate main tab navigation list.
     $this->template->main_tabs = admin::main_tabs();
     // Generate sub navigation list (in default layout, sits on right side).
     $this->template->main_right_tabs = admin::main_right_tabs($this->user);
     $this->template->this_page = "";
     // Load profiler
     // $profiler = new Profiler;
 }
开发者ID:rabbit09,项目名称:Taarifa_Web,代码行数:63,代码来源:admin_simplegroup.php


注:本文中的admin::main_tabs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。