load->database(); $this->load->library('session'); } #--------------------------------------------------------------------------- # PURPOSE : 회원 수정 # CREATE : 2018-02-19 #--------------------------------------------------------------------------- function member_edit_proc($req_data){ # request $org_user_pwd = $req_data['org_user_pwd']; $user_id = $this->session->userdata('Adm_Id'); $sql1 = "select * from admin where is_del = 'N' and user_id ='".$user_id."' and user_pwd = MD5('".$org_user_pwd."')"; $res1 = $this->db->query($sql1); $row1 = $res1->row(); $array = json_decode(json_encode($row1), true); return $array; } #--------------------------------------------------------------------------- # PURPOSE : 비밀번호 수정 # CREATE : 2018-02-19 #--------------------------------------------------------------------------- function member_passwd_update($req_data){ # request $new_user_pwd = $req_data['new_user_pwd']; $user_id = $this->session->userdata('Adm_Id'); $sql1 = "update admin set user_pwd = MD5('".$new_user_pwd."') where is_del = 'N' and user_id ='".$user_id."'"; $this->db->query($sql1); } #--------------------------------------------------------------------------- # PURPOSE : admin where user_id count # CREATE : 2018-03-14 #--------------------------------------------------------------------------- function admin_where_partner_id_count($req_data){ # request $user_id = $req_data; $this->db->where('user_id', $user_id); $this->db->from('admin'); $row = $this->db->count_all_results(); return $row; } } ?>