first commit
This commit is contained in:
75
application/controllers/web/cmtv.php
Executable file
75
application/controllers/web/cmtv.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class cmtv extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 메인
|
||||
# CREATE : 2019-04-17
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_index() {
|
||||
|
||||
$this->load->library('user_agent');
|
||||
if ($this->agent->is_mobile()){
|
||||
$this->load->helper('url');
|
||||
redirect($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/m/cmtv/', 'refresh');
|
||||
}
|
||||
|
||||
// 말씀과 묵상
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = '';
|
||||
$req_data['search_keyword'] = '';
|
||||
$req_data['search_life_type'] = '';
|
||||
$req_data['search_category_code1'] = 22;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click1'] = '';
|
||||
$req_data['search_click2'] = '1';
|
||||
$req_data['sort_column'] = 'a.reg_date';
|
||||
$req_data['search_write_id'] = '';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 4;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$this->load->model('web/m_channel');
|
||||
|
||||
// 말씀영상
|
||||
$req_data['search_category_code2'] = '42';
|
||||
$arr_words = $this->m_channel->channel_join_category_select(42);
|
||||
$arr_words['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$arr_words['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
//찬양영상
|
||||
$req_data['search_category_code2'] = '43';
|
||||
$arr_praise = $this->m_channel->channel_join_category_select(43);
|
||||
$arr_praise['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$arr_praise['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
// 간증
|
||||
$req_data['search_category_code2'] = '44';
|
||||
$arr_testimony = $this->m_channel->channel_join_category_select(44);
|
||||
$arr_testimony['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$arr_testimony['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
//토크쇼
|
||||
$req_data['search_category_code2'] = '45';
|
||||
$arr_talkshow = $this->m_channel->channel_join_category_select(45);
|
||||
$arr_talkshow['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$arr_talkshow['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
# view data
|
||||
$return_data['channel'] = array();
|
||||
array_push($return_data['channel'], $arr_words, $arr_praise, $arr_testimony, $arr_talkshow);
|
||||
// $return_data['arr_praise'] = ;
|
||||
// $return_data['arr_testimony'] = ;
|
||||
// $return_data['arr_talkshow'] = ;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/cmtv/channel_recommend', $return_data, true);
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
1837
application/controllers/web/comm.php
Executable file
1837
application/controllers/web/comm.php
Executable file
File diff suppressed because it is too large
Load Diff
254
application/controllers/web/cs.php
Executable file
254
application/controllers/web/cs.php
Executable file
@@ -0,0 +1,254 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class cs extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 공지사항
|
||||
# CREATE : 2018-05-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_notice() {
|
||||
# Request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
|
||||
# default setting
|
||||
if($page=='') $page = '1';
|
||||
|
||||
# paging 설정
|
||||
$limit = 20;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
# 공지사항
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'total';
|
||||
$req_data['search_keyword'] = $search_keyword;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_bbs_notice');
|
||||
$result = $this->m_bbs_notice->bbs_notice_list($req_data);
|
||||
$total_count = $this->m_bbs_notice->bbs_notice_list_total_count($req_data);
|
||||
$row = $this->m_bbs_notice->bbs_notice_order_by_reg_date_limit1_select();
|
||||
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/cs/notice?search_keyword='.$search_keyword.'&page=');
|
||||
|
||||
$data_num = ($total_count + $limit)-($page*$limit);
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['list'] = $result;
|
||||
$return_data['row'] = $row;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['data_num'] = $data_num;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/cs/notice', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 공지사항 뷰
|
||||
# CREATE : 2018-04-16
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_notice_view() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$data_num = trim($this->input->get_post('data_num', TRUE));
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_bbs_notice');
|
||||
$result = $this->m_bbs_notice->bbs_notice_select($idx);
|
||||
$row = $this->m_bbs_notice->bbs_notice_order_by_reg_date_limit1_select();
|
||||
|
||||
# total count
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'total';
|
||||
$req_data['search_keyword'] = $search_keyword;
|
||||
$total_count = $this->m_bbs_notice->bbs_notice_list_total_count($req_data);
|
||||
|
||||
$next_list = array();
|
||||
if($data_num == '' || $data_num == '0') {
|
||||
$data_num = 1;
|
||||
} else {
|
||||
# next_list
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'total';
|
||||
$req_data['search_keyword'] = $search_keyword;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 4;
|
||||
$req_data['idx'] = $idx;
|
||||
|
||||
$next_list = $this->m_bbs_notice->bbs_notice_next_list($req_data);
|
||||
}
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['result'] = $result;
|
||||
$return_data['next_list'] = $next_list;
|
||||
$return_data['row'] = $row;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['data_num'] = $data_num;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/cs/notice_view', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : faq
|
||||
# CREATE : 2018-05-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_faq() {
|
||||
# Request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$search_category1 = trim($this->input->get_post('search_category1', TRUE));
|
||||
$search_category2 = trim($this->input->get_post('search_category2', TRUE));
|
||||
|
||||
# default setting
|
||||
if($page=='') $page = '1';
|
||||
|
||||
|
||||
# 카테고리 가져오기
|
||||
$this->load->model('web/m_bbs_faq_category');
|
||||
$arr_category = $this->m_bbs_faq_category->bbs_faq_category_all_list();
|
||||
$arr_category1 = array(); $arr_category2 = array();
|
||||
foreach ($arr_category as $val) {
|
||||
if($val['depth']=='1') $arr_category1[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'idx'=> $val['idx']);
|
||||
if($val['depth']=='2') $arr_category2[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'idx'=> $val['idx']);
|
||||
}
|
||||
if($search_category1 == '') $search_category1 = $arr_category1[0]['category_code'];
|
||||
|
||||
# paging 설정
|
||||
$limit = 20;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
# faq
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'title';
|
||||
$req_data['search_keyword'] = $search_keyword;
|
||||
$req_data['faq_category_code1'] = $search_category1;
|
||||
$req_data['faq_category_code2'] = $search_category2;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_bbs_faq');
|
||||
$result = $this->m_bbs_faq->bbs_faq_list($req_data);
|
||||
$total_count = $this->m_bbs_faq->bbs_faq_list_total_count($req_data);
|
||||
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/cs/faq?search_keyword='.$search_keyword.'&search_category1='.$search_category1.'&search_category2='.$search_category2.'&page=');
|
||||
|
||||
$data_num = ($total_count + $limit)-($page*$limit);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['search_category1'] = $search_category1;
|
||||
$return_data['search_category2'] = $search_category2;
|
||||
$return_data['list'] = $result;
|
||||
$return_data['arr_category1'] = $arr_category1;
|
||||
$return_data['arr_category2'] = $arr_category2;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['data_num'] = $data_num;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/cs/faq', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : faq 뷰
|
||||
# CREATE : 2018-04-16
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_faq_view() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$search_category1 = trim($this->input->get_post('search_category1', TRUE));
|
||||
$search_category2 = trim($this->input->get_post('search_category2', TRUE));
|
||||
$data_num = trim($this->input->get_post('data_num', TRUE));
|
||||
|
||||
# 카테고리 가져오기
|
||||
$this->load->model('web/m_bbs_faq_category');
|
||||
$arr_category = $this->m_bbs_faq_category->bbs_faq_category_all_list();
|
||||
$arr_category1 = array(); $arr_category2 = array();
|
||||
foreach ($arr_category as $val) {
|
||||
if($val['depth']=='1') $arr_category1[] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'idx'=> $val['idx']);
|
||||
if($val['depth']=='2') $arr_category2[$val['p_category_code']][] = array('category_code'=>$val['category_code'], 'category_name'=>$val['category_name'], 'idx'=> $val['idx']);
|
||||
}
|
||||
if($search_category1 == '') $search_category1 = $arr_category1[0]['category_code'];
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_bbs_faq');
|
||||
$result = $this->m_bbs_faq->bbs_faq_select($idx);
|
||||
|
||||
# faq
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'title';
|
||||
$req_data['search_keyword'] = $search_keyword;
|
||||
$req_data['faq_category_code1'] = $search_category1;
|
||||
$req_data['faq_category_code2'] = $search_category2;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 4;
|
||||
$req_data['idx'] = $idx;
|
||||
|
||||
$next_list = $this->m_bbs_faq->bbs_faq_next_list($req_data);
|
||||
$total_count = $this->m_bbs_faq->bbs_faq_list_total_count($req_data);
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['result'] = $result;
|
||||
$return_data['next_list'] = $next_list;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['search_category1'] = $search_category1;
|
||||
$return_data['search_category2'] = $search_category2;
|
||||
$return_data['arr_category1'] = $arr_category1;
|
||||
$return_data['arr_category2'] = $arr_category2;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['data_num'] = $data_num;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/cs/faq_view', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
985
application/controllers/web/delete.later/life_test.php
Executable file
985
application/controllers/web/delete.later/life_test.php
Executable file
@@ -0,0 +1,985 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller_test.php');
|
||||
class life_test extends cm_Controller_test {
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 메인
|
||||
# CREATE : 2018-04-10
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_index() {
|
||||
# Request
|
||||
$search_date = trim($this->input->get_post('search_date', TRUE));
|
||||
$search_sort = trim($this->input->get_post('search_sort', TRUE));
|
||||
$popular_page = trim($this->input->get_post('popular_page', TRUE));
|
||||
$search_popular = trim($this->input->get_post('search_popular', TRUE));
|
||||
|
||||
# default setting
|
||||
if($search_sort == '') $search_sort = '1';
|
||||
if($search_date=='') $search_date = date('Y-m');
|
||||
if($search_popular=='') $search_popular = '1';
|
||||
|
||||
|
||||
# 해당월의 마지막 날짜
|
||||
$end_day = date("t", strtotime($search_date));
|
||||
$start_date = $search_date.'-01';
|
||||
$end_date = $search_date.'-'.$end_day;
|
||||
|
||||
# 년월 구하기
|
||||
$month = date('m', strtotime($start_date));
|
||||
$month_txt = date("Y", strtotime($start_date)).'년 '.(int)$month.'월';
|
||||
|
||||
# 이전달
|
||||
$prev_date = date('Y-m', strtotime($start_date." -1 month"));
|
||||
|
||||
# 다음달
|
||||
$next_date = date('Y-m', strtotime($start_date." +1 month"));
|
||||
|
||||
|
||||
# sort
|
||||
switch ($search_sort) {
|
||||
case '1': $sort_column = 'display_date'; break;
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
default : $sort_column = 'display_date'; break;
|
||||
}
|
||||
|
||||
# paging 설정
|
||||
$limit = 15;
|
||||
$offset = 0;
|
||||
|
||||
# 라이프
|
||||
$req_data = array();
|
||||
$req_data['start_date'] = $start_date;
|
||||
$req_data['end_date'] = $end_date;
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_life');
|
||||
$result = $this->m_life->life_list($req_data);
|
||||
$total_count = $this->m_life->life_list_total_count($req_data);
|
||||
|
||||
# 인기채널
|
||||
# paging 설정
|
||||
if($popular_page=='') $popular_page = '1';
|
||||
$popular_limit = 8;
|
||||
$popular_offset = ($popular_page-1) * $popular_limit;
|
||||
|
||||
|
||||
$req_data = array();
|
||||
$req_data['offset'] = $popular_offset;
|
||||
$req_data['limit'] = $popular_limit;
|
||||
$req_data['sort_column'] = 'popular_count';
|
||||
|
||||
if($search_popular == 1) {
|
||||
# model - channel
|
||||
$this->load->model('web/m_channel');
|
||||
$arr_popular = $this->m_channel->channel_list($req_data);
|
||||
$popular_total_count = $this->m_channel->channel_list_total_count();
|
||||
} if($search_popular == 2) {
|
||||
|
||||
$req_data['member_group_idx'] = 6;
|
||||
|
||||
# model - editor
|
||||
$this->load->model('web/m_partner');
|
||||
$arr_popular = $this->m_partner->partner_list($req_data);
|
||||
$popular_total_count = $this->m_partner->partner_list_total_count($req_data);
|
||||
|
||||
}
|
||||
$popular_max_page = ceil($popular_total_count / $popular_limit);
|
||||
|
||||
# channel_page
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
|
||||
|
||||
$pagination = gf_paging($popular_limit, $popular_page, $popular_max_page, '/web/life/?search_date='.$search_date.'&search_sort='.$search_sort.'&search_popular='.$search_popular.'&popular_page=');
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['limit'] = $limit;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['start_date'] = $start_date;
|
||||
$return_data['end_date'] = $end_date;
|
||||
$return_data['search_date'] = $search_date;
|
||||
$return_data['search_sort'] = $search_sort;
|
||||
$return_data['search_popular'] = $search_popular;
|
||||
$return_data['month_txt'] = $month_txt;
|
||||
$return_data['prev_date'] = $prev_date;
|
||||
$return_data['next_date'] = $next_date;
|
||||
$return_data['list'] = $result;
|
||||
$return_data['arr_popular'] = $arr_popular;
|
||||
$return_data['popular_total_count'] = $popular_total_count;
|
||||
$return_data['pagination'] = $pagination;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/index', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프 뷰
|
||||
# CREATE : 2018-04-11
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_life_view() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$content_type = '3';
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_life');
|
||||
$result = $this->m_life->life_join_editor_category_channel_select($idx);
|
||||
if(count($result)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/web/life');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$bookmark_count = 0;
|
||||
if($SES_MEMBER_ID !='') {
|
||||
# 게시물 열람 불가 체크
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['limit_type'] = '2';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_blind_limit');
|
||||
$arr_blind = $this->m_blind_limit->blind_limit_where_member_id_limit_type_select($req_data);
|
||||
if(count($arr_blind) > 0) {
|
||||
$return_data['arr_blind'] = $arr_blind;
|
||||
$return_data['url'] = '/web/life/';
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/blind_view_alert', $return_data, true);
|
||||
}
|
||||
|
||||
# model - bookmark
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
|
||||
$this->load->model('web/m_bookmark');
|
||||
$bookmark_count = $this->m_bookmark->bookmark_member_id_content_idx_count($req_data);
|
||||
|
||||
}
|
||||
|
||||
# hit count update
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_hit_count_update($req_data);
|
||||
|
||||
|
||||
# 이전글
|
||||
$arr_prev = $this->m_life->life_prev_select($idx);
|
||||
|
||||
# 이후글
|
||||
$arr_next = $this->m_life->life_next_select($idx);
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['arr_prev'] = $arr_prev;
|
||||
$return_data['arr_next'] = $arr_next;
|
||||
$return_data['bookmark_count'] = $bookmark_count;
|
||||
$return_data['result'] = $result;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/life_view_test', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프 뷰
|
||||
# CREATE : 2018-04-11
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_life_view2() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$content_type = '3';
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_life');
|
||||
$result = $this->m_life->life_join_editor_category_channel_select($idx);
|
||||
if(count($result)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/web/life');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$bookmark_count = 0;
|
||||
if($SES_MEMBER_ID !='') {
|
||||
# 게시물 열람 불가 체크
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['limit_type'] = '2';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_blind_limit');
|
||||
$arr_blind = $this->m_blind_limit->blind_limit_where_member_id_limit_type_select($req_data);
|
||||
if(count($arr_blind) > 0) {
|
||||
$return_data['arr_blind'] = $arr_blind;
|
||||
$return_data['url'] = '/web/life/';
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/blind_view_alert', $return_data, true);
|
||||
}
|
||||
|
||||
# model - bookmark
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
|
||||
$this->load->model('web/m_bookmark');
|
||||
$bookmark_count = $this->m_bookmark->bookmark_member_id_content_idx_count($req_data);
|
||||
|
||||
}
|
||||
|
||||
# hit count update
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_hit_count_update($req_data);
|
||||
|
||||
|
||||
# 이전글
|
||||
$arr_prev = $this->m_life->life_prev_select($idx);
|
||||
|
||||
# 이후글
|
||||
$arr_next = $this->m_life->life_next_select($idx);
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['arr_prev'] = $arr_prev;
|
||||
$return_data['arr_next'] = $arr_next;
|
||||
$return_data['bookmark_count'] = $bookmark_count;
|
||||
$return_data['result'] = $result;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/life_view2', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 댓글 삭제
|
||||
# CREATE : 2018-05-07
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_user_comment_refresh_proc() {
|
||||
$ci=& get_instance();
|
||||
$ci->load->library('comm');
|
||||
|
||||
# request
|
||||
$idx = trim($this->input->get_post('idx', TRUE));
|
||||
$write_id = trim($this->input->get_post('write_id', TRUE));
|
||||
$content_type = trim($this->input->get_post('content_type', TRUE));
|
||||
|
||||
# model
|
||||
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 15;
|
||||
$req_data['sort_column'] = 'reg_date';
|
||||
$req_data['sort_type'] = 'desc';
|
||||
$req_data['write_id'] = $write_id;
|
||||
|
||||
$arr_comment_result = $ci->comm->fn_comment($req_data);
|
||||
|
||||
$comment_my_delete_count = $arr_comment_result['comment_my_delete_count'];
|
||||
|
||||
if(count($arr_comment_result) == 0) {
|
||||
throw new Cm_Exception('json', '9999', '알 수 없는 오류가 발생하였습니다.');
|
||||
}
|
||||
|
||||
if($arr_comment_result) {
|
||||
$return_data['result'] = array('code' => '0000');
|
||||
} else {
|
||||
$return_data['result'] = array('code' => '9999');
|
||||
}
|
||||
|
||||
$return_data['delete_cnt'] = $comment_my_delete_count;
|
||||
|
||||
# view
|
||||
echo json_encode($return_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프 댓글
|
||||
# CREATE : 2018-04-29
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_life_comment() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$content_type = '3';
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_life');
|
||||
$result = $this->m_life->life_join_editor_category_channel_select($idx);
|
||||
if(count($result)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/web/life');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# 북마크
|
||||
$bookmark_count = 0;
|
||||
if($SES_MEMBER_ID !='') {
|
||||
# model - bookmark
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
|
||||
$this->load->model('web/m_bookmark');
|
||||
$bookmark_count = $this->m_bookmark->bookmark_member_id_content_idx_count($req_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['bookmark_count'] = $bookmark_count;
|
||||
$return_data['result'] = $result;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/life_comment', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프 랭킹
|
||||
# CREATE : 2018-04-29
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ranking() {
|
||||
# Request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$ranking_type = trim($this->input->get_post('ranking_type', TRUE));
|
||||
$content_type = 3;
|
||||
|
||||
# default setting
|
||||
if($ranking_type == '') $ranking_type = '1';
|
||||
if($page=='') $page = '1';
|
||||
|
||||
# paging 설정
|
||||
$limit = 10;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['ranking_type'] = $ranking_type;
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$this->load->model('web/m_ranking');
|
||||
$result = $this->m_ranking->ranking_join_life_list($req_data);
|
||||
$total_count = $this->m_ranking->ranking_join_life_total_count($req_data);
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/life/ranking?ranking_type='.$ranking_type.'&page=');
|
||||
|
||||
|
||||
# right
|
||||
$theme_types = array('13', '14');
|
||||
$this->load->library('comm');
|
||||
$arr_life_right_comm = $this->comm->fn_life_right_comm($theme_types);
|
||||
|
||||
|
||||
$arr_life_style = $arr_life_right_comm['arr_life_style'];
|
||||
$arr_boomup_life = $arr_life_right_comm['arr_boomup_life'];
|
||||
$arr_life_ranking = $arr_life_right_comm['arr_life_ranking'];
|
||||
|
||||
if(count($arr_life_style) > 0) {
|
||||
array_splice($arr_life_style, 2, count($arr_life_style));
|
||||
}
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $result;
|
||||
$return_data['arr_life_style'] = $arr_life_style;
|
||||
$return_data['arr_boomup_life'] = $arr_boomup_life;
|
||||
$return_data['arr_life_ranking'] = $arr_life_ranking;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['ranking_type'] = $ranking_type;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/ranking', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프 채널 홈
|
||||
# CREATE : 2018-04-30
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_channel() {
|
||||
# Request
|
||||
$search_sort = trim($this->input->get_post('search_sort', TRUE));
|
||||
$idx = $this->uri->segment(4);
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$content_type = '3';
|
||||
|
||||
# channel 정보
|
||||
$this->load->model('web/m_channel');
|
||||
$result = $this->m_channel->channel_join_category_select($idx);
|
||||
if(count($result)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/web/life');
|
||||
exit;
|
||||
}
|
||||
|
||||
if($search_sort == '') $search_sort = '1';
|
||||
|
||||
# sort
|
||||
switch ($search_sort) {
|
||||
case '1': $sort_column = 'display_date'; break;
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
default : $sort_column = 'display_date'; break;
|
||||
}
|
||||
|
||||
# 배달여부
|
||||
$this->load->model('web/m_delivery');
|
||||
$channel_delivery_count = 0;
|
||||
if($SES_MEMBER_ID != '') {
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['main_idx'] = $idx;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$arr_column_delivery = $this->m_delivery->delivery_where_member_id_main_idx_select($req_data);
|
||||
$channel_delivery_count = count($arr_column_delivery);
|
||||
|
||||
}
|
||||
|
||||
# 채널글
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 15;
|
||||
$req_data['search_type'] = 'channel_idx';
|
||||
$req_data['search_key'] = $idx;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_life');
|
||||
$list = $this->m_life->life_list($req_data);
|
||||
$total_count = $this->m_life->life_list_total_count($req_data);
|
||||
|
||||
# 배달수
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['main_idx'] = $idx;
|
||||
$channel_delivery_total_count = $this->m_delivery->delivery_where_main_idx_count($req_data);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['search_sort'] = $search_sort;
|
||||
$return_data['channel_delivery_count'] = $channel_delivery_count;
|
||||
$return_data['result'] = $result;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['channel_delivery_total_count'] = $channel_delivery_total_count;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/channel', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : life_list_more
|
||||
# CREATE : 2018-04-30
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_life_list_more() {
|
||||
# request
|
||||
$sort = trim($this->input->get_post('sort', TRUE));
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$channel_idx = trim($this->input->get_post('channel_idx', TRUE));
|
||||
$partner_idx = trim($this->input->get_post('partner_idx', TRUE));
|
||||
$type = trim($this->input->get_post('type', TRUE));
|
||||
$start_date = trim($this->input->get_post('start_date', TRUE));
|
||||
$end_date = trim($this->input->get_post('end_date', TRUE));
|
||||
|
||||
|
||||
switch ($sort) {
|
||||
case '1': $sort_column = 'display_date'; break;
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
default : $sort_column = 'display_date'; break;
|
||||
}
|
||||
|
||||
if($type == 'main') {
|
||||
|
||||
$limit = 15;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
# 라이프
|
||||
$req_data = array();
|
||||
$req_data['start_date'] = $start_date;
|
||||
$req_data['end_date'] = $end_date;
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
|
||||
$view_url = '/web/life/life_main_list_more';
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
if($partner_idx!='') {
|
||||
$search_type = 'partner_idx';
|
||||
$search_key = $partner_idx;
|
||||
$limit = 8;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$view_url = '/web/life/editor_life_list_more';
|
||||
|
||||
} else {
|
||||
$search_type = 'channel_idx';
|
||||
$search_key = $channel_idx;
|
||||
$limit = 15;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$view_url = '/web/life/life_list_more';
|
||||
|
||||
}
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['search_type'] = $search_type;
|
||||
$req_data['search_key'] = $search_key;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_life');
|
||||
$list = $this->m_life->life_list($req_data);
|
||||
$total_count = $this->m_life->life_list_total_count($req_data);
|
||||
|
||||
|
||||
|
||||
|
||||
$more_list = 'N';
|
||||
if(($total_count-($page*$limit)) > 0){
|
||||
$more_list = 'Y';
|
||||
}
|
||||
|
||||
if(count($list) > 0) {
|
||||
$return_data['result_code'] = '0000';
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['more_list'] = $more_list;
|
||||
$return_data['page'] = $page;
|
||||
|
||||
} else {
|
||||
$return_data['result_code'] = '9999';
|
||||
}
|
||||
|
||||
# view
|
||||
return $this->load->view($view_url, $return_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프 에디터 홈
|
||||
# CREATE : 2018-04-30
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_editor() {
|
||||
# Request
|
||||
$search_sort = trim($this->input->get_post('search_sort', TRUE));
|
||||
$idx = $this->uri->segment(4);
|
||||
|
||||
# editor 정보
|
||||
$this->load->model('web/m_partner');
|
||||
$result = $this->m_partner->partner_join_category_channel_select($idx);
|
||||
if(count($result)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/web/life');
|
||||
exit;
|
||||
}
|
||||
|
||||
if($search_sort == '') $search_sort = '1';
|
||||
|
||||
# sort
|
||||
switch ($search_sort) {
|
||||
case '1': $sort_column = 'display_date'; break;
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
default : $sort_column = 'display_date'; break;
|
||||
}
|
||||
|
||||
|
||||
# 에디터글
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 8;
|
||||
$req_data['search_type'] = 'partner_idx';
|
||||
$req_data['search_key'] = $idx;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_life');
|
||||
$list = $this->m_life->life_list($req_data);
|
||||
$total_count = $this->m_life->life_list_total_count($req_data);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['search_sort'] = $search_sort;
|
||||
$return_data['result'] = $result;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['total_count'] = $total_count;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/editor', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프 추천채널
|
||||
# CREATE : 2018-04-30
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_channel_recommend() {
|
||||
|
||||
# 추천채널
|
||||
$etc_section_type = 1;
|
||||
$this->load->model('web/m_life_etc_section');
|
||||
$arr_etc_section = $this->m_life_etc_section->life_etc_section_join_channel_list($etc_section_type);
|
||||
|
||||
$result = $this->m_life_etc_section->life_etc_section_detail_join_life_list($etc_section_type);
|
||||
$arr_etc_section_detail = array();
|
||||
foreach ($result as $val) {
|
||||
$arr_etc_section_detail[$val['life_etc_section_idx']][$val['rank']] = array('head_title'=>$val['head_title'], 'title'=>$val['title'], 'partner_idx' => $val['partner_idx'], 'editor_name' => $val['editor_name'], 'main_img' => $val['main_img'], 'content_idx' => $val['content_idx']);
|
||||
}
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['arr_etc_section'] = $arr_etc_section;
|
||||
$return_data['arr_etc_section_detail'] = $arr_etc_section_detail;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/channel_recommend', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프 카테고리
|
||||
# CREATE : 2018-04-30
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_category() {
|
||||
# Request
|
||||
$search_sort = trim($this->input->get_post('search_sort', TRUE));
|
||||
$category_idx = $this->uri->segment(4);
|
||||
|
||||
if($search_sort == '') $search_sort = '1';
|
||||
|
||||
# sort
|
||||
switch ($search_sort) {
|
||||
case '1': $sort_column = 'reg_date'; break;
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
default : $sort_column = 'reg_date'; break;
|
||||
}
|
||||
|
||||
# 카테고리
|
||||
$this->load->model('web/m_category');
|
||||
$arr_category = $this->m_category->category_all_list();
|
||||
if(count($arr_category)==0) {
|
||||
gf_alert("등록된 카테고리가 없습니다.", '/web/life');
|
||||
exit;
|
||||
}
|
||||
|
||||
if($category_idx == '') {
|
||||
$category_idx = $arr_category[0]['idx'];
|
||||
$category_name = $arr_category[0]['category_name'];
|
||||
$swiper_page = 0;
|
||||
} else {
|
||||
|
||||
foreach($arr_category as $key => $val) {
|
||||
if($val['idx'] == $category_idx) {
|
||||
$swiper_page = $key;
|
||||
$category_name = $val['category_name'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 8;
|
||||
$req_data['search_type'] = 'category_idx';
|
||||
$req_data['search_key'] = $category_idx;
|
||||
$req_data['member_group_idx'] = '6';
|
||||
|
||||
# editor list
|
||||
$this->load->model('web/m_partner');
|
||||
$result = $this->m_partner->partner_life_aritcle_count_list($req_data);
|
||||
$total_count = $this->m_partner->partner_list_total_count($req_data);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['list'] = $result;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['search_sort'] = $search_sort;
|
||||
$return_data['arr_category'] = $arr_category;
|
||||
$return_data['category_idx'] = $category_idx;
|
||||
$return_data['category_name'] = $category_name;
|
||||
$return_data['swiper_page'] = $swiper_page;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/category', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : editor_list_more
|
||||
# CREATE : 2018-05-01
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_editor_list_more() {
|
||||
# request
|
||||
$sort = trim($this->input->get_post('sort', TRUE));
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$category_idx = trim($this->input->get_post('category_idx', TRUE));
|
||||
|
||||
switch ($sort) {
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
case '1': $sort_column = 'reg_date'; break;
|
||||
default : $sort_column = 'reg_date'; break;
|
||||
}
|
||||
|
||||
|
||||
$limit = 8;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['search_type'] = 'category_idx';
|
||||
$req_data['search_key'] = $category_idx;
|
||||
$req_data['member_group_idx'] = '6';
|
||||
|
||||
# editor list
|
||||
$this->load->model('web/m_partner');
|
||||
$list = $this->m_partner->partner_life_aritcle_count_list($req_data);
|
||||
$total_count = $this->m_partner->partner_list_total_count($req_data);
|
||||
|
||||
$more_list = 'N';
|
||||
if(($total_count-($page*$limit)) > 0){
|
||||
$more_list = 'Y';
|
||||
}
|
||||
|
||||
if(count($list) > 0) {
|
||||
$return_data['result_code'] = '0000';
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['more_list'] = $more_list;
|
||||
|
||||
} else {
|
||||
$return_data['result_code'] = '9999';
|
||||
}
|
||||
|
||||
# view
|
||||
return $this->load->view("/web/life/editor_list_more", $return_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : tag
|
||||
# CREATE : 2018-05-01
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_tag() {
|
||||
# Request
|
||||
$tag = $this->uri->segment(4);
|
||||
$content_type = '3';
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
$tag = urldecode($tag);
|
||||
|
||||
# tag
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['tag'] = $tag;
|
||||
|
||||
$this->load->model('web/m_tag');
|
||||
$total_count = $this->m_tag->tag_join_life_list_total_count($req_data);
|
||||
if($total_count == 0) {
|
||||
gf_alert("등록된 태그가 없습니다.", '/web/life');
|
||||
exit;
|
||||
}
|
||||
|
||||
# 배달여부
|
||||
$this->load->model('web/m_delivery');
|
||||
$tag_delivery_count = 0;
|
||||
if($SES_MEMBER_ID != '') {
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = '9';
|
||||
$req_data['main_idx'] = $tag;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$arr_column_delivery = $this->m_delivery->delivery_where_member_id_main_idx_select($req_data);
|
||||
$tag_delivery_count = count($arr_column_delivery);
|
||||
}
|
||||
|
||||
|
||||
$this->load->model('web/m_tag');
|
||||
|
||||
# 연관태그
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['tag'] = $tag;
|
||||
$arr_relation_tag = $this->m_tag->tag_join_tag_list($req_data);
|
||||
|
||||
|
||||
# 태그글
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['tag'] = $tag;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 9;
|
||||
$result = $this->m_tag->tag_join_life_list($req_data);
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['list'] = $result;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['tag_delivery_count'] = $tag_delivery_count;
|
||||
$return_data['tag'] = $tag;
|
||||
$return_data['arr_relation_tag'] = $arr_relation_tag;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/life/tag', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : tag_list_more
|
||||
# CREATE : 2018-05-01
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_tag_list_more() {
|
||||
# request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$tag = trim($this->input->get_post('tag', TRUE));
|
||||
$content_type = '3';
|
||||
|
||||
$limit = 9;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['tag'] = $tag;
|
||||
$req_data['content_type'] = $content_type;
|
||||
|
||||
$this->load->model('web/m_tag');
|
||||
$list = $this->m_tag->tag_join_life_list($req_data);
|
||||
$total_count = $this->m_tag->tag_join_life_list_total_count($req_data);
|
||||
|
||||
$more_list = 'N';
|
||||
if(($total_count-($page*$limit)) > 0){
|
||||
$more_list = 'Y';
|
||||
}
|
||||
|
||||
if(count($list) > 0) {
|
||||
$return_data['result_code'] = '0000';
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['more_list'] = $more_list;
|
||||
|
||||
} else {
|
||||
$return_data['result_code'] = '9999';
|
||||
}
|
||||
|
||||
# view
|
||||
return $this->load->view("/web/life/tag_list_more", $return_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
294
application/controllers/web/delete.later/main_20200107.php
Executable file
294
application/controllers/web/delete.later/main_20200107.php
Executable file
@@ -0,0 +1,294 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
|
||||
include_once(APPPATH.'core/web/cm_exceptions.php');
|
||||
class main extends CI_Controller {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
$this->load->library('user_agent');
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
$this->load->helper('crossmap/exception_helper');
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
/*
|
||||
from _remap
|
||||
*/
|
||||
$this->load->helper('cookie');
|
||||
$session_id = get_cookie('crossmap_save_id');
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
if($session_id != '' && $SES_MEMBER_ID=='') {
|
||||
# model - session 가져오기
|
||||
$this->load->model('web/m_ci_sessions');
|
||||
$session_result = $this->m_ci_sessions->ci_sessions_select($session_id);
|
||||
session_decode($session_result['data']);
|
||||
}
|
||||
|
||||
if($SES_MEMBER_ID!='') {
|
||||
$expire_date = date("Y-m-d H:i:s", strtotime("+10 minutes"));
|
||||
|
||||
# model - 중복로그인 체크용
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$req_data['expire_date'] = $expire_date;
|
||||
$this->load->model('web/m_member_login');
|
||||
$this->m_member_login->member_login_member_id_member_ip_update($req_data);
|
||||
}
|
||||
|
||||
# model - 사이트 정보
|
||||
$this->load->model('web/m_site_info');
|
||||
$site_info = $this->m_site_info->site_info_select(1);
|
||||
|
||||
$controller = $this->uri->segment(2);
|
||||
|
||||
#광고
|
||||
$this->load->model('web/m_advertisement');
|
||||
$advertisement = $this->m_advertisement->find_ad_by_page_key('Main');
|
||||
|
||||
// $this->config->load('filecache',TRUE);
|
||||
// $filecache = $this->config->item('file_cache_path','filecache');
|
||||
// $this->load->library('advertisement_lib',['file_cache_path'=>$filecache]);
|
||||
// $advertisement = json_decode($this->advertisement_lib->get_ad_cache());
|
||||
|
||||
/*
|
||||
from fn_index()
|
||||
*/
|
||||
$now_date = date("Y-m-d");
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_list();
|
||||
|
||||
# 오늘의 말씀
|
||||
$this->load->model('web/m_today_word');
|
||||
$arr_today_word = $this->m_today_word->today_word_where_display_date_select($now_date);
|
||||
|
||||
# 테마
|
||||
# theme_type = 1 (헤드라인뉴스), theme_type = 8 (오늘의칼럼), theme_type = 11 (라이프홈), theme_type = 12 (데일리큐티)
|
||||
$this->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = array('1', '11', '12');
|
||||
$arr_theme = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_headline_news = array();
|
||||
$arr_life_home = array();
|
||||
$arr_daily_cutie = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
if($val['theme_type'] == 1) $arr_headline_news[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['main_img'] ? $val['main_img'] : $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 11) $arr_life_home[$val['rank']] = array('title' => $val['title'], 'sub_title'=> $val['sub_title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 12) $arr_daily_cutie[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
}
|
||||
|
||||
// 오늘의 칼럼
|
||||
$req_data['theme_types'] = array('8');
|
||||
$arr_today_column = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
# 카드뉴스 - 기타섹션 테마
|
||||
$this->load->model('web/m_etc_section');
|
||||
$etc_section_type = 4;
|
||||
$arr_card_news = $this->m_etc_section->etc_section_where_theme_type_list($etc_section_type);
|
||||
|
||||
# 언론
|
||||
$this->load->model('web/m_press');
|
||||
$arr_press = $this->m_press->press_all_list();
|
||||
|
||||
# 카테고리별
|
||||
$this->load->model('web/m_main_category_company');
|
||||
$arr_company = $this->m_main_category_company->main_category_company_all_list();
|
||||
|
||||
$arr_content = array();
|
||||
$content_idx = $this->uri->segment(4);
|
||||
|
||||
// 모아보기
|
||||
// 말씀과 묵상
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = '';
|
||||
$req_data['search_keyword'] = '';
|
||||
$req_data['search_life_type'] = '';
|
||||
$req_data['search_category_code1'] = 6;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click1'] = '';
|
||||
$req_data['search_click2'] = '1';
|
||||
$req_data['sort_column'] = 'a.display_date';
|
||||
$req_data['search_write_id'] = '';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 6;
|
||||
$this->load->model('admin/life/m_life');
|
||||
|
||||
// 1-1 웹툰 모아보기
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$mt_rquset['idx']='0';
|
||||
$mt_rquset['limit']='6';
|
||||
$mt_rquset['div']='main';
|
||||
$maptoon=$this->m_maptoon->get_display_episodes($mt_rquset);
|
||||
$arr_maptoon=array();
|
||||
|
||||
|
||||
// 1-1. 이야기QT
|
||||
$req_data['search_category_code1'] = 8;
|
||||
$req_data['search_category_code2'] = 5;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_heart_opening_story = $this->m_life->life_list($req_data);
|
||||
$req_data['search_category_code2'] = '';
|
||||
|
||||
// 1-3. 은혜한구절
|
||||
$req_data['search_category_code1'] = 10;
|
||||
$req_data['search_category_code2'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_gracious_verse = $this->m_life->life_list($req_data);
|
||||
$req_data['search_category_code2'] = '';
|
||||
|
||||
/*
|
||||
// 1-1. 찬양
|
||||
$req_data['limit'] = 6;
|
||||
$arr_praise = $this->m_life->life_list($req_data);
|
||||
|
||||
// 1-2. 말씀
|
||||
$req_data['search_category_code1'] = 5;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_gospel = $this->m_life->life_list($req_data);
|
||||
|
||||
// 1-3. 성경 지식인
|
||||
$req_data['search_category_code1'] = 10;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_knowledge = $this->m_life->life_list($req_data);
|
||||
*/
|
||||
// 2.크로스맵TV
|
||||
// 2-1.말씀영상
|
||||
$req_data['search_category_code1'] = 22;
|
||||
$req_data['search_category_code2'] = 42;
|
||||
$req_data['limit'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_gospel = $this->m_life->life_list($req_data);
|
||||
// 2-2.찬양영상
|
||||
$req_data['search_category_code2'] = 43;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_praise = $this->m_life->life_list($req_data);
|
||||
// 2-3.간증
|
||||
$req_data['search_category_code2'] = 44;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_testimony = $this->m_life->life_list($req_data);
|
||||
// 2-4.토크쇼
|
||||
$req_data['search_category_code2'] = 45;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_talkshow = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3.이런건 어때?
|
||||
// 3-1.은혜
|
||||
// $req_data['search_category_code1'] = 18;
|
||||
// $req_data['search_category_code2'] = '';
|
||||
// $req_data['limit'] = 24;
|
||||
// $this->load->model('admin/life/m_life');
|
||||
// $arr_grace = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-2.사랑
|
||||
// $req_data['search_category_code1'] = 19;
|
||||
// $this->load->model('admin/life/m_life');
|
||||
// $arr_love = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-4.마무리
|
||||
// $req_data['search_category_code1'] = 21;
|
||||
// $this->load->model('admin/life/m_life');
|
||||
// $arr_completion = $this->m_life->life_list($req_data);
|
||||
/*
|
||||
// 3-3.크리스마스
|
||||
$req_data['search_category_code1'] = 20;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_christmas = $this->m_life->life_list($req_data);
|
||||
*/
|
||||
|
||||
// 3-1.운율이 있는 묵상
|
||||
$req_data['search_category_code1'] = 8;
|
||||
$req_data['search_category_code2'] = 6;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_meditation_contemplation = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-2.말씀엽서
|
||||
$req_data['search_category_code1'] = 5;
|
||||
$req_data['search_category_code2'] = 3;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_bible_postcard = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-3.책 읽는 크리스천
|
||||
$req_data['search_category_code1'] = 17;
|
||||
$req_data['search_category_code2'] = 26;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_christian_reading = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-4. 함께 기도해요
|
||||
$req_data['search_category_code1'] = 26;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click2'] = 1;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_Prayer = $this->m_life->life_list($req_data);
|
||||
|
||||
$i=0;
|
||||
foreach($maptoon as $v){
|
||||
$arr_maptoon[]=$v;
|
||||
$arr_maptoon[$i]['title']=$v['name'].'-'.$v['title'];
|
||||
$arr_maptoon[$i]['div']="mt";
|
||||
$i++;
|
||||
}
|
||||
|
||||
$melon_json = '';//file_get_contents('http://35.224.33.187/melon.json');
|
||||
$melon_json = file_get_contents(dirname(__FILE__). '/melon.json');
|
||||
|
||||
if($melon_json!='')
|
||||
$melon_arr = json_decode($melon_json,true);
|
||||
else
|
||||
$melon_arr = array();
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['site_info'] = $site_info;
|
||||
$return_data['advertisement'] = $advertisement;
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['arr_today_word'] = $arr_today_word;
|
||||
$return_data['arr_headline_news'] = $arr_headline_news;
|
||||
$return_data['arr_life_home'] = $arr_life_home;
|
||||
$return_data['arr_daily_cutie'] = $arr_daily_cutie;
|
||||
$return_data['arr_card_news'] = $arr_card_news;
|
||||
$return_data['arr_press'] = $arr_press;
|
||||
$return_data['arr_company'] = $arr_company;
|
||||
$return_data['arr_heart_opening_story'] = $arr_heart_opening_story;
|
||||
$return_data['arr_maptoon'] = $arr_maptoon;
|
||||
$return_data['arr_gracious_verse'] = $arr_gracious_verse;
|
||||
// $return_data['arr_praise'] = $arr_praise;
|
||||
// $return_data['arr_gospel'] = $arr_gospel;
|
||||
// $return_data['arr_knowledge'] = $arr_knowledge;
|
||||
$return_data['arr_tv_gospel'] = $arr_tv_gospel;
|
||||
$return_data['arr_tv_praise'] = $arr_tv_praise;
|
||||
$return_data['arr_tv_testimony'] = $arr_tv_testimony;
|
||||
$return_data['arr_tv_talkshow'] = $arr_tv_talkshow;
|
||||
// $return_data['arr_grace'] = $arr_grace;
|
||||
// $return_data['arr_love'] = $arr_love;
|
||||
// $return_data['arr_christmas'] = $arr_christmas;
|
||||
// $return_data['arr_completion'] = $arr_completion;
|
||||
$return_data['arr_today_column'] = $arr_today_column;
|
||||
$return_data['arr_melon_ccm'] = $melon_arr;
|
||||
$return_data['arr_meditation_contemplation'] = $arr_meditation_contemplation;
|
||||
$return_data['arr_bible_postcard'] = $arr_bible_postcard;
|
||||
$return_data['arr_christian_reading'] = $arr_christian_reading;
|
||||
$return_data['arr_Prayer'] = $arr_Prayer;
|
||||
|
||||
|
||||
|
||||
|
||||
$this->load->library('user_agent');
|
||||
if($this->agent->is_mobile()) {
|
||||
$return_data['is_mobile'] = true;
|
||||
} else {
|
||||
$return_data['is_mobile'] = false;
|
||||
}
|
||||
$this->load->view('/web/index3', $return_data);
|
||||
}
|
||||
}
|
||||
77
application/controllers/web/delete.later/main_bak.php
Executable file
77
application/controllers/web/delete.later/main_bak.php
Executable file
@@ -0,0 +1,77 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
|
||||
class main_bak extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 메인
|
||||
# CREATE : 2018-04-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_index() {
|
||||
|
||||
$now_date = date("Y-m-d");
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_list();
|
||||
|
||||
# 오늘의 말씀
|
||||
$this->load->model('web/m_today_word');
|
||||
$arr_today_word = $this->m_today_word->today_word_where_display_date_select($now_date);
|
||||
|
||||
# 테마
|
||||
# theme_type = 1 (헤드라인뉴스), theme_type = 8 (오늘의칼럼), theme_type = 11 (라이프홈), theme_type = 12 (데일리큐티)
|
||||
$this->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = array('1', '11', '12');
|
||||
$arr_theme = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_headline_news = array();
|
||||
$arr_life_home = array();
|
||||
$arr_daily_cutie = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
if($val['theme_type'] == 1) $arr_headline_news[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 11) $arr_life_home[$val['rank']] = array('title' => $val['title'], 'sub_title'=> $val['sub_title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 12) $arr_daily_cutie[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
}
|
||||
|
||||
|
||||
# 카드뉴스 - 기타섹션 테마
|
||||
$this->load->model('web/m_etc_section');
|
||||
$etc_section_type = 4;
|
||||
$arr_card_news = $this->m_etc_section->etc_section_where_theme_type_list($etc_section_type);
|
||||
|
||||
# 언론
|
||||
$this->load->model('web/m_press');
|
||||
$arr_press = $this->m_press->press_all_list();
|
||||
|
||||
# 카테고리별
|
||||
$this->load->model('web/m_main_category_company');
|
||||
$arr_company = $this->m_main_category_company->main_category_company_all_list();
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['arr_today_word'] = $arr_today_word;
|
||||
$return_data['arr_headline_news'] = $arr_headline_news;
|
||||
$return_data['arr_life_home'] = $arr_life_home;
|
||||
$return_data['arr_daily_cutie'] = $arr_daily_cutie;
|
||||
$return_data['arr_card_news'] = $arr_card_news;
|
||||
$return_data['arr_press'] = $arr_press;
|
||||
$return_data['arr_company'] = $arr_company;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/index', $return_data, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
255
application/controllers/web/delete.later/main_bak2.php
Executable file
255
application/controllers/web/delete.later/main_bak2.php
Executable file
@@ -0,0 +1,255 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
|
||||
include_once(APPPATH.'core/web/cm_exceptions.php');
|
||||
class main_bak2 extends CI_Controller {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
$this->load->library('user_agent');
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
$this->load->helper('crossmap/exception_helper');
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
/*
|
||||
from _remap
|
||||
*/
|
||||
$this->load->helper('cookie');
|
||||
$session_id = get_cookie('crossmap_save_id');
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
if($session_id != '' && $SES_MEMBER_ID=='') {
|
||||
# model - session 가져오기
|
||||
$this->load->model('web/m_ci_sessions');
|
||||
$session_result = $this->m_ci_sessions->ci_sessions_select($session_id);
|
||||
session_decode($session_result['data']);
|
||||
}
|
||||
|
||||
if($SES_MEMBER_ID!='') {
|
||||
$expire_date = date("Y-m-d H:i:s", strtotime("+10 minutes"));
|
||||
|
||||
# model - 중복로그인 체크용
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$req_data['expire_date'] = $expire_date;
|
||||
$this->load->model('web/m_member_login');
|
||||
$this->m_member_login->member_login_member_id_member_ip_update($req_data);
|
||||
}
|
||||
|
||||
# model - 사이트 정보
|
||||
$this->load->model('web/m_site_info');
|
||||
$site_info = $this->m_site_info->site_info_select(1);
|
||||
|
||||
$controller = $this->uri->segment(2);
|
||||
|
||||
/*
|
||||
from fn_index()
|
||||
*/
|
||||
$now_date = date("Y-m-d");
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_list();
|
||||
|
||||
# 오늘의 말씀
|
||||
$this->load->model('web/m_today_word');
|
||||
$arr_today_word = $this->m_today_word->today_word_where_display_date_select($now_date);
|
||||
|
||||
# 테마
|
||||
# theme_type = 1 (헤드라인뉴스), theme_type = 8 (오늘의칼럼), theme_type = 11 (라이프홈), theme_type = 12 (데일리큐티)
|
||||
$this->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = array('1', '11', '12');
|
||||
$arr_theme = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_headline_news = array();
|
||||
$arr_life_home = array();
|
||||
$arr_daily_cutie = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
if($val['theme_type'] == 1) $arr_headline_news[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 11) $arr_life_home[$val['rank']] = array('title' => $val['title'], 'sub_title'=> $val['sub_title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 12) $arr_daily_cutie[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
}
|
||||
|
||||
// 오늘의 칼럼
|
||||
$req_data['theme_types'] = array('8');
|
||||
$arr_today_column = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
# 카드뉴스 - 기타섹션 테마
|
||||
$this->load->model('web/m_etc_section');
|
||||
$etc_section_type = 4;
|
||||
$arr_card_news = $this->m_etc_section->etc_section_where_theme_type_list($etc_section_type);
|
||||
|
||||
# 언론
|
||||
$this->load->model('web/m_press');
|
||||
$arr_press = $this->m_press->press_all_list();
|
||||
|
||||
# 카테고리별
|
||||
$this->load->model('web/m_main_category_company');
|
||||
$arr_company = $this->m_main_category_company->main_category_company_all_list();
|
||||
|
||||
$arr_content = array();
|
||||
$content_idx = $this->uri->segment(4);
|
||||
|
||||
// 모아보기
|
||||
// 말씀과 묵상
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = '';
|
||||
$req_data['search_keyword'] = '';
|
||||
$req_data['search_life_type'] = '';
|
||||
$req_data['search_category_code1'] = 6;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click1'] = '';
|
||||
$req_data['search_click2'] = '';
|
||||
$req_data['sort_column'] = 'a.reg_date';
|
||||
$req_data['search_write_id'] = '';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
|
||||
//찬양
|
||||
$arr_praise = $this->m_life->life_list($req_data);
|
||||
//말씀
|
||||
$req_data['search_category_code1'] = 5;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_gospel = $this->m_life->life_list($req_data);
|
||||
//지식인
|
||||
$req_data['search_category_code1'] = 10;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_knowledge = $this->m_life->life_list($req_data);
|
||||
|
||||
// 2.크로스맵TV
|
||||
// 2-1.말씀영상
|
||||
$req_data['search_category_code1'] = 22;
|
||||
$req_data['search_category_code2'] = 42;
|
||||
$req_data['limit'] = 8;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_gospel = $this->m_life->life_list($req_data);
|
||||
// 2-2.찬양영상
|
||||
$req_data['search_category_code2'] = 43;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_praise = $this->m_life->life_list($req_data);
|
||||
// 2-3.간증
|
||||
$req_data['search_category_code2'] = 44;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_testimony = $this->m_life->life_list($req_data);
|
||||
// 2-4.토크쇼
|
||||
$req_data['search_category_code2'] = 45;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_talkshow = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3.이런건 어때?
|
||||
// 3-1.은혜
|
||||
$req_data['search_category_code1'] = 18;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['limit'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_grace = $this->m_life->life_list($req_data);
|
||||
// 3-2.사랑
|
||||
$req_data['search_category_code1'] = 19;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_love = $this->m_life->life_list($req_data);
|
||||
// 3-3.크리스마스
|
||||
$req_data['search_category_code1'] = 20;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_christmas = $this->m_life->life_list($req_data);
|
||||
// 3-4.마무리
|
||||
$req_data['search_category_code1'] = 21;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_completion = $this->m_life->life_list($req_data);
|
||||
|
||||
// 1-1. 이야기QT
|
||||
$req_data['search_category_code1'] = 8;
|
||||
$req_data['search_category_code2'] = 5;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_heart_opening_story = $this->m_life->life_list($req_data);
|
||||
$req_data['search_category_code2'] = '';
|
||||
|
||||
$melon_json = file_get_contents('http://35.224.33.187/melon.json');
|
||||
if($melon_json!='')
|
||||
$melon_arr = json_decode($melon_json,true);
|
||||
else
|
||||
$melon_arr = array();
|
||||
|
||||
// 3-4. 함께 기도해요
|
||||
$req_data['search_category_code1'] = 9;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click2'] = 1;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_Prayer = $this->m_life->life_list($req_data);
|
||||
|
||||
// 1-3. 은혜한구절
|
||||
$req_data['search_category_code1'] = 10;
|
||||
$req_data['search_category_code2'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_gracious_verse = $this->m_life->life_list($req_data);
|
||||
$req_data['search_category_code2'] = '';
|
||||
|
||||
// 3-1.운율이 있는 묵상
|
||||
$req_data['search_category_code1'] = 8;
|
||||
$req_data['search_category_code2'] = 6;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_meditation_contemplation = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-2.말씀엽서
|
||||
$req_data['search_category_code1'] = 5;
|
||||
$req_data['search_category_code2'] = 3;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_bible_postcard = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-3.책 읽는 크리스천
|
||||
$req_data['search_category_code1'] = 17;
|
||||
$req_data['search_category_code2'] = 26;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_christian_reading = $this->m_life->life_list($req_data);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['site_info'] = $site_info;
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['arr_today_word'] = $arr_today_word;
|
||||
$return_data['arr_headline_news'] = $arr_headline_news;
|
||||
$return_data['arr_life_home'] = $arr_life_home;
|
||||
$return_data['arr_daily_cutie'] = $arr_daily_cutie;
|
||||
$return_data['arr_card_news'] = $arr_card_news;
|
||||
$return_data['arr_press'] = $arr_press;
|
||||
$return_data['arr_company'] = $arr_company;
|
||||
$return_data['arr_praise'] = $arr_praise;
|
||||
$return_data['arr_gospel'] = $arr_gospel;
|
||||
$return_data['arr_knowledge'] = $arr_knowledge;
|
||||
$return_data['arr_tv_gospel'] = $arr_tv_gospel;
|
||||
$return_data['arr_tv_praise'] = $arr_tv_praise;
|
||||
$return_data['arr_tv_testimony'] = $arr_tv_testimony;
|
||||
$return_data['arr_tv_talkshow'] = $arr_tv_talkshow;
|
||||
$return_data['arr_grace'] = $arr_grace;
|
||||
$return_data['arr_love'] = $arr_love;
|
||||
$return_data['arr_christmas'] = $arr_christmas;
|
||||
$return_data['arr_completion'] = $arr_completion;
|
||||
$return_data['arr_today_column'] = $arr_today_column;
|
||||
$return_data['arr_heart_opening_story'] = $arr_heart_opening_story;
|
||||
$return_data['arr_Prayer'] = $arr_Prayer;
|
||||
$return_data['arr_gracious_verse'] = $arr_gracious_verse;
|
||||
$return_data['arr_meditation_contemplation'] = $arr_meditation_contemplation;
|
||||
$return_data['arr_bible_postcard'] = $arr_bible_postcard;
|
||||
$return_data['arr_christian_reading'] = $arr_christian_reading;
|
||||
$return_data['arr_melon_ccm'] = $melon_arr;
|
||||
|
||||
$this->load->library('user_agent');
|
||||
if($this->agent->is_mobile()) {
|
||||
$return_data['is_mobile'] = true;
|
||||
} else {
|
||||
$return_data['is_mobile'] = false;
|
||||
}
|
||||
|
||||
$this->load->view('/web/index2', $return_data);
|
||||
}
|
||||
}
|
||||
297
application/controllers/web/delete.later/testmain.php
Executable file
297
application/controllers/web/delete.later/testmain.php
Executable file
@@ -0,0 +1,297 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
|
||||
include_once(APPPATH.'core/web/cm_exceptions.php');
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
|
||||
class testmain extends cm_Controller {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
$this->load->library('user_agent');
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
$this->load->helper('crossmap/exception_helper');
|
||||
|
||||
}
|
||||
|
||||
public function fn_index()
|
||||
{
|
||||
/*
|
||||
from _remap
|
||||
*/
|
||||
$this->load->helper('cookie');
|
||||
$session_id = get_cookie('crossmap_save_id');
|
||||
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
if($session_id != '' && $SES_MEMBER_ID=='') {
|
||||
echo "여기 작동한다";
|
||||
# model - session 가져오기
|
||||
$this->load->model('web/m_ci_sessions');
|
||||
$session_result = $this->m_ci_sessions->ci_sessions_select($session_id);
|
||||
echo $session_result;
|
||||
print_r($session_result);
|
||||
session_decode($session_result['data']);
|
||||
}
|
||||
|
||||
if($SES_MEMBER_ID!='') {
|
||||
$expire_date = date("Y-m-d H:i:s", strtotime("+10 minutes"));
|
||||
|
||||
# model - 중복로그인 체크용
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$req_data['expire_date'] = $expire_date;
|
||||
$this->load->model('web/m_member_login');
|
||||
$this->m_member_login->member_login_member_id_member_ip_update($req_data);
|
||||
}
|
||||
|
||||
# model - 사이트 정보
|
||||
$this->load->model('web/m_site_info');
|
||||
$site_info = $this->m_site_info->site_info_select(1);
|
||||
|
||||
$controller = $this->uri->segment(2);
|
||||
|
||||
#광고
|
||||
// $this->load->model('web/m_advertisement');
|
||||
// $advertisement = $this->m_advertisement->find_ad_by_page_key('Main');
|
||||
$this->config->load('filecache',TRUE);
|
||||
$filecache = $this->config->item('file_cache_path','filecache');
|
||||
$this->load->library('advertisement_lib',['file_cache_path'=>$filecache]);
|
||||
$advertisement = json_decode($this->advertisement_lib->get_ad_cache());
|
||||
|
||||
/*
|
||||
from fn_index()
|
||||
*/
|
||||
$now_date = date("Y-m-d");
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_list();
|
||||
|
||||
# 오늘의 말씀
|
||||
$this->load->model('web/m_today_word');
|
||||
$arr_today_word = $this->m_today_word->today_word_where_display_date_select($now_date);
|
||||
|
||||
# 테마
|
||||
# theme_type = 1 (헤드라인뉴스), theme_type = 8 (오늘의칼럼), theme_type = 11 (라이프홈), theme_type = 12 (데일리큐티)
|
||||
$this->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = array('1', '11', '12');
|
||||
$arr_theme = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_headline_news = array();
|
||||
$arr_life_home = array();
|
||||
$arr_daily_cutie = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
if($val['theme_type'] == 1) $arr_headline_news[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 11) $arr_life_home[$val['rank']] = array('title' => $val['title'], 'sub_title'=> $val['sub_title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 12) $arr_daily_cutie[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
}
|
||||
|
||||
// 오늘의 칼럼
|
||||
$req_data['theme_types'] = array('8');
|
||||
$arr_today_column = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
# 카드뉴스 - 기타섹션 테마
|
||||
$this->load->model('web/m_etc_section');
|
||||
$etc_section_type = 4;
|
||||
$arr_card_news = $this->m_etc_section->etc_section_where_theme_type_list($etc_section_type);
|
||||
|
||||
# 언론
|
||||
$this->load->model('web/m_press');
|
||||
$arr_press = $this->m_press->press_all_list();
|
||||
|
||||
# 카테고리별
|
||||
$this->load->model('web/m_main_category_company');
|
||||
$arr_company = $this->m_main_category_company->main_category_company_all_list();
|
||||
|
||||
$arr_content = array();
|
||||
$content_idx = $this->uri->segment(4);
|
||||
|
||||
// 모아보기
|
||||
// 말씀과 묵상
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = '';
|
||||
$req_data['search_keyword'] = '';
|
||||
$req_data['search_life_type'] = '';
|
||||
$req_data['search_category_code1'] = 6;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click1'] = '';
|
||||
$req_data['search_click2'] = '1';
|
||||
$req_data['sort_column'] = 'a.reg_date';
|
||||
$req_data['search_write_id'] = '';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 6;
|
||||
$this->load->model('admin/life/m_life');
|
||||
|
||||
|
||||
// 1-1 웹툰 모아보기
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$mt_rquset['idx']='0';
|
||||
$mt_rquset['limit']='6';
|
||||
$mt_rquset['div']='main';
|
||||
$maptoon=$this->m_maptoon->get_display_episodes($mt_rquset);
|
||||
$arr_maptoon=array();
|
||||
$i=0;
|
||||
|
||||
// 1-1. 이야기QT
|
||||
$req_data['search_category_code1'] = 8;
|
||||
$req_data['search_category_code2'] = 5;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_heart_opening_story = $this->m_life->life_list($req_data);
|
||||
$req_data['search_category_code2'] = '';
|
||||
|
||||
// 1-3. 은혜한구절
|
||||
$req_data['search_category_code1'] = 10;
|
||||
$req_data['search_category_code2'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_gracious_verse = $this->m_life->life_list($req_data);
|
||||
$req_data['search_category_code2'] = '';
|
||||
|
||||
/*
|
||||
// 1-1. 찬양
|
||||
$req_data['limit'] = 6;
|
||||
$arr_praise = $this->m_life->life_list($req_data);
|
||||
|
||||
// 1-2. 말씀
|
||||
$req_data['search_category_code1'] = 5;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_gospel = $this->m_life->life_list($req_data);
|
||||
|
||||
// 1-3. 성경 지식인
|
||||
$req_data['search_category_code1'] = 10;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_knowledge = $this->m_life->life_list($req_data);
|
||||
*/
|
||||
// 2.크로스맵TV
|
||||
// 2-1.말씀영상
|
||||
$req_data['search_category_code1'] = 22;
|
||||
$req_data['search_category_code2'] = 42;
|
||||
$req_data['limit'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_gospel = $this->m_life->life_list($req_data);
|
||||
// 2-2.찬양영상
|
||||
$req_data['search_category_code2'] = 43;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_praise = $this->m_life->life_list($req_data);
|
||||
// 2-3.간증
|
||||
$req_data['search_category_code2'] = 44;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_testimony = $this->m_life->life_list($req_data);
|
||||
// 2-4.토크쇼
|
||||
$req_data['search_category_code2'] = 45;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_talkshow = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3.이런건 어때?
|
||||
// 3-1.은혜
|
||||
// $req_data['search_category_code1'] = 18;
|
||||
// $req_data['search_category_code2'] = '';
|
||||
// $req_data['limit'] = 24;
|
||||
// $this->load->model('admin/life/m_life');
|
||||
// $arr_grace = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-2.사랑
|
||||
// $req_data['search_category_code1'] = 19;
|
||||
// $this->load->model('admin/life/m_life');
|
||||
// $arr_love = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-4.마무리
|
||||
// $req_data['search_category_code1'] = 21;
|
||||
// $this->load->model('admin/life/m_life');
|
||||
// $arr_completion = $this->m_life->life_list($req_data);
|
||||
/*
|
||||
// 3-3.크리스마스
|
||||
$req_data['search_category_code1'] = 20;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_christmas = $this->m_life->life_list($req_data);
|
||||
*/
|
||||
|
||||
// 3-1.운율이 있는 묵상
|
||||
$req_data['search_category_code1'] = 8;
|
||||
$req_data['search_category_code2'] = 6;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_meditation_contemplation = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-2.말씀엽서
|
||||
$req_data['search_category_code1'] = 5;
|
||||
$req_data['search_category_code2'] = 3;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_bible_postcard = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-3.책 읽는 크리스천
|
||||
$req_data['search_category_code1'] = 17;
|
||||
$req_data['search_category_code2'] = 26;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_christian_reading = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3-4. 함께 기도해요
|
||||
$req_data['search_category_code1'] = 9;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click2'] = 1;
|
||||
$req_data['limit'] = 24;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_Prayer = $this->m_life->life_list($req_data);
|
||||
|
||||
foreach($maptoon as $v){
|
||||
$arr_maptoon[]=$v;
|
||||
$arr_maptoon[$i]['title']=$v['name'].'-'.$v['title'];
|
||||
$arr_maptoon[$i]['div']="mt";
|
||||
$i++;
|
||||
}
|
||||
|
||||
$melon_json = file_get_contents('http://35.224.33.187/melon.json');
|
||||
if($melon_json!='')
|
||||
$melon_arr = json_decode($melon_json,true);
|
||||
else
|
||||
$melon_arr = array();
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['site_info'] = $site_info;
|
||||
$return_data['advertisement'] = $advertisement;
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['arr_today_word'] = $arr_today_word;
|
||||
$return_data['arr_headline_news'] = $arr_headline_news;
|
||||
$return_data['arr_life_home'] = $arr_life_home;
|
||||
$return_data['arr_daily_cutie'] = $arr_daily_cutie;
|
||||
$return_data['arr_card_news'] = $arr_card_news;
|
||||
$return_data['arr_press'] = $arr_press;
|
||||
$return_data['arr_company'] = $arr_company;
|
||||
$return_data['arr_heart_opening_story'] = $arr_heart_opening_story;
|
||||
$return_data['arr_maptoon'] = $arr_maptoon;
|
||||
$return_data['arr_gracious_verse'] = $arr_gracious_verse;
|
||||
// $return_data['arr_praise'] = $arr_praise;
|
||||
// $return_data['arr_gospel'] = $arr_gospel;
|
||||
// $return_data['arr_knowledge'] = $arr_knowledge;
|
||||
$return_data['arr_tv_gospel'] = $arr_tv_gospel;
|
||||
$return_data['arr_tv_praise'] = $arr_tv_praise;
|
||||
$return_data['arr_tv_testimony'] = $arr_tv_testimony;
|
||||
$return_data['arr_tv_talkshow'] = $arr_tv_talkshow;
|
||||
// $return_data['arr_grace'] = $arr_grace;
|
||||
// $return_data['arr_love'] = $arr_love;
|
||||
// $return_data['arr_christmas'] = $arr_christmas;
|
||||
// $return_data['arr_completion'] = $arr_completion;
|
||||
$return_data['arr_today_column'] = $arr_today_column;
|
||||
$return_data['arr_melon_ccm'] = $melon_arr;
|
||||
$return_data['arr_meditation_contemplation'] = $arr_meditation_contemplation;
|
||||
$return_data['arr_bible_postcard'] = $arr_bible_postcard;
|
||||
$return_data['arr_christian_reading'] = $arr_christian_reading;
|
||||
$return_data['arr_Prayer'] = $arr_Prayer;
|
||||
|
||||
|
||||
|
||||
|
||||
$this->load->library('user_agent');
|
||||
if($this->agent->is_mobile()) {
|
||||
$return_data['is_mobile'] = true;
|
||||
} else {
|
||||
$return_data['is_mobile'] = false;
|
||||
}
|
||||
$this->load->view('/web/index3test', $return_data);
|
||||
}
|
||||
}
|
||||
1006
application/controllers/web/life.php
Executable file
1006
application/controllers/web/life.php
Executable file
File diff suppressed because it is too large
Load Diff
158
application/controllers/web/main.php
Executable file
158
application/controllers/web/main.php
Executable file
@@ -0,0 +1,158 @@
|
||||
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
|
||||
class main extends MY_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
$this->load->library('user_agent');
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
$this->load->helper('crossmap/exception_helper');
|
||||
$this->load->library('Post', '', 'post');
|
||||
$this->load->model('config_model');
|
||||
$this->load->model('web/m_advertisement');
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->load->helper('cookie');
|
||||
$session_id = get_cookie('crossmap_save_id');
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
if ($session_id != '' && $SES_MEMBER_ID == '') {
|
||||
# model - session 가져오기
|
||||
$this->load->model('web/m_ci_sessions');
|
||||
$session_result = $this->m_ci_sessions->ci_sessions_select($session_id);
|
||||
session_decode($session_result['data']);
|
||||
}
|
||||
|
||||
if ($SES_MEMBER_ID != '') {
|
||||
$expire_date = date("Y-m-d H:i:s", strtotime("+10 minutes"));
|
||||
|
||||
# model - 중복로그인 체크용
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$req_data['expire_date'] = $expire_date;
|
||||
$this->load->model('web/m_member_login');
|
||||
$this->m_member_login->member_login_member_id_member_ip_update($req_data);
|
||||
}
|
||||
|
||||
$graceCategories = array('result' => $this->category_model->findById(array_values($this->config->item('categories')['grace']))->result());
|
||||
foreach ($graceCategories['result'] as $gcategory) {
|
||||
$graceCategories[$gcategory->idx] = $gcategory;
|
||||
}
|
||||
$arr_bible_postcard = $this->post->getPostsByCategoryId(array($this->config->item('categories')['grace']['postcard']), 24);
|
||||
$arr_christian_reading = $this->post->getPostsByCategoryId(array($this->config->item('categories')['grace']['book']), 24);
|
||||
|
||||
$arr_heart_opening_story = $this->post->getPostsByCategoryId(array($this->config->item('categories')['grace']['dailyQT']), 18);
|
||||
$arr_heart_opening_story1 = array_slice($arr_heart_opening_story, 0, 2);
|
||||
$arr_heart_opening_story2 = array_slice($arr_heart_opening_story, 2, 15);
|
||||
$arr_heart_opening_story = array_merge($arr_heart_opening_story1, array(
|
||||
array(
|
||||
'banner_url' => 'https://dramabible.org/',
|
||||
'main_img' => '/assets/images/banner-2020-342343.jpg',
|
||||
'title' => '<span style="color:#26bcb7">AD</span> 성경 듣기! 드라마 바이블로 더욱 생동감있게!!',
|
||||
),
|
||||
));
|
||||
$arr_heart_opening_story = array_merge($arr_heart_opening_story, $arr_heart_opening_story2);
|
||||
|
||||
$arr_gracious_verse = $this->post->getPostsByCategoryId(array($this->config->item('categories')['grace']['enQT']), 18);
|
||||
$arr_qna = $this->post->getPostsByCategoryId(array($this->config->item('categories')['grace']['qna']), 18);
|
||||
|
||||
$arr_headline_news = $this->getHomeTopNews();
|
||||
|
||||
$photoHeadlineNewsPostId = array();
|
||||
foreach ($arr_headline_news as $k => $phn) {
|
||||
$photoHeadlineNewsPostId[] = $phn['idx'];
|
||||
$arr_headline_news[$k]['theme_img'] = $phn['main_img'];
|
||||
$arr_headline_news[$k]['content_idx'] = $phn['idx'];
|
||||
}
|
||||
|
||||
$lackingNews = $this->db->order_by('reg_date', 'desc')
|
||||
->where('is_del', 'N')->where('is_display', 'Y')
|
||||
->limit(24 - count($arr_headline_news))->where_not_in('idx', $photoHeadlineNewsPostId)->get('news')->result_array();
|
||||
foreach ($lackingNews as $val) {
|
||||
array_push($arr_headline_news, array('title' => $val['title'],
|
||||
'theme_img' => $val['main_img'] ? $val['main_img'] : $val['theme_img'], 'content_idx' => $val['idx']));
|
||||
}
|
||||
|
||||
$return_data = array();
|
||||
$return_data['advertisement'] = $this->m_advertisement->find_ad_by_page_key('Main');
|
||||
$return_data['arr_today_word'] = $this->getHomeTodayWord();
|
||||
$return_data['arr_headline_news'] = $arr_headline_news;
|
||||
$return_data['arr_daily_cutie'] = $this->getDailyQt();
|
||||
$return_data['arr_heart_opening_story'] = $arr_heart_opening_story;
|
||||
$return_data['arr_gracious_verse'] = $arr_gracious_verse;
|
||||
$return_data['arr_qna'] = $arr_qna;
|
||||
$return_data['arr_tv_gospel'] = $this->post->getPostsByCategoryId(array(40), 16);
|
||||
$return_data['arr_tv_praise'] = $this->post->getPostsByCategoryId(array(38), 16);
|
||||
$return_data['arr_tv_testimony'] = $this->post->getPostsByCategoryId(array(39), 16);
|
||||
$return_data['arr_tv_talkshow'] = $this->post->getPostsByCategoryId(array(41), 16);
|
||||
$return_data['arr_bible_postcard'] = $arr_bible_postcard;
|
||||
$return_data['arr_christian_reading'] = $arr_christian_reading;
|
||||
$return_data['arr_Prayer'] = $this->post->getPostsByCategoryId(array(26), 24);
|
||||
$return_data['graceCategories'] = $graceCategories;
|
||||
|
||||
$this->load->library('user_agent');
|
||||
if ($this->agent->is_mobile()) {
|
||||
$return_data['is_mobile'] = true;
|
||||
} else {
|
||||
$return_data['is_mobile'] = false;
|
||||
}
|
||||
$this->load->view('/web/nmain', $return_data);
|
||||
}
|
||||
|
||||
private function getDailyQt()
|
||||
{
|
||||
$config = $this->config_model->findByTypeAndPage('home', 'homedailyqt')->get()->result();
|
||||
if (count($config)) {
|
||||
$today = date('Y-m-d');
|
||||
foreach($config as $c) {
|
||||
if(strstr($c->DpTime, $today)) {
|
||||
return $this->post->getPost($c->PostId);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->post->getPostsByCategoryId($this->config->item('categories')['grace']['dailyQT'], 1)[0];
|
||||
}
|
||||
|
||||
private function getHomeTopNews()
|
||||
{
|
||||
$config = $this->config_model->findByTypeAndPage('home', 'hometopnews')->get()->result();
|
||||
if (count($config)) {
|
||||
$posts = array();
|
||||
foreach ($config as $c) {
|
||||
$posts[] = $c->PostId;
|
||||
}
|
||||
$news = $this->db->where_in('idx', $posts)->get('news')->result_array();
|
||||
$nnews = array();
|
||||
foreach ($config as $c) {
|
||||
foreach($news as $n) {
|
||||
if($n['idx'] == $c->PostId) {
|
||||
$nnews[$c->OrderNum] = $n;
|
||||
}
|
||||
}
|
||||
}
|
||||
ksort($nnews);
|
||||
return array_values($nnews);
|
||||
} else {
|
||||
return $this->post->getPostsByCategoryId($this->config->item('categories')['grace']['dailyQT'], 1)[0];
|
||||
}
|
||||
}
|
||||
|
||||
private function getHomeTodayWord() {
|
||||
$config = $this->config_model->findByTypeAndPage('home', 'hometodayword')->get()->result_array();
|
||||
if(count($config)) {
|
||||
$today = date('Y-m-d');
|
||||
foreach($config as $c) {
|
||||
if(strstr($c['DpTime'], $today)) {
|
||||
return array('word' => $c['Title'], 'title' => $c['Headline']);
|
||||
}
|
||||
}
|
||||
}return array('word' => '', 'title' => '');
|
||||
}
|
||||
}
|
||||
489
application/controllers/web/maptoon.php
Executable file
489
application/controllers/web/maptoon.php
Executable file
@@ -0,0 +1,489 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once (APPPATH . 'core/web/cm_controller.php');
|
||||
|
||||
class maptoon extends cm_Controller
|
||||
{
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
$this->load->library('user_agent');
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
$this->load->helper('crossmap/exception_helper');
|
||||
//header('location:/');
|
||||
//exit(3);
|
||||
}
|
||||
|
||||
/*
|
||||
* extract part of widget data
|
||||
*/
|
||||
function get_widget_data($orig_arr, $key, $num)
|
||||
{
|
||||
if (is_array($orig_arr) == FALSE || trim($key) == '' || is_numeric($num) == FALSE || $num <= 0) {
|
||||
return FALSE;
|
||||
}
|
||||
array_multisort(array_column($orig_arr, $key), SORT_DESC, $orig_arr);
|
||||
$ret = array_slice($orig_arr, 0, $num);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function fn_index()
|
||||
{
|
||||
$this->config->load('filecache', TRUE);
|
||||
$filecache = $this->config->item('file_cache_path', 'filecache');
|
||||
|
||||
$this->load->library('maptoon_lib', [
|
||||
'file_cache_path' => $filecache
|
||||
]);
|
||||
// 1. get slideshow
|
||||
$slideshow = $this->maptoon_lib->get_category_cache(8);
|
||||
$slideshow_arr = json_decode($slideshow, TRUE);
|
||||
// 2. 뜨끈뜨끈한 신작
|
||||
$new_release = $this->maptoon_lib->get_category_cache(9);
|
||||
$new_release_arr = json_decode($new_release, TRUE);
|
||||
$new_release_date = $this->get_widget_data($new_release_arr, 'reg_date', 6);
|
||||
$new_release_count = $this->get_widget_data($new_release_arr, 'view_count', 6);
|
||||
$new_release_grade = $this->get_widget_data($new_release_arr, 'grade', 6);
|
||||
// 3. 성경을 재미있게
|
||||
$fun = $this->maptoon_lib->get_category_cache(10);
|
||||
$fun_arr = json_decode($fun, TRUE);
|
||||
$fun_date = $this->get_widget_data($fun_arr, 'reg_date', 3);
|
||||
$fun_count = $this->get_widget_data($fun_arr, 'view_count', 3);
|
||||
$fun_grade = $this->get_widget_data($fun_arr, 'grade', 3);
|
||||
|
||||
$faith = $this->maptoon_lib->get_category_cache(11);
|
||||
$faith_arr = json_decode($faith, TRUE);
|
||||
$faith_date = $this->get_widget_data($faith_arr, 'reg_date', 9);
|
||||
$faith_count = $this->get_widget_data($faith_arr, 'view_count', 9);
|
||||
$faith_grade = $this->get_widget_data($faith_arr, 'grade', 9);
|
||||
|
||||
$menu_home = 1;
|
||||
$return_data = [
|
||||
'slideshow' => $slideshow_arr,
|
||||
'new_release' => $new_release_arr,
|
||||
'new_release_date' => $new_release_date,
|
||||
'new_release_count' => $new_release_count,
|
||||
'new_release_grade' => $new_release_grade,
|
||||
'fun_date' => $fun_date,
|
||||
'fun_count' => $fun_count,
|
||||
'fun_grade' => $fun_grade,
|
||||
'faith_date' => $faith_date,
|
||||
'faith_count' => $faith_count,
|
||||
'faith_grade' => $faith_grade,
|
||||
'menu_home' => $menu_home
|
||||
];
|
||||
return $this->load->view('/web/maptoon/maptoon_main', $return_data, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* 완결 웹툰 페이지
|
||||
*/
|
||||
function fn_completed()
|
||||
{
|
||||
$this->config->load('filecache', TRUE);
|
||||
$filecache = $this->config->item('file_cache_path', 'filecache');
|
||||
|
||||
// today webtoon
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$today = $this->m_maptoon->get_today_maptoon();
|
||||
$today_date = strtolower(date("D"));
|
||||
|
||||
$completed = $this->db->select('l.*, c.name cartoonist')
|
||||
->join('mt_cartoonists c', 'l.mt_cartoonists_idx=c.idx')
|
||||
->get_where('mt_list l', [
|
||||
'status' => 1
|
||||
])
|
||||
->result();
|
||||
|
||||
// menu
|
||||
$menu_completed = 1;
|
||||
$return_data = [
|
||||
'completed' => $completed,
|
||||
'today' => $today,
|
||||
'today_date' => $today_date,
|
||||
'menu_completed' => $menu_completed
|
||||
];
|
||||
return $this->load->view('/web/maptoon/maptoon_completed', $return_data, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* 연재 웹툰 페이지
|
||||
*/
|
||||
function fn_ongoing()
|
||||
{
|
||||
$this->config->load('filecache', TRUE);
|
||||
$filecache = $this->config->item('file_cache_path', 'filecache');
|
||||
|
||||
// today webtoon
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$today = $this->m_maptoon->get_today_maptoon();
|
||||
$today_date = strtolower(date("D"));
|
||||
|
||||
$this->load->library('maptoon_lib', [
|
||||
'file_cache_path' => $filecache
|
||||
]);
|
||||
$recomm = $this->maptoon_lib->get_category_cache(13);
|
||||
$recomm_arr = json_decode($recomm, TRUE);
|
||||
$recomm_date = $this->get_widget_data($recomm_arr, 'reg_date', 6);
|
||||
$recomm_count = $this->get_widget_data($recomm_arr, 'view_count', 6);
|
||||
$recomm_grade = $this->get_widget_data($recomm_arr, 'grade', 6);
|
||||
|
||||
$story = $this->maptoon_lib->get_category_cache(14);
|
||||
$story_arr = json_decode($story, TRUE);
|
||||
$story_date = $this->get_widget_data($story_arr, 'reg_date', 3);
|
||||
$story_count = $this->get_widget_data($story_arr, 'view_count', 3);
|
||||
$story_grade = $this->get_widget_data($story_arr, 'grade', 3);
|
||||
|
||||
$read = $this->maptoon_lib->get_category_cache(15);
|
||||
$read_arr = json_decode($read, TRUE);
|
||||
$read_date = $this->get_widget_data($read_arr, 'reg_date', 3);
|
||||
$read_count = $this->get_widget_data($read_arr, 'view_count', 3);
|
||||
$read_grade = $this->get_widget_data($read_arr, 'grade', 3);
|
||||
|
||||
// menu
|
||||
$menu_ongoing = 1;
|
||||
$return_data = [
|
||||
'recomm_date' => $recomm_date,
|
||||
'recomm_count' => $recomm_count,
|
||||
'recomm_grade' => $recomm_grade,
|
||||
'story_date' => $story_date,
|
||||
'story_count' => $story_count,
|
||||
'story_grade' => $story_grade,
|
||||
'read_date' => $read_date,
|
||||
'read_count' => $read_count,
|
||||
'read_grade' => $read_grade,
|
||||
'today' => $today,
|
||||
'today_date' => $today_date,
|
||||
'menu_ongoing' => $menu_ongoing
|
||||
];
|
||||
return $this->load->view('/web/maptoon/maptoon_ongoing', $return_data, true);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// PURPOSE : maptoon list page
|
||||
// CREATE : 2019-03-19
|
||||
// ---------------------------------------------------------------------------
|
||||
function fn_list()
|
||||
{
|
||||
$mt_id = $this->input->get('mtId');
|
||||
|
||||
if ($mt_id == null) {
|
||||
header("Location: /web/maptoon");
|
||||
} else {
|
||||
$req_data['idx'] = $mt_id;
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
// 맵툰 정보
|
||||
$mt_data = $this->m_maptoon->get_maptoon_list($req_data);
|
||||
|
||||
if (count($mt_data) == 0) {
|
||||
header("Location: /web/maptoon");
|
||||
}
|
||||
|
||||
// 공지사항
|
||||
$notices = $this->m_maptoon->get_announcement_list($mt_id);
|
||||
$arr_notice = array();
|
||||
if (count($notices) != 0) {
|
||||
$c_date = date("Y-m-d H:i:s");
|
||||
foreach ($notices as $val) {
|
||||
if ($val['s_date'] <= $c_date && $c_date <= $val['e_date']) {
|
||||
array_push($arr_notice, $val['contents']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->input->get('page') == null ? $page = 1 : $page = $this->input->get('page');
|
||||
$limit = 10; // 페이지 당 표시할 에피소드
|
||||
$offset = ($page - 1) * $limit;
|
||||
|
||||
$req_data['offset'] = ($page - 1) * $limit;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
// display episode 가져오기
|
||||
$episodes = $this->m_maptoon->get_display_episodes($req_data);
|
||||
// print_r($episodes);
|
||||
|
||||
// paging 설정
|
||||
if ($page == '')
|
||||
$page = 1;
|
||||
|
||||
// pagination
|
||||
$page_data = array();
|
||||
$page_data['total_count'] = $this->m_maptoon->get_totalcount_episodes($mt_id); // 전체 에피소드 수
|
||||
$page_data['limit'] = $limit;
|
||||
$page_data['base_url'] = '/web/maptoon/list';
|
||||
|
||||
$this->load->library('mt_pagination');
|
||||
$pagination = $this->mt_pagination->create_pagenation($page_data);
|
||||
$return_data = $page_data;
|
||||
$return_data['page'] = $page;
|
||||
|
||||
$menu_list = 1;
|
||||
$return_data['menu_list'] = $menu_list;
|
||||
$return_data['pagination'] = $pagination; // page
|
||||
$return_data['notice'] = $arr_notice; // 공지사항
|
||||
$return_data['mt_data'] = $mt_data; // 맵툰 정보
|
||||
$return_data['episodes'] = $episodes; // 에피소드 array
|
||||
|
||||
return $this->load->view('/web/maptoon/maptoon_list', $return_data, true);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// PURPOSE : maptoon article page
|
||||
// CREATE : 2019-03-19
|
||||
// ---------------------------------------------------------------------------
|
||||
function fn_article()
|
||||
{
|
||||
$mt_idx = $this->input->get('mtId');
|
||||
$episode_no = $this->input->get('no');
|
||||
|
||||
$req_data["mt_list_idx"] = $mt_idx;
|
||||
$req_data["ep_no"] = $episode_no;
|
||||
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$episode = $this->m_maptoon->get_episode_by_mt_idx_episode_no($req_data);
|
||||
if ($episode == false || $episode == NULL || count($episode) == 0) {
|
||||
header("Location: /web/maptoon");
|
||||
return false;
|
||||
}
|
||||
|
||||
$user_id = $this->session->userdata('C_Member_Id');
|
||||
$req_data2 = array(
|
||||
'user_id' => $user_id,
|
||||
'ep_idx' => $episode['idx']
|
||||
);
|
||||
|
||||
// 좋아요 & 별점 참여 유무 확인
|
||||
if ($user_id != '' || isset($user_id)) {
|
||||
$is_data = $this->m_maptoon->ep_is_like_grade($req_data2);
|
||||
}
|
||||
if (isset($is_data)) {
|
||||
$return_data['is_like'] = $is_data['is_like'];
|
||||
$return_data['is_grade'] = $is_data['is_grade'];
|
||||
} else {
|
||||
$return_data['is_like'] = 0;
|
||||
$return_data['is_grade'] = 0;
|
||||
}
|
||||
|
||||
// 페이징 데이터 가져오기
|
||||
$req_data["ep_idx"] = $episode['idx'];
|
||||
|
||||
$te_req_data['idx'] = $mt_idx;
|
||||
$list = $this->m_maptoon->get_display_episodes($te_req_data);
|
||||
$return_data['total_ep_count'] = $this->m_maptoon->get_totalcount_episodes($mt_idx);
|
||||
|
||||
// 맵툰 정보 공유 하기 위해
|
||||
$mt_req_data['idx'] = $mt_idx;
|
||||
|
||||
// 조회수 업데이트
|
||||
$this->m_maptoon->ep_hit_count($req_data2);
|
||||
|
||||
// 누적인기 웹툰
|
||||
$mt_pop_rank = $this->m_maptoon->get_mt_pop_rank();
|
||||
|
||||
$mt_data = $this->m_maptoon->get_maptoon_list($mt_req_data);
|
||||
|
||||
$return_data["menu_article"] = 1;
|
||||
$return_data["data"] = $episode;
|
||||
$return_data["mt_data"] = $mt_data;
|
||||
$return_data['mt_pop_rank'] = $mt_pop_rank;
|
||||
$return_data['list'] = $list;
|
||||
|
||||
return $this->load->view('/web/maptoon/maptoon_article', $return_data, true);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// PURPOSE : recommened click function ajax
|
||||
// CREATE : 2019-03-21
|
||||
// ---------------------------------------------------------------------------
|
||||
function fn_ajax_recommened()
|
||||
{
|
||||
$user_id = $this->session->userdata('C_Member_Id');
|
||||
$response_data = array();
|
||||
if ($user_id == '' || ! isset($user_id)) {
|
||||
$message = "로그인이 필요한 서비스입니다.";
|
||||
$response_data = array(
|
||||
'message' => $message,
|
||||
'state' => 0
|
||||
);
|
||||
} else {
|
||||
$ep_idx = $this->input->post('ep_idx');
|
||||
$mt_list_idx = $this->input->post('mt_list_idx');
|
||||
$req_data = array(
|
||||
'user_id' => $user_id,
|
||||
'ep_idx' => $ep_idx,
|
||||
'mt_list_idx' => $mt_list_idx
|
||||
);
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$response_data = $this->m_maptoon->like($req_data);
|
||||
}
|
||||
echo json_encode($response_data);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// PURPOSE : starScore click function ajax
|
||||
// CREATE : 2019-03-25
|
||||
// ---------------------------------------------------------------------------
|
||||
function fn_ajax_star_score()
|
||||
{
|
||||
$user_id = $this->session->userdata('C_Member_Id');
|
||||
$response_data = array();
|
||||
if ($user_id == '' || ! isset($user_id)) {
|
||||
$message = "로그인이 필요한 서비스입니다.";
|
||||
$response_data = array(
|
||||
'message' => $message,
|
||||
'state' => 0
|
||||
);
|
||||
} else {
|
||||
$ep_idx = $this->input->post('ep_idx');
|
||||
$score = $this->input->post('score');
|
||||
$req_data = array(
|
||||
'user_id' => $user_id,
|
||||
'ep_idx' => $ep_idx,
|
||||
'score' => $score
|
||||
);
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$response_data = $this->m_maptoon->star_score($req_data);
|
||||
}
|
||||
echo json_encode($response_data);
|
||||
}
|
||||
|
||||
function fn_ajax_mt_recommend()
|
||||
{
|
||||
$user_id = $this->session->userdata('C_Member_Id');
|
||||
$mt_idx = $this->input->post('mt_list_idx');
|
||||
|
||||
if ($user_id == '' || ! isset($user_id)) {
|
||||
$message = "로그인이 필요한 서비스입니다.";
|
||||
$response_data = array(
|
||||
'message' => $message,
|
||||
'state' => 0
|
||||
);
|
||||
} else {
|
||||
$req_data = array(
|
||||
'user_id' => $user_id,
|
||||
'mt_idx' => $mt_idx
|
||||
);
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$response_data = $this->m_maptoon->mt_recommend($req_data);
|
||||
}
|
||||
echo json_encode($response_data);
|
||||
}
|
||||
|
||||
function fn_ongoing_1()
|
||||
{
|
||||
$this->config->load('filecache', TRUE);
|
||||
$filecache = $this->config->item('file_cache_path', 'filecache');
|
||||
|
||||
// today webtoon
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$today = $this->m_maptoon->get_today_maptoon();
|
||||
$today_date = strtolower(date("D"));
|
||||
|
||||
$this->load->library('maptoon_lib', [
|
||||
'file_cache_path' => $filecache
|
||||
]);
|
||||
$recomm = $this->maptoon_lib->get_category_cache(13);
|
||||
$recomm_arr = json_decode($recomm, TRUE);
|
||||
$recomm_date = $this->get_widget_data($recomm_arr, 'reg_date', 6);
|
||||
$recomm_count = $this->get_widget_data($recomm_arr, 'view_count', 6);
|
||||
$recomm_grade = $this->get_widget_data($recomm_arr, 'grade', 6);
|
||||
|
||||
$story = $this->maptoon_lib->get_category_cache(14);
|
||||
$story_arr = json_decode($story, TRUE);
|
||||
$story_date = $this->get_widget_data($story_arr, 'reg_date', 3);
|
||||
$story_count = $this->get_widget_data($story_arr, 'view_count', 3);
|
||||
$story_grade = $this->get_widget_data($story_arr, 'grade', 3);
|
||||
|
||||
$read = $this->maptoon_lib->get_category_cache(15);
|
||||
$read_arr = json_decode($read, TRUE);
|
||||
$read_date = $this->get_widget_data($read_arr, 'reg_date', 3);
|
||||
$read_count = $this->get_widget_data($read_arr, 'view_count', 3);
|
||||
$read_grade = $this->get_widget_data($read_arr, 'grade', 3);
|
||||
|
||||
// menu
|
||||
$menu_ongoing = 1;
|
||||
$return_data = [
|
||||
'recomm_date' => $recomm_date,
|
||||
'recomm_count' => $recomm_count,
|
||||
'recomm_grade' => $recomm_grade,
|
||||
'story_date' => $story_date,
|
||||
'story_count' => $story_count,
|
||||
'story_grade' => $story_grade,
|
||||
'read_date' => $read_date,
|
||||
'read_count' => $read_count,
|
||||
'read_grade' => $read_grade,
|
||||
'today' => $today,
|
||||
'today_date' => $today_date,
|
||||
'menu_ongoing' => $menu_ongoing
|
||||
];
|
||||
return $this->load->view('/web/maptoon/maptoon_ongoing_1', $return_data, true);
|
||||
}
|
||||
|
||||
function fn_comments()
|
||||
{
|
||||
$mt_idx = $this->input->get('mtId');
|
||||
$episode_no = $this->input->get('no');
|
||||
$req_data["mt_list_idx"] = $mt_idx;
|
||||
$req_data["ep_no"] = $episode_no;
|
||||
|
||||
$this->load->model('maptoon/m_maptoon');
|
||||
$episode = $this->m_maptoon->get_episode_by_mt_idx_episode_no($req_data);
|
||||
if ($episode == false || $episode == NULL || count($episode) == 0) {
|
||||
header("Location: /web/maptoon");
|
||||
return false;
|
||||
}
|
||||
|
||||
$user_id = $this->session->userdata('C_Member_Id');
|
||||
$req_data2 = array(
|
||||
'user_id' => $user_id,
|
||||
'ep_idx' => $episode['idx']
|
||||
);
|
||||
|
||||
// 좋아요 & 별점 참여 유무 확인
|
||||
if ($user_id != '' || isset($user_id)) {
|
||||
$is_data = $this->m_maptoon->ep_is_like_grade($req_data2);
|
||||
}
|
||||
if (isset($is_data)) {
|
||||
$return_data['is_like'] = $is_data['is_like'];
|
||||
$return_data['is_grade'] = $is_data['is_grade'];
|
||||
} else {
|
||||
$return_data['is_like'] = 0;
|
||||
$return_data['is_grade'] = 0;
|
||||
}
|
||||
|
||||
// 페이징 데이터 가져오기
|
||||
$req_data["ep_idx"] = $episode['idx'];
|
||||
|
||||
$te_req_data['idx'] = $mt_idx;
|
||||
$list = $this->m_maptoon->get_display_episodes($te_req_data);
|
||||
$return_data['total_ep_count'] = $this->m_maptoon->get_totalcount_episodes($mt_idx);
|
||||
|
||||
// 맵툰 정보 공유 하기 위해
|
||||
$mt_req_data['idx'] = $mt_idx;
|
||||
|
||||
// 조회수 업데이트
|
||||
$this->m_maptoon->ep_hit_count($req_data2);
|
||||
|
||||
// 누적인기 웹툰
|
||||
$mt_pop_rank = $this->m_maptoon->get_mt_pop_rank();
|
||||
|
||||
$mt_data = $this->m_maptoon->get_maptoon_list($mt_req_data);
|
||||
|
||||
$return_data["menu_article"] = 1;
|
||||
$return_data["data"] = $episode;
|
||||
$return_data["mt_data"] = $mt_data;
|
||||
$return_data['mt_pop_rank'] = $mt_pop_rank;
|
||||
$return_data['list'] = $list;
|
||||
|
||||
return $this->load->view('/web/maptoon/maptoon_comments', $return_data, true);
|
||||
}
|
||||
}
|
||||
1
application/controllers/web/melon.json
Executable file
1
application/controllers/web/melon.json
Executable file
@@ -0,0 +1 @@
|
||||
[["https://cdnimg.melon.co.kr/cm/album/images/102/39/610/10239610_500.jpg/melon/resize/120/quality/80/optimize", "\ub208\ubb3c\uc758 \ud638\ub9ac\ubcd1", "\uc815\uba85\ud76c"], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/569/10239569_500.jpg/melon/resize/120/quality/80/optimize", "\ub0b4 \uae30\ub3c4\ud558\ub294 \uadf8 \uc2dc\uac04", "\uc870\uc5d8 \ub9ac (Joel Lee)"], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/562/10239562_500.jpg/melon/resize/120/quality/80/optimize", "\ub0b4\uac8c \uc788\ub294 \ud5a5\uc720 \uc625\ud569 (I Surrender All)", "\uc88c\uc131\uc544(Sungah Chua)"], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/513/10239513_500.jpg/melon/resize/120/quality/80/optimize", "\ud558\ub098\ub2d8\uc758 \uc601\uc73c\ub85c", "\ubcc0\uc815\ubbf8"], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/345/10239345_500.jpg/melon/resize/120/quality/80/optimize", "\uc8fc\ub2d8\uc758 \ub9d0\uc500\uc740", "\uae40\ud55c\ub098"], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/340/10239340_500.jpg/melon/resize/120/quality/80/optimize", "\uadc0\ud55c \uc8fc\ub2d8\uc758 \uc0ac\ub791", "\uc2a4\ud504\ub77c\uae30\uc2a4"], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/262/10239262_500.jpg/melon/resize/120/quality/80/optimize", "\ub098\uc758 \uac08 \uae38 \ub2e4 \uac00\ub3c4\ub85d (Arr.\ubc15\uc0ac\ubb34\uc5d8) (384\uc7a5)", "\ud544\ub370\uc774\ube0c\uc2a4\ud29c\ub514\uc624"], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/243/10239243_500.jpg/melon/resize/120/quality/80/optimize", "Vanity", "\uc0ac\uc6b4\ub529\ub77c\uc774\uce20"], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/187/10239187_500.jpg/melon/resize/120/quality/80/optimize", "\uba3c\ud6d7\ub0a0\uc5d0", ""], ["https://cdnimg.melon.co.kr/cm/album/images/102/39/182/10239182_500.jpg/melon/resize/120/quality/80/optimize", "\uc6b0\ub9ac \ubcf4\uc88c \uc55e\uc5d0 \ubaa8\uc600\ub124 (Vision)", "\uc88c\uc131\uc544(Sungah Chua)"]]
|
||||
850
application/controllers/web/member.php
Executable file
850
application/controllers/web/member.php
Executable file
@@ -0,0 +1,850 @@
|
||||
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class member extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 아이디중복체크
|
||||
# CREATE : 2018-04-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_member_id_check_proc() {
|
||||
# request
|
||||
$member_id = trim($this->input->get_post('member_id', TRUE));
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$member_count = $this->m_member->member_where_member_id_count($member_id);
|
||||
|
||||
if($member_count == 0) {
|
||||
$return_data['result'] = array('result_code' => '0000');
|
||||
} else {
|
||||
$return_data['result'] = array('result_code' => '9999');
|
||||
}
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 일반회원 로그인
|
||||
# CREATE : 2018-04-05
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_login_proc(){
|
||||
|
||||
$this->load->helper('cookie');
|
||||
|
||||
# Request
|
||||
$member_id = trim($this->input->get_post('member_id', TRUE)); // 아이디
|
||||
$member_pwd = trim($this->input->get_post('member_pwd', TRUE)); // 비밀번호
|
||||
$_url = urldecode(trim($this->input->get_post('url', TRUE))); // return url
|
||||
$save_login = trim($this->input->get_post('save_login', TRUE)); //로그인 상태 유지
|
||||
|
||||
# valid Check
|
||||
if (empty($member_id) == true) throw new Cm_Exception('json', '9999', '회원아이디와 비밀번호를 확인해주세요.');
|
||||
if (empty($member_pwd) == true) throw new Cm_Exception('json', '9999', '회원아이디와 비밀번호를 확인해주세요.');
|
||||
|
||||
# 로그인
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $member_id;
|
||||
$req_data['member_pwd'] = $member_pwd;
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$result = $this->m_member->member_join_member_group_where_member_id_member_pwd_select($req_data);
|
||||
if(count($result) == 0) {
|
||||
throw new Cm_Exception('json', '9999', '회원아이디와 비밀번호를 확인해주세요.');
|
||||
}
|
||||
|
||||
# 비밀번호 변경확인
|
||||
$now_date = date("Y-m-d");
|
||||
$last_pwd_change_date = date("Y-m-d", strtotime($result['last_pwd_change_date'].' + 3month'));
|
||||
|
||||
if($now_date >= $last_pwd_change_date) {
|
||||
$this->session->set_userdata('C_Member_Password_Change', 'Y');
|
||||
}
|
||||
|
||||
$result['save_login'] = $save_login;
|
||||
$this->load->library('comm');
|
||||
$msg = $this->comm->fn_login_proc($result);
|
||||
|
||||
|
||||
$return_data = array();
|
||||
$return_data['result'] = array('code' => '0000', 'msg'=>$msg, 'url'=>$_url);
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 로그아웃
|
||||
# CREATE : 2018-04-10
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_logout_proc(){
|
||||
|
||||
$this->load->helper('url');
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_logout_proc();
|
||||
|
||||
# 메인으로 이동
|
||||
redirect($_SERVER['HTTP_REFERER']);
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 비밀번호 확인
|
||||
# CREATE : 2018-04-11
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_password_check_proc(){
|
||||
|
||||
# Request
|
||||
$member_id = trim($this->input->get_post('member_id', TRUE)); // 아이디
|
||||
$member_pwd = trim($this->input->get_post('member_pwd', TRUE)); // 비밀번호
|
||||
|
||||
|
||||
# 로그인
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $member_id;
|
||||
$req_data['member_pwd'] = $member_pwd;
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$result = $this->m_member->member_join_member_group_where_member_id_member_pwd_select($req_data);
|
||||
if(count($result) == 0) {
|
||||
throw new Cm_Exception('json', '9999', '비밀번호를 확인해주세요.');
|
||||
}
|
||||
|
||||
$this->load->helper('cookie');
|
||||
set_cookie('crossmap_passwd_check', 'Y', 0);
|
||||
|
||||
$return_data = array();
|
||||
$return_data['result'] = array('code' => '0000');
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 회원가입
|
||||
# CREATE : 2018-04-24
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_member_join_proc() {
|
||||
|
||||
# Request
|
||||
$social_id = trim($this->input->get_post('social_id', TRUE));
|
||||
$sns_profile_img = trim($this->input->get_post('sns_profile_img', TRUE));
|
||||
$is_mobile_auth = trim($this->input->get_post('is_mobile_auth', TRUE));
|
||||
$member_gender = trim($this->input->get_post('member_gender', TRUE));
|
||||
$parent_gender = trim($this->input->get_post('parent_gender', TRUE));
|
||||
$is_parent_auth = trim($this->input->get_post('is_parent_auth', TRUE));
|
||||
$is_under14 = trim($this->input->get_post('is_under14', TRUE));
|
||||
$agree1 = trim($this->input->get_post('agree1', TRUE));
|
||||
$agree2 = trim($this->input->get_post('agree2', TRUE));
|
||||
$agree3 = trim($this->input->get_post('agree3', TRUE));
|
||||
$member_id = trim($this->input->get_post('member_id', TRUE));
|
||||
$member_pwd = trim($this->input->get_post('member_pwd', TRUE));
|
||||
$member_name = trim($this->input->get_post('member_name', TRUE));
|
||||
$birth_year = trim($this->input->get_post('birth_year', TRUE));
|
||||
$birth_month = trim($this->input->get_post('birth_month', TRUE));
|
||||
$birth_day = trim($this->input->get_post('birth_day', TRUE));
|
||||
$member_calendar = trim($this->input->get_post('member_calendar', TRUE));
|
||||
$parent_name = trim($this->input->get_post('parent_name', TRUE));
|
||||
$parent_mobile_company = trim($this->input->get_post('parent_mobile_company', TRUE));
|
||||
$parent_mobile = trim($this->input->get_post('parent_mobile', TRUE));
|
||||
$under14_member_email = trim($this->input->get_post('under14_member_email', TRUE));
|
||||
$email1 = trim($this->input->get_post('email1', TRUE));
|
||||
$email2 = trim($this->input->get_post('email2', TRUE));
|
||||
$country_phone_no = trim($this->input->get_post('country_phone_no', TRUE));
|
||||
$mobile1 = trim($this->input->get_post('mobile1', TRUE));
|
||||
$mobile2 = trim($this->input->get_post('mobile2', TRUE));
|
||||
$mobile3 = trim($this->input->get_post('mobile3', TRUE));
|
||||
$member_church = trim($this->input->get_post('member_church', TRUE));
|
||||
$etc1 = trim($this->input->get_post('etc1', TRUE));
|
||||
$etc2 = trim($this->input->get_post('etc2', TRUE));
|
||||
$etc3 = trim($this->input->get_post('etc3', TRUE));
|
||||
$etc4 = trim($this->input->get_post('etc4', TRUE));
|
||||
$etc5 = trim($this->input->get_post('etc5', TRUE));
|
||||
$mobile_CI = trim($this->input->get_post('mobile_CI', TRUE));
|
||||
$under14_member_name = trim($this->input->get_post('under14_member_name', TRUE));
|
||||
|
||||
$nickname = trim($this->input->get_post('nickname', TRUE));
|
||||
|
||||
# helper
|
||||
$this->load->helper('url');
|
||||
$this->load->helper('cookie');
|
||||
|
||||
|
||||
# valid check
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_rules('agree1', '', 'required|in_list[Y]');
|
||||
$this->form_validation->set_rules('agree2', '', 'required|in_list[Y]');
|
||||
$this->form_validation->set_rules('agree3', '', 'required|in_list[Y]');
|
||||
$this->form_validation->set_rules('member_gender', '', 'required');
|
||||
if($social_id == '') {
|
||||
$this->form_validation->set_rules('member_id', '', 'required');
|
||||
$this->form_validation->set_rules('member_pwd', '', 'required');
|
||||
}
|
||||
$this->form_validation->set_rules('member_name', '', 'required');
|
||||
$this->form_validation->set_rules('nickname', '', 'required');
|
||||
$this->form_validation->set_rules('birth_year', '', 'required');
|
||||
$this->form_validation->set_rules('birth_month', '', 'required');
|
||||
$this->form_validation->set_rules('birth_day', '', 'required');
|
||||
$this->form_validation->set_rules('member_calendar', '', 'required');
|
||||
$this->form_validation->set_rules('is_mobile_auth', '', 'required|in_list[Y]');
|
||||
$this->form_validation->set_rules('mobile_CI', '', 'required');
|
||||
if($this->form_validation->run() == false){
|
||||
gf_alert("잘못된 접근입니다.1", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
$parent_CI = '';$parent_real_name = '';
|
||||
if($is_under14=='Y') { // 14세 미만
|
||||
$this->form_validation->set_rules('parent_name', '', 'required');
|
||||
$this->form_validation->set_rules('parent_mobile_company', '', 'required');
|
||||
$this->form_validation->set_rules('parent_mobile', '', 'required');
|
||||
if($this->form_validation->run() == false){
|
||||
gf_alert("잘못된 접근입니다.2", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
$member_email = $under14_member_email;
|
||||
$member_mobile = '';
|
||||
$parent_real_name = $member_name;
|
||||
$member_name = $under14_member_name;
|
||||
$parent_CI = $mobile_CI;
|
||||
$mobile_CI = '';
|
||||
$is_parent_auth = $is_mobile_auth;
|
||||
$is_mobile_auth = 'N';
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$this->form_validation->set_rules('email1', '', 'required');
|
||||
$this->form_validation->set_rules('email2', '', 'required');
|
||||
$this->form_validation->set_rules('country_phone_no', '', 'required');
|
||||
$this->form_validation->set_rules('mobile1', '', 'required');
|
||||
$this->form_validation->set_rules('mobile2', '', 'required');
|
||||
|
||||
if($this->form_validation->run() == false){
|
||||
gf_alert("잘못된 접근입니다.3", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
$member_email = $email1.'@'.$email2;
|
||||
$member_mobile = $mobile1.'-'.$mobile2.'-'.$mobile3;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$now_date = date("Y-m-d H:i:s");
|
||||
|
||||
|
||||
$filename = '';
|
||||
$social_type = '';
|
||||
$token = '';
|
||||
$token_secret = '';
|
||||
$refresh_token = '';
|
||||
$token_expires_date = $now_date;
|
||||
$member_group_idx = 1;
|
||||
if($social_id!='') { // sns 가입
|
||||
# model
|
||||
$this->load->model('web/m_tmp_social_member');
|
||||
$arr_social = $this->m_tmp_social_member->tmp_social_member_select($social_id);
|
||||
|
||||
$social_type = $arr_social['social_type'];
|
||||
$token = $arr_social['token'];
|
||||
$token_secret = $arr_social['token_secret'];
|
||||
$refresh_token = $arr_social['refresh_token'];
|
||||
$token_expires_date = $arr_social['token_expires_date'];
|
||||
|
||||
$member_group_idx = 2;
|
||||
$member_id_prefix = '';
|
||||
switch ($social_type) {
|
||||
case '1': $member_id_prefix = 'FB_'; break;
|
||||
case '2': $member_id_prefix = 'TW_'; break;
|
||||
case '3': $member_id_prefix = 'KK_'; break;
|
||||
case '4': $member_id_prefix = 'NB_'; break;
|
||||
}
|
||||
|
||||
$member_id = $member_id_prefix.$social_id;
|
||||
$member_pwd = time();
|
||||
|
||||
$upload_path = './files/profile/' . date("Y") . "/" . date("m");
|
||||
if (!is_dir($upload_path)) {
|
||||
mkdir($upload_path, 0777, TRUE);
|
||||
}
|
||||
|
||||
if($sns_profile_img!='') {
|
||||
$arr_img_type = explode('.', $sns_profile_img);
|
||||
|
||||
$last_key = count($arr_img_type)-1;
|
||||
$img_type = '';
|
||||
if(isset($arr_img_type[$last_key])==true) {
|
||||
$img_type = $arr_img_type[$last_key];
|
||||
}
|
||||
|
||||
$img_name = $social_id.time().".".$img_type;
|
||||
copy($sns_profile_img, $upload_path.'/'.$img_name);
|
||||
$filename = '/files/profile/' . date("Y") . "/" . date("m").'/'.$img_name;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
# model - 아이디 중복체크
|
||||
$this->load->model('web/m_member');
|
||||
$member_count = $this->m_member->member_where_member_id_count($member_id);
|
||||
if($member_count > 0) {
|
||||
gf_alert("잘못된 접근입니다.4", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# 이미지업로드
|
||||
if($_FILES['member_img']['name']!='') {
|
||||
# image upload
|
||||
$upload_path = './files/profile/'.date("Y")."/".date("m");
|
||||
if (!is_dir($upload_path)) {
|
||||
mkdir($upload_path, 0777, TRUE);
|
||||
}
|
||||
$config['upload_path'] = $upload_path;
|
||||
$config['allowed_types'] = 'gif|jpg|png';
|
||||
$config['encrypt_name'] = TRUE;
|
||||
|
||||
$this->load->library('upload');
|
||||
$this->upload->initialize($config);
|
||||
|
||||
if ( ! $this->upload->do_upload('member_img')) {
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
gf_alert("이미지 업로드에 실패했습니다.", '/');
|
||||
exit;
|
||||
}
|
||||
$arr_upload_data = $this->upload->data();
|
||||
$filename = str_replace($_SERVER['DOCUMENT_ROOT'], '', $arr_upload_data['full_path']);
|
||||
}
|
||||
|
||||
|
||||
$member_birth = $birth_year.'-'.$birth_month.'-'.$birth_day;
|
||||
$now_year = date("Y");
|
||||
$member_age = floor((($now_year+1)-$birth_year)/10)*10;
|
||||
|
||||
|
||||
# update data
|
||||
$req_data = array();
|
||||
$req_data['member_img'] = $filename;
|
||||
$req_data['member_id'] = $member_id;
|
||||
$req_data['member_name'] = $member_name;
|
||||
$req_data['member_group_idx'] = $member_group_idx;
|
||||
$req_data['member_pwd'] = MD5($member_pwd);
|
||||
$req_data['member_email'] = $member_email;
|
||||
$req_data['member_birth'] = $member_birth;
|
||||
$req_data['member_calendar'] = $member_calendar;
|
||||
$req_data['member_age'] = $member_age;
|
||||
$req_data['member_gender'] = $member_gender;
|
||||
$req_data['country_phone_no'] = $country_phone_no;
|
||||
$req_data['member_mobile'] = $member_mobile;
|
||||
$req_data['is_member_auth'] = $is_mobile_auth;
|
||||
$req_data['member_church'] = $member_church;
|
||||
$req_data['etc1'] = $etc1;
|
||||
$req_data['etc2'] = $etc2;
|
||||
$req_data['etc3'] = $etc3;
|
||||
$req_data['etc4'] = $etc4;
|
||||
$req_data['etc5'] = $etc5;
|
||||
$req_data['member_church'] = $member_church;
|
||||
$req_data['last_login_date'] = $now_date;
|
||||
$req_data['last_pwd_change_date'] = $now_date;
|
||||
$req_data['visit_count'] = 1;
|
||||
$req_data['sns_type'] = $social_type;
|
||||
$req_data['sns_id'] = $social_id;
|
||||
$req_data['sns_token'] = $token;
|
||||
$req_data['sns_token_secret'] = $token_secret;
|
||||
$req_data['sns_refresh_token'] = $refresh_token;
|
||||
$req_data['sns_token_expires_date'] = $token_expires_date;
|
||||
$req_data['is_under14'] = $is_under14;
|
||||
$req_data['parent_name'] = $parent_name;
|
||||
$req_data['parent_mobile_company'] = $parent_mobile_company;
|
||||
$req_data['parent_mobile'] = $parent_mobile;
|
||||
$req_data['parent_real_name'] = $parent_real_name;
|
||||
$req_data['parent_CI'] = $parent_CI;
|
||||
$req_data['is_parent_auth'] = $is_parent_auth;
|
||||
$req_data['member_status'] = 1;
|
||||
$req_data['reg_date'] = $now_date;
|
||||
$req_data['reg_id'] = $member_id;
|
||||
$req_data['update_date'] = $now_date;
|
||||
$req_data['update_id'] = $member_id;
|
||||
$req_data['mobile_CI'] = $mobile_CI;
|
||||
$req_data['member_nickname'] = $nickname;
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$member_idx = $this->m_member->member_insert($req_data);
|
||||
if($member_idx==0 || $member_idx=='') {
|
||||
gf_alert("회원가입에 실패했습니다.", 'back');
|
||||
exit;
|
||||
}
|
||||
|
||||
// 이메일발송
|
||||
$content ='크리스천들의 놀이터! <p></p>';
|
||||
$content.=$member_name.'님의 크로스맵 회원가입을 진심으로 축하합니다! <p></p>';
|
||||
$content.='크리스천 놀이터 크로스맵에 자주 놀러 오실 거죠? <p></p><p> </p>';
|
||||
$content.='아이디: '.$member_id.'<p></p>';
|
||||
$content.='이름/닉네임: '.$member_name.'<p></p>';
|
||||
$content.='가입일시: '.date("Y").'년 '.date("m").'월 '.date("d").'일 '.date("H").'시 '.date("i").'분 '.date("s").'초<p></p><p> </p>';
|
||||
$content.='닉네임 등 프로필 정보는 '내 정보관리' 에서 수정할 수 있어요:) <p></p>';
|
||||
$content.='<a href="'.$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'" target="_blank">-> 크로스맵에 놀러 가기!</a> <p></p><p> </p>';
|
||||
$content.='P.S) 하나님의 은혜와 평강이 '.$member_name.'님의 삶 가운데 늘 가득하기를 <p></p>';
|
||||
$content.='크로스맵이 응원하고 기도합니다! <p></p><p> </p>';
|
||||
$content.=' - 크로스맵 일동 올림 - <p></p>';
|
||||
|
||||
$mail_result['content'] = $content;
|
||||
$message = $this->load->view('/web/comm/mail_template', $mail_result, TRUE);
|
||||
|
||||
|
||||
$this->load->library('email');
|
||||
$config = array();
|
||||
$config['wordwrap'] = true;
|
||||
$config['mailtype'] = 'html';
|
||||
$this->email->initialize($config);
|
||||
$this->email->from(CROSSMAP_EMAIL, CROSSMAP_EMAIL_NAME);
|
||||
$this->email->to($member_email);
|
||||
$this->email->subject('크로스맵 회원가입을 진심으로 축하합니다!');
|
||||
$this->email->message($message);
|
||||
|
||||
$this->email->send();
|
||||
|
||||
$req_data['idx'] = $member_idx;
|
||||
$req_data['member_nickname'] = $nickname;
|
||||
$req_data['member_intro'] = '';
|
||||
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_login_proc($req_data);
|
||||
|
||||
$this->session->set_userdata('C_Member_First', 'Y');
|
||||
|
||||
|
||||
# 메인으로 이동
|
||||
redirect(WWW_CROSSMAP);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 이메일 중복체크
|
||||
# CREATE : 2018-04-24
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_member_email_check_proc() {
|
||||
# request
|
||||
$member_email = trim($this->input->get_post('email', TRUE));
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$member_count = $this->m_member->member_where_email_count($member_email);
|
||||
|
||||
if($member_count == 0) {
|
||||
$return_data['result'] = array('result_code' => '0000');
|
||||
} else {
|
||||
$return_data['result'] = array('result_code' => '9999');
|
||||
}
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 비밀번호 변경
|
||||
# CREATE : 2018-04-24
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_password_change_proc() {
|
||||
# request
|
||||
$now_pwd = trim($this->input->get_post('now_pwd', TRUE));
|
||||
$new_member_pwd = trim($this->input->get_post('new_member_pwd', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
# 현재 비밀번호 체크
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_pwd'] = $now_pwd;
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$result = $this->m_member->member_join_member_group_where_member_id_member_pwd_select($req_data);
|
||||
if(count($result) == 0) {
|
||||
throw new Cm_Exception('json', '9999', '현재 비밀번호를 확인해주세요.');
|
||||
}
|
||||
|
||||
$now_date = date("Y-m-d");
|
||||
$next_change_date = date("Y-m-d", strtotime($now_date.' + 3month'));
|
||||
|
||||
$now_date = str_replace("-", ".", $now_date);
|
||||
$next_change_date = str_replace("-", ".", $next_change_date);
|
||||
|
||||
$member_email = $result['member_email'];
|
||||
$member_name = $result['member_name'];
|
||||
|
||||
# 비밀번호 update
|
||||
$req_data = array();
|
||||
$req_data['idx'] = $result['idx'];
|
||||
$req_data['member_pwd'] = md5($new_member_pwd);
|
||||
$req_data['last_pwd_change_date'] = $now_date;
|
||||
$req_data['update_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$this->m_member->member_update($req_data);
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_logout_proc();
|
||||
|
||||
|
||||
if($member_email!='') {
|
||||
// 이메일발송
|
||||
$content =$member_name.'님, '.date("Y").'년 '.date("m").'월 '.date("d").'일 '.date("H").'시 '.date("i").'분 '.date("s").'초에 계정 비밀번호 정보를 변경하였습니다.<p></p>';
|
||||
$content.='혹시, 변경한 적이 없는 경우 1:1 고객센터로 문의해 주시면, 도움 드리도록 하겠습니다.<p></p>';
|
||||
$content.='* 소중한 개인정보, 잊어버리지 않도록 유의해 주세요. <p></p><p> </p>';
|
||||
$content.='P.S) 하나님의 은혜와 평강이 '.$member_name.'님의 삶 가운데 늘 가득하기를 <p></p>';
|
||||
$content.='크로스맵이 응원하고 기도합니다! <p></p><p> </p>';
|
||||
$content.=' - 크로스맵 일동 올림 - <p></p>';
|
||||
|
||||
$mail_result['content'] = $content;
|
||||
$message = $this->load->view('/web/comm/mail_template', $mail_result, TRUE);
|
||||
|
||||
$this->load->library('email');
|
||||
$config = array();
|
||||
$config['wordwrap'] = true;
|
||||
$config['mailtype'] = 'html';
|
||||
$this->email->initialize($config);
|
||||
$this->email->from(CROSSMAP_EMAIL, CROSSMAP_EMAIL_NAME);
|
||||
$this->email->to($member_email);
|
||||
$this->email->subject('개인 비밀번호 정보 변경 안내 메일입니다.');
|
||||
$this->email->message($message);
|
||||
|
||||
$this->email->send();
|
||||
|
||||
$arr_email = explode("@", $member_email);
|
||||
|
||||
$email1 = mb_substr($arr_email[0], 0, 1).'**'.mb_substr($arr_email[0], 3, 1).'***';
|
||||
$email2 = mb_substr($arr_email[1], 0, 1).'******';
|
||||
|
||||
$member_email = $email1.'@'.$email2;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$member_id = $result['member_id'];
|
||||
$member_id = mb_substr($member_id, 0, 4).'****';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$data = array('now_date'=>$now_date, 'next_change_data'=>$next_change_date, 'member_id'=>$member_id, 'member_email'=> $member_email);
|
||||
$return_data = array();
|
||||
$return_data['result'] = array('code' => '0000', 'data'=>$data);
|
||||
|
||||
$this->session->set_userdata('C_Member_Login', 'Y');
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 닉네임 중복체크
|
||||
# CREATE : 2018-04-25
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_member_nickname_check_proc() {
|
||||
# request
|
||||
$member_nickname = trim($this->input->get_post('member_nickname', TRUE));
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$member_count = $this->m_member->member_where_member_nickname_count($member_nickname);
|
||||
|
||||
if($member_count == 0) {
|
||||
$return_data['result'] = array('result_code' => '0000');
|
||||
} else {
|
||||
$return_data['result'] = array('result_code' => '9999');
|
||||
}
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 내 이메일 체크
|
||||
# CREATE : 2018-04-25
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_member_my_email_check_proc() {
|
||||
# request
|
||||
$member_email = trim($this->input->get_post('email', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
|
||||
# model
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_email'] = $member_email;
|
||||
|
||||
$this->load->model('web/m_member');
|
||||
$member_count = $this->m_member->member_where_member_id_email_count($req_data);
|
||||
|
||||
if($member_count > 0) {
|
||||
$return_data['result'] = array('result_code' => '0000');
|
||||
} else {
|
||||
$return_data['result'] = array('result_code' => '9999');
|
||||
}
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 이메일 변경
|
||||
# CREATE : 2018-04-25
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_member_email_edit_proc() {
|
||||
# request
|
||||
$member_email = trim($this->input->get_post('email', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$SES_MEMBER_NAME = $this->session->userdata('C_Member_Name');
|
||||
|
||||
|
||||
$this->load->model('web/m_member');
|
||||
$result = $this->m_member->member_where_member_id_select($SES_MEMBER_ID);
|
||||
if(count($result)==0) {
|
||||
throw new Cm_Exception('json', '9999', '잘못된 접근입니다.');
|
||||
}
|
||||
|
||||
$org_email = $result['member_email'];
|
||||
|
||||
|
||||
# 이메일 update
|
||||
$req_data = array();
|
||||
$req_data['member_email'] = $member_email;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['update_id'] = $SES_MEMBER_ID;
|
||||
|
||||
|
||||
$result = $this->m_member->member_where_member_id_update($req_data);
|
||||
|
||||
$return_data = array();
|
||||
if($result) {
|
||||
|
||||
$content =$SES_MEMBER_NAME.'님, '.date("Y").'년 '.date("m").'월 '.date("d").'일 '.date("H").'시 '.date("i").'분 '.date("s").'초에 이메일주소 정보를 변경하셨습니다. <p></p>';
|
||||
$content.='변경된 주소는 '.$member_email.' 입니다. <p></p><p> </p>';
|
||||
$content.='혹시, 변경한 적이 없는 경우 1:1 고객센터로 문의 해 주시면, 도움 드리도록 하겠습니다.<p></p>';
|
||||
$content.='* 소중한 개인정보, 잊어버리지 않도록 유의해 주세요.<p></p><p> </p>';
|
||||
$content.='P.S) 하나님의 은혜와 평강이 '.$SES_MEMBER_NAME.'님의 삶 가운데 늘 가득하기를 <p></p>';
|
||||
$content.='크로스맵이 응원하고 기도합니다! <p></p><p> </p>';
|
||||
$content.=' - 크로스맵 일동 올림 - <p></p>';
|
||||
|
||||
$mail_result['content'] = $content;
|
||||
$message = $this->load->view('/web/comm/mail_template', $mail_result, TRUE);
|
||||
|
||||
$this->load->library('email');
|
||||
$config = array();
|
||||
$config['wordwrap'] = true;
|
||||
$config['mailtype'] = 'html';
|
||||
$this->email->initialize($config);
|
||||
$this->email->from(CROSSMAP_EMAIL, CROSSMAP_EMAIL_NAME);
|
||||
$this->email->to($org_email, $member_email);
|
||||
$this->email->subject('개인 이메일 정보 변경 안내 메일입니다.');
|
||||
$this->email->message($message);
|
||||
$this->email->send();
|
||||
|
||||
if($member_email!='') {
|
||||
$this->session->set_userdata('C_Member_Email', $member_email);
|
||||
$arr_email = explode("@", $member_email);
|
||||
$email1 = mb_substr($arr_email[0], 0, 2).'******';
|
||||
$arr_email2 = explode(".", $arr_email[1]);
|
||||
$email2 = mb_substr($arr_email[1], 0, 1).'*******'.str_replace($arr_email2[0], '', $arr_email[1]);
|
||||
$member_email = $email1.'@'.$email2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$return_data['result'] = array('code' => '0000', 'data'=>$member_email);
|
||||
} else {
|
||||
$return_data['result'] = array('code' => '9999');
|
||||
}
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 비밀번호 확인
|
||||
# CREATE : 2018-04-25
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_member_pwd_check_proc(){
|
||||
|
||||
# Request
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$member_pwd = trim($this->input->get_post('member_pwd', TRUE)); // 비밀번호
|
||||
|
||||
|
||||
# 로그인
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_pwd'] = MD5($member_pwd);
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$count = $this->m_member->member_where_member_id_member_pwd_count($req_data);
|
||||
if($count == 0) {
|
||||
throw new Cm_Exception('json', '9999', '비밀번호를 확인해주세요.');
|
||||
}
|
||||
|
||||
$return_data = array();
|
||||
$return_data['result'] = array('code' => '0000');
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 회원탈퇴
|
||||
# CREATE : 2018-04-25
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_member_leave_proc(){
|
||||
|
||||
# Request
|
||||
$member_pwd = trim($this->input->get_post('member_pwd', TRUE)); // 비밀번호
|
||||
$SES_MEMBER_EMAIL = $this->session->userdata('C_Member_Email');
|
||||
$SES_MEMBER_NAME = $this->session->userdata('C_Member_Name');
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
# 로그인
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_pwd'] = MD5($member_pwd);
|
||||
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member');
|
||||
$result = $this->m_member->member_where_member_id_member_pwd_select($req_data);
|
||||
if(count($result) == 0) {
|
||||
throw new Cm_Exception('json', '9999', '잘못된 접근입니다.');
|
||||
}
|
||||
|
||||
# 상태 update
|
||||
$req_data = array();
|
||||
$req_data['idx'] = $result['idx'];
|
||||
$req_data['member_status'] = '2';
|
||||
$req_data['update_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$this->m_member->member_update($req_data);
|
||||
|
||||
|
||||
$content =$SES_MEMBER_NAME.'님의 계정 탈퇴가 완료 되었습니다. <p></p>';
|
||||
$content.='크로스맵이 마음에 들지 않으셨나요? <p></p>';
|
||||
$content.='더 나은 서비스를 위해 최선을 다해 노력하겠습니다.__)<p></p>';
|
||||
$content.='개인정보 및 이용기록은 영구삭제 되며<p></p>';
|
||||
$content.='동일한 아이디로 재가입 하실 수 없습니다. <p></p>';
|
||||
$content.='좋아요, 댓글 등의 사용 기록은 삭제되지 않으니 양지 부탁 드리겠습니다. <p></p><p> </p>';
|
||||
$content.='P.S) 하나님의 은혜와 평강이 '.$SES_MEMBER_NAME.'님의 삶 가운데 늘 가득하기를 <p></p>';
|
||||
$content.='크로스맵이 응원하고 기도합니다! <p></p><p> </p>';
|
||||
$content.=' - 크로스맵 일동 올림 - <p></p>';
|
||||
|
||||
$mail_result['content'] = $content;
|
||||
$message = $this->load->view('/web/comm/mail_template', $mail_result, TRUE);
|
||||
|
||||
$this->load->library('email');
|
||||
$config = array();
|
||||
$config['wordwrap'] = true;
|
||||
$config['mailtype'] = 'html';
|
||||
$this->email->initialize($config);
|
||||
$this->email->from(CROSSMAP_EMAIL, CROSSMAP_EMAIL_NAME);
|
||||
$this->email->to($SES_MEMBER_EMAIL);
|
||||
$this->email->subject($SES_MEMBER_NAME.'님의 크로스맵 회원탈퇴가 완료 되었습니다.');
|
||||
$this->email->message($message);
|
||||
|
||||
$this->email->send();
|
||||
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_logout_proc();
|
||||
|
||||
|
||||
$return_data = array();
|
||||
$return_data['result'] = array('code' => '0000');
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 휴대폰 번호 변경
|
||||
# CREATE : 2018-06-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_member_mobile_change_proc(){
|
||||
# Request
|
||||
$mobile = trim($this->input->get_post('mobile', TRUE)); // 비밀번호
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
$member_mobile = mb_substr($mobile, 0, 3).'-'.mb_substr($mobile, 3, 4).'-'.mb_substr($mobile, 7, 4);
|
||||
|
||||
|
||||
# 휴대폰 번호 update
|
||||
$req_data = array();
|
||||
$req_data['member_mobile'] = $member_mobile;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['update_id'] = $SES_MEMBER_ID;
|
||||
$this->load->model('web/m_member');
|
||||
$this->m_member->member_where_member_id_update($req_data);
|
||||
|
||||
$member_mobile = mb_substr($member_mobile, 1, 4).'***-***'.mb_substr($member_mobile, 12, 1);
|
||||
|
||||
$return_data = array();
|
||||
$return_data['result'] = array('code' => '0000', 'data'=>$member_mobile);
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
680
application/controllers/web/mypage.php
Executable file
680
application/controllers/web/mypage.php
Executable file
@@ -0,0 +1,680 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class mypage extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 회원수정
|
||||
# CREATE : 2018-04-11
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_member_edit() {
|
||||
|
||||
$this->load->helper('cookie');
|
||||
$crossmap_passwd_check = get_cookie('crossmap_passwd_check');
|
||||
if($crossmap_passwd_check != 'Y') {
|
||||
gf_alert("잘못된 접근입니다.", '/');
|
||||
exit;
|
||||
}
|
||||
set_cookie('crossmap_passwd_check', 'N', 0);
|
||||
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$SES_MEMBER_GROUP_IDX = $this->session->userdata('C_Member_Group');
|
||||
$SES_MEMBER_GROUP_Name = $this->session->userdata('C_Member_Group_Name');
|
||||
if($SES_MEMBER_GROUP_IDX == '') {
|
||||
$SES_MEMBER_GROUP_IDX ='8';
|
||||
$SES_MEMBER_GROUP_Name = '비회원';
|
||||
}
|
||||
|
||||
# 해당회원이 사용가능한지 확인
|
||||
$req_data = array();
|
||||
$req_data['member_group_idx'] = $SES_MEMBER_GROUP_IDX;
|
||||
$req_data['menu_code'] = '3';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member_group_menu_auth');
|
||||
$count = $this->m_member_group_menu_auth->member_group_menu_auth_count($req_data);
|
||||
if($count > 0) {
|
||||
gf_alert($SES_MEMBER_GROUP_Name."은 해당 메뉴를 사용하실수 없습니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_member');
|
||||
$result = $this->m_member->member_where_member_id_select($SES_MEMBER_ID);
|
||||
if(count($result) == 0){
|
||||
gf_alert("잘못된 접근입니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['result'] = $result;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/mypage/member_edit', $return_data, true);
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 북마크
|
||||
# CREATE : 2018-05-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_bookmark() {
|
||||
# Request
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
$limit = 10;
|
||||
$offset = 0;
|
||||
|
||||
$search_keyword_txt = addslashes($search_keyword);
|
||||
|
||||
|
||||
# 북마크
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'total';
|
||||
$req_data['search_keyword'] = $search_keyword_txt;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_bookmark');
|
||||
$result = $this->m_bookmark->bookmark_join_vw_content_list($req_data);
|
||||
$total_count = $this->m_bookmark->bookmark_join_vw_content_list_total_count($req_data);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['list'] = $result;
|
||||
$return_data['limit'] = $limit;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/mypage/bookmark', $return_data, true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 이미지 더가져오기
|
||||
# CREATE : 2018-05-05
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_bookmark_list_more() {
|
||||
# request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
if($SES_MEMBER_ID == '') throw new Cm_Exception('json', '9999', '회원로그인 후에 가능합니다.');
|
||||
|
||||
# paging 설정
|
||||
$limit = 10;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
# 북마크
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'total';
|
||||
$req_data['search_keyword'] = $search_keyword;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_bookmark');
|
||||
$list = $this->m_bookmark->bookmark_join_vw_content_list($req_data);
|
||||
$total_count = $this->m_bookmark->bookmark_join_vw_content_list_total_count($req_data);
|
||||
|
||||
$more_list = 'N';
|
||||
if(($total_count-($page*$limit)) > 0){
|
||||
$more_list = 'Y';
|
||||
}
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['result_code'] = '0000';
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['more_list'] = $more_list;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/mypage/bookmark_list_more', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 1:1문의
|
||||
# CREATE : 2018-05-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_qna() {
|
||||
# Request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_type = trim($this->input->get_post('search_type', TRUE));
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$SES_MEMBER_GROUP_IDX = $this->session->userdata('C_Member_Group');
|
||||
$SES_MEMBER_GROUP_Name = $this->session->userdata('C_Member_Group_Name');
|
||||
if($SES_MEMBER_GROUP_IDX == '') {
|
||||
$SES_MEMBER_GROUP_IDX ='8';
|
||||
$SES_MEMBER_GROUP_Name = '비회원';
|
||||
}
|
||||
|
||||
# 해당회원이 사용가능한지 확인
|
||||
$req_data = array();
|
||||
$req_data['member_group_idx'] = $SES_MEMBER_GROUP_IDX;
|
||||
$req_data['menu_code'] = '3';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member_group_menu_auth');
|
||||
$count = $this->m_member_group_menu_auth->member_group_menu_auth_count($req_data);
|
||||
if($count > 0) {
|
||||
gf_alert($SES_MEMBER_GROUP_Name."은 해당 메뉴를 사용하실수 없습니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# default setting
|
||||
if($page=='') $page = '1';
|
||||
|
||||
# paging 설정
|
||||
$limit = 20;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
# 1:1문의
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = $search_type;
|
||||
$req_data['search_keyword'] = $search_keyword;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_bbs_question');
|
||||
$result = $this->m_bbs_question->bbs_question_where_member_id_list($req_data);
|
||||
$total_count = $this->m_bbs_question->bbs_question_where_member_id_list_total_count($req_data);
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/mypage/qna?search_type='.$search_type.'&search_keyword='.$search_keyword.'&page=');
|
||||
|
||||
$data_num = ($total_count + $limit)-($page*$limit);
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['list'] = $result;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['data_num'] = $data_num;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['search_type'] = $search_type;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/mypage/qna', $return_data, true);
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 1:1문의 - 글쓰기
|
||||
# CREATE : 2018-05-05
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_qna_add() {
|
||||
|
||||
$SES_MEMBER_GROUP_IDX = $this->session->userdata('C_Member_Group');
|
||||
$SES_MEMBER_GROUP_Name = $this->session->userdata('C_Member_Group_Name');
|
||||
if($SES_MEMBER_GROUP_IDX == '') {
|
||||
$SES_MEMBER_GROUP_IDX ='8';
|
||||
$SES_MEMBER_GROUP_Name = '비회원';
|
||||
}
|
||||
|
||||
# 해당회원이 사용가능한지 확인
|
||||
$req_data = array();
|
||||
$req_data['member_group_idx'] = $SES_MEMBER_GROUP_IDX;
|
||||
$req_data['menu_code'] = '3';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member_group_menu_auth');
|
||||
$count = $this->m_member_group_menu_auth->member_group_menu_auth_count($req_data);
|
||||
if($count > 0) {
|
||||
gf_alert($SES_MEMBER_GROUP_Name."은 해당 메뉴를 사용하실수 없습니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/mypage/qna_add', '', true);
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 1:1문의 - 글쓰기저장
|
||||
# CREATE : 2018-05-05
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_qna_add_proc() {
|
||||
# Request
|
||||
$title = trim($this->input->get_post('title', TRUE));
|
||||
$content = trim($this->input->get_post('content', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$SES_MEMBER_NICNAME = $this->session->userdata('C_Member_Nicname');
|
||||
|
||||
$SES_MEMBER_GROUP_IDX = $this->session->userdata('C_Member_Group');
|
||||
$SES_MEMBER_GROUP_Name = $this->session->userdata('C_Member_Group_Name');
|
||||
if($SES_MEMBER_GROUP_IDX == '') {
|
||||
$SES_MEMBER_GROUP_IDX ='8';
|
||||
$SES_MEMBER_GROUP_Name = '비회원';
|
||||
}
|
||||
|
||||
# 해당회원이 사용가능한지 확인
|
||||
$req_data = array();
|
||||
$req_data['member_group_idx'] = $SES_MEMBER_GROUP_IDX;
|
||||
$req_data['menu_code'] = '3';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member_group_menu_auth');
|
||||
$count = $this->m_member_group_menu_auth->member_group_menu_auth_count($req_data);
|
||||
if($count > 0) {
|
||||
gf_alert($SES_MEMBER_GROUP_Name."은 해당 메뉴를 사용하실수 없습니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_bbs_question');
|
||||
|
||||
# max idx 가져오기
|
||||
$result = $this->m_bbs_question->bbs_question_max_idx_select();
|
||||
|
||||
$max_idx = $result['max_idx']+1;
|
||||
$now_date = date("Y-m-d H:i:s");
|
||||
|
||||
$req_data = array();
|
||||
$req_data['title'] = $title;
|
||||
$req_data['content'] = $content;
|
||||
$req_data['idx'] = $max_idx;
|
||||
$req_data['p_idx'] = $max_idx;
|
||||
$req_data['s_idx'] = '1';
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['write_id'] = $SES_MEMBER_ID;
|
||||
$req_data['write_name'] = $SES_MEMBER_NICNAME;
|
||||
$req_data['reg_date'] = $now_date;
|
||||
$req_data['update_id'] = $SES_MEMBER_ID;
|
||||
$req_data['update_date']= $now_date;
|
||||
|
||||
# insert
|
||||
$this->m_bbs_question->bbs_question_insert($req_data);
|
||||
|
||||
gf_alert("등록되었습니다.", '/web/mypage/qna');
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 1:1문의 - 삭제
|
||||
# CREATE : 2018-05-05
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_qna_arr_del_proc() {
|
||||
# request
|
||||
$arr_idx = $this->input->get_post('is_del', TRUE); // 삭제할 idx
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
if($SES_MEMBER_ID == '') {
|
||||
gf_alert("회원로그인 후에 가능합니다.", '/web/mypage/qna');
|
||||
exit;
|
||||
}
|
||||
|
||||
$SES_MEMBER_GROUP_IDX = $this->session->userdata('C_Member_Group');
|
||||
$SES_MEMBER_GROUP_Name = $this->session->userdata('C_Member_Group_Name');
|
||||
if($SES_MEMBER_GROUP_IDX == '') {
|
||||
$SES_MEMBER_GROUP_IDX ='8';
|
||||
$SES_MEMBER_GROUP_Name = '비회원';
|
||||
}
|
||||
|
||||
# 해당회원이 사용가능한지 확인
|
||||
$req_data = array();
|
||||
$req_data['member_group_idx'] = $SES_MEMBER_GROUP_IDX;
|
||||
$req_data['menu_code'] = '3';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member_group_menu_auth');
|
||||
$count = $this->m_member_group_menu_auth->member_group_menu_auth_count($req_data);
|
||||
if($count > 0) {
|
||||
gf_alert($SES_MEMBER_GROUP_Name."은 해당 메뉴를 사용하실수 없습니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_bbs_question');
|
||||
|
||||
$now_date = date("Y-m-d H:i:s");
|
||||
foreach ($arr_idx as $key=>$val) {
|
||||
$req_data = array();
|
||||
$req_data['idx'] = $val;
|
||||
$req_data['write_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$count = $this->m_bbs_question->bbs_question_write_id_idx_count($req_data);
|
||||
if($count > 0) {
|
||||
$arr_update_data1 = array();
|
||||
$arr_update_data1[$key]['idx'] = $val;
|
||||
$arr_update_data1[$key]['is_del'] = 'Y';
|
||||
$arr_update_data1[$key]['update_id'] = $SES_MEMBER_ID;
|
||||
$arr_update_data1[$key]['update_date'] = $now_date;
|
||||
$this->m_bbs_question->bbs_question_is_del_update_batch($arr_update_data1);
|
||||
|
||||
$arr_update_data2 = array();
|
||||
$arr_update_data2[$key]['p_idx'] = $val;
|
||||
$arr_update_data2[$key]['is_del'] = 'Y';
|
||||
$arr_update_data2[$key]['update_id'] = $SES_MEMBER_ID;
|
||||
$arr_update_data2[$key]['update_date'] = $now_date;
|
||||
$this->m_bbs_question->bbs_question_p_idx_is_del_update_batch($arr_update_data2);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
gf_alert("삭제되었습니다.", '/web/mypage/qna');
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 1:1문의 - 보기
|
||||
# CREATE : 2018-05-05
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_qna_view() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_type = trim($this->input->get_post('search_type', TRUE));
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$data_num = trim($this->input->get_post('data_num', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
|
||||
$SES_MEMBER_GROUP_IDX = $this->session->userdata('C_Member_Group');
|
||||
$SES_MEMBER_GROUP_Name = $this->session->userdata('C_Member_Group_Name');
|
||||
if($SES_MEMBER_GROUP_IDX == '') {
|
||||
$SES_MEMBER_GROUP_IDX ='8';
|
||||
$SES_MEMBER_GROUP_Name = '비회원';
|
||||
}
|
||||
|
||||
# 해당회원이 사용가능한지 확인
|
||||
$req_data = array();
|
||||
$req_data['member_group_idx'] = $SES_MEMBER_GROUP_IDX;
|
||||
$req_data['menu_code'] = '3';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member_group_menu_auth');
|
||||
$count = $this->m_member_group_menu_auth->member_group_menu_auth_count($req_data);
|
||||
if($count > 0) {
|
||||
gf_alert($SES_MEMBER_GROUP_Name."은 해당 메뉴를 사용하실수 없습니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$req_data = array();
|
||||
$req_data['idx'] = $idx;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_bbs_question');
|
||||
$result = $this->m_bbs_question->bbs_question_member_id_idx_select($req_data);
|
||||
if(count($result)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/web/mypage/qna');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# next
|
||||
$req_data = array();
|
||||
$req_data['idx'] = $idx;
|
||||
$req_data['search_type'] = $search_type;
|
||||
$req_data['search_keyword'] = $search_keyword;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 4;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$next_list = $this->m_bbs_question->bbs_question_next_parent_list($req_data);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['result'] = $result;
|
||||
$return_data['next_list'] = $next_list;
|
||||
$return_data['page'] = $page;
|
||||
$return_data['search_type'] = $search_type;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['data_num'] = $data_num;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/mypage/qna_view', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 1:1문의 - 삭제
|
||||
# CREATE : 2018-05-05
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_qna_del_proc() {
|
||||
# request
|
||||
$idx = trim($this->input->get_post('idx', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
if($SES_MEMBER_ID == '') {
|
||||
gf_alert("회원로그인 후에 가능합니다.", '/web/mypage/qna');
|
||||
exit;
|
||||
}
|
||||
|
||||
$SES_MEMBER_GROUP_IDX = $this->session->userdata('C_Member_Group');
|
||||
$SES_MEMBER_GROUP_Name = $this->session->userdata('C_Member_Group_Name');
|
||||
if($SES_MEMBER_GROUP_IDX == '') {
|
||||
$SES_MEMBER_GROUP_IDX ='8';
|
||||
$SES_MEMBER_GROUP_Name = '비회원';
|
||||
}
|
||||
|
||||
# 해당회원이 사용가능한지 확인
|
||||
$req_data = array();
|
||||
$req_data['member_group_idx'] = $SES_MEMBER_GROUP_IDX;
|
||||
$req_data['menu_code'] = '3';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_member_group_menu_auth');
|
||||
$count = $this->m_member_group_menu_auth->member_group_menu_auth_count($req_data);
|
||||
if($count > 0) {
|
||||
gf_alert($SES_MEMBER_GROUP_Name."은 해당 메뉴를 사용하실수 없습니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_bbs_question');
|
||||
|
||||
$now_date = date("Y-m-d H:i:s");
|
||||
|
||||
$req_data = array();
|
||||
$req_data['idx'] = $idx;
|
||||
$req_data['write_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$count = $this->m_bbs_question->bbs_question_write_id_idx_count($req_data);
|
||||
if($count > 0) {
|
||||
$arr_update_data1 = array();
|
||||
$arr_update_data1[0]['idx'] = $idx;
|
||||
$arr_update_data1[0]['is_del'] = 'Y';
|
||||
$arr_update_data1[0]['update_id'] = $SES_MEMBER_ID;
|
||||
$arr_update_data1[0]['update_date'] = $now_date;
|
||||
$this->m_bbs_question->bbs_question_is_del_update_batch($arr_update_data1);
|
||||
|
||||
$arr_update_data2 = array();
|
||||
$arr_update_data2[0]['p_idx'] = $idx;
|
||||
$arr_update_data2[0]['is_del'] = 'Y';
|
||||
$arr_update_data2[0]['update_id'] = $SES_MEMBER_ID;
|
||||
$arr_update_data2[0]['update_date'] = $now_date;
|
||||
$this->m_bbs_question->bbs_question_p_idx_is_del_update_batch($arr_update_data2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
gf_alert("삭제되었습니다.", '/web/mypage/qna');
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 회원수정
|
||||
# CREATE : 2018-06-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_member_edit_proc() {
|
||||
# Request
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$org_profile_img = trim($this->input->get_post('org_profile_img', TRUE));
|
||||
$member_nickname = trim($this->input->get_post('member_nickname', TRUE));
|
||||
$member_intro = trim($this->input->get_post('member_intro', TRUE));
|
||||
$is_nickname = trim($this->input->get_post('is_nickname', TRUE));
|
||||
$is_agree_sms = trim($this->input->get_post('is_agree_sms', TRUE));
|
||||
$is_agree_mail = trim($this->input->get_post('is_agree_mail', TRUE));
|
||||
$is_agree_info_open = trim($this->input->get_post('is_agree_info_open', TRUE));
|
||||
$member_edit_church = trim($this->input->get_post('member_edit_church', TRUE));
|
||||
$member_edit_etc1 = trim($this->input->get_post('member_edit_etc1', TRUE));
|
||||
$member_edit_etc2 = trim($this->input->get_post('member_edit_etc2', TRUE));
|
||||
$member_edit_password = trim($this->input->get_post('member_edit_password', TRUE));
|
||||
$member_edit_new_password = trim($this->input->get_post('member_edit_new_password', TRUE));
|
||||
|
||||
// 쿠키
|
||||
$this->load->helper('cookie');
|
||||
set_cookie('crossmap_passwd_check', 'Y', 0);
|
||||
|
||||
if($member_nickname!='' && $is_nickname=='N') {
|
||||
gf_alert("닉네임 중복확인을 해주세요.", '/web/mypage/member_edit');
|
||||
exit;
|
||||
}
|
||||
|
||||
$member_nickname = addslashes($member_nickname);
|
||||
$member_intro = addslashes($member_intro);
|
||||
$member_edit_church = addslashes($member_edit_church);
|
||||
$member_edit_password = addslashes($member_edit_password);
|
||||
$member_edit_new_password = addslashes($member_edit_new_password);
|
||||
$member_edit_etc1 = addslashes($member_edit_etc1);
|
||||
$member_edit_etc2 = addslashes($member_edit_etc2);
|
||||
|
||||
# 이미지업로드
|
||||
if($_FILES['member_img']['name']!='') {
|
||||
# image upload
|
||||
$upload_path = './files/profile/'.date("Y")."/".date("m");
|
||||
if (!is_dir($upload_path)) {
|
||||
mkdir($upload_path, 0777, TRUE);
|
||||
}
|
||||
$config['upload_path'] = $upload_path;
|
||||
$config['allowed_types'] = 'gif|jpg|png';
|
||||
$config['encrypt_name'] = TRUE;
|
||||
|
||||
$this->load->library('upload');
|
||||
$this->upload->initialize($config);
|
||||
|
||||
if ( ! $this->upload->do_upload('member_img')) {
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
gf_alert("이미지 업로드에 실패했습니다.", '/web/mypage/member_edit');
|
||||
exit;
|
||||
}
|
||||
$arr_upload_data = $this->upload->data();
|
||||
$filename = str_replace($_SERVER['DOCUMENT_ROOT'], '', $arr_upload_data['full_path']);
|
||||
} else {
|
||||
$filename = $org_profile_img;
|
||||
}
|
||||
|
||||
$now_date = date("Y-m-d H:i:s");
|
||||
|
||||
# update
|
||||
$this->load->model('web/m_member');
|
||||
$req_data = array();
|
||||
if($member_edit_new_password!='') {
|
||||
# 비밀번호 확인
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_pwd'] = MD5($member_edit_password);
|
||||
$count = $this->m_member->member_where_member_id_member_pwd_count($req_data);
|
||||
if($count==0) {
|
||||
gf_alert("입력하신 현재 비밀번호가 맞지 않습니다.", '/web/mypage/member_edit');
|
||||
exit;
|
||||
}
|
||||
|
||||
$req_data['last_pwd_change_date'] = $now_date;
|
||||
$req_data['member_pwd'] = MD5($member_edit_new_password);
|
||||
|
||||
}
|
||||
|
||||
$req_data['member_img'] = $filename;
|
||||
$req_data['member_nickname'] = $member_nickname;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_intro'] = $member_intro;
|
||||
$req_data['member_church'] = $member_edit_church;
|
||||
$req_data['etc1'] = $member_edit_etc1;
|
||||
$req_data['etc2'] = $member_edit_etc2;
|
||||
$req_data['is_agree_sms'] = $is_agree_sms;
|
||||
$req_data['is_agree_mail'] = $is_agree_mail;
|
||||
$req_data['is_agree_info_open'] = $is_agree_info_open;
|
||||
$req_data['update_id'] = $SES_MEMBER_ID;
|
||||
$req_data['update_date'] = $now_date;
|
||||
|
||||
$this->m_member->member_where_member_id_update($req_data);
|
||||
|
||||
|
||||
if($member_edit_new_password!='') {
|
||||
$result = $this->m_member->member_where_member_id_select($SES_MEMBER_ID);
|
||||
$member_email = $result['member_email'];
|
||||
$member_name = $result['member_name'];
|
||||
|
||||
if($member_email!='') {
|
||||
// 이메일발송
|
||||
$content =$member_name.'님, '.date("Y").'년 '.date("m").'월 '.date("d").'일 '.date("H").'시 '.date("i").'분 '.date("s").'초에 계정 비밀번호 정보를 변경하였습니다.<p></p>';
|
||||
$content.='혹시, 변경한 적이 없는 경우 1:1 고객센터로 문의해 주시면, 도움 드리도록 하겠습니다.<p></p>';
|
||||
$content.='* 소중한 개인정보, 잊어버리지 않도록 유의해 주세요. <p></p><p> </p>';
|
||||
$content.='P.S) 하나님의 은혜와 평강이 '.$member_name.'님의 삶 가운데 늘 가득하기를 <p></p>';
|
||||
$content.='크로스맵이 응원하고 기도합니다! <p></p><p> </p>';
|
||||
$content.=' - 크로스맵 일동 올림 - <p></p>';
|
||||
|
||||
$mail_result['content'] = $content;
|
||||
$message = $this->load->view('/web/comm/mail_template', $mail_result, TRUE);
|
||||
|
||||
$this->load->library('email');
|
||||
$config = array();
|
||||
$config['wordwrap'] = true;
|
||||
$config['mailtype'] = 'html';
|
||||
$this->email->initialize($config);
|
||||
$this->email->from(CROSSMAP_EMAIL, CROSSMAP_EMAIL_NAME);
|
||||
$this->email->to($member_email);
|
||||
$this->email->subject('개인 비밀번호 정보 변경 안내 메일입니다.');
|
||||
$this->email->message($message);
|
||||
|
||||
$this->email->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$this->session->set_userdata('C_Member_Nicname', $member_nickname);
|
||||
$this->session->set_userdata('C_Member_Intro', $member_intro);
|
||||
$this->session->set_userdata('C_Member_Profile', $filename);
|
||||
|
||||
gf_alert("회원정보가 수정되었습니다.", '/web/mypage/member_edit');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
671
application/controllers/web/news.php
Executable file
671
application/controllers/web/news.php
Executable file
@@ -0,0 +1,671 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class news extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 메인
|
||||
# CREATE : 2018-04-11
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_index() {
|
||||
# Request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_sort = trim($this->input->get_post('search_sort', TRUE));
|
||||
|
||||
# default setting
|
||||
if($search_sort == '') $search_sort = '1';
|
||||
if($page=='') $page = '1';
|
||||
|
||||
# sort
|
||||
switch ($search_sort) {
|
||||
case '1': $sort_column = 'display_date'; break;
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
default : $sort_column = 'display_date'; break;
|
||||
}
|
||||
|
||||
# paging 설정
|
||||
$limit = 10;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
# 뉴스
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_news');
|
||||
$result = $this->m_news->news_list($req_data);
|
||||
$total_count = $this->m_news->news_list_total_count($req_data);
|
||||
|
||||
# news setting
|
||||
$this->load->model('web/m_contents_setting');
|
||||
$arr_news_setting = $this->m_contents_setting->contents_setting_select(1);
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/news/?search_sort='.$search_sort.'&page=');
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['search_sort'] = $search_sort;
|
||||
$return_data['list'] = $result;
|
||||
$return_data['arr_news_setting'] = $arr_news_setting;
|
||||
$return_data['pagination'] = $pagination;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/index', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스 뷰
|
||||
# CREATE : 2018-04-16
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_news_view() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$content_type = '1';
|
||||
|
||||
|
||||
|
||||
$bookmark_count = 0;
|
||||
$arr_review = array();
|
||||
if($SES_MEMBER_ID !='') {
|
||||
# 게시물 열람 불가 체크
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['limit_type'] = '2';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_blind_limit');
|
||||
$arr_blind = $this->m_blind_limit->blind_limit_where_member_id_limit_type_select($req_data);
|
||||
if(count($arr_blind) > 0) {
|
||||
$return_data['arr_blind'] = $arr_blind;
|
||||
$return_data['url'] = '/web/news/';
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/blind_view_alert', $return_data, true);
|
||||
}
|
||||
|
||||
|
||||
# model - bookmark
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
|
||||
$this->load->model('web/m_bookmark');
|
||||
$bookmark_count = $this->m_bookmark->bookmark_member_id_content_idx_count($req_data);
|
||||
|
||||
# model - review
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['content_idx'] = $idx;
|
||||
|
||||
$this->load->model('web/m_review_log');
|
||||
$arr_review = $this->m_review_log->review_log_where_member_id_content_idx_select($req_data);
|
||||
|
||||
}
|
||||
|
||||
# hit count update
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_hit_count_update($req_data);
|
||||
|
||||
|
||||
|
||||
# model - news view
|
||||
$this->load->model('web/m_news');
|
||||
$result = $this->m_news->news_join_news_section_press_select($idx);
|
||||
|
||||
|
||||
# 연관글
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
$this->load->model('web/m_relation_article');
|
||||
$arr_relation_news = $this->m_relation_article->relation_article_join_news_list($req_data);
|
||||
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_where_news_idx_select($idx);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['arr_relation_news'] = $arr_relation_news;
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['arr_review'] = $arr_review;
|
||||
$return_data['bookmark_count'] = $bookmark_count;
|
||||
$return_data['result'] = $result;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/news_view', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스 컬럼 메인
|
||||
# CREATE : 2018-04-28
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_column() {
|
||||
|
||||
# 칼럼
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = 'reg_date';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 12;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_column');
|
||||
$result = $this->m_column->column_list($req_data);
|
||||
$total_count = $this->m_column->column_total_count();
|
||||
|
||||
|
||||
# 칼럼리스트
|
||||
$req_data = array();
|
||||
$req_data['member_group_idx'] = 7;
|
||||
$req_data['sort_column'] = 'display_sort';
|
||||
$this->load->model('web/m_partner');
|
||||
$arr_columnist = $this->m_partner->partner_all_list($req_data);
|
||||
|
||||
|
||||
# 테마
|
||||
# 7: 헤드라인칼럼
|
||||
$theme_types = array('7', '15');
|
||||
$this->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = $theme_types;
|
||||
$arr_theme = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_recomm_life = array();
|
||||
$arr_headline_column = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
if($val['theme_type'] == 7) $arr_headline_column[$val['rank']] = array('rank'=>$val['rank'], 'title' => $val['title'], 'column_name'=> $val['column_name'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx'], 'partner_idx' => $val['partner_idx'], 'content' => $val['content']);
|
||||
if($val['theme_type'] == 15) $arr_recomm_life[$val['rank']] = array('rank'=>$val['rank'], 'title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
}
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['list'] = $result;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['arr_columnist'] = $arr_columnist;
|
||||
$return_data['arr_headline_column'] = $arr_headline_column;
|
||||
$return_data['arr_recomm_life'] = $arr_recomm_life;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/column', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : column list more
|
||||
# CREATE : 2018-04-28
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_column_list_more() {
|
||||
# request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
|
||||
# paging 설정 -- 2page 부터 시작이고 1페이지는 6개였음.
|
||||
$limit = 10;
|
||||
$offset = ($page-2) * $limit;
|
||||
$offset = $offset + 6;
|
||||
|
||||
# 검색
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = 'reg_date';
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_column');
|
||||
$arr_column = $this->m_column->column_list($req_data);
|
||||
$total_count = $this->m_column->column_total_count();
|
||||
|
||||
|
||||
$more_list = 'N';
|
||||
if(($total_count-($page*$limit)) > 0){
|
||||
$more_list = 'Y';
|
||||
}
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['result_code'] = '0000';
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $arr_column;
|
||||
$return_data['more_list'] = $more_list;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/column_list_more', $return_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스 컬럼 뷰
|
||||
# CREATE : 2018-04-28
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_column_view() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$content_type = '2';
|
||||
|
||||
|
||||
$bookmark_count = 0;
|
||||
if($SES_MEMBER_ID !='') {
|
||||
# 게시물 열람 불가 체크
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['limit_type'] = '2';
|
||||
|
||||
# model
|
||||
$this->load->model('web/m_blind_limit');
|
||||
$arr_blind = $this->m_blind_limit->blind_limit_where_member_id_limit_type_select($req_data);
|
||||
if(count($arr_blind) > 0) {
|
||||
$return_data['arr_blind'] = $arr_blind;
|
||||
$return_data['url'] = '/web/news/column';
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/blind_view_alert', $return_data, true);
|
||||
}
|
||||
|
||||
|
||||
# bookmark
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
|
||||
$this->load->model('web/m_bookmark');
|
||||
$bookmark_count = $this->m_bookmark->bookmark_member_id_content_idx_count($req_data);
|
||||
}
|
||||
|
||||
# hit count update
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_hit_count_update($req_data);
|
||||
|
||||
|
||||
# model - column view
|
||||
$this->load->model('web/m_column');
|
||||
$result = $this->m_column->column_select($idx);
|
||||
|
||||
# 연관글
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
$this->load->model('web/m_relation_article');
|
||||
$arr_relation_column = $this->m_relation_article->relation_article_join_column_list($req_data);
|
||||
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_where_news_idx_select($idx);
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['arr_relation_column'] = $arr_relation_column;
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['bookmark_count'] = $bookmark_count;
|
||||
$return_data['result'] = $result;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/column_view', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스 프린트
|
||||
# CREATE : 2018-04-16
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_nonskin_news_print() {
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/news_print', '');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스 칼럼니스트 메인
|
||||
# CREATE : 2018-04-28
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_columnist() {
|
||||
# Request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_sort = trim($this->input->get_post('search_sort', TRUE));
|
||||
$partner_idx = $this->uri->segment(4);
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$content_type = '2';
|
||||
|
||||
# default setting
|
||||
if($search_sort == '') $search_sort = '1';
|
||||
if($page=='') $page = '1';
|
||||
|
||||
# sort
|
||||
switch ($search_sort) {
|
||||
case '1': $sort_column = 'display_date'; break;
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
default : $sort_column = 'display_date'; break;
|
||||
}
|
||||
|
||||
$column_delivery_count = 0;
|
||||
if($SES_MEMBER_ID != '') {
|
||||
# 배달여부
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['main_idx'] = $partner_idx;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$this->load->model('web/m_delivery');
|
||||
$arr_column_delivery = $this->m_delivery->delivery_where_member_id_main_idx_select($req_data);
|
||||
$column_delivery_count = count($arr_column_delivery);
|
||||
|
||||
}
|
||||
|
||||
|
||||
# 칼럼정보
|
||||
# model - list
|
||||
$this->load->model('web/m_partner');
|
||||
$arr_columnist = $this->m_partner->partner_select($partner_idx);
|
||||
if(count($arr_columnist)==0) {
|
||||
gf_alert("잘못된 접근입니다.", '/');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
# paging 설정
|
||||
$limit = 10;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
# 칼럼 리스트
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['search_type'] = 'partner_idx';
|
||||
$req_data['search_key'] = $partner_idx;
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_column');
|
||||
$result = $this->m_column->column_list($req_data);
|
||||
$total_count = $this->m_column->column_list_total_count($req_data);
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/news/columnist/'.$partner_idx.'?search_sort='.$search_sort.'&page=');
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['list'] = $result;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['search_sort'] = $search_sort;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['arr_columnist'] = $arr_columnist;
|
||||
$return_data['column_delivery_count'] = $column_delivery_count;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/columnist', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스 랭킹
|
||||
# CREATE : 2018-04-28
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ranking() {
|
||||
# Request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$ranking_type = trim($this->input->get_post('ranking_type', TRUE));
|
||||
$content_type = 1;
|
||||
|
||||
# default setting
|
||||
if($ranking_type == '') $ranking_type = '1';
|
||||
if($page=='') $page = '1';
|
||||
|
||||
|
||||
# paging 설정
|
||||
$limit = 10;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['ranking_type'] = $ranking_type;
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$this->load->model('web/m_ranking');
|
||||
$result = $this->m_ranking->ranking_join_news_list($req_data);
|
||||
$total_count = $this->m_ranking->ranking_join_news_total_count($req_data);
|
||||
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/news/ranking?ranking_type='.$ranking_type.'&page=');
|
||||
|
||||
|
||||
# news setting
|
||||
$this->load->model('web/m_contents_setting');
|
||||
$arr_news_setting = $this->m_contents_setting->contents_setting_select(1);
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $result;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['ranking_type'] = $ranking_type;
|
||||
$return_data['arr_news_setting'] = $arr_news_setting;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/ranking', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스 카테고리
|
||||
# CREATE : 2018-04-28
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_category() {
|
||||
# Request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_sort = trim($this->input->get_post('search_sort', TRUE));
|
||||
$category_code = $this->uri->segment(4);
|
||||
|
||||
$this->load->helper('url');
|
||||
|
||||
if($category_code=='') {
|
||||
redirect(WWW_CROSSMAP.'/web/news/');
|
||||
exit;
|
||||
}
|
||||
|
||||
# default setting
|
||||
if($search_sort == '') $search_sort = '1';
|
||||
if($page=='') $page = '1';
|
||||
|
||||
# sort
|
||||
switch ($search_sort) {
|
||||
case '1': $sort_column = 'display_date'; break;
|
||||
case '2': $sort_column = 'popular_count'; break;
|
||||
default : $sort_column = 'display_date'; break;
|
||||
}
|
||||
|
||||
# paging 설정
|
||||
$limit = 10;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
# 뉴스
|
||||
$req_data = array();
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['search_type'] = 'category_code';
|
||||
$req_data['search_keyword'] = $category_code;
|
||||
|
||||
|
||||
# model - list
|
||||
$this->load->model('web/m_news');
|
||||
$result = $this->m_news->news_list($req_data);
|
||||
$total_count = $this->m_news->news_list_total_count($req_data);
|
||||
|
||||
|
||||
$category_count = strlen($category_code);
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
$category_code2 = ''; $category_code3 = '';
|
||||
if($category_count == 6) $category_code3 = substr($category_code, 0, 6);
|
||||
if($category_count == 4 || $category_count == 6) $category_code2 = substr($category_code, 0, 4);
|
||||
|
||||
|
||||
# 카테고리
|
||||
$this->load->model('web/m_news_section');
|
||||
$arr_category = $this->m_news_section->news_section_select($category_code);
|
||||
$arr_category1 = $this->m_news_section->news_section_select($category_code1);
|
||||
|
||||
$arr_category2 = array();
|
||||
if($category_code2 != '') $arr_category2 = $this->m_news_section->news_section_select($category_code2);
|
||||
|
||||
$arr_category3 = array();
|
||||
if($category_code3 != '') $arr_category3 = $this->m_news_section->news_section_select($category_code3);
|
||||
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/news/category/'.$category_code.'?search_sort='.$search_sort.'&page=');
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $result;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['search_sort'] = $search_sort;
|
||||
$return_data['category_code'] = $category_code;
|
||||
$return_data['arr_category'] = $arr_category;
|
||||
$return_data['arr_category1'] = $arr_category1;
|
||||
$return_data['arr_category2'] = $arr_category2;
|
||||
$return_data['arr_category3'] = $arr_category3;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/category', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스 댓글
|
||||
# CREATE : 2018-04-29
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_news_comment() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
|
||||
# model - news view
|
||||
$this->load->model('web/m_news');
|
||||
$result = $this->m_news->news_join_news_section_press_select($idx);
|
||||
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_where_news_idx_select($idx);
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['result'] = $result;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/news_comment', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 칼럼 댓글
|
||||
# CREATE : 2018-05-14
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_column_comment() {
|
||||
# Request
|
||||
$idx = $this->uri->segment(4);
|
||||
|
||||
# model - column view
|
||||
$this->load->model('web/m_column');
|
||||
$result = $this->m_column->column_select($idx);
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_where_news_idx_select($idx);
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['idx'] = $idx;
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['result'] = $result;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/news/column_comment', $return_data, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
26
application/controllers/web/popup.php
Executable file
26
application/controllers/web/popup.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
|
||||
include_once(APPPATH.'core/web/cm_exceptions.php');
|
||||
class Popup extends CI_Controller {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
$this->load->library('user_agent');
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
$this->load->helper('crossmap/exception_helper');
|
||||
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$this->load->view('/web/popup');
|
||||
}
|
||||
|
||||
public function find_id() {
|
||||
$this->load->view('/web/find_id');
|
||||
}
|
||||
|
||||
public function find_password() {
|
||||
$this->load->view('/web/find_password');
|
||||
}
|
||||
}
|
||||
80
application/controllers/web/prayer.php
Executable file
80
application/controllers/web/prayer.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class prayer extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 메인
|
||||
# CREATE : 2019-04-17
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_index() {
|
||||
$this->load->library('user_agent');
|
||||
if ($this->agent->is_mobile()){
|
||||
$this->load->helper('url');
|
||||
redirect($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/m/prayer/', 'refresh');
|
||||
}
|
||||
// 말씀과 묵상
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = '';
|
||||
$req_data['search_keyword'] = '';
|
||||
$req_data['search_life_type'] = '';
|
||||
$req_data['search_category_code1'] = 26;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click1'] = '';
|
||||
$req_data['search_click2'] = '1';
|
||||
$req_data['sort_column'] = 'a.reg_date';
|
||||
$req_data['search_write_id'] = '';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 4;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$this->load->model('web/m_channel');
|
||||
|
||||
// 열방을 위한 기도
|
||||
$req_data['search_category_code2'] = '49';
|
||||
$world = $this->m_channel->channel_join_category_select(49);
|
||||
$world['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$world['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
//아침을 여는 기도
|
||||
$req_data['search_category_code2'] = '18';
|
||||
$moning = $this->m_channel->channel_join_category_select(18);
|
||||
$moning['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$moning['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
// 순교자의 소리
|
||||
$req_data['search_category_code2'] = '46';
|
||||
$sound = $this->m_channel->channel_join_category_select(46);
|
||||
$sound['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$sound['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
//Open door
|
||||
$req_data['search_category_code2'] = '47';
|
||||
$open_door = $this->m_channel->channel_join_category_select(47);
|
||||
$open_door['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$open_door['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
//Corner stone
|
||||
$req_data['search_category_code2'] = '50';
|
||||
$corner_stone = $this->m_channel->channel_join_category_select(50);
|
||||
$corner_stone['channel_article_count'] = $this->m_life->life_list_total_count($req_data);
|
||||
$corner_stone['data'] = $this->m_life->life_list($req_data);
|
||||
|
||||
# view data
|
||||
$return_data['channel'] = array();
|
||||
$return_data['page_title'] = "기도공감";
|
||||
array_push($return_data['channel'], $world, $moning, $sound, $open_door, $corner_stone);
|
||||
// $return_data['arr_praise'] = ;
|
||||
// $return_data['arr_testimony'] = ;
|
||||
// $return_data['arr_talkshow'] = ;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/cmtv/channel_recommend', $return_data, true);
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
205
application/controllers/web/renew.php
Executable file
205
application/controllers/web/renew.php
Executable file
@@ -0,0 +1,205 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
|
||||
include_once(APPPATH.'core/web/cm_exceptions.php');
|
||||
class Renew extends CI_Controller {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
$this->load->library('user_agent');
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
$this->load->helper('crossmap/exception_helper');
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
/*
|
||||
from _remap
|
||||
*/
|
||||
$this->load->helper('cookie');
|
||||
$session_id = get_cookie('crossmap_save_id');
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
if($session_id != '' && $SES_MEMBER_ID=='') {
|
||||
# model - session 가져오기
|
||||
$this->load->model('web/m_ci_sessions');
|
||||
$session_result = $this->m_ci_sessions->ci_sessions_select($session_id);
|
||||
session_decode($session_result['data']);
|
||||
}
|
||||
|
||||
if($SES_MEMBER_ID!='') {
|
||||
$expire_date = date("Y-m-d H:i:s", strtotime("+10 minutes"));
|
||||
|
||||
# model - 중복로그인 체크용
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['member_ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$req_data['expire_date'] = $expire_date;
|
||||
$this->load->model('web/m_member_login');
|
||||
$this->m_member_login->member_login_member_id_member_ip_update($req_data);
|
||||
}
|
||||
|
||||
# model - 사이트 정보
|
||||
$this->load->model('web/m_site_info');
|
||||
$site_info = $this->m_site_info->site_info_select(1);
|
||||
|
||||
$controller = $this->uri->segment(2);
|
||||
|
||||
/*
|
||||
from fn_index()
|
||||
*/
|
||||
$now_date = date("Y-m-d");
|
||||
|
||||
# 영적기상도
|
||||
$this->load->model('web/m_weather');
|
||||
$arr_weather = $this->m_weather->weather_join_relation_article_join_news_list();
|
||||
|
||||
# 오늘의 말씀
|
||||
$this->load->model('web/m_today_word');
|
||||
$arr_today_word = $this->m_today_word->today_word_where_display_date_select($now_date);
|
||||
|
||||
# 테마
|
||||
# theme_type = 1 (헤드라인뉴스), theme_type = 8 (오늘의칼럼), theme_type = 11 (라이프홈), theme_type = 12 (데일리큐티)
|
||||
$this->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = array('1', '11', '12');
|
||||
$arr_theme = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_headline_news = array();
|
||||
$arr_life_home = array();
|
||||
$arr_daily_cutie = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
if($val['theme_type'] == 1) $arr_headline_news[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 11) $arr_life_home[$val['rank']] = array('title' => $val['title'], 'sub_title'=> $val['sub_title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($val['theme_type'] == 12) $arr_daily_cutie[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
}
|
||||
|
||||
// 오늘의 칼럼
|
||||
$req_data['theme_types'] = array('8');
|
||||
$arr_today_column = $this->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
# 카드뉴스 - 기타섹션 테마
|
||||
$this->load->model('web/m_etc_section');
|
||||
$etc_section_type = 4;
|
||||
$arr_card_news = $this->m_etc_section->etc_section_where_theme_type_list($etc_section_type);
|
||||
|
||||
# 언론
|
||||
$this->load->model('web/m_press');
|
||||
$arr_press = $this->m_press->press_all_list();
|
||||
|
||||
# 카테고리별
|
||||
$this->load->model('web/m_main_category_company');
|
||||
$arr_company = $this->m_main_category_company->main_category_company_all_list();
|
||||
|
||||
$arr_content = array();
|
||||
$content_idx = $this->uri->segment(4);
|
||||
|
||||
// 모아보기
|
||||
// 말씀과 묵상
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = '';
|
||||
$req_data['search_keyword'] = '';
|
||||
$req_data['search_life_type'] = '';
|
||||
$req_data['search_category_code1'] = 6;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['search_click1'] = '';
|
||||
$req_data['search_click2'] = '';
|
||||
$req_data['sort_column'] = 'a.reg_date';
|
||||
$req_data['search_write_id'] = '';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
|
||||
//찬양
|
||||
$arr_praise = $this->m_life->life_list($req_data);
|
||||
//말씀
|
||||
$req_data['search_category_code1'] = 5;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_gospel = $this->m_life->life_list($req_data);
|
||||
//지식인
|
||||
$req_data['search_category_code1'] = 10;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_knowledge = $this->m_life->life_list($req_data);
|
||||
|
||||
// 2.크로스맵TV
|
||||
// 2-1.말씀영상
|
||||
$req_data['search_category_code1'] = 22;
|
||||
$req_data['search_category_code2'] = 42;
|
||||
$req_data['limit'] = 8;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_gospel = $this->m_life->life_list($req_data);
|
||||
// 2-2.찬양영상
|
||||
$req_data['search_category_code2'] = 43;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_praise = $this->m_life->life_list($req_data);
|
||||
// 2-3.간증
|
||||
$req_data['search_category_code2'] = 44;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_testimony = $this->m_life->life_list($req_data);
|
||||
// 2-4.토크쇼
|
||||
$req_data['search_category_code2'] = 45;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_tv_talkshow = $this->m_life->life_list($req_data);
|
||||
|
||||
// 3.이런건 어때?
|
||||
// 3-1.은혜
|
||||
$req_data['search_category_code1'] = 18;
|
||||
$req_data['search_category_code2'] = '';
|
||||
$req_data['limit'] = 7;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_grace = $this->m_life->life_list($req_data);
|
||||
// 3-2.사랑
|
||||
$req_data['search_category_code1'] = 19;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_love = $this->m_life->life_list($req_data);
|
||||
// 3-3.크리스마스
|
||||
$req_data['search_category_code1'] = 20;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_christmas = $this->m_life->life_list($req_data);
|
||||
// 3-4.마무리
|
||||
$req_data['search_category_code1'] = 21;
|
||||
$this->load->model('admin/life/m_life');
|
||||
$arr_completion = $this->m_life->life_list($req_data);
|
||||
|
||||
$melon_json = file_get_contents('http://35.224.33.187/melon.json');
|
||||
if($melon_json!='')
|
||||
$melon_arr = json_decode($melon_json,true);
|
||||
else
|
||||
$melon_arr = array();
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['site_info'] = $site_info;
|
||||
$return_data['arr_weather'] = $arr_weather;
|
||||
$return_data['arr_today_word'] = $arr_today_word;
|
||||
$return_data['arr_headline_news'] = $arr_headline_news;
|
||||
$return_data['arr_life_home'] = $arr_life_home;
|
||||
$return_data['arr_daily_cutie'] = $arr_daily_cutie;
|
||||
$return_data['arr_card_news'] = $arr_card_news;
|
||||
$return_data['arr_press'] = $arr_press;
|
||||
$return_data['arr_company'] = $arr_company;
|
||||
$return_data['arr_praise'] = $arr_praise;
|
||||
$return_data['arr_gospel'] = $arr_gospel;
|
||||
$return_data['arr_knowledge'] = $arr_knowledge;
|
||||
$return_data['arr_tv_gospel'] = $arr_tv_gospel;
|
||||
$return_data['arr_tv_praise'] = $arr_tv_praise;
|
||||
$return_data['arr_tv_testimony'] = $arr_tv_testimony;
|
||||
$return_data['arr_tv_talkshow'] = $arr_tv_talkshow;
|
||||
$return_data['arr_grace'] = $arr_grace;
|
||||
$return_data['arr_love'] = $arr_love;
|
||||
$return_data['arr_christmas'] = $arr_christmas;
|
||||
$return_data['arr_completion'] = $arr_completion;
|
||||
$return_data['arr_today_column'] = $arr_today_column;
|
||||
$return_data['arr_melon_ccm'] = $melon_arr;
|
||||
|
||||
$this->load->library('user_agent');
|
||||
if($this->agent->is_mobile()) {
|
||||
$return_data['is_mobile'] = true;
|
||||
} else {
|
||||
$return_data['is_mobile'] = false;
|
||||
}
|
||||
|
||||
$this->load->view('/web/index2', $return_data);
|
||||
}
|
||||
}
|
||||
72
application/controllers/web/rules.php
Executable file
72
application/controllers/web/rules.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class rules extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 서비스이용약관
|
||||
# CREATE : 2018-04-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_service() {
|
||||
|
||||
# model - 사이트 정보
|
||||
$this->load->model('web/m_site_info');
|
||||
$site_info = $this->m_site_info->site_info_select(1);
|
||||
|
||||
|
||||
$return_data = array();
|
||||
$return_data['site_info'] = $site_info;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/rules/service', $return_data, true);
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 개인정보 취급방침
|
||||
# CREATE : 2018-05-07
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_privacy() {
|
||||
|
||||
# model - 사이트 정보
|
||||
$this->load->model('web/m_site_info');
|
||||
$site_info = $this->m_site_info->site_info_select(1);
|
||||
|
||||
|
||||
$return_data = array();
|
||||
$return_data['site_info'] = $site_info;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/rules/privacy', $return_data, true);
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 개인정보 수집 및 이용
|
||||
# CREATE : 2018-05-07
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_privacy_agreement() {
|
||||
|
||||
# model - 사이트 정보
|
||||
$this->load->model('web/m_site_info');
|
||||
$site_info = $this->m_site_info->site_info_select(1);
|
||||
|
||||
|
||||
$return_data = array();
|
||||
$return_data['site_info'] = $site_info;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/rules/privacy_agreement', $return_data, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
689
application/controllers/web/search.php
Executable file
689
application/controllers/web/search.php
Executable file
@@ -0,0 +1,689 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class search extends cm_Controller {
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 검색메인
|
||||
# CREATE : 2018-04-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_index() {
|
||||
# Request
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
|
||||
|
||||
$search_keyword_tmp = urldecode($search_keyword);
|
||||
$search_keyword_tmp = addslashes($search_keyword_tmp);
|
||||
|
||||
# 연관검색어
|
||||
$req_data = array();
|
||||
$req_data['keyword'] = $search_keyword_tmp;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 10;
|
||||
$this->load->model('web/m_search_keyword_relation');
|
||||
$arr_search_keyword_relation = $this->m_search_keyword_relation->search_keyword_relation_list($req_data);
|
||||
|
||||
|
||||
$search_keyword_txt = gf_search_keyword_fulltext_string($search_keyword_tmp);
|
||||
|
||||
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search';
|
||||
$req_data['search_keyword'] = $search_keyword_txt;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 3;
|
||||
$req_data['sort_column'] = 'display_date';
|
||||
|
||||
# 라이프
|
||||
$this->load->model('web/m_life');
|
||||
$arr_life = $this->m_life->life_list($req_data);
|
||||
|
||||
# 뉴스
|
||||
$this->load->model('web/m_news');
|
||||
$arr_news = $this->m_news->news_list($req_data);
|
||||
|
||||
# 칼럼
|
||||
$this->load->model('web/m_column');
|
||||
$arr_column = $this->m_column->column_list($req_data);
|
||||
|
||||
|
||||
# 뉴스 - 관련 뉴스
|
||||
$this->load->model('web/m_relation_article');
|
||||
$arr_news_relation_article = array();
|
||||
foreach($arr_news as $val) {
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = '1';
|
||||
$req_data['content_idx'] = $val['idx'];
|
||||
$arr_news_relation_article[$val['idx']] = $this->m_relation_article->relation_article_join_news_list($req_data);
|
||||
}
|
||||
|
||||
$search_keyword_txt = addslashes($search_keyword);
|
||||
|
||||
|
||||
# 동영상
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search_and_video_url';
|
||||
$req_data['search_keyword'] = $search_keyword_tmp;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 5;
|
||||
$req_data['sort_column'] = 'display_date';
|
||||
|
||||
$arr_life_video = $this->m_life->life_list($req_data);
|
||||
$arr_news_video = $this->m_news->news_list($req_data);
|
||||
$arr_column_video = $this->m_column->column_list($req_data);
|
||||
$arr_video = array_merge($arr_life_video, $arr_news_video, $arr_column_video);
|
||||
$arr_display_date = array();
|
||||
foreach ($arr_video as $key=>$val) {
|
||||
$arr_display_date[$key] = $val['display_date'];
|
||||
}
|
||||
array_multisort($arr_display_date, SORT_DESC, $arr_video);
|
||||
|
||||
|
||||
# 이미지
|
||||
$arr_img = array_merge($arr_life, $arr_news, $arr_column);
|
||||
$arr_display_date = array();
|
||||
foreach ($arr_img as $key=>$val) {
|
||||
$arr_display_date[$key] = $val['display_date'];
|
||||
}
|
||||
array_multisort($arr_display_date, SORT_DESC, $arr_img);
|
||||
|
||||
$total_count = count($arr_img);
|
||||
|
||||
|
||||
|
||||
|
||||
$return_data = array();
|
||||
$return_data['arr_life'] = $arr_life;
|
||||
$return_data['arr_news'] = $arr_news;
|
||||
$return_data['arr_column'] = $arr_column;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['arr_search_keyword_relation'] = $arr_search_keyword_relation;
|
||||
$return_data['arr_img'] = $arr_img;
|
||||
$return_data['arr_video'] = $arr_video;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['arr_news_relation_article'] = $arr_news_relation_article;
|
||||
|
||||
|
||||
// $this->load->library('remotesearch');
|
||||
// $return_data['wikiResult'] = $this->remotesearch->wikipedia($return_data['search_keyword']);
|
||||
$return_data['wikiResult'] = [];
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/search/index', $return_data, true);
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 검색어 찾기
|
||||
# CREATE : 2018-05-02
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_search_keyword() {
|
||||
# request
|
||||
$keyword = trim($this->input->get_post('keyword', TRUE));
|
||||
|
||||
# select
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'keyword';
|
||||
$req_data['search_keyword'] = $keyword;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 15;
|
||||
$this->load->model('web/m_search_keyword');
|
||||
$result_tmp = $this->m_search_keyword->search_keyword_list($req_data);
|
||||
|
||||
$result = array();
|
||||
foreach ($result_tmp as $key=>$val) {
|
||||
$result[$key]['keyword'] = str_replace("'", "\\'", $val['keyword']);
|
||||
|
||||
}
|
||||
|
||||
if(count($result) > 0) {
|
||||
$return_data['result'] = array('code' => '0000', 'data' => $result);
|
||||
} else {
|
||||
$return_data['result'] = array('code' => '9999');
|
||||
}
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 검색어 찾기
|
||||
# CREATE : 2018-05-02
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_search_keyword_reg() {
|
||||
# request
|
||||
$keyword = trim($this->input->get_post('keyword', TRUE));
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->load->model('web/m_search_keyword');
|
||||
$this->load->model('web/m_search_keyword_relation');
|
||||
|
||||
$arr_keyword = explode(" ", $keyword);
|
||||
if(count($arr_keyword) > 0) {
|
||||
array_unshift($arr_keyword, $keyword);
|
||||
foreach ($arr_keyword as $key =>$val) {
|
||||
|
||||
# 금칙어
|
||||
$forbidden_word_count = $this->comm->fn_forbidden_word($val);
|
||||
if($forbidden_word_count > 0) {
|
||||
throw new Cm_Exception('json', '9999', '검색할수 없는 단어가 있습니다.');
|
||||
exit;
|
||||
}
|
||||
|
||||
# 검색키워드 넣기
|
||||
$req_data = array();
|
||||
$req_data['keyword'] = $val;
|
||||
$result = $this->m_search_keyword->search_keyword_where_keyword_select($req_data);
|
||||
if($result > 0) {
|
||||
$this->m_search_keyword->search_keyword_search_count_update($result['idx']);
|
||||
|
||||
} else {
|
||||
$req_data = array();
|
||||
$req_data['keyword'] = $val;
|
||||
$this->m_search_keyword->search_keyword_insert($req_data);
|
||||
}
|
||||
|
||||
# 연관검색어
|
||||
if($key > 1) {
|
||||
$req_data = array();
|
||||
$req_data['keyword'] = $arr_keyword[1];
|
||||
$req_data['relation_keyword'] = $val;
|
||||
|
||||
$result1 = $this->m_search_keyword_relation->search_keyword_relation_where_keyword_relation_keyword_select($req_data);
|
||||
if($result1 > 0) {
|
||||
$this->m_search_keyword_relation->search_keyword_relation_search_count_update($result1['idx']);
|
||||
|
||||
} else {
|
||||
$req_data = array();
|
||||
$req_data['keyword'] = $arr_keyword[1];
|
||||
$req_data['relation_keyword'] = $val;
|
||||
$this->m_search_keyword_relation->search_keyword_relation_keyword_insert($req_data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# log insert
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['keyword'] = $keyword;
|
||||
$this->load->model('web/m_search_keyword_log');
|
||||
$this->m_search_keyword_log->search_keyword_log_insert($req_data);
|
||||
|
||||
|
||||
$return_data['result'] = array('code' => '0000');
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 이미지
|
||||
# CREATE : 2018-05-03
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_image() {
|
||||
# Request
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
|
||||
$search_keyword_tmp = urldecode($search_keyword);
|
||||
$search_keyword_tmp = addslashes($search_keyword_tmp);
|
||||
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search';
|
||||
$req_data['search_keyword'] = $search_keyword_tmp;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 100;
|
||||
|
||||
$this->load->model('web/m_vw_content');
|
||||
$total_count = $this->m_vw_content->vw_content_list_total_count($req_data);
|
||||
|
||||
$return_data = array();
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['limit'] = 100;
|
||||
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/search/image', $return_data, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 이미지 더가져오기
|
||||
# CREATE : 2018-05-03
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_image_list_more() {
|
||||
# request
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
|
||||
$search_keyword_tmp = urldecode($search_keyword);
|
||||
$search_keyword_tmp = addslashes($search_keyword_tmp);
|
||||
|
||||
|
||||
# paging 설정
|
||||
$limit = 100;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search';
|
||||
$req_data['search_keyword'] = $search_keyword_tmp;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
|
||||
|
||||
|
||||
$this->load->model('web/m_vw_content');
|
||||
$list = $this->m_vw_content->vw_content_list($req_data);
|
||||
$total_count = $this->m_vw_content->vw_content_list_total_count($req_data);
|
||||
|
||||
$more_list = 'N';
|
||||
if(($total_count-($page*$limit)) > 0){
|
||||
$more_list = 'Y';
|
||||
}
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['result_code'] = '0000';
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['more_list'] = $more_list;
|
||||
$return_data['limit'] = $limit;
|
||||
$return_data['page'] = $page;
|
||||
$return_data['view_count'] = $offset;
|
||||
$return_data['search_keyword_tmp'] = $search_keyword_tmp;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return $this->load->view('/web/search/image_list_more', $return_data);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 이미지, 동영상 신고
|
||||
# CREATE : 2018-05-03
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_spam_proc() {
|
||||
$spam_type = trim($this->input->get_post('spam_type', TRUE));
|
||||
$spam_list = $this->input->get_post('spam_list', TRUE);
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
if($spam_type=='') throw new Cm_Exception('json', '9999', '신고할 내용이 없습니다.');
|
||||
if(count($spam_list)==0) throw new Cm_Exception('json', '9999', '신고할 내용이 없습니다.');
|
||||
if($SES_MEMBER_ID == '') throw new Cm_Exception('json', '9999', '로그인을 하셔야 가능합니다.');
|
||||
|
||||
$this->load->model('web/m_spam_media_log');
|
||||
|
||||
foreach ($spam_list as $val) {
|
||||
$arr_content = explode("_", $val);
|
||||
$content_type = $arr_content[0];
|
||||
$content_idx = $arr_content[1];
|
||||
if($content_type=='') throw new Cm_Exception('json', '9999', '신고할 내용이 없습니다.');
|
||||
if($content_idx=='') throw new Cm_Exception('json', '9999', '신고할 내용이 없습니다.');
|
||||
|
||||
# insert
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
$req_data['spam_type'] = $spam_type;
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $content_idx;
|
||||
$this->m_spam_media_log->spam_media_log_insert($req_data);
|
||||
|
||||
}
|
||||
|
||||
$return_data['result'] = array('code' => '0000');
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 라이프, 칼럼
|
||||
# CREATE : 2018-05-03
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_list() {
|
||||
# Request
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$content_type = trim($this->input->get_post('content_type', TRUE));
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
|
||||
# default setting
|
||||
if($page=='') $page = '1';
|
||||
|
||||
$search_keyword_tmp = urldecode($search_keyword);
|
||||
$search_keyword_tmp = addslashes($search_keyword_tmp);
|
||||
|
||||
|
||||
$search_keyword_txt = gf_search_keyword_fulltext_string($search_keyword_tmp);
|
||||
|
||||
# paging 설정
|
||||
$limit = 20;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search';
|
||||
$req_data['search_keyword'] = $search_keyword_txt;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['sort_column'] = 'display_date';
|
||||
|
||||
if($content_type == '3') {
|
||||
# 라이프
|
||||
$this->load->model('web/m_life');
|
||||
$list = $this->m_life->life_list($req_data);
|
||||
$total_count = $this->m_life->life_list_total_count($req_data);
|
||||
$page_title = '라이프';
|
||||
|
||||
} else if($content_type == '2') {
|
||||
# 칼럼
|
||||
$this->load->model('web/m_column');
|
||||
$list = $this->m_column->column_list($req_data);
|
||||
$total_count = $this->m_column->column_list_total_count($req_data);
|
||||
$page_title = '칼럼';
|
||||
|
||||
}
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/search/list?search_keyword='.urlencode($search_keyword).'&content_type='.$content_type.'&page=');
|
||||
|
||||
|
||||
$start_row = $offset+1;
|
||||
$end_row = $limit*$page;
|
||||
|
||||
if($end_row >= $total_count) $end_row = $total_count;
|
||||
|
||||
|
||||
$return_data = array();
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['page'] = $page;
|
||||
$return_data['start_row'] = $start_row;
|
||||
$return_data['end_row'] = $end_row;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['page_title'] = $page_title;
|
||||
$return_data['content_type'] = $content_type;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/search/list', $return_data, true);
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 영상
|
||||
# CREATE : 2018-05-03
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_video() {
|
||||
# Request
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
|
||||
# default setting
|
||||
if($page=='') $page = '1';
|
||||
|
||||
|
||||
$search_keyword_tmp = urldecode($search_keyword);
|
||||
$search_keyword_tmp = addslashes($search_keyword_tmp);
|
||||
|
||||
|
||||
# paging 설정
|
||||
$limit = 20;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search_and_video_url';
|
||||
$req_data['search_keyword'] = $search_keyword_tmp;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
|
||||
$this->load->model('web/m_vw_content');
|
||||
$list = $this->m_vw_content->vw_content_list($req_data);
|
||||
$total_count = $this->m_vw_content->vw_content_list_total_count($req_data);
|
||||
|
||||
|
||||
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/search/video?search_keyword='.urlencode($search_keyword).'&page=');
|
||||
|
||||
|
||||
$start_row = $offset+1;
|
||||
$end_row = $limit*$page;
|
||||
|
||||
if($end_row >= $total_count) $end_row = $total_count;
|
||||
|
||||
$return_data = array();
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['page'] = $page;
|
||||
$return_data['start_row'] = $start_row;
|
||||
$return_data['end_row'] = $end_row;
|
||||
$return_data['pagination'] = $pagination;
|
||||
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/search/video', $return_data, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 뉴스
|
||||
# CREATE : 2018-05-03
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_news() {
|
||||
# Request
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
$page = trim($this->input->get_post('page', TRUE));
|
||||
$search_sort = trim($this->input->get_post('search_sort', TRUE));
|
||||
$content_idx = trim($this->input->get_post('content_idx', TRUE));
|
||||
|
||||
# default setting
|
||||
if($search_sort == '') $search_sort = '1';
|
||||
if($page=='') $page = '1';
|
||||
|
||||
# sort
|
||||
switch ($search_sort) {
|
||||
case '1': $sort_column = 'display_date'; $sort_type = 'desc'; $sorting = SORT_DESC; break;
|
||||
case '2': $sort_column = 'display_date'; $sort_type = 'asc'; $sorting = SORT_ASC; break;
|
||||
default : $sort_column = 'display_date'; $sort_type = 'desc'; $sorting = SORT_DESC; break;
|
||||
}
|
||||
|
||||
$search_keyword_tmp = urldecode($search_keyword);
|
||||
$search_keyword_tmp = addslashes($search_keyword_tmp);
|
||||
|
||||
|
||||
$search_keyword_txt = gf_search_keyword_fulltext_string($search_keyword_tmp);
|
||||
|
||||
# paging 설정
|
||||
$limit = 20;
|
||||
$offset = ($page-1) * $limit;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search';
|
||||
$req_data['search_keyword'] = $search_keyword_txt;
|
||||
$req_data['offset'] = $offset;
|
||||
$req_data['limit'] = $limit;
|
||||
$req_data['sort_column'] = $sort_column;
|
||||
$req_data['sort_type'] = $sort_type;
|
||||
|
||||
$news_type = '';
|
||||
$arr_news_relation_article = array();
|
||||
if($content_idx == '') {
|
||||
# 뉴스
|
||||
$this->load->model('web/m_news');
|
||||
$list = $this->m_news->news_list($req_data);
|
||||
$total_count = $this->m_news->news_list_total_count($req_data);
|
||||
|
||||
} else {
|
||||
# 뉴스
|
||||
$this->load->model('web/m_news');
|
||||
$list[] = $this->m_news->news_select($content_idx);
|
||||
}
|
||||
|
||||
# 뉴스 - 관련 뉴스
|
||||
$this->load->model('web/m_relation_article');
|
||||
foreach($list as $val) {
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = '1';
|
||||
$req_data['content_idx'] = $val['idx'];
|
||||
$arr_news_relation_article[$val['idx']] = $this->m_relation_article->relation_article_join_news_list($req_data);
|
||||
}
|
||||
|
||||
if($content_idx != '') {
|
||||
$list = array_merge($list, $arr_news_relation_article[$content_idx]);
|
||||
$total_count = count($list);
|
||||
$news_type='relation';
|
||||
$arr_news_relation_article = array();
|
||||
|
||||
$arr_display_date = array();
|
||||
foreach ($list as $key=>$val) {
|
||||
$arr_display_date[$key] = $val['display_date'];
|
||||
}
|
||||
array_multisort($arr_display_date, $sorting, $list);
|
||||
|
||||
}
|
||||
|
||||
# page
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$pagination = gf_paging($limit, $page, $max_page, '/web/search/news?search_keyword='.urlencode($search_keyword).'&content_idx='.$content_idx.'&search_sort='.$search_sort.'&page=');
|
||||
|
||||
|
||||
$start_row = $offset+1;
|
||||
$end_row = $limit*$page;
|
||||
|
||||
if($end_row >= $total_count) $end_row = $total_count;
|
||||
|
||||
|
||||
$return_data = array();
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
$return_data['list'] = $list;
|
||||
$return_data['total_count'] = $total_count;
|
||||
$return_data['page'] = $page;
|
||||
$return_data['start_row'] = $start_row;
|
||||
$return_data['end_row'] = $end_row;
|
||||
$return_data['pagination'] = $pagination;
|
||||
$return_data['search_sort'] = $search_sort;
|
||||
$return_data['arr_news_relation_article'] = $arr_news_relation_article;
|
||||
$return_data['news_type'] = $news_type;
|
||||
$return_data['content_idx'] = $content_idx;
|
||||
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/search/news', $return_data, true);
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 이미지 뷰
|
||||
# CREATE : 2018-05-04
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_image_view() {
|
||||
# request
|
||||
$content_type = trim($this->input->get_post('content_type', TRUE));
|
||||
$content_idx = trim($this->input->get_post('content_idx', TRUE));
|
||||
$row_num = trim($this->input->get_post('row_num', TRUE));
|
||||
$search_keyword = trim($this->input->get_post('search_keyword', TRUE));
|
||||
|
||||
$search_keyword_tmp = addslashes($search_keyword);
|
||||
|
||||
|
||||
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search';
|
||||
$req_data['search_keyword'] = $search_keyword_tmp;
|
||||
$req_data['row_num'] = $row_num;
|
||||
|
||||
$this->load->model('web/m_vw_content');
|
||||
$arr_next = $this->m_vw_content->vw_content_next_select($req_data);
|
||||
$arr_prev = $this->m_vw_content->vw_content_prev_select($req_data);
|
||||
|
||||
if($content_type == '1') {
|
||||
$this->load->model('web/m_news');
|
||||
$result = $this->m_news->news_select($content_idx);
|
||||
|
||||
} else if($content_type == '2') {
|
||||
$this->load->model('web/m_column');
|
||||
$result = $this->m_column->column_select($content_idx);
|
||||
|
||||
} else if($content_type == '3') {
|
||||
$this->load->model('web/m_life');
|
||||
$result = $this->m_life->life_select($content_idx);
|
||||
}
|
||||
|
||||
|
||||
$req_data = array();
|
||||
$req_data['search_type'] = 'main_search';
|
||||
$req_data['search_keyword'] = $search_keyword_tmp;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 8;
|
||||
$req_data['idx'] = $content_idx;
|
||||
$this->load->model('web/m_vw_content');
|
||||
$arr_relation_img = $this->m_vw_content->vw_content_where_not_idx_list($req_data);
|
||||
|
||||
|
||||
|
||||
# view data
|
||||
$return_data = array();
|
||||
$return_data['result_code'] = '0000';
|
||||
$return_data['result'] = $result;
|
||||
$return_data['arr_relation_img'] = $arr_relation_img;
|
||||
$return_data['content_type'] = $content_type;
|
||||
$return_data['arr_next'] = $arr_next;
|
||||
$return_data['arr_prev'] = $arr_prev;
|
||||
$return_data['search_keyword'] = $search_keyword;
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/search/image_view', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
335
application/controllers/web/share.php
Executable file
335
application/controllers/web/share.php
Executable file
@@ -0,0 +1,335 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
/**
|
||||
* 인클루드 class
|
||||
*
|
||||
* cm_controller: 부모 Class(CI_Controller 확장한 custome class)
|
||||
*/
|
||||
include_once(APPPATH.'core/web/cm_controller.php');
|
||||
class share extends cm_Controller {
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 트위터 callback url
|
||||
# CREATE : 2018-04-10
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_twitter_callback_proc() {
|
||||
|
||||
# Request
|
||||
$type = trim($this->input->get_post('type', TRUE));
|
||||
$oauth_token = trim($this->input->get_post('oauth_token', TRUE));
|
||||
$oauth_verifier = trim($this->input->get_post('oauth_verifier', TRUE));
|
||||
|
||||
$twitter_oauth_token = $this->session->userdata('Twitter_Oauth_Token');
|
||||
$twitter_oauth_token_secret = $this->session->userdata('Twitter_Oauth_Token_Secret');
|
||||
|
||||
$this->session->unset_userdata('Twitter_Oauth_Token');
|
||||
$this->session->unset_userdata('Twitter_Oauth_Token_Secret');
|
||||
|
||||
if ($oauth_token != $twitter_oauth_token) {
|
||||
gf_alert('트위터 연동에 실패했습니다.', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
if($oauth_verifier=='') {
|
||||
gf_alert('트위터 연동에 실패했습니다.', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once (APPPATH."/inc/twitter_OAuth.php");
|
||||
$tmhOAuth = new tmhOAuth();
|
||||
|
||||
// update with the temporary token and secret
|
||||
$tmhOAuth->reconfigure(array_merge($tmhOAuth->config, array('token' => $twitter_oauth_token, 'secret' => $twitter_oauth_token_secret)));
|
||||
$code = $tmhOAuth->user_request(array(
|
||||
'method' => 'POST',
|
||||
'url' => $tmhOAuth->url('oauth/access_token', ''),
|
||||
'params' => array('oauth_verifier' => trim($oauth_verifier))
|
||||
));
|
||||
|
||||
if ($code != 200) {
|
||||
gf_alert('트위터 연동에 실패했습니다.', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
$oauth_creds = $tmhOAuth->extract_params($tmhOAuth->response['response']);
|
||||
|
||||
$tmhOAuth->reconfigure(array_merge($tmhOAuth->config, array(
|
||||
'token' => $oauth_creds['oauth_token'],
|
||||
'secret' => $oauth_creds['oauth_token_secret'],
|
||||
)));
|
||||
$code = $tmhOAuth->user_request(array(
|
||||
'url' => $tmhOAuth->url('1.1/account/verify_credentials')
|
||||
));
|
||||
|
||||
$arr_member_data = json_decode($tmhOAuth->response['response'], true);
|
||||
|
||||
if($type=='comment') {
|
||||
$social_id = (string)$arr_member_data['id'];
|
||||
$social_name = $arr_member_data['name'];
|
||||
|
||||
# 로그
|
||||
$req_data = array();
|
||||
$req_data['social_id'] = $social_id;
|
||||
$req_data['name'] = $social_name;
|
||||
$req_data['social_type'] = '2';
|
||||
$this->load->model('web/m_comment_social_member_log');
|
||||
$this->m_comment_social_member_log->comment_social_member_log_insert($req_data);
|
||||
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $social_id;
|
||||
$req_data['member_name'] = $social_name;
|
||||
$req_data['sns_type_name'] = 'twitter';
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_comment_login_proc($req_data);
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/social_login', '', true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 카카오 callback url
|
||||
# CREATE : 2018-04-10
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_kakao_callback_proc() {
|
||||
|
||||
# Request
|
||||
$code = trim($this->input->get_post('code', TRUE));
|
||||
$state = trim($this->input->get_post('state', TRUE));
|
||||
|
||||
$SES_RANDOM_STATE = $this->session->userdata('RANDOM_STATE');
|
||||
if($state!=$SES_RANDOM_STATE) {
|
||||
gf_alert('카카오계정 연동에 실패했습니다.1', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
$CLIENT_ID = "d9d530edc95295682137fdd37dddc55f";
|
||||
$REDIRECT_URI = WWW_CROSSMAP."/web/share/kakao_callback_proc";
|
||||
$TOKEN_API_URL = "https://kauth.kakao.com/oauth/token";
|
||||
|
||||
$params = sprintf( 'grant_type=authorization_code&client_id=%s&redirect_uri=%s&code=%s', $CLIENT_ID, $REDIRECT_URI, $code);
|
||||
$opts = array(
|
||||
CURLOPT_URL => $TOKEN_API_URL,
|
||||
CURLOPT_SSL_VERIFYPEER => false,
|
||||
CURLOPT_SSLVERSION => 1, // TLS
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => $params,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_HEADER => false
|
||||
);
|
||||
$curlSession = curl_init();
|
||||
curl_setopt_array($curlSession, $opts);
|
||||
$accessTokenJson = curl_exec($curlSession);
|
||||
$status_code = curl_getinfo($curlSession, CURLINFO_HTTP_CODE);
|
||||
curl_close($curlSession);
|
||||
|
||||
if($status_code != 200) {
|
||||
gf_alert('카카오계정 연동에 실패했습니다.2', 'self_close');
|
||||
exit;
|
||||
}
|
||||
$arr_data = json_decode($accessTokenJson, true);
|
||||
$token_expires_date = date("Y-m-d H:i:s", time()+$arr_data['expires_in']);
|
||||
|
||||
$header = "Bearer ".$arr_data['access_token']; // Bearer 다음에 공백 추가
|
||||
$url = "https://kapi.kakao.com/v1/user/me";
|
||||
$is_post = false;
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_POST, $is_post);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$headers = array();
|
||||
$headers[] = "Authorization: ".$header;
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
$response = curl_exec ($ch);
|
||||
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close ($ch);
|
||||
if($status_code != 200) {
|
||||
gf_alert('카카오계정 연동에 실패했습니다.3', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$arr_member_data = json_decode($response, true);
|
||||
if(isset($arr_member_data['id'])==true){
|
||||
|
||||
$social_id = (string)$arr_member_data['id'];
|
||||
$social_name = $arr_member_data['properties']['nickname'];
|
||||
|
||||
# 로그
|
||||
$req_data = array();
|
||||
$req_data['social_id'] = $social_id;
|
||||
$req_data['name'] = $social_name;
|
||||
$req_data['social_type'] = '3';
|
||||
$this->load->model('web/m_comment_social_member_log');
|
||||
$this->m_comment_social_member_log->comment_social_member_log_insert($req_data);
|
||||
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $social_id;
|
||||
$req_data['member_name'] = $social_name;
|
||||
$req_data['sns_type_name'] = 'kakao';
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_comment_login_proc($req_data);
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/social_login', '', true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 네이버 callback url
|
||||
# CREATE : 2018-04-10
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_naver_callback_proc() {
|
||||
|
||||
# Request
|
||||
$code = trim($this->input->get_post('code', TRUE));
|
||||
$state = trim($this->input->get_post('state', TRUE));
|
||||
$error = trim($this->input->get_post('error', TRUE));
|
||||
|
||||
if($error!='') {
|
||||
gf_alert('네이버계정 연동에 실패했습니다.1', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
$SES_RANDOM_STATE = $this->session->userdata('RANDOM_STATE');
|
||||
if($state!=$SES_RANDOM_STATE) {
|
||||
gf_alert('네이버계정 연동에 실패했습니다.2', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
$client_id = "cNiinVHYsygxVKF4FOtw";
|
||||
$client_secret = "nrTOCTFNUq";
|
||||
|
||||
$redirectURI = urlencode(WWW_CROSSMAP."/web/share/naver_callback_proc");
|
||||
$url = "https://nid.naver.com/oauth2.0/token?grant_type=authorization_code&client_id=".$client_id."&client_secret=".$client_secret."&redirect_uri=".$redirectURI."&code=".$code."&state=".$state;
|
||||
$is_post = false;
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_POST, $is_post);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
$response = curl_exec ($ch);
|
||||
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close ($ch);
|
||||
if($status_code != 200) {
|
||||
gf_alert('네이버계정 연동에 실패했습니다.3', 'self_close');
|
||||
exit;
|
||||
}
|
||||
$arr_data = json_decode($response, true);
|
||||
$token_expires_date = date("Y-m-d H:i:s", time()+$arr_data['expires_in']);
|
||||
|
||||
|
||||
$header = "Bearer ".$arr_data['access_token']; // Bearer 다음에 공백 추가
|
||||
$url = "https://openapi.naver.com/v1/nid/me";
|
||||
$is_post = false;
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_POST, $is_post);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$headers = array();
|
||||
$headers[] = "Authorization: ".$header;
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
$response = curl_exec ($ch);
|
||||
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close ($ch);
|
||||
if($status_code != 200) {
|
||||
gf_alert('네이버계정 연동에 실패했습니다.', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$arr_member_data = json_decode($response, true);
|
||||
if($arr_member_data['resultcode'] == '00'){
|
||||
|
||||
if(!$arr_member_data['response']['name']) {
|
||||
gf_alert('네이버계정 연동에 실패했습니다.(필수항목 : 이름)', 'self_close');
|
||||
exit;
|
||||
}
|
||||
|
||||
$social_id = $arr_member_data['response']['id'];
|
||||
$social_name = $arr_member_data['response']['name'];
|
||||
|
||||
# 로그
|
||||
$req_data = array();
|
||||
$req_data['social_id'] = $social_id;
|
||||
$req_data['name'] = $social_name;
|
||||
$req_data['social_type'] = '4';
|
||||
$this->load->model('web/m_comment_social_member_log');
|
||||
$this->m_comment_social_member_log->comment_social_member_log_insert($req_data);
|
||||
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $social_id;
|
||||
$req_data['member_name'] = $social_name;
|
||||
$req_data['sns_type_name'] = 'naver';
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_comment_login_proc($req_data);
|
||||
|
||||
$this->session->unset_userdata('RANDOM_STATE');
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/social_login', '', true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : 페이스북 로그인 url
|
||||
# CREATE : 2018-04-10
|
||||
#---------------------------------------------------------------------------
|
||||
function fn_ajax_facebook_login_proc() {
|
||||
# Request
|
||||
$id = trim($this->input->get_post('id', TRUE));
|
||||
$name = trim($this->input->get_post('name', TRUE));
|
||||
|
||||
$return_data['result'] = array('code' => '9999');
|
||||
if($id!='') {
|
||||
|
||||
$social_id = $id;
|
||||
$social_name = $name;
|
||||
|
||||
# 로그
|
||||
$req_data = array();
|
||||
$req_data['social_id'] = $social_id;
|
||||
$req_data['name'] = $social_name;
|
||||
$req_data['social_type'] = '1';
|
||||
$this->load->model('web/m_comment_social_member_log');
|
||||
$this->m_comment_social_member_log->comment_social_member_log_insert($req_data);
|
||||
|
||||
$req_data = array();
|
||||
$req_data['member_id'] = $social_id;
|
||||
$req_data['member_name'] = $social_name;
|
||||
$req_data['sns_type_name'] = 'facebook';
|
||||
|
||||
$this->load->library('comm');
|
||||
$this->comm->fn_comment_login_proc($req_data);
|
||||
|
||||
$return_data['result'] = array('code' => '0000');
|
||||
|
||||
}
|
||||
|
||||
# view
|
||||
return $this->load->view('/web/comm/result_json', $return_data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
34
application/controllers/web/user.php
Executable file
34
application/controllers/web/user.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
|
||||
include_once(APPPATH.'core/web/cm_exceptions.php');
|
||||
class user extends CI_Controller {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
$this->load->library('user_agent');
|
||||
$this->load->helper('crossmap/tool_helper');
|
||||
$this->load->helper('crossmap/exception_helper');
|
||||
$this->load->helper('url');
|
||||
}
|
||||
|
||||
public function index() {
|
||||
redirect($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/web/user/register');
|
||||
}
|
||||
|
||||
public function register() {
|
||||
$this->load->view('/web/member/register');
|
||||
}
|
||||
|
||||
public function login() {
|
||||
$this->load->view('/web/member/login');
|
||||
}
|
||||
|
||||
public function find_id() {
|
||||
$this->load->view('/web/member/find_id');
|
||||
}
|
||||
|
||||
public function find_password() {
|
||||
$this->load->view('/web/member/find_password');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user