first commit
This commit is contained in:
76
application/models/admin/setting/m_blind_setting.php
Executable file
76
application/models/admin/setting/m_blind_setting.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class m_blind_setting extends CI_Model{
|
||||
|
||||
// 생성자, 해당 모델이 생성될때 항상 실행되는 초기화작업
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
|
||||
$this->load->database();
|
||||
$this->load->library('session');
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : list
|
||||
# CREATE : 2018-03-30
|
||||
#---------------------------------------------------------------------------
|
||||
function blind_setting_list(){
|
||||
|
||||
$this->db->from('blind_setting');
|
||||
$this->db->order_by('limit_count', 'desc');
|
||||
$res = $this->db->get();
|
||||
$row = $res->result_array();
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : update
|
||||
# CREATE : 2018-03-30
|
||||
#---------------------------------------------------------------------------
|
||||
function blind_setting_update($req_data){
|
||||
|
||||
$user_id = $this->session->userdata('Adm_Id');
|
||||
$now_date = date("Y-m-d H:i:s");
|
||||
|
||||
foreach($req_data as $key=>$val) {
|
||||
$req_data[$key]['update_id'] = $user_id;
|
||||
$req_data[$key]['update_date'] = $now_date;
|
||||
}
|
||||
|
||||
$this->db->update_batch('blind_setting', $req_data, 'idx');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : select
|
||||
# CREATE : 2018-03-30
|
||||
#---------------------------------------------------------------------------
|
||||
function blind_setting_select($idx){
|
||||
|
||||
$this->db->where('idx', $idx);
|
||||
$this->db->from('blind_setting');
|
||||
$res = $this->db->get();
|
||||
$row = $res->row_array();
|
||||
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user