示例#1
0
 function __construct()
 {
     parent::__construct();
     $this->init("anggota", "id", "nomor_anggota");
     $this->load->model("pinjaman");
     $this->load->model("tabungan");
 }
示例#2
0
 public function __construct()
 {
     $this->db_tablepre = 't_wechat_';
     // 不设置默认为t_sys_
     $this->table_name = 'config';
     parent::__construct();
 }
示例#3
0
 public function __construct()
 {
     $this->db_tablepre = 'ci_';
     $this->table_name = 'game_rank';
     parent::__construct();
     $this->mode_table_name = $this->table_name;
 }
 /**
  * Constructs a Question_Type_Model while setting attribute types.
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     //setting attribute types.
     settype($this->id, "integer");
     settype($this->name, "string");
 }
 public function __construct()
 {
     parent::__construct();
     $this->users_table = "users";
     $this->roles_table = "roles";
     $this->zones_table = "zones";
     $this->areas_table = "areas";
     $this->brands_table = "brands";
     $this->profiles_table = "profiles";
     $this->credit_limit_table = "credit_limit";
 }
示例#6
0
 public function paginate($page = 1, $where = array(), $limit = 10)
 {
     // get filtered results
     $where = array_merge($where, $this->where);
     $offset = $page <= 1 ? 0 : ($page - 1) * $limit;
     $this->db->limit($limit, $offset);
     $results = parent::get_many_by($where);
     // get counts (e.g. for pagination)
     $count_results = count($results);
     $count_total = parent::count_by($where);
     $total_pages = ceil($count_total / $limit);
     $counts = array('from_num' => $count_results == 0 ? 0 : $offset + 1, 'to_num' => $count_results == 0 ? 0 : $offset + $count_results, 'total_num' => $count_total, 'curr_page' => $page, 'total_pages' => $count_results == 0 ? 1 : $total_pages, 'limit' => $limit);
     return array('data' => $results, 'counts' => $counts);
 }
示例#7
0
 function __construct()
 {
     parent::__construct();
     // Setup allowed tables
     $this->load->config('khaos', true, true);
     $options = $this->config->item('acl', 'khaos');
     $this->_TABLES = $options['tables'];
     $this->_TABLES['groups'] = $this->config->item('backendpro_table_prefix') . "groups";
     $this->_TABLES['resources'] = $this->config->item('backendpro_table_prefix') . "resources";
     // Setup ACO Model
     $this->resource = new Nested_sets_model();
     $this->resource->setControlParams($this->_TABLES['acos']);
     $this->resource->setPrimaryKeyColumn('id');
     // Setup ARO Model
     $this->group = new Nested_sets_model();
     $this->group->setControlParams("n_" . $this->_TABLES['aros']);
     $this->group->setPrimaryKeyColumn('id');
     log_message('debug', 'BackendPro : Access_control_model class loaded');
 }
示例#8
0
 public function paginate($page = 1, $where = array(), $limit = NULL)
 {
     // decide per-page limit by: 1) $this->limit; 2) a default value (10)
     if (!empty($this->limit) && $limit === NULL) {
         $limit = $this->limit;
     } else {
         if ($limit === NULL) {
             $limit = 10;
         }
     }
     // avoid overrided by $this->limit
     $this->limit = NULL;
     // get filtered results
     $where = array_merge($where, $this->where);
     $offset = $page <= 1 ? 0 : ($page - 1) * $limit;
     $this->db->limit($limit, $offset);
     $results = parent::get_many_by($where);
     // get counts (e.g. for pagination)
     $count_results = count($results);
     $count_total = parent::count_by($where);
     $total_pages = ceil($count_total / $limit);
     $counts = array('from_num' => $count_results == 0 ? 0 : $offset + 1, 'to_num' => $count_results == 0 ? 0 : $offset + $count_results, 'total_num' => $count_total, 'curr_page' => $page, 'total_pages' => $count_results == 0 ? 1 : $total_pages, 'limit' => $limit);
     return array('data' => $results, 'counts' => $counts);
 }
 public function __construct()
 {
     $this->db_tablepre = 'ci_';
     $this->table_name = 'wx_keywords';
     parent::__construct();
 }
示例#10
0
 public function __construct()
 {
     parent::__construct('article_cat');
 }
示例#11
0
 function __construct()
 {
     parent::__construct('players', 'player');
 }
示例#12
0
 function __construct()
 {
     $this->db_tablepre = 'tb_';
     $this->table_name = 'member_role_priv';
     parent::__construct();
 }
示例#13
0
 public function __construct()
 {
     parent::__construct();
     $this->loadConnection('default');
     $this->logger->write('info', 'model: Agama');
 }
 function __construct()
 {
     parent::__construct('transactions', 'datetime');
 }
示例#15
0
 public function __construct()
 {
     parent::__construct();
 }
示例#16
0
 public function __construct()
 {
     parent::__construct();
     $this->table_name = "tb_alarm_mon";
 }
示例#17
0
 public function __construct()
 {
     parent::__construct();
     $this->_path = isset($this->name) ? base_url() . DIR_APPS . '/' . DIR_APP . '/modules/' . $this->name . '/' : false;
     $this->_localPath = isset($this->name) ? $this->name . DS : false;
 }
示例#18
0
 function update_user_role($user_id, $role_ids)
 {
     $this->_db()->delete('user_role', array('user_id' => $user_id));
     if (!empty($role_ids)) {
         if (!is_array($role_ids)) {
             $role_ids = array($role_ids);
         }
         foreach ($role_ids as $role_id) {
             if (!empty($role_id)) {
                 $role_id = empty($role_id) ? 0 : $role_id;
                 $user_role = array('user_id' => $user_id, 'role_id' => $role_id);
                 Base_Model::before_save($user_role);
                 $this->_db()->insert('user_role', $user_role);
             }
         }
     }
 }
示例#19
0
	/**
	 * __construct : ctor
	 * 
	 * @access public
	 * @return void
	 */
	public function __construct() {
		parent::__construct();
		$this->load->database();
	}
 function __construct()
 {
     parent::__construct('movements', 'datetime');
 }
示例#21
0
 public function __construct()
 {
     parent::__construct();
     $this->table_name = "tb_locarea_info";
 }
示例#22
0
 /**
  * Tracker Model Constructor
  *
  * @access	public
  */
 public function __construct()
 {
     parent::__construct();
     $this->set_table('tracker');
 }
示例#23
0
 function update_tag($tags, $id)
 {
     $CI =& get_instance();
     if (!is_array($tags)) {
         $tags = array($tags);
     }
     $this->db->where(array($this->_name . '_id' => $id));
     $this->db->delete('tag_' . $this->_name);
     foreach ($tags as $tag) {
         if (!empty($tag)) {
             $tag_id = $CI->_model('tag')->add($tag);
             if (!empty($tag_id)) {
                 $obj_tag = array('tag_id' => $tag_id, $this->_name . '_id' => $id);
                 Base_Model::before_save($obj_tag);
                 $this->db->insert('tag_' . $this->_name, $obj_tag);
             }
         }
     }
 }
示例#24
0
 public function __construct()
 {
     parent::__construct();
     $this->table_name = "tb_department_info";
 }
示例#25
0
 /**
  * Article Model Constructor
  *
  * @access	public
  */
 public function __construct()
 {
     // Call the Model constructor
     parent::__construct();
 }
示例#26
0
 public function __construct()
 {
     parent::__construct();
     $this->table_name = "tb_dep_ru_prohibit";
 }
示例#27
0
 public function __construct()
 {
     $this->table_name = 'operator_info';
     parent::__construct();
 }
示例#28
0
 public function __construct()
 {
     $this->table_name = 'member';
     parent::__construct();
 }
示例#29
0
文件: ads.php 项目: nmadipati/si-ksc
 public function __construct()
 {
     parent::__construct();
     $this->loadConnection('default');
 }
示例#30
0
 public function __construct()
 {
     $this->table_name = 'times';
     parent::__construct();
 }