77 lines
1.8 KiB
PHP
Executable File
77 lines
1.8 KiB
PHP
Executable File
<?
|
|
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;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
?>
|
|
|
|
|
|
|