first commit
This commit is contained in:
58
application/models/web/m_popup.php
Executable file
58
application/models/web/m_popup.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class m_popup extends CI_Model{
|
||||
|
||||
// 생성자, 해당 모델이 생성될때 항상 실행되는 초기화작업
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
|
||||
$this->load->database();
|
||||
$this->load->library('session');
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : list
|
||||
# CREATE : 2018-04-11
|
||||
#---------------------------------------------------------------------------
|
||||
function popup_where_menu_code_list($req_data){
|
||||
# request
|
||||
$menu_code = $req_data['menu_code'];
|
||||
$now_date = $req_data['now_date'];
|
||||
|
||||
$this->db->where('menu_code', $menu_code);
|
||||
$this->db->where('start_date <=', $now_date);
|
||||
$this->db->where('end_date >=', $now_date);
|
||||
$this->db->where('is_del', 'N');
|
||||
$this->db->where('is_display', 'Y');
|
||||
$this->db->from('popup');
|
||||
$res = $this->db->get();
|
||||
$row = $res->result_array();
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : select
|
||||
# CREATE : 2018-04-17
|
||||
#---------------------------------------------------------------------------
|
||||
function popup_select($idx){
|
||||
$this->db->where('idx', $idx);
|
||||
$this->db->where('is_del', 'N');
|
||||
$this->db->where('is_display', 'Y');
|
||||
$this->db->from('popup');
|
||||
$res = $this->db->get();
|
||||
$row = $res->row_array();
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user