<?
defined('BASEPATH') OR exit('No direct script access allowed');

class m_member_setting extends CI_Model{

	// 생성자, 해당 모델이 생성될때 항상 실행되는 초기화작업
	function __construct(){
		parent::__construct();

        $this->load->database();
        $this->load->library('session');
	}

	#---------------------------------------------------------------------------
    # PURPOSE :	회원가입설정 셋팅 - list
    # CREATE  :	2018-02-25
    #---------------------------------------------------------------------------
	function m_member_setting_list(){

	    $this->db->where('is_del', 'N');
        $this->db->from('member_setting');
        $res = $this->db->get();
        $row = $res->result_array();

        return $row;
        
    }

    #---------------------------------------------------------------------------
    # PURPOSE :	회원가입설정 셋팅 - update
    # CREATE  :	2018-02-27
    #---------------------------------------------------------------------------
	function m_member_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;
        }
        $row = $this->db->update_batch('member_setting', $req_data, 'idx');
        return $row;

    }


}
?>
