function listing()
 {
     $user_id = $this->session->userdata('admin_data')['id'];
     $this->_fields = "sf.*,u.name";
     $this->db->from('submitted_forms sf');
     $this->db->join('users u', 'u.id=sf.client_id');
     if ($user_id != 8) {
         $this->db->where('client_id', $user_id);
     }
     foreach ($this->criteria as $key => $value) {
         if (!is_array($value) && strcmp($value, '') === 0) {
             continue;
         }
         switch ($key) {
             case 'sf.title':
                 $this->db->like('sf.title', $value);
                 break;
             case 'u.name':
                 $this->db->like('u.name', $value);
                 break;
             case 'sf.created_date':
                 $this->db->like('sf.created_date', $value);
                 break;
         }
     }
     return parent::listing();
 }
Example #2
0
 function listing()
 {
     $date = date('Y-m-d');
     $this->_fields = "so.id,so.customer_id,so.order_status,so.created_date,so.total_amount,so.total_items,so.payment_type,u.name";
     $this->db->from('sales_order so');
     $this->db->join('users u', 'so.customer_id=u.id');
     foreach ($this->criteria as $key => $value) {
         if (!is_array($value) && strcmp($value, '') === 0) {
             continue;
         }
         switch ($key) {
             case 'id':
                 $this->db->like('so.id', $value);
                 break;
             case 'name':
                 $this->db->like('u.name', $value);
                 break;
             case 'order_status':
                 $this->db->like('so.order_status', $value);
                 break;
             case 'payment_type':
                 $this->db->like('so.payment_type', $value);
                 break;
         }
     }
     return parent::listing();
 }
Example #3
0
 function listing()
 {
     $this->_fields = "*";
     //from
     $this->db->from($this->_table);
     //joins
     //where
     foreach ($this->criteria as $key => $value) {
         if (!is_array($value) && strcmp($value, '') === 0) {
             continue;
         }
         switch ($key) {
             case 'product_name':
                 $this->db->like("jwb_views.product_name", $value);
                 break;
             case 'description':
                 $this->db->like("jwb_views.description", $value);
                 break;
             case 'price':
                 $this->db->like("jwb_views.price", $value);
                 break;
         }
     }
     return parent::listing();
 }
Example #4
0
 function listing()
 {
     $user_id = $this->session->userdata('admin_data')['id'];
     $role = $this->session->userdata('admin_data')['role'];
     if ($role == '2') {
         $user_id = $this->session->userdata('admin_data')['id'];
     } else {
         $user_id = '8';
     }
     $id = $this->session->userdata('id');
     $this->_fields = "*,id as id, IF(is_display='1','Active','Inactive') as is_display";
     if ($role == '2') {
         $this->db->where('created_user', $user_id);
     } else {
         $this->db->where('updated_user', $user_id);
     }
     foreach ($this->criteria as $key => $value) {
         if (!is_array($value) && strcmp($value, '') === 0) {
             continue;
         }
         switch ($key) {
             case 'title':
                 $this->db->like($key, $value);
                 break;
         }
     }
     return parent::listing();
 }
Example #5
0
 /**
  * Get the collection class name for the collection of entities
  * @return string
  */
 protected function _getCollectionClass()
 {
     if (null == $this->_collectionClass) {
         $this->setCollectionClass(App_Model::getClassSibling($this, App_Model::MODEL_TYPE_COLLECTION));
     }
     return $this->_collectionClass;
 }
Example #6
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 't_iujk';
     $this->column_primary = 'iujk_id';
     $this->column_order = '';
     $this->column_unique = 'iujk_kodepos';
 }
Example #7
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'master_user';
     $this->column_primary = 'ID_USER';
     $this->column_order = '';
     $this->column_unique = '';
 }
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'ijin_lokasi_inti';
     $this->column_primary = 'ID_IJIN_LOKASI_INTI';
     $this->column_order = '';
     $this->column_unique = '';
 }
Example #9
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'trayek';
     $this->column_primary = 'ID_TRAYEK';
     $this->column_order = 'ID_TRAYEK ASC';
     $this->column_unique = '';
 }
Example #10
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'trotoar';
     $this->column_primary = 'ID_TROTOAR';
     $this->column_order = 'ID_TROTOAR DESC';
     $this->column_unique = '';
 }
 function __construct()
 {
     parent::__construct();
     $this->table_name = 't_apotek_asisten';
     $this->column_primary = 'asisten_id';
     $this->column_order = '';
     $this->column_unique = '';
 }
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'iuiphhk_rencana_alat';
     $this->column_primary = 'ID_RENCANA_ALAT';
     $this->column_order = '';
     $this->column_unique = '';
 }
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'iuiphhk_rencana_produksi';
     $this->column_primary = 'ID_RENCANA_PRODUKSI';
     $this->column_order = '';
     $this->column_unique = '';
 }
Example #14
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'sppl';
     $this->column_primary = 'ID_SPPL';
     $this->column_order = 'ID_SPPL ASC';
     $this->column_unique = '';
 }
Example #15
0
 /**
     Update - automatically called by RedBean when stored.
 */
 public function update()
 {
     parent::update();
     $test = R::findOne("subscription", "email=? and id<>?", array($this->email, $this->id));
     if ($test) {
         $this->bean->id = $test->id;
     }
 }
Example #16
0
 /**
  * 单例模式
  * @return App_Model
  */
 public static function &instance()
 {
     if (!isset(self::$instance)) {
         // Create a new instance
         self::$instance = new App_Model();
     }
     return self::$instance;
 }
Example #17
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'master_ijin';
     $this->column_primary = 'id';
     $this->column_order = 'id ASC';
     $this->column_unique = '';
 }
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'master_syarat';
     $this->column_primary = 'ID_SYARAT';
     $this->column_order = '';
     $this->column_unique = '';
 }
Example #19
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 't_ipmbl_dok';
     $this->column_primary = 'dok_ipmbl_id';
     $this->column_order = '';
     $this->column_unique = '';
 }
Example #20
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'sktr';
     $this->column_primary = 'ID_SKTR';
     $this->column_order = 'ID_SKTR ASC';
     $this->column_unique = '';
 }
Example #21
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'iuiphhk';
     $this->column_primary = 'ID_IUIPHHK';
     $this->column_order = 'ID_IUIPHHK ASC';
     $this->column_unique = '';
 }
Example #22
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'ijin_prinsip';
     $this->column_primary = 'ID_IJIN_PRINSIP';
     $this->column_order = 'ID_IJIN_PRINSIP';
     $this->column_unique = '';
 }
Example #23
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 't_idam_det';
     $this->column_primary = 'det_idam_id';
     $this->column_order = '';
     $this->column_unique = '';
 }
 function __construct()
 {
     parent::__construct();
     $this->table_name = 't_iujt_ceklist';
     $this->column_primary = 'iujt_cek_id';
     $this->column_order = '';
     $this->column_unique = '';
 }
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'cek_list_sppl';
     $this->column_primary = 'ID_IJIN';
     $this->column_order = '';
     $this->column_unique = '';
 }
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'ijin_lingkungan_inti';
     $this->column_primary = 'ID_IJIN_LINGKUNGAN_INTI';
     $this->column_order = '';
     $this->column_unique = '';
 }
Example #27
0
 function __construct()
 {
     parent::__construct();
     $this->table_name = 'm_pemohon';
     $this->column_primary = 'pemohon_id';
     $this->column_order = 'pemohon_id';
     $this->column_unique = '';
 }
Example #28
0
 /**
  * Returns the dbTable object
  * @return App_Db_Table
  */
 public function getDbTable()
 {
     if (null == $this->_dbTable) {
         if (!($class = $this->_dbTableClass)) {
             $class = App_Model::getClassSibling($this, App_Model::MODEL_TYPE_DBTABLE);
         }
         $this->_dbTable = new $class();
     }
     return $this->_dbTable;
 }
Example #29
0
 /**
  * Calls the parent constructor then loads any fields defined in the current theme's configuration into the Group::$fields array
  */
 public function __construct()
 {
     parent::__construct();
     $this->ci = get_instance();
     if (file_exists(APPPATH . 'views/themes/' . $this->ci->config->item('theme') . '/config/user_fields.php')) {
         require_once APPPATH . 'views/themes/' . $this->ci->config->item('theme') . '/config/user_fields.php';
         $this->fields = $fields;
     }
     unset($this->ci);
 }
Example #30
0
 /**
     Update - automatically caled by RedBean when stored.
 */
 public function update()
 {
     if ($this->password != $this->password2) {
         RedView::end('error', 'Password mismatch.');
     }
     parent::update();
     //sha1 pwd
     $this->bean->pwhash = sha1($this->password);
     $this->bean->remove('password');
     $this->bean->remove('password2');
 }