Beispiel #1
0
 public function Admin_links()
 {
     parent::__construct();
     $this->user->require_group("Administrators");
     $this->load->model('users');
     $this->load->model('links');
 }
Beispiel #2
0
 function admin_install()
 {
     parent::__construct();
     if ($this->is_installed()) {
         redirect("/", 'location');
     }
 }
Beispiel #3
0
 function Admin_files()
 {
     parent::__construct();
     if (!$this->user->is_member_of("Administrators")) {
         die;
     }
 }
 public function Admin_themes()
 {
     parent::__construct();
     $this->user->require_group("Administrators");
     $this->load->model('users');
     $this->load->model('modules_db');
 }
Beispiel #5
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  *         http://example.com/index.php/welcome
  *    - or -  
  *         http://example.com/index.php/welcome/index
  *    - or -
  * Since this controller is set as the default controller in 
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 public function Admin_ajax()
 {
     parent::__construct();
     $this->load->model('users');
     //$this->load->model('blocks');
     //$this->load->model('versions');
     $this->user =& $this->users->get_current_user();
 }
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  *         http://example.com/index.php/welcome
  *    - or -
  *         http://example.com/index.php/welcome/index
  *    - or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 function __construct()
 {
     parent::__construct();
     $this->load->model('builderengine');
     if ($this->builderengine->get_option('user_dashboard_activ') != 'yes') {
         redirect("/", 'location');
     }
 }
Beispiel #7
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  *         http://example.com/index.php/welcome
  *    - or -
  *         http://example.com/index.php/welcome/index
  *    - or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 function __construct()
 {
     parent::__construct();
     $this->user->is_verified();
     $this->load->model('builderengine');
     if ($this->builderengine->get_option('user_dashboard_activ') != 'yes') {
         redirect("/", 'location');
     }
     if ($this->builderengine->get_option('user_dashboard_blog') != 'yes') {
         redirect("user/main/dashboard", 'location');
     }
 }
Beispiel #8
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  *         http://example.com/index.php/welcome
  *    - or -
  *         http://example.com/index.php/welcome/index
  *    - or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 public function Admin_main()
 {
     parent::__construct();
     if ($this->uri->segment(3) != 'login' && $this->uri->segment(3) != 'recover_password' && $this->uri->segment(3) != 'logout') {
         $this->user->require_group("Administrators");
     } else {
         if ($this->uri->segment(3) == 'login') {
             if ($this->user->is_logged_in()) {
                 redirect("/admin/main/dashboard", 'location');
             }
         }
     }
 }
Beispiel #9
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  *         http://example.com/index.php/welcome
  *    - or -
  *         http://example.com/index.php/welcome/index
  *    - or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 function __construct()
 {
     parent::__construct();
     $this->load->model('builderengine');
     if ($this->builderengine->get_option('user_dashboard_activ') != 'yes') {
         redirect("/", 'location');
     }
     if ($this->uri->segment(1) == 'login' && $this->uri->segment(2)) {
         $module_id = $this->uri->segment(2);
         $this->load->model('module');
         $module = $this->module->get();
         foreach ($module->all as $key => $value) {
             if ($value->id == $module_id) {
                 /* first method */
                 if (file_exists(FCPATH . 'modules/' . $value->folder . '/controllers/' . $value->folder . '.php') && method_exists($value->folder, 'login') && is_callable(array($value->folder, 'login'))) {
                     redirect(base_url($value->folder . '/login'), 'location');
                 }
                 /* second method */
                 // switch ($value->folder) {
                 //     case 'page':
                 //         break;
                 //     case 'blog':
                 //         break;
                 //     case 'builderpayment':
                 //         break;
                 //     default:
                 //        redirect(base_url($value->folder.'/login'), 'location');
                 // }
             }
         }
     }
     if ($this->uri->segment(1) == 'login') {
         if ($this->user->is_logged_in()) {
             redirect("/user/main/dashboard", 'location');
         } else {
             redirect("/user/main/userLogin", 'location');
         }
     }
 }
 function BE_Controller()
 {
     $this->page_path = false;
     global $active_controller;
     global $active_show;
     $active_controller = $this;
     parent::__construct();
     $this->load->helper("url");
     if (!$this->is_installed() && $this->uri->segment(2) != "install" && $this->uri->segment(1) != "api") {
         redirect('/admin/install/index', 'location');
     }
     if ($this->is_installed()) {
         $this->load->database();
         @$this->load->library('datamapper');
     }
     if (!$active_show) {
         $this->show = new Show($this);
     } else {
         $this->show =& $active_show;
     }
     $this->load->model('BuilderEngine');
     $this->load->model('users');
     if ($this->is_installed()) {
         $this->load->model('user');
         global $cache;
         $this->load->model("cache");
         $cache = $this->cache;
         $this->BuilderEngine->load_settings();
         if (!EventManager::is_initialized() && !EventManager::is_initializing()) {
             EventManager::set_initializing(true);
             $this->load->model('module');
             $modules = $this->module;
             // $modules = new Module();
             foreach ($modules->get() as $module) {
                 if ($module->folder == "module_system") {
                     continue;
                 }
                 Modules::run($module->folder . "/register_events");
             }
             EventManager::set_initialized(true);
         }
         if (self::$s_user == null) {
             self::$s_user = new User();
             $session = $this->session;
             self::$s_user->_init($session);
         }
         $user_model = $this->users;
         global $user;
         $user = self::$s_user;
         $this->user =& self::$s_user;
         $CI =& get_instance();
         $this->load->model('links');
         $this->links_array = $this->links->get();
         foreach ($this->links_array as $link) {
             $link->target = str_replace("%site_root%", home_url('/'), $link->target);
         }
     }
     $this->BuilderEngine->set_option("active_backend_theme", "dashboard", false);
     $this->load->library('module_parser');
     $this->load->library('parser');
     //$this->BuilderEngine->activate_theme("default");
     //echo $this->get_page_path();
     $this->load->module("layout_system");
     $this->layout_system->load->model("blocks");
     $this->layout_system->load->model('versions');
     $this->versions =& $this->layout_system->versions;
     if ($this->is_installed()) {
         $this->load->model('Module');
         $this->load->model('Group');
         $this->load->model('Group_module_permission');
     }
 }
Beispiel #11
0
 public function Admin_themes()
 {
     parent::__construct();
     $this->load->model('users');
     $this->load->model('modules_db');
 }
Beispiel #12
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  * 		http://example.com/index.php/welcome
  *	- or -
  * 		http://example.com/index.php/welcome/index
  *	- or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 public function seo()
 {
     parent::__construct();
 }
Beispiel #13
0
 public function __construct()
 {
     parent::__construct();
     $this->user->require_group("Administrators");
 }
Beispiel #14
0
 function Admin()
 {
     parent::__construct();
     $this->show->set_default_breadcrumb(0, "Blog", "/admin/module/blog/show_posts");
 }
Beispiel #15
0
 public function Admin_links()
 {
     parent::__construct();
     $this->load->model('users');
     $this->load->model('links');
 }
Beispiel #16
0
 function Admin()
 {
     parent::__construct();
     $this->show->set_default_breadcrumb(0, "Pages", "/admin/module/page/show_pages");
 }
Beispiel #17
0
 public function module_blog()
 {
     parent::__construct();
 }
Beispiel #18
0
 public function ajax()
 {
     parent::__construct();
     $this->load->model('communication');
 }