__construct() public method

public __construct ( BaseActiveRecord $model, BaseAdminController $controller )
$model BaseActiveRecord
$controller BaseAdminController
Beispiel #1
0
 public function __construct()
 {
     parent::__construct();
     if ($this->site_config['diy_url'] != 2) {
         $this->show_message('生成静态功能是收费的', 2, 'http://www.xiaocms.com/buy/');
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (isset($_POST['submit_add'])) {
         $this->AddNewUser();
     } else {
         if (isset($_GET['action']) && $_GET['action'] == "edit" && isset($_GET['id']) && is_numeric($_GET['id'])) {
             if (isset($_POST['submit_edit'])) {
                 $this->UpdateUser();
             } else {
                 $info_array = array("where" => "user_id='" . $_GET['id'] . "'");
                 $this->data = $this->GetSingleRecord("user_master", $info_array);
             }
         } else {
             if (isset($_GET['action']) && $_GET['action'] == "status" && isset($_GET['status']) && is_numeric($_GET['status']) && isset($_GET['id']) && $_GET['id'] > 1) {
                 $info_array = array("active_status" => $_GET['status']);
                 $records = $this->UpdateRecord("user_master", $info_array, "user_id='" . $_GET['id'] . "'");
                 if ($records > 0) {
                     $_SESSION['admin_response'] = array("status" => "success", "message" => " Active status has been changed successfully.");
                 }
                 $this->RedirectPage($this->pagefilename);
             } else {
                 if (isset($_GET['action']) && $_GET['action'] == "delete" && isset($_GET['id']) && $_GET['id'] > 1) {
                     $records = $this->DeleteRecord("user_master", "user_id='" . $_GET['id'] . "'");
                     if ($records > 0) {
                         $_SESSION['admin_response'] = array("status" => "success", "message" => " Record has been deleted successfully.");
                     }
                     $this->RedirectPage($this->pagefilename);
                 } else {
                     $this->DisplayData();
                 }
             }
         }
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->StatisticData();
     $this->LatestUsers();
     $this->LatestMessages();
 }
Beispiel #4
0
 public function __construct()
 {
     parent::__construct();
     $this->load->helper(array('url', 'form'));
     $this->load->library(array('session'));
     $this->load->model('M_tags');
 }
 public function __construct()
 {
     parent::__construct();
     $this->load->model("admin/model_vendor_user");
     $this->load->model("admin/model_vendor_user_region");
     $this->config->load("auth");
 }
Beispiel #6
0
 public function __construct($arrayRestFolder = NULL)
 {
     parent::__construct($arrayRestFolder);
     if ($arrayRestFolder != NULL) {
         $this->arrayRestFolder = $arrayRestFolder;
         $this->arrayVariable = Navigation::getVariableArraySlug($this->arrayRestFolder);
     }
     $this->module = DataHandler::getValueByArrayIndex($this->arrayVariable, "module") ? DataHandler::getValueByArrayIndex($this->arrayVariable, "module") : "theme";
     switch ($this->module) {
         case "style":
             $this->DAO = StyleDAO::getInstance();
             break;
         case "technique":
             $this->DAO = TechniqueDAO::getInstance();
             break;
         case "type":
             $this->DAO = TypeDAO::getInstance();
             break;
         case "format":
             $this->DAO = FormatDAO::getInstance();
             break;
         case "composition":
             $this->DAO = CompositionDAO::getInstance();
             break;
         case "theme":
             $this->DAO = ThemeDAO::getInstance();
             break;
         default:
             $this->DAO = ThemeDAO::getInstance();
             break;
     }
 }
Beispiel #7
0
 public function __construct()
 {
     parent::__construct();
     $this->CI =& get_instance();
     $this->load->library('form_validation');
     $this->load->model('config_model');
 }
Beispiel #8
0
 public function __construct()
 {
     parent::__construct();
     if (!defined('XIAOCMS_MEMBER')) {
         $this->show_message('没有安装会员模块,请去XiaoCms下载安装', 2, 'http://www.xiaocms.com');
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->link = $this->model('linkage');
     $this->level = 0;
     $this->childnode = array();
 }
Beispiel #10
0
 public function __construct()
 {
     parent::__construct();
     //Load Dependencies
     $this->load->model("admin/model_pm");
     $this->load->model("admin/model_pm_history");
 }
Beispiel #11
0
 public function __construct()
 {
     parent::__construct();
     \CI::auth()->check_access('Admin', true);
     \CI::load()->model('Locations');
     \CI::lang()->load('locations');
 }
Beispiel #12
0
 function __construct()
 {
     parent::__construct();
     \CI::auth()->check_access('Admin', true);
     \CI::lang()->load('categories');
     \CI::load()->model('Categories');
 }
Beispiel #13
0
 public function __construct()
 {
     parent::__construct();
     $this->block = $this->model('block');
     $this->type = array(1 => lang('a-blo-0'), 2 => lang('a-blo-1'), 3 => lang('a-blo-2'));
     $this->view->assign('type', $this->type);
 }
Beispiel #14
0
 public function __construct()
 {
     parent::__construct();
     \CI::auth()->check_access('Admin', true);
     \CI::load()->model(['Categories', 'Products', 'Pages']);
     \CI::lang()->load('sitemap');
 }
Beispiel #15
0
 public function __construct($path)
 {
     parent::__construct($path);
     $this->CheckAction();
     //权限验证
     $this->update_path = ROOT . 'upgrade/';
 }
Beispiel #16
0
 public function __construct()
 {
     parent::__construct();
     \CI::load()->model(array('Customers', 'Locations'));
     \CI::load()->helper('formatting_helper');
     \CI::lang()->load('customers');
 }
Beispiel #17
0
 public function __construct()
 {
     parent::__construct();
     if ($this->action == 'index') {
         $this->redirect(url('admin/model/index', array('typeid' => 3)));
     }
     $this->cid = (int) $this->get('cid');
     $formmodel = $this->get_model('form');
     $this->modelid = (int) $this->get('modelid');
     if (empty($this->modelid)) {
         $this->adminMsg(lang('a-for-1'));
     }
     $this->model = $formmodel[$this->modelid];
     if (empty($this->model)) {
         $this->adminMsg(lang('a-for-2', array('1' => $this->modelid)));
     }
     $this->table = $this->model['tablename'];
     $this->form = $this->model($this->table);
     $joinmodel = $this->cache->get('model_join_' . $this->siteid);
     $this->join = isset($joinmodel[$this->model['joinid']]) ? $joinmodel[$this->model['joinid']] : null;
     $join_info = lang('a-for-3');
     if ($this->join) {
         $join_info = lang('a-for-4', array('1' => $this->join['modelname']));
         if ($this->join['typeid'] == 1) {
             $join_info = '<a href="' . url('admin/content/', array('modelid' => $this->join['modelid'])) . '">' . lang('a-for-4', array('1' => $this->join['modelname'])) . '</a>';
         }
     }
     $this->view->assign(array('cid' => $this->cid, 'model' => $this->model, 'modelid' => $this->modelid, 'join_info' => $join_info));
 }
Beispiel #18
0
 public function __construct()
 {
     parent::__construct();
     $this->load->database();
     $this->load->model('media_model');
     $this->medialib = new Library\Media\Media();
 }
Beispiel #19
0
 public function __construct()
 {
     parent::__construct();
     \CI::auth()->check_access('Admin', true);
     \CI::load()->model('Coupons');
     \CI::load()->model('products');
     \CI::lang()->load('coupons');
 }
Beispiel #20
0
 public function __construct($arrayRestFolder = NULL)
 {
     parent::__construct();
     if ($arrayRestFolder != NULL) {
         $this->arrayRestFolder = $arrayRestFolder;
         $this->arrayVariable = Navigation::getVariableArraySlug($this->arrayRestFolder);
     }
 }
Beispiel #21
0
 public function __construct()
 {
     parent::__construct();
     \CI::load()->model('GiftCards');
     \CI::load()->helper('form');
     \CI::load()->library('form_validation');
     \CI::lang()->load('gift_cards');
 }
Beispiel #22
0
 function __construct()
 {
     parent::__construct();
     \CI::auth()->check_access('Admin', true);
     \CI::load()->model(['Orders', 'Search']);
     \CI::load()->helper(array('formatting'));
     \CI::lang()->load('reports');
 }
Beispiel #23
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('media_model');
     $this->load->model('category_model');
     $this->load->model('user/Mod_user');
     $this->medialib = new Library\Media\Media();
 }
 public function __construct()
 {
     parent::__construct();
     $this->load->library('round_robin');
     $this->load->model('admin/model_user');
     $this->load->model('admin/model_task');
     $this->load->library('table');
 }
Beispiel #25
0
 public function __construct()
 {
     parent::__construct();
     \CI::auth()->check_access('Admin', true);
     \CI::load()->model(['Messages', 'Pages', 'Locations']);
     \CI::lang()->load('settings');
     \CI::load()->helper('inflector');
 }
Beispiel #26
0
 public function __construct()
 {
     parent::__construct();
     $this->dir = TEMPLATE_DIR . SYS_THEME_DIR;
     if (file_exists($this->dir . 'config.php')) {
         $this->file_info = (include $this->dir . 'config.php');
     }
 }
Beispiel #27
0
 public function __construct()
 {
     parent::__construct();
     \CI::auth()->check_access('Admin', true);
     \CI::load()->model(['Products', 'Categories']);
     \CI::load()->helper('form');
     \CI::lang()->load('products');
 }
Beispiel #28
0
 public function __construct($opts = [])
 {
     parent::__construct($opts);
     $this->limit = (int) RM::get("limit", 10);
     $this->page = RM::get("page", 1);
     $this->start = RM::get("start", date('Y-m-d'));
     $this->end = RM::get("end", date('Y-m-d', strtotime('now')));
 }
Beispiel #29
0
 public function __construct()
 {
     parent::__construct();
     if ($this->config['SYS_MEMBER']) {
         $this->adminMsg('系统禁止了会员功能');
     }
     $this->mgroup = $this->model('member_group');
 }
 public function __construct()
 {
     parent::__construct();
     $this->tree = $this->instance('tree');
     $this->table = 'content_' . $this->siteid;
     $this->verify = $this->model('content_' . $this->siteid . '_verify');
     $this->tree->config(array('id' => 'catid', 'parent_id' => 'parentid', 'name' => 'catname'));
 }