function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'product_pic';
        $this->product_cat = pc_base::load_model('product_cat_model');
		parent::__construct();
	}
Exemple #2
0
 public function __construct()
 {
     $this->db_config = loadConfig('dbconfig');
     $this->db_setting = 'default';
     $this->table_name = 'session';
     parent::__construct();
 }
	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		parent::__construct();
		$this->url = pc_base::load_app_class('url', 'content');
		$this->siteid = get_siteid();
	}
 public function __construct()
 {
     parent::__construct();
     $setting = $this->db->table('payment_authorize')->get();
     $this->api_id = $setting['api_id'];
     $this->api_key = $setting['api_key'];
 }
Exemple #5
0
 public function __construct($db_config)
 {
     $this->db_config = array('ucenter' => $db_config);
     $this->db_setting = 'ucenter';
     $this->table_name = 'members';
     parent::__construct();
 }
 function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     $this->table_name = 'dianping_type';
     parent::__construct();
 }
 function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     $this->table_name = 'category_priv';
     parent::__construct();
 }
	function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		//$this->db_tablepre = $this->db_config[$this->db_setting]['tablepre'];
		$this->table_name = 'vote_option';
		parent::__construct();
	}
Exemple #9
0
 /**
  * The construct function.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->setAgent();
     $this->setApiRoot();
     $this->loadModel('tree');
 }
 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'comment';
     $this->table_name = 'comment_setting';
     parent::__construct();
 }
Exemple #11
0
 public function __construct()
 {
     parent::__construct();
     $this->db = $this->load->db->Mysqli();
     //$this->ramdom=new Ramdom();
     $this->dataMSG = new ArrayObject();
 }
Exemple #12
0
 public function __construct($par = null)
 {
     if (is_null($par)) {
         $this->mysql = db::getInstance();
         if (!empty($_POST['test']) && !empty($_POST['check'])) {
             $test_id = (int) $_POST['test'];
             $sum = 0;
             foreach ($_POST['check'] as $ch) {
                 $r = $this->mysql->executeQuery("SELECT `id_set` FROM `set_to_test` WHERE `id_set`=:set_id AND `id_test`=:test_id", array(array(':test_id', $test_id, 'integer'), array(':set_id', (int) $ch, 'integer')));
                 $sum += $r['rows'];
             }
             if ($sum < 1) {
                 foreach ($_POST['check'] as $ch) {
                     $this->mysql->executeQuery("INSERT INTO `set_to_test` (`id_test`, `id_set`) VALUES (:test_id, :set_id)", array(array(':test_id', $test_id, 'integer'), array(':set_id', (int) $ch, 'integer')));
                 }
                 $this->data['alert'] = array('type' => 'success', 'mess' => array('addtotest'));
             } else {
                 $this->data['alert'] = array('type' => 'warning', 'mess' => array('testanyet'));
             }
         }
         parent::__construct('adm_menu_set');
         $r = $this->mysql->executeQuery("SELECT `id_set`, `s_name` FROM `set`");
         while ($row = $r['stmt']->fetch(PDO::FETCH_ASSOC)) {
             $this->data['set'][] = $row;
         }
         $r = $this->mysql->executeQuery("SELECT `id_test`, `t_test_name` FROM `test`");
         if ($r['rows'] >= 1) {
             while ($row = $r['stmt']->fetch(PDO::FETCH_ASSOC)) {
                 $this->data['test'][] = $row;
             }
         }
     }
 }
 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'phpsso';
     $this->table_name = 'members';
     parent::__construct();
 }
Exemple #14
0
 /**
  * Construct function.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->now = time();
     $this->setSavePath();
     $this->setWebPath();
 }
Exemple #15
0
 /**
  * The construct function.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->setAgent();
     $this->setApiRoot();
     $this->classFile = $this->app->loadClass('zfile');
 }
 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     parent::__construct();
     $this->table_name = $this->db_tablepre . 'index_mapping';
 }
 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     $this->table_name = 'search';
     parent::__construct();
 }
Exemple #18
0
 public function __construct()
 {
     //调用其他数据库配置文件,操作其他数据库
     $this->db_config = System::load_sys_config('database');
     $this->db_setting = 'two';
     parent::__construct();
 }
	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'model';
		parent::__construct();
		$this->charset = $this->db_config[$this->db_setting]['charset'];
	}
Exemple #20
0
 public function __construct()
 {
     parent::__construct();
     $setting =& $this->model('common')->setting();
     if (in_array($setting['dict_cache'], array('redis', 'memcache'))) {
         $this->type = $setting['dict_cache'];
         $cache_set = array('host' => $setting[$this->type . '_host'], 'port' => $setting[$this->type . '_port']);
         $this->cache = $this->load('lib/cache_' . $this->type, $cache_set);
         if (!$this->cache->is_install()) {
             $this->error_report();
         } else {
             $status = $this->cache->connect();
             if (!$status) {
                 $this->error_report();
                 return false;
             }
             $status = $this->cache->auth($setting[$this->type . '_pswd']);
             if (!$status) {
                 $this->error_report();
                 return false;
             }
             $this->enable = true;
         }
     }
 }
 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'reviews';
     $this->table_name = $this->old_table_name = 'reviews_check';
     parent::__construct();
 }
Exemple #22
0
 /**
  * Connection to the database
  *
  */
 public function __construct()
 {
     $this->domain = $domain;
     parent::__construct();
     require FRAMEWORK . DS . 'conf' . DS . 'datastore.php';
     $config = $datastore[$this->datastore];
     if (!isset(self::$connection[$this->datastore])) {
         self::$connection[$this->datastore] = @ldap_connect($config['protocol'] . $config['domain']);
         if (!self::$connection[$this->datastore]) {
             throw new connectException('Could not connect to the Active Directory.');
         }
         ldap_set_option(self::$connection[$this->datastore], LDAP_OPT_REFERRALS, 0);
         ldap_set_option(self::$connection[$this->datastore], LDAP_OPT_PROTOCOL_VERSION, 3);
         if (!@ldap_bind(self::$connection[$this->datastore], $config['user'] . '@' . $config['domain'], $config['password'])) {
             throw new connectException('Could not bind to the Active Directory.');
         }
     }
     $this->con =& self::$connection[$this->datastore];
     $this->dn = $config['dn'];
     $config2 = $datastore[$this->datastore2];
     if (!isset(self::$connection[$this->datastore2])) {
         self::$connection[$this->datastore2] = @ldap_connect($config2['protocol'] . $config2['domain']);
         if (!self::$connection[$this->datastore2]) {
             throw new connectException('Could not connect to the Active Directory.');
         }
         ldap_set_option(self::$connection[$this->datastore2], LDAP_OPT_REFERRALS, 0);
         ldap_set_option(self::$connection[$this->datastore2], LDAP_OPT_PROTOCOL_VERSION, 3);
         if (!@ldap_bind(self::$connection[$this->datastore2], $config2['user'] . '@' . $config2['domain'], $config2['password'])) {
             throw new connectException('Could not bind to the Active Directory.');
         }
     }
     $this->con2 =& self::$connection[$this->datastore2];
     $this->dn2 = $config2['dn'];
     $this->attributes = array_keys($this->mapping);
 }
Exemple #23
0
 public function __construct($par = null)
 {
     $this->mysql = db::getInstance();
     if (!empty($_POST['train']) && !empty($_POST['group']) && !empty($_POST['id'])) {
         $this->mysql->executeQuery("UPDATE `user` SET `id_group`=:group WHERE `id_user`=:user_id", array(array(':group', (int) $_POST['group'], 'integer'), array(':user_id', (int) $_POST['id'], 'integer')));
         $this->data['alert'] = array('type' => 'success', 'mess' => array('userupdate'));
     }
     if (is_null($par)) {
         if (!empty($_POST['check']) && !empty($_POST['group'])) {
             $gr_id = (int) $_POST['group'];
             $sum = 0;
             foreach ($_POST['check'] as $ch) {
                 $r = $this->mysql->executeQuery("SELECT `id_user` FROM `user_to_group` WHERE `id_user`=:user_id AND `id_student_group`=:group_id", array(array(':user_id', (int) $ch, 'integer'), array(':group_id', $gr_id, 'integer')));
                 $sum += $r['rows'];
             }
             if ($sum < 1) {
                 foreach ($_POST['check'] as $ch) {
                     $this->mysql->executeQuery("INSERT INTO `user_to_group` (`id_user`, `id_student_group`) VALUES (:user_id, :group_id)", array(array(':user_id', (int) $ch, 'integer'), array(':group_id', $gr_id, 'integer')));
                 }
                 $this->data['alert'] = array('type' => 'success', 'mess' => array('addtogroup'));
             } else {
                 $this->data['alert'] = array('type' => 'warning', 'mess' => array('user_yet_gr'));
             }
         }
         parent::__construct('adm_tabs_users');
         $r = $this->mysql->executeQuery("SELECT `id_user`, `u_username`, `u_name`,`u_sname`,`id_group`, `u_reg_date` FROM `user`");
         while ($row = $r['stmt']->fetch(PDO::FETCH_ASSOC)) {
             $this->data['users'][$row['id_user']] = $row;
             $this->data['users'][$row['id_user']]['u_training_name'] = '-';
             $this->data['users'][$row['id_user']]['u_reg_date'] = date("d.m.y G:i", $this->data['users'][$row['id_user']]['u_reg_date']);
         }
         $r = $this->mysql->executeQuery("SELECT `id_user`, `sg_name` FROM `user_to_group` JOIN `student_group` USING (`id_student_group`) ");
         while ($row = $r['stmt']->fetch(PDO::FETCH_ASSOC)) {
             $this->data['users'][$row['id_user']]['u_training_name'] = $row['sg_name'];
         }
         $r = $this->mysql->executeQuery("SELECT `id_student_group`, `sg_name` FROM `student_group`");
         if ($r['rows'] >= 1) {
             while ($row = $r['stmt']->fetch(PDO::FETCH_ASSOC)) {
                 $this->data['group'][] = $row;
             }
         }
     } else {
         parent::__construct('adm_smen_uconf');
         $id = (int) $par;
         $r = $this->mysql->executeQuery("SELECT `u_username`, `u_name`,`u_sname` FROM `user` WHERE `id_user`=:user_id LIMIT 1", array(array(':user_id', $id, 'integer')));
         if ($r['rows'] === 1) {
             foreach ($r['stmt']->fetch(PDO::FETCH_ASSOC) as $k => $v) {
                 $this->data[$k] = $v;
             }
             $r = $this->mysql->executeQuery("SELECT `id_student_group`, `sg_name` FROM `student_group`");
             while ($row = $r['stmt']->fetch(PDO::FETCH_ASSOC)) {
                 $this->data['stud_group'][] = $row;
             }
             $this->data['id'] = $id;
         } else {
             header('Location: ' . DIRURL . 'admin/users');
         }
     }
 }
 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     $this->table_name = 'orders';
     //仅仅需要修改这里的对应的表名,不带前缀
     parent::__construct();
 }
Exemple #25
0
 /**
  * Construct 
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->cacheRoot = $this->app->getTmpRoot() . 'cache';
     if (!is_dir($this->cacheRoot)) {
         mkdir($this->cacheRoot, 0755, true);
     }
 }
Exemple #26
0
 public function __construct($data_post = null)
 {
     parent::__construct('adm_main');
     if (empty($_SESSION['admin_welcome'])) {
         $this->data['alert'] = array('type' => 'info', 'mess' => array('welcome'));
     }
     $_SESSION['admin_welcome'] = true;
 }
Exemple #27
0
 public function __construct()
 {
     $this->setting = 'default';
     $this->table_name = 'message';
     $this->_username = cookie('_username');
     $this->_userid = cookie('_userid');
     parent::__construct();
 }
Exemple #28
0
 public function __construct()
 {
     parent::__construct();
     $this->main_lang =& $this->model('common')->main_lang();
     $current_lang = cookie('lang');
     !$current_lang && ($current_lang = $this->main_lang);
     $this->current_lang = $current_lang;
 }
 	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->header = "<\x3Fxml version=\"1.0\" encoding=\"UTF-8\"\x3F>\n\t<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">";
	    $this->charset = "UTF-8";
	    $this->footer = "\t</urlset>\n";
	    $this->items = array();
		parent::__construct();
	}
	function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'message';
		$this->_username = param::get_cookie('_username');
		$this->_userid = param::get_cookie('_userid');
		parent::__construct();
	}