Browse Source

휘파람보드 1.2.0

- 대규모 업데이트
master
장선근 6 years ago
parent
commit
dfd0e642b1
  1. 99
      _src/admin/js/admin.js
  2. 9
      _src/admin/js/modules/datagrid.js
  3. 24
      _src/admin/js/modules/member.js
  4. 16
      _src/admin/scss/plugins/_plugins_custom.scss
  5. 2
      _src/common/js/modules/components.js
  6. 0
      _src/common/js/plugins/jquery.tmpl.js
  7. 2
      public_html/assets/css/admin.min.css
  8. 2
      public_html/assets/css/admin.min.css.map
  9. 2
      public_html/assets/css/desktop.min.css
  10. 2
      public_html/assets/css/desktop.min.css.map
  11. 2
      public_html/assets/css/mobile.min.css
  12. 2
      public_html/assets/css/mobile.min.css.map
  13. BIN
      public_html/assets/images/admin/help/naver_syndi01.png
  14. BIN
      public_html/assets/images/admin/help/naver_syndi02.png
  15. BIN
      public_html/assets/images/admin/help/naver_syndi03.png
  16. 2
      public_html/assets/js/admin.min.js
  17. 2
      public_html/assets/js/admin.min.js.map
  18. 2
      public_html/assets/js/desktop.min.js
  19. 2
      public_html/assets/js/desktop.min.js.map
  20. 2
      public_html/assets/js/mobile.min.js
  21. 2
      public_html/assets/js/mobile.min.js.map
  22. 2
      source.info.json
  23. 2
      wheeparam/application/config/routes.php
  24. 77
      wheeparam/application/controllers/Board.php
  25. 88
      wheeparam/application/controllers/Helptool.php
  26. 1
      wheeparam/application/controllers/admin/Board.php
  27. 131
      wheeparam/application/controllers/admin/Management.php
  28. 134
      wheeparam/application/controllers/admin/Members.php
  29. 63
      wheeparam/application/controllers/admin/ajax/Management.php
  30. 186
      wheeparam/application/controllers/admin/ajax/Members.php
  31. 62
      wheeparam/application/controllers/ajax/Members.php
  32. 154
      wheeparam/application/controllers/customer/Qna.php
  33. 18
      wheeparam/application/libraries/Member.php
  34. 146
      wheeparam/config/wheeparam.sql
  35. 9
      wheeparam/views/themes/admin/board/form.php
  36. 34
      wheeparam/views/themes/admin/help/naver_syndi.php
  37. 4
      wheeparam/views/themes/admin/management/banner.php
  38. 41
      wheeparam/views/themes/admin/management/banner_form.php
  39. 179
      wheeparam/views/themes/admin/management/qna.php
  40. 79
      wheeparam/views/themes/admin/management/qna_category.php
  41. 15
      wheeparam/views/themes/admin/management/qna_category_form.php
  42. 72
      wheeparam/views/themes/admin/management/qna_view.php
  43. 146
      wheeparam/views/themes/admin/members/info.php
  44. 200
      wheeparam/views/themes/admin/members/lists.php
  45. 140
      wheeparam/views/themes/admin/members/log.php
  46. 4
      wheeparam/views/themes/admin/members/login.php
  47. 130
      wheeparam/views/themes/admin/members/modify.php
  48. 31
      wheeparam/views/themes/admin/members/password.php
  49. 151
      wheeparam/views/themes/admin/members/point.php
  50. 33
      wheeparam/views/themes/admin/members/point_form.php
  51. 136
      wheeparam/views/themes/admin/members/points.php
  52. 3
      wheeparam/views/themes/admin/setting/admin.php
  53. 2
      wheeparam/views/themes/admin/statics/visit.php
  54. 2
      wheeparam/views/themes/admin/theme.php
  55. 41
      wheeparam/views/themes/desktop/customer/qna/lists.php
  56. 39
      wheeparam/views/themes/desktop/customer/qna/write.php

99
_src/admin/js/admin.js

@ -83,7 +83,6 @@ APP.initPlugins = function() {
}); });
}; };
APP.initSortableList = function() { APP.initSortableList = function() {
$('[data-toggle="sortable"]').each(function(){ $('[data-toggle="sortable"]').each(function(){
@ -149,7 +148,7 @@ APP.initFitHeight = function() {
var mH = $('#contents').height(); var mH = $('#contents').height();
$('[data-fit-aside]').each(function() { $('[data-fit-aside]').each(function() {
mH -= $(this).height();
mH -= $(this).outerHeight(true);
}); });
$('[data-fit-content]').height(mH); $('[data-fit-content]').height(mH);
@ -157,6 +156,102 @@ APP.initFitHeight = function() {
}).resize(); }).resize();
}; };
APP.memberMenuObject = function(e, point_name, obj) {
var a = [
{
icon: 'card',
text: '회원정보',
beginGroup:true,
onItemClick: function() {
APP.MEMBER.POP_INFO_ADMIN(e.row.data.mem_idx);
}
},
{
icon: 'edit',
text: '정보수정',
onItemClick: function() {
APP.MEMBER.POP_MODIFY_ADMIN(e.row.data.mem_idx);
}
},
{
icon: 'key',
text: '비밀번호 변경',
onItemClick: function() {
APP.MEMBER.POP_PASSWORD_ADMIN(e.row.data.mem_idx);
}
},
{
beginGroup:true,
icon:'repeat',
text: '휴면처리',
visible: e.row.data.mem_status == 'Y',
onItemClick: function() {
APP.MEMBER.STATUS_CHANGE(e.row.data.mem_idx,'Y','H');
}
},
{
icon:'clear',
text: '로그인금지',
visible: e.row.data.mem_status == 'Y',
onItemClick: function() {
APP.MEMBER.STATUS_CHANGE(e.row.data.mem_idx,'Y','D');
}
},
{
icon:'clearformat',
text: '휴면해제',
visible: e.row.data.mem_status == 'H',
onItemClick: function() {
APP.MEMBER.STATUS_CHANGE(e.row.data.mem_idx,'H','Y');
}
},
{
icon:'clearformat',
text: '로그인금지 해제',
visible: e.row.data.mem_status == 'D',
onItemClick: function() {
APP.MEMBER.STATUS_CHANGE(e.row.data.mem_idx,'D','Y');
}
},
{
icon:'trash',
text: '회원 탈퇴',
visible: e.row.data.mem_status != 'N',
onItemClick: function() {
APP.MEMBER.STATUS_CHANGE(e.row.data.mem_idx,'D','Y');
}
},
{
icon:'event',
beginGroup:true,
text: '로그인 기록',
onItemClick: function() {
APP.POPUP({
url: base_url + '/admin/members/log?mode=popup&sc=idx&st=' + e.row.data.mem_idx
})
}
},
{
icon:'unpin',
beginGroup:true,
text: point_name + ' 관리',
visible: point_name !== false,
onItemClick: function() {
APP.MEMBER.POP_POINT_ADMIN(e.row.data.mem_idx);
}
},
{
icon:'unpin',
text: point_name + ' 추가',
visible: point_name !== false,
onItemClick: function() {
APP.MEMBER.POP_POINT_FORM_ADMIN(e.row.data.mem_idx);
}
}
]
return a;
};
$(function(){ $(function(){
APP.init(); APP.init();

9
_src/admin/js/modules/datagrid.js

@ -14,12 +14,19 @@ function GRID (element, addOptions) {
key : '', key : '',
values : [] values : []
}, },
sorting: {
mode:'none',
ascendingText: '오름차순 정렬',
clearText: '정렬 초기화',
descendingText: '내림차순 정렬'
},
colorField : [], colorField : [],
loadPanel: { enabled: true }, loadPanel: { enabled: true },
remoteOperations: { remoteOperations: {
groupPaging: true, groupPaging: true,
sorting:true, sorting:true,
paging:true
paging:true,
summary:false
}, },
paging: { paging: {
pageSize: 30, pageSize: 30,

24
_src/admin/js/modules/member.js

@ -14,7 +14,8 @@ APP.MEMBER.POP_INFO_ADMIN = function(mem_idx) {
title : '회원 정보' title : '회원 정보'
}, },
callback : function(){ callback : function(){
location.reload();
APP.MODAL.close();
grid.refresh();
}, },
iframe : { iframe : {
method : 'get', method : 'get',
@ -41,7 +42,8 @@ APP.MEMBER.POP_PASSWORD_ADMIN = function(mem_idx) {
title : '비밀번호 변경' title : '비밀번호 변경'
}, },
callback : function(){ callback : function(){
location.reload();
APP.MODAL.close();
grid.refresh();
}, },
iframe : { iframe : {
method : 'get', method : 'get',
@ -68,7 +70,8 @@ APP.MEMBER.POP_MODIFY_ADMIN = function(mem_idx) {
title : '회원 정보 수정' title : '회원 정보 수정'
}, },
callback : function(){ callback : function(){
location.reload();
APP.MODAL.close();
grid.refresh();
}, },
iframe : { iframe : {
method : 'get', method : 'get',
@ -95,7 +98,8 @@ APP.MEMBER.POP_POINT_ADMIN = function(mem_idx) {
title : '회원 포인트 관리' title : '회원 포인트 관리'
}, },
callback : function(){ callback : function(){
location.reload();
APP.MODAL.close();
grid.refresh();
}, },
iframe : { iframe : {
method : 'get', method : 'get',
@ -115,9 +119,6 @@ APP.MEMBER.POP_POINT_FORM_ADMIN = function(mem_idx) {
return; return;
} }
APP.MODAL2.callback = function(){
location.reload();
};
APP.MODAL2.open({ APP.MODAL2.open({
width: 410, width: 410,
height :200, height :200,
@ -125,7 +126,8 @@ APP.MEMBER.POP_POINT_FORM_ADMIN = function(mem_idx) {
title : '회원 포인트 추가' title : '회원 포인트 추가'
}, },
callback : function(){ callback : function(){
location.reload();
APP.MODAL2.close();
grid.refresh();
}, },
iframe : { iframe : {
method : 'get', method : 'get',
@ -154,7 +156,7 @@ APP.MEMBER.STATUS_CHANGE = function(mem_idx, current_status, change_status) {
if( ! confirm('해당 회원의 상태를 [' + change_status_msg + '] 상태로 변경합니까?') ) return; if( ! confirm('해당 회원의 상태를 [' + change_status_msg + '] 상태로 변경합니까?') ) return;
$.ajax({ $.ajax({
url : '/ajax/members/status',
url : base_url + '/admin/ajax/members/status',
type : 'POST', type : 'POST',
async : false, async : false,
cache : false, cache : false,
@ -164,8 +166,8 @@ APP.MEMBER.STATUS_CHANGE = function(mem_idx, current_status, change_status) {
change_status : change_status change_status : change_status
}, },
success:function(){ success:function(){
alert('지정한 회원의 상태를 [' + change_status_msg + '] 상태로 변경하였습니다.');
location.reload();
toastr.success('지정한 회원의 상태를 [' + change_status_msg + '] 상태로 변경하였습니다.');
grid.refresh();
} }
}) })
}; };

16
_src/admin/scss/plugins/_plugins_custom.scss

@ -124,6 +124,22 @@
} }
} }
} }
.dx-datagrid-total-footer {
>.dx-datagrid-content {
padding:0;
.dx-row {
border: 1px solid #ddd;
background-color:#f9f9f9;
color:#282828;
td {
border-right:1px solid #ddd;
border-bottom:1px solid #ddd;
}
}
}
}
} }
.dx-datagrid-rowsview {border:1px solid #d8d8d8;} .dx-datagrid-rowsview {border:1px solid #d8d8d8;}

2
_src/common/js/modules/components.js

@ -48,7 +48,7 @@ $(function() {
* 숫자 3자리마다 Comma 자동 입력 * 숫자 3자리마다 Comma 자동 입력
***********************************************************************************************************************/ ***********************************************************************************************************************/
$(function() { $(function() {
$(document).on('keypress', '[data-number-format]', function(e) {
$(document).on('keyup', '[data-number-format]', function(e) {
$(this).val( $(this).val().trim().unNumberFormat().numberFormat() ); $(this).val( $(this).val().trim().unNumberFormat().numberFormat() );
}) })
}); });

0
_src/admin/js/jquery.tmpl.js → _src/common/js/plugins/jquery.tmpl.js

2
public_html/assets/css/admin.min.css
File diff suppressed because it is too large
View File

2
public_html/assets/css/admin.min.css.map
File diff suppressed because it is too large
View File

2
public_html/assets/css/desktop.min.css
File diff suppressed because it is too large
View File

2
public_html/assets/css/desktop.min.css.map
File diff suppressed because it is too large
View File

2
public_html/assets/css/mobile.min.css
File diff suppressed because it is too large
View File

2
public_html/assets/css/mobile.min.css.map
File diff suppressed because it is too large
View File

BIN
public_html/assets/images/admin/help/naver_syndi01.png

Before

Width: 700  |  Height: 381  |  Size: 19 KiB

BIN
public_html/assets/images/admin/help/naver_syndi02.png

Before

Width: 700  |  Height: 538  |  Size: 67 KiB

BIN
public_html/assets/images/admin/help/naver_syndi03.png

Before

Width: 920  |  Height: 109  |  Size: 27 KiB

2
public_html/assets/js/admin.min.js
File diff suppressed because it is too large
View File

2
public_html/assets/js/admin.min.js.map
File diff suppressed because it is too large
View File

2
public_html/assets/js/desktop.min.js
File diff suppressed because it is too large
View File

2
public_html/assets/js/desktop.min.js.map
File diff suppressed because it is too large
View File

2
public_html/assets/js/mobile.min.js
File diff suppressed because it is too large
View File

2
public_html/assets/js/mobile.min.js.map
File diff suppressed because it is too large
View File

2
source.info.json

@ -8,6 +8,7 @@
"source" : { "source" : {
"commonJs" : [ "commonJs" : [
"node_modules/clipboard/dist/clipboard.js", "node_modules/clipboard/dist/clipboard.js",
"_src/common/js/plugins/jquery.tmpl.js",
"_src/plugins/jquery-blockUI/jquery.blockUI.js", "_src/plugins/jquery-blockUI/jquery.blockUI.js",
"_src/plugins/jquery-cookie/jquery.cookie.js", "_src/plugins/jquery-cookie/jquery.cookie.js",
"node_modules/ax5core/dist/ax5core.js", "node_modules/ax5core/dist/ax5core.js",
@ -47,7 +48,6 @@
"_src/admin/js/jquery-ui.js", "_src/admin/js/jquery-ui.js",
"_src/admin/js/dx.all.js", "_src/admin/js/dx.all.js",
"_src/admin/js/dx.messages.ko.js", "_src/admin/js/dx.messages.ko.js",
"_src/admin/js/jquery.tmpl.js",
"_src/admin/js/admin.js", "_src/admin/js/admin.js",
"_src/admin/js/modules/modal.js", "_src/admin/js/modules/modal.js",
"_src/admin/js/modules/board.js", "_src/admin/js/modules/board.js",

2
wheeparam/application/config/routes.php

@ -11,10 +11,10 @@ $route['customer/faq/(:any)'] = 'customer/faq/index/$1';
$route['customer/faq/(:any)/(:num)'] = 'customer/faq/view/$2/$1'; $route['customer/faq/(:any)/(:num)'] = 'customer/faq/view/$2/$1';
// Q&A 라우팅 설정 // Q&A 라우팅 설정
$route['customer/qna/write'] = 'customer/qna/write';
$route['customer/qna/(:num)'] = 'customer/qna/view/$1'; $route['customer/qna/(:num)'] = 'customer/qna/view/$1';
$route['customer/qna/(:any)'] = 'customer/qna/index/$1'; $route['customer/qna/(:any)'] = 'customer/qna/index/$1';
$route['customer/qna/(:any)/(:num)'] = 'customer/qna/view/$2/$1'; $route['customer/qna/(:any)/(:num)'] = 'customer/qna/view/$2/$1';
$route['customer/qna/(:num)/write'] = 'customer/qna/write/$1';
// 게시판 라우팅 설정 // 게시판 라우팅 설정
$route['board/comment/modify/(:num)'] = "board/comment_modify/$1"; $route['board/comment/modify/(:num)'] = "board/comment_modify/$1";

77
wheeparam/application/controllers/Board.php

@ -825,11 +825,6 @@ class Board extends WB_Controller {
$insert_data['post_idx'] = $post_idx; $insert_data['post_idx'] = $post_idx;
$insert_data['post_status'] = 'Y'; $insert_data['post_status'] = 'Y';
if( $insert_data['post_secret'] != 'Y' )
{
$this->_naver_syndi($insert_data);
}
alert(langs('게시판/msg/write_success'), base_url("board/{$brd_key}/{$post_idx}")); alert(langs('게시판/msg/write_success'), base_url("board/{$brd_key}/{$post_idx}"));
exit; exit;
@ -939,7 +934,7 @@ class Board extends WB_Controller {
} }
// 포인트 실제 처리 // 포인트 실제 처리
$this->member->add_point($this->member->is_login(), $this->data['board'][$type], FALSE, $mpo_type, $msg, $target_idx);
$this->member->add_point($this->member->is_login(),$this->data['board'][$type."_flag"], $this->data['board'][$type], FALSE, $mpo_type, $msg, $target_idx);
} }
} }
} }
@ -967,7 +962,7 @@ class Board extends WB_Controller {
$ret = $this->db->where('target_type', $target_type)->where('mem_idx', $this->member->is_login() )->where('target_idx', $target_idx)->where('mpo_value !=','0')->get('member_point')->row_array(); $ret = $this->db->where('target_type', $target_type)->where('mem_idx', $this->member->is_login() )->where('target_idx', $target_idx)->where('mpo_value !=','0')->get('member_point')->row_array();
if( $ret && isset($ret['mpo_value']) && $ret['mpo_value'] != 0 ) if( $ret && isset($ret['mpo_value']) && $ret['mpo_value'] != 0 )
{ {
$this->member->add_point($this->member->is_login(), - $ret['mpo_value'], FALSE, $target_type, $msg, $target_idx);
$this->member->add_point($this->member->is_login(),$ret['mpo_flag']*-1, $ret['mpo_value'], FALSE, $target_type, $msg, $target_idx);
} }
} }
} }
@ -1136,72 +1131,4 @@ class Board extends WB_Controller {
$this->active = "/board/".$this->data['board']['brd_key']; $this->active = "/board/".$this->data['board']['brd_key'];
} }
/**
* 네이버 신디케이션 전송
* @param $post_id
* @param $board
* @param string $status
* @return mixed|void
*/
public function _naver_syndi($post)
{
// curl library 가 지원되어야 합니다.
if ( ! function_exists('curl_init')) {
return;
}
// 네이버 신디케이션 key가 없으면 리턴
if ( empty($this->site->config('naver_syndication_key')) ) {
return;
}
// 게시판이 네이버 신디케이션 미사용이면 리턴
if ( $this->data['board']['brd_use_naver_syndi'] != 'Y')
{
return;
}
// 비회원 글읽기가 불가능한경우 리턴
if( $this->data['board']['brd_lv_read'] != 0 )
{
return;
}
// 비밀글이거나 정상상태의 글이 아닌경우 리턴
if( $post['post_status'] != 'Y' OR $post['post_secret'] == 'Y' ) {
return;
}
$httpheader = 'Authorization: Bearer ' . $this->site->config('naver_syndication_key');
$ping_url = urlencode(base_url('helptool/naversyndi/' . $this->data['board']['brd_key'] . '/' . $post['post_idx']));
$client_opt = array(
CURLOPT_URL => 'https://apis.naver.com/crawl/nsyndi/v2',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => 'ping_url=' . $ping_url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 10,
CURLOPT_HTTPHEADER => array('Host: apis.naver.com', 'Pragma: no-cache', 'Accept: */*', $httpheader)
);
$ch = curl_init();
curl_setopt_array($ch, $client_opt);
$exec = curl_exec($ch);
curl_close($ch);
if( $exec )
{
$xmlData = simplexml_load_string($exec);
$log_data = array(
"post_idx" => $post['post_idx'],
"brd_key" => $this->data['board']['brd_key'],
"bsl_return_code" => $xmlData->error_code ? $xmlData->error_code: '000',
'bsl_return_message' => $xmlData->message,
"bsl_receipt_number" => $xmlData->receipt_number,
"bsl_regtime" => date('Y-m-d H:i:s')
);
$this->db->insert('board_syndi_log', $log_data);
}
return $exec;
}
} }

88
wheeparam/application/controllers/Helptool.php

@ -22,92 +22,4 @@ class Helptool extends WB_Controller {
} }
exit; exit;
} }
/**
* 네이버 신디케이션
* @param $brd_key
* @param $post_idx
*/
public function naversyndi($brd_key, $post_idx)
{
$this->load->model('board_model');
if ( empty($this->site->config('naver_syndication_key'))) {
die('신디케이션 키가 입력되지 않았습니다');
}
$post_idx = (int) $post_idx;
if (empty($post_idx) OR $post_idx < 1) {
show_404();
}
$board = $this->board_model->get_board($brd_key, FALSE);
if( ! element('brd_key', $board) )
{
show_404();
}
if ( $board['brd_use_naver_syndi'] != 'Y') {
die('이 게시판은 신디케이션 기능을 사용하지 않습니다');
}
$post = $this->board_model->get_post($brd_key, $post_idx, FALSE);
if ( ! element('post_idx', $post)) {
show_404();
}
if( $post['post_status'] != 'Y' ) {
show_404();
}
// 비회원 글읽기가 불가능한경우 리턴
if( $board['brd_lv_read'] != 0 )
{
die('이 게시판은 신디케이션 기능을 사용하지 않습니다');
}
if ($post['post_secret'] == 'Y') {
die('비밀글은 신디케이션을 지원하지 않습니다');
}
$base_url = rtrim(base_url("board/{$brd_key}"), '/');
$post_content = str_replace(PHP_EOL,"", ($post['post_content']));
//$content = str_replace(array('&amp;', '&nbsp;'), array('&', ' '), $post_content);
$content = $post_content;
$summary = str_replace(PHP_EOL,"", str_replace(array('&amp;', '&nbsp;'), array('&', ' '), html_escape(strip_tags(element('post_content', $post)))));
header('content-type: text/xml');
header('cache-control: no-cache, must-revalidate');
header('pragma: no-cache');
$xml = "";
$xml .= "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
$xml .= "<feed xmlns=\"http://webmastertool.naver.com\">\n";
$xml .= "<id>".PHP_EOL . $base_url .PHP_EOL. "</id>\n";
$xml .= "<title>{$post['post_title']}</title>\n";
$xml .= "<author>\n";
$xml .= "<name>webmaster</name>\n";
$xml .= "</author>\n";
$xml .= "<updated>" . date('Y-m-d\TH:i:s\+09:00') . "</updated>\n";
$xml .= '<link rel="site" href="'.$base_url.'" title="'.html_escape($this->site->config('site_title')).'" />'.PHP_EOL;
$xml .= "<entry>\n";
$xml .= "<id>" . PHP_EOL . base_url('board/'.$brd_key.'/'.$post_idx) . PHP_EOL . "</id>\n";
$xml .= "<title><![CDATA[" . html_escape(element('post_title', $post)) . "]]></title>\n";
$xml .= "<author>\n";
$xml .= "<name>" . html_escape(element('mem_nickname', $post)) . "</name>\n";
$xml .= "</author>\n";
$xml .= "<updated>" .date('Y-m-d\TH:i:s\+09:00', strtotime(element('post_modtime', $post))) . "</updated>\n";
$xml .= "<published>" . date('Y-m-d\TH:i:s\+09:00', strtotime(element('post_regtime', $post))) . "</published>\n";
$xml .= "<link rel=\"via\" href=\"" . base_url('board/'.$brd_key) . "\" title=\"" . html_escape(element('brd_title', $board)) . "\" />\n";
$xml .= "<link rel=\"mobile\" href=\"" . base_url('board/'.$brd_key.'/'.$post_idx) . "\" />\n";
$xml .= "<content type=\"html\"><![CDATA[{$content}]]></content>\n";
$xml .= "<summary type=\"text\"><![CDATA[{$summary}]]></summary>\n";
$xml .= "<category term=\"" . element('brd_key', $board) . "\" label=\"" . html_escape(element('brd_title', $board)) . "\" />\n";
$xml .= "</entry>\n";
$xml .= "</feed>";
echo $xml;
$this->layout = FALSE;
}
} }

1
wheeparam/application/controllers/admin/Board.php

@ -85,7 +85,6 @@ class Board extends WB_Controller
$data['brd_use_total_rss'] = $this->input->post('brd_use_total_rss', TRUE); $data['brd_use_total_rss'] = $this->input->post('brd_use_total_rss', TRUE);
$data['brd_use_rss'] = $this->input->post('brd_use_rss', TRUE); $data['brd_use_rss'] = $this->input->post('brd_use_rss', TRUE);
$data['brd_use_sitemap'] = $this->input->post('brd_use_sitemap', TRUE); $data['brd_use_sitemap'] = $this->input->post('brd_use_sitemap', TRUE);
$data['brd_use_naver_syndi'] = $this->input->post('brd_use_naver_syndi', TRUE, 'Y');
if(empty($brd_key)) if(empty($brd_key))
{ {

131
wheeparam/application/controllers/admin/Management.php

@ -176,8 +176,7 @@ class Management extends WB_Controller {
*/ */
public function sitemap() public function sitemap()
{ {
$this->view = "management/sitemap";
$this->active = "management/sitemap";
$this->view = $this->active = "management/sitemap";
} }
/** /**
@ -515,6 +514,9 @@ class Management extends WB_Controller {
$data['bng_name'] = $this->input->post('bng_name', TRUE); $data['bng_name'] = $this->input->post('bng_name', TRUE);
$data['bng_width'] = $this->input->post('bng_width', TRUE, 0); $data['bng_width'] = $this->input->post('bng_width', TRUE, 0);
$data['bng_height'] = $this->input->post('bng_height', TRUE, 0); $data['bng_height'] = $this->input->post('bng_height', TRUE, 0);
$data['upd_user'] = $this->member->is_login();
$data['upd_datetime'] = date('Y-m-d H:i:s');
for($i=1; $i<=5; $i++) for($i=1; $i<=5; $i++)
{ {
$data["bng_ext{$i}"] = $this->input->post("bng_ext{$i}",TRUE,''); $data["bng_ext{$i}"] = $this->input->post("bng_ext{$i}",TRUE,'');
@ -530,6 +532,8 @@ class Management extends WB_Controller {
} }
$sort = (int)$this->db->select_max('bng_sort', 'max')->get('banner_group')->row(0)->max; $sort = (int)$this->db->select_max('bng_sort', 'max')->get('banner_group')->row(0)->max;
$data['reg_user'] = $data['upd_user'];
$data['reg_datetime'] = $data['upd_datetime'];
$data['bng_sort'] = $sort+1; $data['bng_sort'] = $sort+1;
if( $this->db->insert('banner_group', $data)) if( $this->db->insert('banner_group', $data))
@ -560,7 +564,6 @@ class Management extends WB_Controller {
$this->data['view'] = $this->db->where('bng_idx', $bng_idx)->get('banner_group')->row_array(); $this->data['view'] = $this->db->where('bng_idx', $bng_idx)->get('banner_group')->row_array();
} }
$this->theme = "admin";
$this->theme_file = "iframe"; $this->theme_file = "iframe";
$this->view = "management/banner_group_form"; $this->view = "management/banner_group_form";
} }
@ -640,7 +643,6 @@ class Management extends WB_Controller {
$data['ban_link_use'] = $this->input->post('ban_link_use', TRUE) == 'Y' ? 'Y' : 'N'; $data['ban_link_use'] = $this->input->post('ban_link_use', TRUE) == 'Y' ? 'Y' : 'N';
$data['ban_link_url'] = $this->input->post('ban_link_url', TRUE, ""); $data['ban_link_url'] = $this->input->post('ban_link_url', TRUE, "");
$data['ban_link_type'] = $this->input->post('ban_link_url', TRUE) == 'Y' ? 'Y': 'N'; $data['ban_link_type'] = $this->input->post('ban_link_url', TRUE) == 'Y' ? 'Y': 'N';
$data['ban_modtime'] = date('Y-m-d H:i:s');
$data['ban_status'] = $this->input->post('ban_status', TRUE) == 'H' ? 'H' : 'Y'; $data['ban_status'] = $this->input->post('ban_status', TRUE) == 'H' ? 'H' : 'Y';
$data['ban_timer_use'] = $this->input->post('ban_timer_use', TRUE) == 'Y' ? 'Y' : 'N'; $data['ban_timer_use'] = $this->input->post('ban_timer_use', TRUE) == 'Y' ? 'Y' : 'N';
$data['ban_timer_start'] = $this->input->post('ban_timer_start', TRUE, '0000-00-00 00:00:00'); $data['ban_timer_start'] = $this->input->post('ban_timer_start', TRUE, '0000-00-00 00:00:00');
@ -649,6 +651,9 @@ class Management extends WB_Controller {
{ {
$data["ban_ext{$i}"] = $this->input->post("ban_ext{$i}",TRUE,''); $data["ban_ext{$i}"] = $this->input->post("ban_ext{$i}",TRUE,'');
} }
$data['upd_user'] = $this->member->is_login();
$data['upd_datetime'] = date('Y-m-d H:i:s');
// 업로드된 파일이 있을경우 처리 // 업로드된 파일이 있을경우 처리
if( isset($_FILES['userfile']) && $_FILES['userfile'] && $_FILES['userfile']['tmp_name'] ) if( isset($_FILES['userfile']) && $_FILES['userfile'] && $_FILES['userfile']['tmp_name'] )
@ -681,6 +686,7 @@ class Management extends WB_Controller {
if(empty($data['ban_idx'])) if(empty($data['ban_idx']))
{ {
$data['ban_regtime'] = date('Y-m-d H:i:s'); $data['ban_regtime'] = date('Y-m-d H:i:s');
$data['reg_user'] = $data['upd_user'];
$sort = (int)$this->db->select_max('ban_sort', 'max')->where('bng_key', $data['bng_key'])->get('banner')->row(0)->max; $sort = (int)$this->db->select_max('ban_sort', 'max')->where('bng_key', $data['bng_key'])->get('banner')->row(0)->max;
$data['ban_sort'] = $sort+1; $data['ban_sort'] = $sort+1;
@ -761,6 +767,121 @@ class Management extends WB_Controller {
} }
} }
/*--------------------------------------------------------------------------*/
/****************************************************************************
* Q&A 관리
***************************************************************************/
function qna() {
$this->view = $this->active = 'management/qna';
}
/****************************************************************************
* Q&A 분류 관리
***************************************************************************/
function qna_category()
{
$this->data['lists'] = $this->db->where('qnc_status','Y')->order_by('sort ASC')->get('qna_category')->result_array();
$this->view = "management/qna_category";
$this->theme_file = 'iframe';
}
/****************************************************************************
* Q&A 내용 보기
***************************************************************************/
function qna_view($qna_idx = "")
{
$this->load->library('form_validation');
if(empty($qna_idx)) {
alert_modal_close('잘못된 접근입니다.');
exit;
}
if(! $this->data['view'] =
$this->db
->select('Q.*, QC.qnc_title, M.mem_nickname AS qna_ans_upd_username')
->where('qna_idx', $qna_idx)
->from('qna AS Q')
->join('qna_category AS QC','QC.qnc_idx=Q.qnc_idx','left')
->join('member AS M','M.mem_idx=Q.qna_ans_user','left')
->get()
->row_array() )
{
alert_modal_close('잘못된 접근입니다.');
exit;
}
$this->form_validation->set_rules('qna_ans_content', '답변 내용', 'required|trim');
if( $this->form_validation->run() !=FALSE )
{
$data['qna_ans_status'] = 'Y';
$data['qna_ans_upd_user'] = $this->member->is_login();
$data['qna_ans_upd_datetime'] = date('Y-m-d H:i:s');
$data['qna_ans_content'] = $this->input->post('qna_ans_content', TRUE);
if($this->data['view']['qna_ans_status'] == 'N') {
$data['qna_ans_user'] = $data['qna_ans_upd_user'];
$data['qna_ans_datetime'] = $data['qna_ans_upd_datetime'];
}
$this->db->where('qna_idx', $qna_idx)->update('qna', $data);
alert('답변 작성이 완료되었습니다.', base_url('admin/management/qna_view/'.$qna_idx));
exit;
}
else {
// 첨부파일 가져오기
$this->data['view']['attach_list'] = $this->db->where('att_target_type','QNA')->where('att_target', $qna_idx)->get('attach')->result_array();
$this->view = "management/qna_view";
$this->theme_file = 'iframe';
}
}
/****************************************************************************
* Q&A 분류 관리 등록/수정
***************************************************************************/
function qna_category_form($qnc_idx="")
{
$this->load->library('form_validation');
$this->form_validation->set_rules('qnc_title', '질문 유형 제목', 'required|trim');
if( $this->form_validation->run() != FALSE )
{
$data['qnc_title'] = $this->input->post('qnc_title', TRUE);
$data['upd_user'] = $this->member->is_login();
$data['upd_datetime'] = date('Y-m-d H:i:s');
if(empty($qnc_idx)) {
$data['qnc_status'] = 'Y';
$data['reg_user'] = $data['upd_user'];
$data['reg_datetime'] = $data['upd_datetime'];
$data['sort'] = (int)$this->db->select_max('sort', 'max')->where('qnc_status','Y')->get('qna_category')->row(0)->max;
$this->db->insert('qna_category', $data);
}
else {
$this->db->where('qnc_idx', $qnc_idx)->update('qna_category', $data);
}
alert_modal2_close('Q&A 분류 정보가 입력되었습니다.', TRUE);
}
else {
$this->data['view'] = array();
if(! empty($qnc_idx)) {
if(! $this->data['view'] = $this->db->where('qnc_idx', $qnc_idx)->get('qna_category')->row_array())
{
alert_modal2_close('잘못된 접근입니다.', FALSE);
}
}
$this->theme_file = 'iframe';
$this->view = "management/qna_category_form";
}
}
} }

134
wheeparam/application/controllers/admin/Members.php

@ -3,6 +3,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
class Members extends WB_Controller { class Members extends WB_Controller {
public function __construct()
{
parent::__construct();
$this->theme = "admin";
}
public function login(){ public function login(){
if( $this->member->is_login() ) { if( $this->member->is_login() ) {
alert(langs('회원/login/already'), base_url("members/info")); alert(langs('회원/login/already'), base_url("members/info"));
@ -39,33 +46,11 @@ class Members extends WB_Controller {
if( $this->data['sdate'] && $this->data['startdate'] ) $param['where']['mem_' . $this->data['sdate'] . ' >=' ] = $this->data['startdate'] . " 00:00:00"; if( $this->data['sdate'] && $this->data['startdate'] ) $param['where']['mem_' . $this->data['sdate'] . ' >=' ] = $this->data['startdate'] . " 00:00:00";
if( $this->data['sdate'] && $this->data['enddate'] ) $param['where']['mem_' . $this->data['sdate'] . ' <=' ] = $this->data['enddate'] . " 23:59:59"; if( $this->data['sdate'] && $this->data['enddate'] ) $param['where']['mem_' . $this->data['sdate'] . ' <=' ] = $this->data['enddate'] . " 23:59:59";
// 정보 넣기
$param['page'] = $this->input->get('page', TRUE, 1);
$param['page_rows'] = 20;
$param['limit'] = TRUE;
// 회원목록 가져오기
$this->data['member_list'] = $this->member_model->member_list($param);
// 페이지네이션 세팅
$this->load->library('paging');
$this->paging->initialize(array(
"page" => $param['page'],
"page_rows" => $param['page_rows'],
"total_rows" => $this->data['member_list']['total_count'],
"fixe_nums" => 10,
'full_tag_open' => '<ul class="pagination pagination-sm">'
));
$this->data['pagination'] = $this->paging->create();
// 메타태그 설정 // 메타태그 설정
$this->site->meta_title = "회원 목록"; // 이 페이지의 타이틀 $this->site->meta_title = "회원 목록"; // 이 페이지의 타이틀
// 레이아웃 & 뷰파일 설정 // 레이아웃 & 뷰파일 설정
$this->theme = "admin";
$this->view = "members/lists";
$this->active = "members/lists";
$this->view = $this->active = "members/lists";
} }
/** /**
@ -100,36 +85,8 @@ class Members extends WB_Controller {
$this->load->model('member_model'); $this->load->model('member_model');
$this->data['startdate'] = $param['startdate'] = $this->input->get('startdate', TRUE);
$this->data['enddate'] = $param['enddate'] = $this->input->get('enddate', TRUE);
$this->data['target_type'] = $this->input->get('target_type', TRUE);
if( $this->data['target_type'] )
{
$param['where']['target_type'] = $this->data['target_type'];
}
// 정보 넣기
$param['page'] = $this->input->get('page', TRUE, 1);
$param['page_rows'] = 10;
// 회원목록 가져오기
$this->data['point_list'] = $this->member_model->point_list($mem_idx, $param);
// 페이지네이션 세팅
$this->load->library('paging');
$this->paging->initialize(array(
"page" => $param['page'],
"page_rows" => $param['page_rows'],
"total_rows" => $this->data['point_list']['total_count'],
"fixe_nums" => 10,
'full_tag_open' => '<ul class="pagination pagination-sm">'
));
$this->data['pagination'] = $this->paging->create();
// 회원 정보 // 회원 정보
$this->data['mem'] = $this->member->get_member($mem_idx,'mem_idx'); $this->data['mem'] = $this->member->get_member($mem_idx,'mem_idx');
// 포인트 유형
$this->data['point_type'] = point_type(TRUE);
$this->theme = "admin"; $this->theme = "admin";
$this->theme_file = "iframe"; $this->theme_file = "iframe";
@ -142,10 +99,9 @@ class Members extends WB_Controller {
*/ */
public function point_form($mem_idx) public function point_form($mem_idx)
{ {
if(empty($mem_idx)) if(empty($mem_idx))
{ {
alert_modal_close('잘못된 접근입니다.');
alert_modal2_close('잘못된 접근입니다.');
exit; exit;
} }
@ -160,12 +116,13 @@ class Members extends WB_Controller {
if( $this->form_validation->run() != FALSE ) if( $this->form_validation->run() != FALSE )
{ {
$data['mem_idx'] = $this->input->post('mem_idx', TRUE); $data['mem_idx'] = $this->input->post('mem_idx', TRUE);
$data['mpo_flag'] = $this->input->post('mpo_flag', TRUE, 1);
$data['mpo_value'] = $this->input->post('mpo_value', TRUE); $data['mpo_value'] = $this->input->post('mpo_value', TRUE);
$data['mpo_description'] = $this->input->post('mpo_description', TRUE); $data['mpo_description'] = $this->input->post('mpo_description', TRUE);
$data['target_type'] = $this->input->post('target_type', TRUE); $data['target_type'] = $this->input->post('target_type', TRUE);
$data['mpo_regtime'] = date('Y-m-d H:i:s'); $data['mpo_regtime'] = date('Y-m-d H:i:s');
if( $this->member->add_point($data['mem_idx'], $data['mpo_value'], FALSE, $data['target_type'], $data['mpo_description'],0))
if( $this->member->add_point($data['mem_idx'],$data['mpo_flag'], $data['mpo_value'], FALSE, $data['target_type'], $data['mpo_description'],0))
{ {
alert_modal2_close('등록완료'); alert_modal2_close('등록완료');
exit; exit;
@ -191,28 +148,6 @@ class Members extends WB_Controller {
*/ */
function points() function points()
{ {
$this->load->model('basic_model');
$param['page'] = $this->input->get('page', TRUE, 1);
$param['page_rows'] = 15;
$param['limit'] = TRUE;
$param['join'][] = array('member', 'member.mem_idx=member_point.mem_idx','inner');
$param['from'] = 'member_point';
$param['order_by'] = 'mpo_idx DESC';
$this->data['list'] = $this->basic_model->get_list($param);
// 페이지네이션 세팅
$this->load->library('paging');
$this->paging->initialize(array(
"page" => $param['page'],
"page_rows" => $param['page_rows'],
"total_rows" => $this->data['list']['total_count'],
"fixe_nums" => 10,
'full_tag_open' => '<ul class="pagination pagination-sm">'
));
$this->data['pagination'] = $this->paging->create();
// 메타태그 설정 // 메타태그 설정
$this->site->meta_title = $this->site->config('point_name'). " 관리"; $this->site->meta_title = $this->site->config('point_name'). " 관리";
@ -339,53 +274,21 @@ class Members extends WB_Controller {
*/ */
public function log() public function log()
{ {
// 모델 가져오기
$this->load->model('member_model');
$this->data['st'] = $this->input->get('st', TRUE);
$this->data['sc'] = $this->input->get('sc', TRUE);
// 넘어온 검색값 정리
$this->data['startdate'] = $this->input->get('startdate', TRUE, date('Y-m-d', strtotime("-1 month", time())));
$this->data['enddate'] = $this->input->get('enddate', TRUE, date('Y-m-d'));
$this->data['st'] = $this->input->get('st', TRUE);
$this->data['sc'] = $this->input->get('sc', TRUE);
if ( $this->data['st'] && $this->data['sc'] )
{
if( $this->data['sc'] == 'nickname' OR $this->data['sc'] == 'userid')
{
$param['sc'] = "member_log.mem_" . $this->data['sc'];
$param['st'] = $this->data['st'];
}
else if ( $this->data['sc'] == 'idx' )
{
$param['where']['member_log.mem_idx'] = $this->data['st'];
}
}
$param['where']['mlg_regtime >='] = $this->data['startdate'] . " 00:00:00";
$param['where']['mlg_regtime <='] = $this->data['enddate'] . " 23:59:59";
// 값 가져오기
$param['page'] = $this->input->get('page', TRUE, 1);
$param['page_rows'] = 20;
$this->data['log_list'] = $this->member_model->log_list($param);
// 페이지네이션 세팅
$this->load->library('paging');
$this->paging->initialize(array(
"page" => $param['page'],
"page_rows" => $param['page_rows'],
"total_rows" => $this->data['log_list']['total_count'],
"fixe_nums" => 10,
'full_tag_open' => '<ul class="pagination pagination-sm">'
));
$this->data['pagination'] = $this->paging->create();
$popup_mode = strtolower($this->input->get('mode', TRUE)) == 'popup';
// 메타태그 설정 // 메타태그 설정
$this->site->meta_title = "회원 로그인 기록"; // 이 페이지의 타이틀 $this->site->meta_title = "회원 로그인 기록"; // 이 페이지의 타이틀
// 레이아웃 & 뷰파일 설정 // 레이아웃 & 뷰파일 설정
$this->theme = "admin";
$this->view = "members/log"; $this->view = "members/log";
$this->active = "members/log"; $this->active = "members/log";
if($popup_mode) {
$this->theme_file = 'iframe';
}
} }
/** /**
@ -460,7 +363,6 @@ class Members extends WB_Controller {
$data['mem_idx'] = $mem_idx; $data['mem_idx'] = $mem_idx;
$data['mem_nickname'] = $this->input->post('mem_nickname', TRUE); $data['mem_nickname'] = $this->input->post('mem_nickname', TRUE);
$data['mem_email'] = $this->input->post('mem_email', TRUE); $data['mem_email'] = $this->input->post('mem_email', TRUE);
$data['mem_verfy_email'] = ( USE_EMAIL_VERFY ) ? ( $this->input->post('mem_verfy_email', TRUE) == 'Y' ? 'Y' : 'N' ) : 'Y';
$data['mem_phone'] = $this->input->post('mem_phone', TRUE); $data['mem_phone'] = $this->input->post('mem_phone', TRUE);
$data['mem_auth'] = $this->input->post('mem_auth', TRUE); $data['mem_auth'] = $this->input->post('mem_auth', TRUE);
$data['mem_gender'] = $this->input->post('mem_gender', TRUE); $data['mem_gender'] = $this->input->post('mem_gender', TRUE);

63
wheeparam/application/controllers/admin/ajax/Management.php

@ -102,6 +102,69 @@ class Management extends REST_Controller
$this->db->where('sit_idx', $sit_idx)->delete('sitemap'); $this->db->where('sit_idx', $sit_idx)->delete('sitemap');
} }
// Q&A 분류 삭제
function qna_category_delete()
{
$qnc_idx = $this->delete('qnc_idx', TRUE);
if(empty($qnc_idx)) $this->response(array('message'=>'잘못된 접근입니다.'), 400);
$data['upd_user'] = $this->member->is_login();
$data['upd_datetime'] = date('Y-m-d H:i:s');
$data['qnc_status'] = 'N';
$this->db->where('qnc_idx', $qnc_idx)->update('qna_category', $data);
}
function qna_delete()
{
$qna_idx= $this->delete('qna_idx', TRUE);
if(empty($qna_idx)) $this->response(array('message'=>'잘못된 접근입니다.'), 400);
$data['upd_user'] = $this->member->is_login();
$data['upd_datetime'] = date('Y-m-d H:i:s');
$data['qna_status'] = 'N';
$this->db->where('qna_idx', $qna_idx)->update('qna', $data);
}
function qna_get()
{
$startdate = $this->get('startdate', TRUE);
$enddate = $this->get('enddate', TRUE);
$qna_ans_status = $this->get('qna_ans_status', TRUE);
$st = $this->get('st', TRUE);
$sc = $this->get('sc', TRUE);
$page_rows = $this->get('take', TRUE);
$start = $this->get('skip', TRUE);
if(! empty($page_rows)) $this->db->limit($page_rows, $start);
if(! empty($startdate)) $this->db->where('reg_datetime >=', $startdate.' 00:00:00');
if(! empty($enddate)) $this->db->where('reg_datetime <=', $enddate.' 23:59:59');
if(! empty($qna_ans_status)) $this->db->where('qna_ans_status', $qna_ans_status);
if(! empty($st) && ! empty($sc)) $this->db->like($sc, $st);
$this->db->select("SQL_CALC_FOUND_ROWS Q.*, QC.qnc_title, M.mem_nickname AS qna_ans_upd_username",FALSE);
$this->db->order_by('qna_idx DESC');
$this->db->from('qna AS Q');
$this->db->join('qna_category AS QC','QC.qnc_idx=Q.qnc_idx','left');
$this->db->join('member AS M','M.mem_idx=Q.qna_ans_user','left');
$this->db->where('qna_status','Y');
$result = $this->db->get();
$return['lists'] = $result->result_array();
$return['totalCount'] = (int)$this->db->query("SELECT FOUND_ROWS() AS cnt")->row(0)->cnt;
foreach($return['lists'] as $i=>&$row)
{
$row['nums'] = $return['totalCount'] - $i - $start;
}
$this->response($return, 200);
}
/** /**
* 공용 에디트 * 공용 에디트
*/ */

186
wheeparam/application/controllers/admin/ajax/Members.php

@ -0,0 +1,186 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH . '/libraries/REST_Controller.php';
class Members extends REST_Controller
{
/**************************************************************
* 사용자 목록
***************************************************************/
function index_get()
{
$page_rows = $this->get('take', TRUE);
$start = $this->get('skip', TRUE);
$sdate = $this->input->get('sdate', TRUE);
$startdate = $this->input->get('startdate', TRUE);
$enddate = $this->input->get('enddate', TRUE);
if(! empty($sdate) && !empty($startdate)) $this->db->where('mem_'.$sdate.' >=', $startdate.' 00:00:00');
if(! empty($sdate) && !empty($enddate)) $this->db->where('mem_'.$sdate.' <=', $enddate.' 23:59:59');
if(empty($page_rows)) $this->db->limit($page_rows, $start);
$order_by = 'mem_idx DESC';
$this->db->order_by($order_by);
$this->db->select("SQL_CALC_FOUND_ROWS *", FALSE);
$this->db->from('member');
$result = $this->db->get();
$return['lists'] = $result->result_array();
$return['totalCount'] = (int)$this->db->query("SELECT FOUND_ROWS() AS cnt")->row(0)->cnt;
foreach($return['lists'] as $i=>&$row) {
$row['nums'] = $return['totalCount'] - (int)$start - $i;
$row['mem_regip'] = long2ip((int)$row['mem_regip']);
$row['mem_logip'] = long2ip((int)$row['mem_logip']);
}
$this->response($return, 200);
}
/**************************************************************
* 사용자 상태 변경
***************************************************************/
function status_post()
{
if(! $this->member->is_super() )
$this->response(array('status'=>FALSE, 'message'=>'권한이 없습니다.'), 400);
$mem_idx = $this->post('mem_idx', TRUE);
$current_status = $this->post('current_status', TRUE);
$change_status = $this->post('change_status', TRUE);
if(empty($mem_idx))
$this->response(array('status'=>FALSE, 'message'=>'관리자로 설정할 회원이 존재하지 않습니다.'), 400);
if(! $mem = $this->member->get_member($mem_idx,'mem_idx') )
{
$this->response(array('status'=>FALSE, 'message'=>'존재하지 않는 회원입니다.'), 400);
}
if( $mem['mem_status'] != $current_status )
{
$this->response(array('status'=>FALSE, 'message'=>'변경전 회원상태가 실제 DB상 회원상태와 일치하지 않습니다.'), 400);
}
if( ! in_array($change_status, array('Y','N','D','H')))
{
$this->response(array('status'=>FALSE, 'message'=>'변경하려는 회원상태가 올바르지 않습니다.'), 400);
}
$this->db->trans_start();
if( $change_status == 'Y' ) {
$this->db->set('mem_leavetime', '0000-00-00 00:00:00');
$this->db->set('mem_bantime', '0000-00-00 00:00:00');
$this->db->set('mem_htime', '0000-00-00 00:00:00');
}
else if ($change_status == 'B') {
$this->db->set('mem_bantime', date('Y-m-d H:i:s'));
}
else if ($change_status == 'N') {
$this->db->set('mem_leavetime', date('Y-m-d H:i:s'));
}
else if ($change_status == 'H') {
$this->db->set('mem_htime', date('Y-m-d H:i:s'));
}
$this->db->set('mem_status', $change_status)->where('mem_idx', $mem_idx)->update('member');
if ($this->db->trans_status() === FALSE)
{
$this->db->trans_rollback();
$this->response(array('status'=>FALSE, 'message'=>'시스템 오류가 발생하였습니다.'), 500);
}
else
{
$this->db->trans_commit();
$this->response(array('status'=>TRUE, 'message'=>'회원 상태변경이 완료되었습니다.'), 200);
}
}
function logs_get()
{
$page_rows = $this->get('take', TRUE);
$start = $this->get('skip', TRUE);
$start_date = $this->input->get('startdate', TRUE, date('Y-m-d', strtotime("-1 month", time())));
$end_date = $this->input->get('enddate', TRUE, date('Y-m-d'));
$st = $this->input->get('st', TRUE);
$sc = $this->input->get('sc', TRUE);
if ( !empty($st) && !empty($sc) )
{
if( $sc == 'nickname' OR $sc == 'userid')
{
$sc = "member_log.mem_" . $sc;
$this->db->like($sc, $st);
}
else if ( $sc == 'idx' )
{
$this->db->where('member_log.mem_idx', $st);
}
}
if(! empty($start_date)) $this->db->where('mlg_regtime >=',$start_date . " 00:00:00");
if(! empty($end_date)) $this->db->where('mlg_regtime <=',$end_date . " 23:59:59");
if(! empty($page_rows)) $this->db->limit($page_rows, $start);
$this->db->select("SQL_CALC_FOUND_ROWS *", FALSE);
$this->db->from('member_log');
$this->db->join('member','member.mem_idx=member_log.mem_idx','inner');
$result = $this->db->get();
$return['lists'] = $result->result_array();
$return['totalCount'] = (int)$this->db->query("SELECT FOUND_ROWS() AS cnt")->row(0)->cnt;
foreach($return['lists'] as $i=>&$row) {
$row['nums'] = $return['totalCount'] - $i - $start;
$row['mlg_is_mobile'] = $row['mlg_is_mobile'] == 'Y';
$row['mlg_ip'] = long2ip((int)$row['mlg_ip']);
}
$this->response($return, 200);
}
/**************************************************************
* 포인트 목록
***************************************************************/
function points_get()
{
$start_date = $this->get('startdate', TRUE);
$end_date = $this->get('enddate', TRUE);
$target_type = $this->get('target_type', TRUE);
$mem_idx = $this->get('mem_idx', TRUE);
$page_rows = $this->get('take', TRUE);
$start = $this->get('skip', TRUE);
if( ! empty($target_type) ) $this->db->where('target_type', $target_type);
if( ! empty($start_date)) $this->db->where('reg_datetime >= ', $start_date . ' 00:00:00');
if( ! empty($end_date)) $this->db->where('reg_datetime <= ', $end_date . ' 23:59:59');
if( ! empty($mem_idx)) $this->db->where('MP.mem_idx', $mem_idx);
if( ! empty($page_rows)) $this->db->limit($page_rows, $start);
$this->db->order_by('mpo_idx DESC');
$this->db->select("SQL_CALC_FOUND_ROWS MP.*, M.*", FALSE);
$this->db->from('member_point AS MP');
$this->db->join('member AS M','M.mem_idx=MP.mem_idx','inner');
$result = $this->db->get();
$return['lists'] = $result->result_array();
$return['totalCount'] = (int)$this->db->query("SELECT FOUND_ROWS() AS cnt")->row(0)->cnt;
foreach($return['lists'] as $i=>&$row)
{
$row['nums'] = $return['totalCount'] - $i - $start;
$row['target_type'] = point_type($row['target_type']);
}
$this->response($return, 200);
}
}

62
wheeparam/application/controllers/ajax/Members.php

@ -196,66 +196,4 @@ class Members extends REST_Controller {
$this->db->update('member', $data); $this->db->update('member', $data);
$this->response(array("result"=>TRUE,"message"=>langs('회원/msg/modify_success')), 200); $this->response(array("result"=>TRUE,"message"=>langs('회원/msg/modify_success')), 200);
} }
/**************************************************************
* 사용자 상태 변경
***************************************************************/
function status_post()
{
if(! $this->member->is_super() )
$this->response(array('status'=>FALSE, 'message'=>'권한이 없습니다.'), 400);
$mem_idx = $this->post('mem_idx', TRUE);
$current_status = $this->post('current_status', TRUE);
$change_status = $this->post('change_status', TRUE);
if(empty($mem_idx))
$this->response(array('status'=>FALSE, 'message'=>'관리자로 설정할 회원이 존재하지 않습니다.'), 400);
if(! $mem = $this->member->get_member($mem_idx,'mem_idx') )
{
$this->response(array('status'=>FALSE, 'message'=>'존재하지 않는 회원입니다.'), 400);
}
if( $mem['mem_status'] != $current_status )
{
$this->response(array('status'=>FALSE, 'message'=>'변경전 회원상태가 실제 DB상 회원상태와 일치하지 않습니다.'), 400);
}
if( ! in_array($change_status, array('Y','N','D','H')))
{
$this->response(array('status'=>FALSE, 'message'=>'변경하려는 회원상태가 올바르지 않습니다.'), 400);
}
$this->db->trans_start();
if( $change_status == 'Y' ) {
$this->db->set('mem_leavetime', '0000-00-00 00:00:00');
$this->db->set('mem_bantime', '0000-00-00 00:00:00');
$this->db->set('mem_htime', '0000-00-00 00:00:00');
}
else if ($change_status == 'B') {
$this->db->set('mem_bantime', date('Y-m-d H:i:s'));
}
else if ($change_status == 'N') {
$this->db->set('mem_leavetime', date('Y-m-d H:i:s'));
}
else if ($change_status == 'H') {
$this->db->set('mem_htime', date('Y-m-d H:i:s'));
}
$this->db->set('mem_status', $change_status)->where('mem_idx', $mem_idx)->update('member');
if ($this->db->trans_status() === FALSE)
{
$this->db->trans_rollback();
$this->response(array('status'=>FALSE, 'message'=>'시스템 오류가 발생하였습니다.'), 500);
}
else
{
$this->db->trans_commit();
$this->response(array('status'=>TRUE, 'message'=>'회원 상태변경이 완료되었습니다.'), 200);
}
}
} }

154
wheeparam/application/controllers/customer/Qna.php

@ -7,13 +7,161 @@ class Qna extends WB_Controller
{ {
function index($qna_idx="") function index($qna_idx="")
{ {
if(!$this->member->is_login())
$page = (int)$this->input->get('page', TRUE, 1) > 1 ? (int)$this->input->get('page', TRUE, 1) : 1;
$page_rows = (int)$this->input->get('page_rows', TRUE, 15);
$start = ($page - 1) * $page_rows;
$sc = $this->input->get('sc', TRUE);
$st = $this->input->get('st', TRUE);
if(! empty($sc) && !empty($st)) {
$st = explode(" ", $st);
if(count($st) > 0) {
foreach($st as $stxt) {
$this->db->like("qna_".$sc, $stxt);
}
}
}
// Q&A 목록 가져오기
$this->db
->select("SQL_CALC_FOUND_ROWS Q.*, QC.qnc_title", FALSE)
->from('qna AS Q')
->join('qna_category AS QC','QC.qnc_idx=Q.qnc_idx','left')
->where('qna_status', 'Y')
->limit($page_rows, $start);
$result = $this->db->get();
$this->data['lists'] = $result->result_array();
$this->data['total_count'] = (int)$this->db->query("SELECT FOUND_ROWS() AS cnt")->row(0)->cnt;
foreach($this->data['lists'] as $i=>&$row)
{ {
alert_login();
exit;
$row['nums'] = $this->data['total_count'] - $i - $start;
$row['is_answered'] = $row['qna_ans_status'] == 'Y';
} }
// 페이지네이션 세팅
$paging['page'] = $page;
$paging['page_rows'] = $page_rows;
$paging['total_rows'] = $this->data['total_count'];
$this->load->library('paging', $paging);
$this->data['pagination'] = $this->paging->create();
$this->theme = $this->site->get_layout(); $this->theme = $this->site->get_layout();
$this->view = "customer/qna/lists"; $this->view = "customer/qna/lists";
} }
function write()
{
$this->load->library('form_validation');
$this->form_validation->set_rules('qna_title', '제목', 'required|trim');
if( $this->form_validation->run() != FALSE )
{
$data['qnc_idx'] = $this->input->post('qnc_idx', TRUE, 0);
$data['qna_title'] = trim($this->input->post('qna_title', TRUE,''));
if( $this->member->is_login() )
{
$data['qna_name'] = $this->member->info('nickname');
$data['qna_password'] = $this->member->info('password');
}
else {
$data['qna_name'] = trim($this->input->post('qna_name', TRUE,''));
$data['qna_password'] = get_password_hash($data['qna_password']);
}
$data['qna_phone'] = trim($this->input->post('qna_phone', TRUE,''));
$data['qna_email'] = trim($this->input->post('qna_email', TRUE,''));
$data['qna_content'] = trim($this->input->post('qna_content', TRUE,''));
$data['upd_user'] = $data['reg_user'] = $this->member->is_login();
$data['upd_datetime'] = $data['reg_datetime'] = date('Y-m-d H:i:s');
$data['qna_ans_status'] = 'N';
$data['qna_ans_user'] = 0;
$data['qna_ans_datetime'] = '0000-00-00 00:00:00';
$data['qna_ans_upd_user'] = 0;
$data['qna_ans_upd_datetime'] ='0000-00-00 00:00:00';
$data['qna_ans_content'] = '';
$upload_array = array();
if( isset($_FILES) && isset($_FILES['userfile']) && count($_FILES['userfile']) > 0 )
{
$dir_path = DIR_UPLOAD . "/qna/".date('Y')."/".date('m');
make_dir($dir_path,FALSE);
$upload_config['upload_path'] = "./".$dir_path;
$upload_config['file_ext_tolower'] = TRUE;
$upload_config['allowed_types'] = FILE_UPLOAD_ALLOW;
$upload_config['encrypt_name'] = TRUE;
$this->load->library("upload", $upload_config);
// FOR문으로 업로드하기 위해 돌리기
$files = NULL;
foreach ($_FILES['userfile'] as $key => $value) {
foreach ($value as $noKey => $noValue) {
$files[$noKey][$key] = $noValue;
}
}
unset($_FILES);
// FOR 문 돌면서 정리
foreach ($files as $file) {
$_FILES['userfile'] = $file;
$this->upload->initialize($upload_config);
if( ! isset($_FILES['userfile']['tmp_name']) OR ! $_FILES['userfile']['tmp_name']) continue;
if (! $this->upload->do_upload('userfile') )
{
alert('파일 업로드에 실패하였습니다.\\n'.$this->upload->display_errors(' ',' '));
exit;
}
else
{
$filedata = $this->upload->data();
$upload_array[] = array(
"att_target_type" => 'QNA',
"att_origin" => $filedata['orig_name'],
"att_filepath" => $dir_path . "/" . $filedata['file_name'],
"att_downloads" => 0,
"att_filesize" => $filedata['file_size'] * 1024,
"att_width" => $filedata['image_width'] ? $filedata['image_width'] : 0,
"att_height" => $filedata['image_height'] ? $filedata['image_height'] : 0,
"att_ext" => $filedata['file_ext'],
"att_is_image" => ($filedata['is_image'] == 1) ? 'Y' : 'N',
"reg_user" => $this->member->is_login(),
"reg_datetime" => date('Y-m-d H:i:s')
);
}
}
}
$this->db->insert('qna', $data);
$qna_idx = $this->db->insert_id();
if( count($upload_array) > 0 )
{
foreach($upload_array as &$arr) {
$arr['att_target'] = $qna_idx;
}
$this->db->insert_batch('attach', $upload_array);
}
alert('등록이 완료되었습니다.', base_url('customer/qna'));
}
else
{
$this->data['qna_category'] = $this->db->where('qnc_status','Y')->order_by('sort')->get('qna_category')->result_array();
$this->theme = $this->site->get_layout();
$this->view = "customer/qna/write";
}
}
function view($qna_idx) {
}
} }

18
wheeparam/application/libraries/Member.php

@ -190,7 +190,7 @@ class Member {
if( $this->CI->site->config('point_use') == 'Y' && (int)$this->CI->site->config('point_member_register') > 0 ) if( $this->CI->site->config('point_use') == 'Y' && (int)$this->CI->site->config('point_member_register') > 0 )
{ {
$member_info = $this->get_member($param['mem_userid']); $member_info = $this->get_member($param['mem_userid']);
$this->add_point($member_info['mem_idx'], $this->CI->site->config('point_member_register'), FALSE, "JOIN", point_type("JOIN"), 0);
$this->add_point($member_info['mem_idx'],1, $this->CI->site->config('point_member_register'), FALSE, "JOIN", point_type("JOIN"), 0);
} }
return TRUE; return TRUE;
@ -249,7 +249,7 @@ class Member {
// 로그인시 포인트 부여 // 로그인시 포인트 부여
if( $this->CI->site->config('point_use') == 'Y' && $this->CI->site->config('point_member_login') > 0 ) if( $this->CI->site->config('point_use') == 'Y' && $this->CI->site->config('point_member_login') > 0 )
{ {
$this->add_point($member_info['mem_idx'], $this->CI->site->config('point_member_login'), TRUE, "TODAY_LOGIN", point_type("TODAY_LOGIN"), 0);
$this->add_point($member_info['mem_idx'],1, $this->CI->site->config('point_member_login'), TRUE, "TODAY_LOGIN", point_type("TODAY_LOGIN"), 0);
} }
// 자동로그인 설정시 자동로그인 처리 // 자동로그인 설정시 자동로그인 처리
@ -288,7 +288,7 @@ class Member {
/********************************************************** /**********************************************************
* 포인트 추가 실제 처리 * 포인트 추가 실제 처리
*********************************************************/ *********************************************************/
public function add_point($mem_idx, $point, $point_on_day=FALSE, $target_type="", $description="",$target_idx="")
public function add_point($mem_idx, $flag=1, $point, $point_on_day=FALSE, $target_type="", $description="",$target_idx="")
{ {
// 포인트 기능 미사용일경우 리턴 // 포인트 기능 미사용일경우 리턴
if($this->CI->site->config('point_use') != 'Y') return FALSE; if($this->CI->site->config('point_use') != 'Y') return FALSE;
@ -309,8 +309,8 @@ class Member {
$this->CI->db->where("mem_idx", $mem_idx); $this->CI->db->where("mem_idx", $mem_idx);
$this->CI->db->where("target_type", $target_type); $this->CI->db->where("target_type", $target_type);
$this->CI->db->where("mpo_value >", "0"); $this->CI->db->where("mpo_value >", "0");
$this->CI->db->where("mpo_regtime >=", date('Y-m-d 00:00:00'));
$this->CI->db->where("mpo_regtime <=", date('Y-m-d 23:59:59'));
$this->CI->db->where("reg_datetime >=", date('Y-m-d 00:00:00'));
$this->CI->db->where("reg_datetime <=", date('Y-m-d 23:59:59'));
$temp = $this->CI->db->get("member_point"); $temp = $this->CI->db->get("member_point");
$count = (int) $temp->row(0)->cnt; $count = (int) $temp->row(0)->cnt;
if( $count > 0 ) if( $count > 0 )
@ -321,15 +321,19 @@ class Member {
// 입력할 데이타 정리 // 입력할 데이타 정리
$this->CI->db->set('mem_idx', $mem_idx); $this->CI->db->set('mem_idx', $mem_idx);
$this->CI->db->set('mpo_flag', $flag);
$this->CI->db->set('mpo_value', $point); $this->CI->db->set('mpo_value', $point);
$this->CI->db->set('mpo_description', $description); $this->CI->db->set('mpo_description', $description);
$this->CI->db->set('target_type', $target_type); $this->CI->db->set('target_type', $target_type);
$this->CI->db->set('target_idx', $target_idx); $this->CI->db->set('target_idx', $target_idx);
$this->CI->db->set('mpo_regtime', date('Y-m-d H:i:s') );
$this->CI->db->set('reg_user', $this->CI->member->is_login() );
$this->CI->db->set('reg_datetime', date('Y-m-d H:i:s') );
$this->CI->db->set('upd_user', $this->CI->member->is_login() );
$this->CI->db->set('upd_datetime', date('Y-m-d H:i:s') );
$this->CI->db->insert('member_point'); $this->CI->db->insert('member_point');
// 회원 DB에 반영 // 회원 DB에 반영
$point=(int)$this->CI->db->select('SUM(mpo_value) AS sumval')->where('mem_idx', $this->CI->member->is_login())->get('member_point')->row(0)->sumval;
$point=(int)$this->CI->db->select('SUM(mpo_value * mpo_flag) AS sumval')->where('mem_idx', $this->CI->member->is_login())->get('member_point')->row(0)->sumval;
$this->CI->db->set('mem_point', $point); $this->CI->db->set('mem_point', $point);
$this->CI->db->where('mem_idx', $mem_idx); $this->CI->db->where('mem_idx', $mem_idx);
$this->CI->db->update('member'); $this->CI->db->update('member');

146
wheeparam/config/wheeparam.sql

@ -1,3 +1,21 @@
DROP TABLE IF EXISTS `wb_attach`;
CREATE TABLE `wb_attach` (
`att_idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
`att_target_type` enum('QNA','BOARD','ETC') NOT NULL DEFAULT 'ETC',
`att_target` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '파일이 소속된 문서 PK',
`att_is_image` enum('Y','N') NOT NULL DEFAULT 'N' COMMENT '이미지 인지 여부',
`att_origin` varchar(255) NOT NULL COMMENT '원본 파일명',
`att_filepath` varchar(255) NOT NULL COMMENT '실제 업로드된 파일 경로',
`att_downloads` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '해당 파일 다운로드 수',
`att_ext` varchar(10) NOT NULL DEFAULT '' COMMENT '파일 확장자',
`att_filesize` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '파일 크기 kb',
`att_width` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT '이미지일경우 너비',
`att_height` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT '이미지일경우 높이',
`reg_user` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '등록자 PK',
`reg_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록시간',
PRIMARY KEY (`att_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `wb_banner`; DROP TABLE IF EXISTS `wb_banner`;
CREATE TABLE `wb_banner` ( CREATE TABLE `wb_banner` (
`ban_idx` int(10) unsigned NOT NULL AUTO_INCREMENT, `ban_idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
@ -8,8 +26,6 @@ CREATE TABLE `wb_banner` (
`ban_link_url` varchar(50) NOT NULL DEFAULT '', `ban_link_url` varchar(50) NOT NULL DEFAULT '',
`ban_link_type` enum('Y','N') NOT NULL DEFAULT 'N', `ban_link_type` enum('Y','N') NOT NULL DEFAULT 'N',
`ban_status` enum('Y','H','N') NOT NULL DEFAULT 'Y', `ban_status` enum('Y','H','N') NOT NULL DEFAULT 'Y',
`ban_regtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ban_modtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ban_sort` int(10) unsigned NOT NULL DEFAULT '0', `ban_sort` int(10) unsigned NOT NULL DEFAULT '0',
`ban_timer_use` enum('Y','N') NOT NULL DEFAULT 'N', `ban_timer_use` enum('Y','N') NOT NULL DEFAULT 'N',
`ban_timer_start` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `ban_timer_start` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@ -19,6 +35,10 @@ CREATE TABLE `wb_banner` (
`ban_ext3` varchar(255) NOT NULL DEFAULT '', `ban_ext3` varchar(255) NOT NULL DEFAULT '',
`ban_ext4` varchar(255) NOT NULL DEFAULT '', `ban_ext4` varchar(255) NOT NULL DEFAULT '',
`ban_ext5` varchar(255) NOT NULL DEFAULT '', `ban_ext5` varchar(255) NOT NULL DEFAULT '',
`reg_user` int(10) unsigned NOT NULL DEFAULT 0,
`reg_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`upd_user` int(10) unsigned NOT NULL DEFAULT 0,
`upd_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`ban_idx`), PRIMARY KEY (`ban_idx`),
KEY `bng_key` (`bng_key`) KEY `bng_key` (`bng_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -31,8 +51,8 @@ CREATE TABLE `wb_banner_group` (
`bng_sort` int(10) unsigned NOT NULL DEFAULT 0, `bng_sort` int(10) unsigned NOT NULL DEFAULT 0,
`bng_key` varchar(20) NOT NULL DEFAULT '', `bng_key` varchar(20) NOT NULL DEFAULT '',
`bng_name` varchar(50) NOT NULL DEFAULT '', `bng_name` varchar(50) NOT NULL DEFAULT '',
`bng_width` int(11) NOT NULL DEFAULT '0',
`bng_height` int(11) NOT NULL DEFAULT '0',
`bng_width` smallint(6) NOT NULL DEFAULT 0,
`bng_height` smallint(6) NOT NULL DEFAULT 0,
`bng_ext1` varchar(255) NOT NULL DEFAULT '', `bng_ext1` varchar(255) NOT NULL DEFAULT '',
`bng_ext2` varchar(255) NOT NULL DEFAULT '', `bng_ext2` varchar(255) NOT NULL DEFAULT '',
`bng_ext3` varchar(255) NOT NULL DEFAULT '', `bng_ext3` varchar(255) NOT NULL DEFAULT '',
@ -43,6 +63,10 @@ CREATE TABLE `wb_banner_group` (
`bng_ext3_use` enum('Y','N') NOT NULL DEFAULT 'N', `bng_ext3_use` enum('Y','N') NOT NULL DEFAULT 'N',
`bng_ext4_use` enum('Y','N') NOT NULL DEFAULT 'N', `bng_ext4_use` enum('Y','N') NOT NULL DEFAULT 'N',
`bng_ext5_use` enum('Y','N') NOT NULL DEFAULT 'N', `bng_ext5_use` enum('Y','N') NOT NULL DEFAULT 'N',
`reg_user` int(10) unsigned NOT NULL DEFAULT 0,
`reg_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`upd_user` int(11) NOT NULL DEFAULT 0,
`upd_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`bng_idx`) PRIMARY KEY (`bng_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -60,15 +84,15 @@ CREATE TABLE `wb_board` (
`brd_skin_w_m` varchar(100) NOT NULL DEFAULT '', `brd_skin_w_m` varchar(100) NOT NULL DEFAULT '',
`brd_skin_c` varchar(100) NOT NULL DEFAULT '', `brd_skin_c` varchar(100) NOT NULL DEFAULT '',
`brd_skin_c_m` varchar(100) NOT NULL DEFAULT '', `brd_skin_c_m` varchar(100) NOT NULL DEFAULT '',
`brd_sort` int(10) unsigned NOT NULL DEFAULT '0',
`brd_sort` int(10) unsigned NOT NULL DEFAULT 0,
`brd_search` enum('Y','N') NOT NULL DEFAULT 'Y', `brd_search` enum('Y','N') NOT NULL DEFAULT 'Y',
`brd_lv_list` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_lv_read` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_lv_write` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_lv_reply` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_lv_comment` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_lv_download` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_lv_upload` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_lv_list` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_lv_read` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_lv_write` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_lv_reply` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_lv_comment` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_lv_download` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_lv_upload` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_use_anonymous` enum('Y','N','A') NOT NULL DEFAULT 'N', `brd_use_anonymous` enum('Y','N','A') NOT NULL DEFAULT 'N',
`brd_use_category` enum('Y','N') NOT NULL DEFAULT 'Y', `brd_use_category` enum('Y','N') NOT NULL DEFAULT 'Y',
`brd_use_secret` enum('Y','N','A') NOT NULL DEFAULT 'Y', `brd_use_secret` enum('Y','N','A') NOT NULL DEFAULT 'Y',
@ -80,29 +104,33 @@ CREATE TABLE `wb_board` (
`brd_use_list_file` enum('Y','N') NOT NULL DEFAULT 'N', `brd_use_list_file` enum('Y','N') NOT NULL DEFAULT 'N',
`brd_use_view_list` enum('Y','N') NOT NULL DEFAULT 'N', `brd_use_view_list` enum('Y','N') NOT NULL DEFAULT 'N',
`brd_use_assign` enum('Y','N') NOT NULL DEFAULT 'N', `brd_use_assign` enum('Y','N') NOT NULL DEFAULT 'N',
`brd_thumb_width` int(10) unsigned NOT NULL DEFAULT '0',
`brd_thumb_height` int(10) unsigned NOT NULL DEFAULT '0',
`brd_thumb_width` int(10) unsigned NOT NULL DEFAULT 0,
`brd_thumb_height` int(10) unsigned NOT NULL DEFAULT 0,
`brd_use_rss` enum('Y','N') NOT NULL DEFAULT 'Y', `brd_use_rss` enum('Y','N') NOT NULL DEFAULT 'Y',
`brd_use_total_rss` enum('Y','N') NOT NULL DEFAULT 'Y', `brd_use_total_rss` enum('Y','N') NOT NULL DEFAULT 'Y',
`brd_use_sitemap` enum('Y','N') NOT NULL DEFAULT 'Y', `brd_use_sitemap` enum('Y','N') NOT NULL DEFAULT 'Y',
`brd_display_time` enum('sns','basic','full') NOT NULL DEFAULT 'sns', `brd_display_time` enum('sns','basic','full') NOT NULL DEFAULT 'sns',
`brd_count_post` int(10) unsigned NOT NULL DEFAULT '0',
`brd_count_post` int(10) unsigned NOT NULL DEFAULT 0,
`brd_page_limit` enum('Y','N') NOT NULL DEFAULT 'Y', `brd_page_limit` enum('Y','N') NOT NULL DEFAULT 'Y',
`brd_page_rows` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_page_rows_m` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_fixed_num` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_fixed_num_m` tinyint(3) unsigned NOT NULL DEFAULT '0',
`brd_point_write` int(10) NOT NULL DEFAULT '0',
`brd_point_read` int(10) NOT NULL DEFAULT '0',
`brd_point_comment` int(10) NOT NULL DEFAULT '0',
`brd_point_download` int(10) NOT NULL DEFAULT '0',
`brd_point_reply` int(10) NOT NULL DEFAULT '0',
`brd_time_new` int(10) unsigned NOT NULL DEFAULT '0',
`brd_hit_count` int(10) unsigned NOT NULL DEFAULT '0',
`brd_page_rows` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_page_rows_m` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_fixed_num` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_fixed_num_m` tinyint(3) unsigned NOT NULL DEFAULT 0,
`brd_point_write` int(10) unsigned NOT NULL DEFAULT 0,
`brd_point_write_flag` tinyint(4) NOT NULL DEFAULT 1,
`brd_point_read` int(10) unsigned NOT NULL DEFAULT 0,
`brd_point_read_flag` tinyint(4) NOT NULL DEFAULT -1,
`brd_point_comment` int(10) unsigned NOT NULL DEFAULT 0,
`brd_point_comment_flag` tinyint(4) NOT NULL DEFAULT 1,
`brd_point_download` int(10) unsigned NOT NULL DEFAULT 0,
`brd_point_download_flag` tinyint(4) NOT NULL DEFAULT -1,
`brd_point_reply` int(10) unsigned NOT NULL DEFAULT 0,
`brd_point_reply_flag` tinyint(4) NOT NULL DEFAULT 1,
`brd_time_new` int(10) unsigned NOT NULL DEFAULT 0,
`brd_hit_count` int(10) unsigned NOT NULL DEFAULT 0,
`brd_keywords` varchar(255) NOT NULL, `brd_keywords` varchar(255) NOT NULL,
`brd_description` text NOT NULL, `brd_description` text NOT NULL,
`brd_blind_nickname` enum('Y','N') NOT NULL DEFAULT 'N', `brd_blind_nickname` enum('Y','N') NOT NULL DEFAULT 'N',
`brd_use_naver_syndi` enum('Y','N') NOT NULL DEFAULT 'Y',
PRIMARY KEY (`brd_key`) PRIMARY KEY (`brd_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -199,20 +227,6 @@ CREATE TABLE `wb_board_post` (
PRIMARY KEY (`post_idx`) PRIMARY KEY (`post_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `wb_board_syndi_log`;
CREATE TABLE `wb_board_syndi_log` (
`bsl_idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
`brd_key` varchar(10) NOT NULL DEFAULT '',
`post_idx` int(10) unsigned NOT NULL DEFAULT '0',
`bsl_return_code` char(3) NOT NULL DEFAULT '000',
`bsl_return_message` varchar(255) NOT NULL DEFAULT '',
`bsl_receipt_number` varchar(255) NOT NULL DEFAULT '',
`bsl_regtime` datetime NOT NULL,
PRIMARY KEY (`bsl_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `wb_config`; DROP TABLE IF EXISTS `wb_config`;
CREATE TABLE `wb_config` ( CREATE TABLE `wb_config` (
`cfg_key` varchar(30) NOT NULL, `cfg_key` varchar(30) NOT NULL,
@ -244,7 +258,6 @@ insert into `wb_config`(`cfg_key`,`cfg_value`) values
('email_send_address','email@address.com'), ('email_send_address','email@address.com'),
('icode_userid',''), ('icode_userid',''),
('icode_userpw',''), ('icode_userpw',''),
('naver_syndication_key',''),
('point_member_login','0'), ('point_member_login','0'),
('point_member_register','0'), ('point_member_register','0'),
('point_name','포인트'), ('point_name','포인트'),
@ -517,12 +530,16 @@ CREATE TABLE `wb_member_meta` (
DROP TABLE IF EXISTS `wb_member_point`; DROP TABLE IF EXISTS `wb_member_point`;
CREATE TABLE `wb_member_point` ( CREATE TABLE `wb_member_point` (
`mpo_idx` int(10) unsigned NOT NULL AUTO_INCREMENT, `mpo_idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mem_idx` int(10) unsigned NOT NULL DEFAULT '0',
`mpo_value` int(10) NOT NULL DEFAULT '0',
`mem_idx` int(10) unsigned NOT NULL DEFAULT 0,
`mpo_flag` tinyint(4) NOT NULL DEFAULT 1,
`mpo_value` int(10) unsigned NOT NULL DEFAULT 0,
`mpo_description` varchar(255) NOT NULL DEFAULT '', `mpo_description` varchar(255) NOT NULL DEFAULT '',
`target_type` enum('NONE','POST_READ','POST_WRITE','POST_LIKE','POST_ATTACH_DOWNLOAD','CMT_WRITE','CMT_LIKE','TODAY_LOGIN','JOIN') NOT NULL DEFAULT 'NONE', `target_type` enum('NONE','POST_READ','POST_WRITE','POST_LIKE','POST_ATTACH_DOWNLOAD','CMT_WRITE','CMT_LIKE','TODAY_LOGIN','JOIN') NOT NULL DEFAULT 'NONE',
`target_idx` int(10) unsigned NOT NULL DEFAULT '0',
`mpo_regtime` datetime NOT NULL,
`target_idx` int(10) unsigned NOT NULL DEFAULT 0,
`reg_user` int(10) unsigned NOT NULL DEFAULT 0,
`reg_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`upd_user` int(10) unsigned NOT NULL DEFAULT 0,
`upd_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`mpo_idx`) PRIMARY KEY (`mpo_idx`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8;
@ -575,6 +592,43 @@ CREATE TABLE `wb_popup` (
PRIMARY KEY (`pop_idx`) PRIMARY KEY (`pop_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `wb_qna`;
CREATE TABLE `wb_qna` (
`qna_idx` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Q&A PK',
`qna_status` enum('Y','N') NOT NULL DEFAULT 'Y' COMMENT 'N: 삭제됨',
`qnc_idx` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Q&A 카테고리 PK',
`qna_title` varchar(255) NOT NULL DEFAULT '' COMMENT 'Q&A 제목',
`qna_name` varchar(20) NOT NULL DEFAULT '' COMMENT '작성자 이름',
`qna_phone` varchar(15) NOT NULL DEFAULT '' COMMENT '연락처',
`qna_email` varchar(50) NOT NULL DEFAULT '' COMMENT 'E-mail',
`qna_password` char(64) NOT NULL DEFAULT '',
`qna_content` text NOT NULL COMMENT '작성내용',
`reg_user` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '회원이 작성한경우 PK',
`reg_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`upd_user` int(10) unsigned NOT NULL DEFAULT 0,
`upd_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`qna_ans_status` enum('Y','N') NOT NULL DEFAULT 'N' COMMENT '답변 등록 여부',
`qna_ans_user` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '답변자 PK',
`qna_ans_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '답변 시간',
`qna_ans_upd_user` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '답변 수정자 PK',
`qna_ans_upd_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '답변 수정 시간',
`qna_ans_content` text NOT NULL COMMENT '답변 내용',
PRIMARY KEY (`qna_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `wb_qna_category`;
CREATE TABLE `wb_qna_category` (
`qnc_idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
`qnc_status` enum('Y','N') DEFAULT NULL,
`qnc_title` varchar(50) NOT NULL DEFAULT '',
`sort` int(10) unsigned NOT NULL DEFAULT 0,
`reg_user` int(10) unsigned NOT NULL DEFAULT 0,
`reg_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`upd_user` int(10) unsigned NOT NULL DEFAULT 0,
`upd_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`qnc_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `wb_search`; DROP TABLE IF EXISTS `wb_search`;
CREATE TABLE `wb_search` ( CREATE TABLE `wb_search` (
`sea_idx` int(10) unsigned NOT NULL AUTO_INCREMENT, `sea_idx` int(10) unsigned NOT NULL AUTO_INCREMENT,

9
wheeparam/views/themes/admin/board/form.php

@ -498,15 +498,6 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">네이버 신디케이션 연동</label>
<div class="controls">
<select class="form-control form-control-inline" name="brd_use_naver_syndi">
<option value="Y" <?=element('brd_use_naver_syndi', $view)=='Y'?'selected':''?>>사용</option>
<option value="N" <?=element('brd_use_naver_syndi', $view)=='N'?'selected':''?>>사용</option>
</select>
</div>
</div>
</div> </div>
</div> </div>

34
wheeparam/views/themes/admin/help/naver_syndi.php

@ -1,34 +0,0 @@
<div class="col-xs-12">
<div class="page-header">
<h2 class="page-title"><i class="far fa-question-circle" style="display:inline"></i> 네이버 신디케이션 API 등록방법</h2>
</div>
<div class="admin-help-wrap">
<ul>
<li>
<p class="MT20 MB20">1. NAVER 웹마스터도구 페이지로 이동합니다. <a href="http://webmastertool.naver.com/" target="_blank" class="point-color">NAVER 웹마스터도구 페이지 바로가기</a></p>
<img src="/assets/images/admin/help/naver_ownership01.jpg" alt="">
</li>
<li>
<p class="MT20 MB20">
2. 로그인 <span class="point-color">연동 사이트 목록</span>페이지로 이동됩니다.<br>
연동된 사이트를 더블클릭 합니다.
</p>
<img src="/assets/images/admin/help/naver_syndi01.png" alt="">
</li>
<li>
<p class="MT20 MB20">
3. 왼쪽 메뉴에 <span class="point-color">설정</span>메뉴 부분을 클릭하여 <span class="point-color">신디케이션 인증키</span> 복사합니다.
</p>
<img src="/assets/images/admin/help/naver_syndi02.png" alt="">
</li>
<li>
<p class="MT20 MB20">
4. 휘파람 관리자 페이지로 돌아와 <span class="point-color">[신디케이션 인증키]</span>코드를 휘파람 보드 관리자 -> <span class="point-color">네이버 신디케이션 API KEY</span> 붙여 넣습니다.
</p>
<img src="/assets/images/admin/help/naver_syndi03.png" alt="">
<br>
<br>
</li>
</ul>
</div>
</div>

4
wheeparam/views/themes/admin/management/banner.php

@ -6,7 +6,7 @@
<h4>배너 분류</h4> <h4>배너 분류</h4>
</div> </div>
<div class="right"> <div class="right">
<button type="button" class="btn btn-default" data-button="btn-banner-group-form" data-idx=""><i class="far fa-plus-circle"></i> 배너그룹 추가</button>
<button type="button" class="btn btn-default" data-button="btn-banner-group-form" data-idx=""><i class="fal fa-plus-circle"></i> 배너그룹 추가</button>
</div> </div>
</div> </div>
@ -77,7 +77,7 @@
<td><?=thumb_img($row['ban_filepath'],'img-thumbnail','style="max-width:250px"')?></td> <td><?=thumb_img($row['ban_filepath'],'img-thumbnail','style="max-width:250px"')?></td>
<td><?=$row['ban_name']?></td> <td><?=$row['ban_name']?></td>
<td class="text-center W150"> <td class="text-center W150">
<button type="button" class="btn btn-default btn-sm" data-button="btn-banner-form" data-bng-key="<?=$bng_key?>" data-idx="<?=$row['ban_idx']?>"><i class="far fa-pencil"></i> 수정</button>
<button type="button" class="btn btn-default btn-sm MR5" data-button="btn-banner-form" data-bng-key="<?=$bng_key?>" data-idx="<?=$row['ban_idx']?>"><i class="far fa-pencil"></i> 수정</button>
<button type="button" class="btn btn-danger btn-sm" data-button="btn-banner-delete" data-idx="<?=$row['ban_idx']?>"><i class="far fa-trash"></i> 삭제</button> <button type="button" class="btn btn-danger btn-sm" data-button="btn-banner-delete" data-idx="<?=$row['ban_idx']?>"><i class="far fa-trash"></i> 삭제</button>
</td> </td>
</tr> </tr>

41
wheeparam/views/themes/admin/management/banner_form.php

@ -108,7 +108,7 @@
<div data-ax-td class="width-100"> <div data-ax-td class="width-100">
<div data-ax-td-label>표시 시작시간</div> <div data-ax-td-label>표시 시작시간</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control form-control-inline" name="ban_timer_start" value="<?=element('ban_timer_start', $view)?>">
<div data-toggle="datetime-picker" data-type="datetime" data-name="ban_timer_start" data-value="<?=element('ban_timer_start', $view, set_value('pop_start'))?>"></div>
</div> </div>
</div> </div>
</div> </div>
@ -116,7 +116,7 @@
<div data-ax-td class="width-100"> <div data-ax-td class="width-100">
<div data-ax-td-label>표시 종료시간</div> <div data-ax-td-label>표시 종료시간</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control form-control-inline" name="ban_timer_end" value="<?=element('ban_timer_end', $view)?>">
<div data-toggle="datetime-picker" data-type="datetime" data-name="ban_timer_end" data-value="<?=element('ban_timer_end', $view, set_value('pop_end'))?>"></div>
</div> </div>
</div> </div>
</div> </div>
@ -130,15 +130,6 @@
<script> <script>
$(function(){ $(function(){
$('select[name="ban_timer_use"]').change(function(){
if( $(this).find('option:selected').val() == 'Y' )
{
$('[name="ban_timer_start"],[name="ban_timer_end"]').removeAttr('disabled');
}
else {
$('[name="ban_timer_start"],[name="ban_timer_end"]').val('').attr('disabled','disabled');
}
}).change();
$('input[name="ban_link_use"]').change(function(){ $('input[name="ban_link_use"]').change(function(){
if( $('input[name="ban_link_use"]:checked').val() == 'Y' ) { if( $('input[name="ban_link_use"]:checked').val() == 'Y' ) {
@ -150,5 +141,33 @@
$('input[name="ban_link_type"]').attr('disabled','disabled'); $('input[name="ban_link_type"]').attr('disabled','disabled');
} }
}).change(); }).change();
$('[data-toggle="datetime-picker"]').each(function() {
var name = $(this).data('name'),
value = $(this).data('value') && $(this).data('value') != '0000-00-00 00:00:00' ? new Date($(this).data('value')) : (new Date()).dateFormat('yyyy-MM-dd 00:00'),
type = $(this).data('type');
$(this).dxDateBox({
type: type,
value: value,
displayFormat: type == 'datetime' ? "yyyy-MM-dd HH:mm" : 'yyyy-MM-dd',
applyButtonText:'적용',
cancelButtonText:'취소'
});
$(this).find('input').attr('name', name);
});
$('select[name="ban_timer_use"]').change(function(){
if( $(this).find('option:selected').val() == 'Y' )
{
$('[data-toggle="datetime-picker"]').dxDateBox('option', 'disabled', false);
//$('[name="ban_timer_start"],[name="ban_timer_end"]').removeAttr('disabled');
}
else {
$('[data-toggle="datetime-picker"]').dxDateBox('option', 'disabled', true);
//$('[name="ban_timer_start"],[name="ban_timer_end"]').val('').attr('disabled','disabled');
}
}).change();
}); });
</script> </script>

179
wheeparam/views/themes/admin/management/qna.php

@ -0,0 +1,179 @@
<div class="page-header" data-fit-aside>
<h1 class="page-title">Q&amp;A 관리</h1>
</div>
<form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>작성 기간 검색</div>
<div data-ax-td-wrap>
<input class="form-control" data-chained-datepicker="[name='enddate']" name="startdate" data-toggle="datepicker" value="">
</div>
<div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="">
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>답변여부</div>
<div data-ax-td-wrap>
<select class="form-control" name="qna_ans_status">
<option value="">전체보기</option>
<option value="N">미답변</option>
<option value="Y">답변완료</option>
</select>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>검색어 입력</div>
<div data-ax-td-wrap>
<select class="form-control form-control-inline" name="sc">
<option value="qna_title">질문 제목</option>
<option value="qna_name">작성자</option>
<option value="qna_phone">연락처</option>
<option value="qna_email">이메일</option>
</select>
</div>
</div>
<div data-ax-td>
<div data-ax-td-wrap>
<input class="form-control" name="st" value="">
</div>
<div data-ax-td-wrap>
<button class="btn btn-default btn-sm"><i class="fal fa-search"></i> 필터적용</button>
</div>
</div>
<div data-ax-td class="right">
<div data-ax-td-wrap>
<button type="button" class="btn btn-default btn-sm" data-button="qna-category"><i class="fal fa-sitemap"></i> Q&amp;A 유형 관리</button>
</div>
</div>
</div>
</div>
</form>
<div class="H10" data-fit-aside></div>
<div class="grid-wrapper" data-fit-content>
<div class="grid-container" id="grid-container"></div>
</div>
<script>
var grid = new GRID('#grid-container', {
paging: {
pageSize: 20
},
columns: [
{caption:'번호', dataField:'nums', alignment:'right', width:60, dataType:'number', format:'fixedPoint'},
{caption:'질문일시', dataField:'reg_datetime', alignment:'center', width:120},
{caption:'Q&A유형', dataField:'qnc_title', alignment:'center', width:120},
{caption:'질문제목', dataField:'qna_title', alignment:'left'},
{caption:'질문자', dataField:'qna_name', alignment:'center', width:80},
{caption:'구분', dataField:'reg_user', alignment:'center', width:80, customizeText:function(cell) {return cell.value > 0 ?'회원':'비회원'}},
{caption:'연락처', dataField:'qna_phone', alignment:'center', width:120},
{caption:'E-mail', dataField:'qna_email', alignment:'left', width:180},
{caption:'답변여부', dataField:'qna_ans_status', alignment:'center', width:60, customizeText:function(cell) {return cell.value == 'Y' ?'답변완료':''}},
{caption:'답변자', dataField:'qna_ans_upd_username', alignment:'center', width:80},
{caption:'답변일시', dataField:'qna_ans_upd_datetime', alignment:'center', width:120, customizeText:function(cell) {return cell.value != '0000-00-00 00:00:00' ?cell.value:''}}
],
dataSource: new DevExpress.data.DataSource({
key : 'qna_idx',
load: function(loadOptions) {
var d = $.Deferred();
var params = grid.getSearchParam(loadOptions);
$.ajax({
url : base_url + '/admin/ajax/management/qna',
type: 'GET',
async: false,
cache: false,
data: params
}).done(function(res) {
d.resolve(res.lists, {
totalCount : res.totalCount
});
});
return d.promise();
}
}),
onContextMenuPreparing: function(e) {
if (e.row.rowType === "data") {
e.items = [
{
icon : 'search',
text: '내용보기',
onItemClick: function () {
grid.form(e.row.data.qna_idx);
}
},
{
icon : 'trash',
text: "삭제",
onItemClick: function () {
grid.delete(e.row.data);
}
}
]
}
},
onRowDblClick: function(e) {
grid.form(e.data.qna_idx);
},
});
grid.form = function(qna_idx) {
APP.MODAL.callback = function() {
grid.refresh();
APP.MODAL.close();
}
APP.MODAL.open({
iframe: {
url: base_url + '/admin/management/qna_view/' + qna_idx
},
width:800,
height:600,
header: {
title: 'Q&A 내용보기'
}
})
};
grid.delete = function(data) {
if(! confirm('선택하신 데이타를 삭제하시겠습니까?\n제목: '+data.qna_title + '\n작성자: ' + data.qna_name)) return false;
$.ajax({
url: base_url + '/admin/ajax/management/qna',
type: 'DELETE',
data: {
qna_idx: data.qna_idx
},
success:function() {
toastr.success('삭제되었습니다.');
grid.refresh();
}
})
}
$(function() {
grid.init();
$('[data-button="qna-category"]').click(function() {
APP.MODAL.open({
iframe: {
url: base_url + '/admin/management/qna_category'
},
width: 800,
height: 600,
header: {
title: 'Q&A 유형 관리'
}
})
});
})
</script>

79
wheeparam/views/themes/admin/management/qna_category.php

@ -0,0 +1,79 @@
<div class="ax-button-group">
<div class="left">
<h4>Q&amp;A 분류 관리</h4>
</div>
<div class="right">
<button type="button" class="btn btn-default" data-button="form-qna-category" data-idx=""><i class="fal fa-plus-circle"></i> 신규 등록</button>
</div>
</div>
<div class="grid">
<table>
<thead>
<tr>
<th class="W20"></th>
<th>분류 이름</th>
<th class="W80">관리</th>
</tr>
</thead>
<tbody data-toggle="sortable" data-key="qnc_idx" data-sort="sort" data-table="qna_category">
<?php foreach($lists as $row):?>
<tr>
<td class="text-center">
<span class="move-grip"></span>
<input type="hidden" name="qnc_idx[]" value="<?=$row['qnc_idx']?>">
</td>
<td><?=$row['qnc_title']?></td>
<td class="text-center">
<button type="button" class="btn btn-default btn-xs MR5" data-button="form-qna-category" data-idx="<?=$row['qnc_idx']?>"><i class="fal fa-pencil"></i></button>
<button type="button" class="btn btn-danger btn-xs" data-button="delete-qna-category" data-idx="<?=$row['qnc_idx']?>"><i class="fal fa-trash"></i></button>
</td>
</tr>
<?php endforeach;?>
<?php if(count($lists) == 0) :?>
<tr>
<td colspan="3" class="empty">등록된 분류가 없습니다.</td>
</tr>
<?php endif;?>
</tbody>
</table>
</div>
<script>
$(function() {
$('[data-button="form-qna-category"]').click(function (e) {
var idx = $(this).data('idx');
idx = typeof idx != 'undefined' && idx ? idx :'';
APP.MODAL2.callback = function() {
location.reload();
};
APP.MODAL2.open({
iframe: {
url: base_url + '/admin/management/qna_category_form/' + idx,
},
width: 340,
height: 200
});
});
$('[data-button="delete-qna-category"]').click(function(e) {
var idx = $(this).data('idx');
idx = typeof idx != 'undefined' && idx ? idx : false;
if(! idx) return;
if(! confirm('해당 분류를 삭제하시겠습니까?')) return;
$.ajax({
url: base_url + '/admin/ajax/management/qna-category',
type:'DELETE',
data: {
qnc_idx:idx
},
success:function() {
location.reload();
}
})
});
})
</script>

15
wheeparam/views/themes/admin/management/qna_category_form.php

@ -0,0 +1,15 @@
<?=form_open(NULL, array('autocomplete'=>'off'))?>
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>분류 이름</div>
<div data-ax-td-wrap>
<input class="form-control" name="qnc_title" value="<?=element('qnc_title', $view)?>" autofocus required>
</div>
</div>
</div>
</div>
<div class="text-center MT15">
<button class="btn btn-primary"><i class="fal fa-save"></i> 저장하기</button>
</div>
<?=form_close()?>

72
wheeparam/views/themes/admin/management/qna_view.php

@ -0,0 +1,72 @@
<?=form_open()?>
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>제목</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$view['qna_title']?></p>
</div>
</div>
</div>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>작성자</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$view['qna_name']?></p>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>연락처</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$view['qna_phone']?></p>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>E-mail</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$view['qna_email']?></p>
</div>
</div>
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>내용</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=nl2br($view['qna_content'])?></p>
</div>
</div>
</div>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>답변작성여부</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$view['qna_ans_status']=='Y'?'답변완료':'미답변'?></p>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>답변작성자</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$view['qna_ans_status']=='Y'?$view['qna_ans_upd_username']:''?></p>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>답변작성시간</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$view['qna_ans_status']=='Y'?$view['qna_ans_upd_datetime']:''?></p>
</div>
</div>
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>답변 작성</div>
<div data-ax-td-wrap>
<textarea class="form-control" name="qna_ans_content" data-autosize rows="4"><?=$view['qna_ans_content']?></textarea>
</div>
</div>
</div>
</div>
<div class="text-center MT15">
<button class="btn btn-primary">답변 작성하기</button>
</div>
<?=form_close()?>

146
wheeparam/views/themes/admin/members/info.php

@ -1,94 +1,96 @@
<div class="ax-button-group">
<div class="left">
<h4><?=$mem['mem_nickname']?>님의 회원정보</h4>
</div>
</div>
<div class="form-flex">
<div class="form-group">
<label class="control-label control-label-sm">아이디</label>
<div class="controls">
<input class="form-control" value="<?=$mem['mem_userid']?>" readonly>
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>닉네임</div>
<div data-ax-td-wrap>
<input class="form-control" value="<?=$mem['mem_nickname']?>" readonly>
</div>
</div> </div>
</div>
<?php if(! USE_EMAIL_ID) :?>
<div class="form-group">
<label class="control-label control-label-sm">E-mail</label>
<div class="controls">
<input class="form-control" value="<?=$mem['mem_email']?>" readonly>
<div data-ax-td>
<div data-ax-td-label>상태</div>
<div data-ax-td-wrap>
<?php
if($mem['mem_status'] == 'Y') :
$status = '정상';
elseif($mem['mem_status'] == 'D') :
$status = '접근금지';
elseif($mem['mem_status'] == 'H') :
$status = '휴면';
else :
$status = '탈퇴';
endif;
?>
<p class="form-control-static"><?=$status?></p>
</div>
<div data-ax-td-wrap>
<?php if($mem['mem_status'] == 'H') : ?>
<a href="#" class="btn btn-default btn-sm" onclick="APP.MEMBER.STATUS_CHANGE('<?=$mem['mem_idx']?>','<?=$mem['mem_status']?>','Y')"><i class="far fa-user-secret"></i> 휴면 해제</a>
<?php elseif( $mem['mem_status'] == 'Y' ) :?>
<a href="#" class="btn btn-default btn-sm" onclick="APP.MEMBER.STATUS_CHANGE('<?=$mem['mem_idx']?>','<?=$mem['mem_status']?>','D')"><i class="far fa-ban"></i> 로그인 금지</a>
<?php elseif( $mem['mem_status'] == 'D' ) :?>
<a href="#" class="btn btn-default btn-sm" onclick="APP.MEMBER.STATUS_CHANGE('<?=$mem['mem_idx']?>','<?=$mem['mem_status']?>','Y')"><i class="far fa-ban"></i> 로그인 금지 해제</a>
<?php endif;?>
</div>
</div> </div>
</div> </div>
<?php endif;?>
<div class="form-group">
<label class="control-label control-label-sm">닉네임</label>
<div class="controls">
<input class="form-control" value="<?=$mem['mem_nickname']?>" readonly>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>아이디</div>
<div data-ax-td-wrap><input class="form-control" value="<?=$mem['mem_userid']?>" readonly></div>
</div> </div>
</div>
<div class="form-group">
<label class="control-label control-label-sm">휴대폰</label>
<div class="controls">
<input class="form-control" value="<?=$mem['mem_phone']?>" readonly>
<div data-ax-td>
<div data-ax-td-label>비밀번호</div>
<div data-ax-td-wrap>
<a href="<?=base_url('admin/members/password/'.$mem['mem_idx'])?>" class="btn btn-default btn-sm"><i class="fal fa-lock"></i> 비밀번호 변경</a>
</div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label control-label-sm">성별</label>
<div class="controls">
<input class="form-control" value="<?=$mem['mem_gender']=='M'?'남':($mem['mem_gender']=='F'?'여':'미공개')?>" readonly>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>E-mail</div>
<div data-ax-td-wrap> <input class="form-control" value="<?=$mem['mem_email']?>" readonly></div>
</div> </div>
</div>
<div class="form-group">
<label class="control-label control-label-sm">권한 레벨</label>
<div class="controls">
<input class="form-control" value="<?=$mem['mem_auth']?>" readonly>
<div data-ax-td>
<div data-ax-td-label>휴대폰</div>
<div data-ax-td-wrap>
<input class="form-control" value="<?=$mem['mem_phone']?>" readonly>
</div>
</div> </div>
</div> </div>
<div data-ax-tr>
<div class="form-group">
<label class="control-label control-label-sm">E-mail 수신</label>
<div class="controls">
<input class="form-control" value="<?=$mem['mem_recv_email']=='Y'?'수신':'거부'?>" readonly>
<div data-ax-td>
<div data-ax-td-label>성별</div>
<div data-ax-td-wrap>
<input class="form-control" value="<?=$mem['mem_gender']=='M'?'남':($mem['mem_gender']=='F'?'여':'미공개')?>" readonly>
</div>
</div> </div>
<label class="control-label control-label-sm">SMS 수신</label>
<div class="controls">
<input class="form-control" value="<?=$mem['mem_recv_sms']=='Y'?'수신':'거부'?>" readonly>
<div data-ax-td>
<div data-ax-td-label>권한 레벨</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$mem['mem_auth']?></p>
</div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label control-label-sm">상태</label>
<div class="controls">
<?php
if($mem['mem_status'] == 'Y') :
$status = '정상';
elseif($mem['mem_status'] == 'D') :
$status = '접근금지';
elseif($mem['mem_status'] == 'H') :
$status = '휴면';
else :
$status = '탈퇴';
endif;
?>
<input class="form-control" value="<?=$status?>" readonly>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>E-mail</div>
<div data-ax-td-wrap>
<p class="form-control-static">수신 <?=$mem['mem_recv_email']=='Y'?'동의':'거부'?></p>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>SMS</div>
<div data-ax-td-wrap>
<p class="form-control-static">수신 <?=$mem['mem_recv_sms']=='Y'?'동의':'거부'?></p>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="H20"></div> <div class="H20"></div>
<div class="text-center"> <div class="text-center">
<a href="<?=base_url('admin/members/password/'.$mem['mem_idx'])?>" class="btn btn-default"><i class="far fa-lock"></i> 비밀번호 변경</a>
<a href="<?=base_url('admin/members/modify/'.$mem['mem_idx'])?>" class="btn btn-default"><i class="far fa-pencil"></i> 정보 수정</a>
<?php if($mem['mem_status'] == 'H') : ?>
<a href="#" class="btn btn-warning" onclick="APP.MEMBER.STATUS_CHANGE('<?=$mem['mem_idx']?>','<?=$mem['mem_status']?>','Y')"><i class="far fa-user-secret"></i> 휴면 해제</a>
<?php elseif( $mem['mem_status'] == 'Y' ) :?>
<a href="#" class="btn btn-warning" onclick="APP.MEMBER.STATUS_CHANGE('<?=$mem['mem_idx']?>','<?=$mem['mem_status']?>','D')"><i class="far fa-ban"></i> 로그인 금지</a>
<?php elseif( $mem['mem_status'] == 'D' ) :?>
<a href="#" class="btn btn-warning" onclick="APP.MEMBER.STATUS_CHANGE('<?=$mem['mem_idx']?>','<?=$mem['mem_status']?>','Y')"><i class="far fa-ban"></i> 로그인 금지 해제</a>
<?php endif;?>
<a href="<?=base_url('admin/members/modify/'.$mem['mem_idx'])?>" class="btn btn-default MR10"><i class="far fa-pencil"></i> 정보 수정</a>
<a href="#" class="btn btn-danger" onclick="APP.MEMBER.STATUS_CHANGE('<?=$mem['mem_idx']?>','<?=$mem['mem_status']?>','N')"><i class="far fa-user-secret"></i> 회원 탈퇴</a> <a href="#" class="btn btn-danger" onclick="APP.MEMBER.STATUS_CHANGE('<?=$mem['mem_idx']?>','<?=$mem['mem_status']?>','N')"><i class="far fa-user-secret"></i> 회원 탈퇴</a>
</div> </div>

200
wheeparam/views/themes/admin/members/lists.php

@ -1,48 +1,31 @@
<div class="page-header">
<div class="page-header" data-fit-aside>
<h1 class="page-title">회원 목록<small>회원관리 &gt; 회원목록</small></h1> <h1 class="page-title">회원 목록<small>회원관리 &gt; 회원목록</small></h1>
</div> </div>
<div class="box">
<div class="box-header">
<h2 class="box-title">검색 필터</h2>
</div>
<?=form_open(NULL, array("method"=>'get','class'=>'form-flex','autocomplete'=>'off'))?>
<form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
<div data-ax-tbl> <div data-ax-tbl>
<div data-ax-tr> <div data-ax-tr>
<div data-ax-td> <div data-ax-td>
<div data-ax-td-label>기간 검색</div> <div data-ax-td-label>기간 검색</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<select class="form-control form-control-sm" name="sdate">
<option value="regtime" <?=$sdate=='regtime'?'selected':''?>>가입일</option>
<option value="logtime" <?=$sdate=='logtime'?'selected':''?>>최근로그인</option>
<select class="form-control" name="sdate">
<option value="regtime">가입일</option>
<option value="logtime">최근로그인</option>
</select> </select>
</div> </div>
</div> </div>
<div data-ax-td> <div data-ax-td>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control form-control-sm" name="startdate" data-toggle="datepicker" value="<?=$startdate?>">
<input class="form-control" data-chained-datepicker="[name='enddate']" name="startdate" data-toggle="datepicker" value="">
</div> </div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control form-control-sm" name="enddate" data-toggle="datepicker" value="<?=$enddate?>">
<input class="form-control" name="enddate" data-toggle="datepicker" value="">
</div> </div>
</div> </div>
<div data-ax-td> <div data-ax-td>
<div data-ax-td-label>권한 그룹</div>
<div data-ax-td-label>검색어 입력</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<select class="form-control form-control-sm" name="mem_auth">
<option value="">전체보기</option>
<?php for($i=1; $i<=10; $i++) :?>
<option value="<?=$i?>"><?=$i?></option>
<?php endfor;?>
</select>
</div>
</div>
</div>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>검색</div>
<div data-ax-td-wrap>
<select class="form-control form-control-sm" name="sc">
<select class="form-control" name="sc">
<option value="mem_nickname">닉네임</option> <option value="mem_nickname">닉네임</option>
<option value="mem_userid">아이디</option> <option value="mem_userid">아이디</option>
</select> </select>
@ -50,110 +33,85 @@
</div> </div>
<div data-ax-td> <div data-ax-td>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control form-control-sm" name="st" value="">
<input class="form-control" name="st">
</div> </div>
</div>
</div>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>필터적용</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<button class="btn btn-default btn-sm"><i class="far fa-search"></i> 필터적용</button>
<button class="btn btn-default btn-sm"><i class="fal fa-search"></i> 필터적용</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<?=form_close()?>
</div>
</form>
<div class="H10"></div>
<div class="H10" data-fit-aside></div>
<div class="box">
<div class="box-header">
<h4 class="box-title">회원 검색결과 <small>(<?=number_format($member_list['total_count'])?> 명)</small></h4>
<div class="ax-button-group" data-fit-aside>
<div class="left">
<a class="btn btn-primary" href="<?=base_url('admin/members/add')?>"><i class="fal fa-user-plus"></i> 회원 추가</a>
</div> </div>
</div>
<div class="grid">
<table>
<thead>
<tr>
<th class="W50 hidden-xs"><input type="checkbox" data-checkbox="member" data-checkbox-all="true"></th>
<th>아이디</th>
<th>닉네임</th>
<th class="">E-mail</th>
<th class="W50">상태</th>
<th class="W50">권한</th>
<th class="W100"><?=$this->site->config('point_name')?></th>
<th class="W50">이메일</th>
<th class="W50">SMS</th>
<th class="hidden-x">소셜연동</th>
<th class="hidden-xs W100">가입일</th>
<th class="hidden-xs W125">가입 IP</th>
<th class="hidden-xs W150">최근로그인</th>
<th class="hidden-xs W125">최근로그인 IP</th>
<th class="W100"></th>
</tr>
</thead>
<tbody>
<?php foreach($member_list['list'] as $row) :?>
<tr>
<td class="text-center hidden-xs"><input type="checkbox" data-checkbox="member" name="mem_idx[]" value="<?=$row['mem_idx']?>"></td>
<td><?=$row['mem_userid']?></td>
<td><?=display_member_menu($row['mem_idx'], $row['mem_nickname'], $row['mem_status'])?></td>
<td><?=$row['mem_email']?></td>
<td class="text-center">
<?php if($row['mem_status'] == 'Y') : ?>
<label class="label label-success">정상</label>
<?php elseif ($row['mem_status'] == 'B') :?>
<label class="label label-danger">금지</label>
<?php elseif ($row['mem_status'] == 'H') :?>
<label class="label label-warning">휴면</label>
<?php else :?>
<label class="label label-default">탈퇴</label>
<?php endif;?>
</td>
<td class="text-center"><?=$row['mem_auth']?></td>
<td class="text-right"><?=number_format($row['mem_point'])?></td>
<td class="text-center"><?=$row['mem_recv_email']=='Y'?'<label class="label label-success">수신</label>':'<label class="label label-default">미수신</label>'?></td>
<td class="text-center"><?=$row['mem_recv_sms']=='Y'?'<label class="label label-success">수신</label>':'<label class="label label-default">미수신</label>'?></td>
<td class="text-center hidden-xs">
<?php if($row['social_naver']) : ?>
<img src="<?=base_url('assets/images/social/icon_naver.png')?>" style="width:22px;">
<?php endif;?>
<?php if($row['social_facebook']) : ?>
<img src="<?=base_url('assets/images/social/icon_facebook.png')?>" style="width:22px;">
<?php endif;?>
<?php if($row['social_google']) : ?>
<img src="<?=base_url('assets/images/social/icon_google.png')?>" style="width:22px;">
<?php endif;?>
<?php if($row['social_kakao']) : ?>
<img src="<?=base_url('assets/images/social/icon_kakao.png')?>" style="width:22px;">
<?php endif;?>
</td>
<td class="hidden-xs text-center"><?=date('Y.m.d', strtotime($row['mem_regtime']))?></td>
<td class="hidden-xs text-center"><?=long2ip($row['mem_regip'])?></td>
<td class="hidden-xs text-center"><?=date('Y.m.d H:i', strtotime($row['mem_logtime']))?></td>
<td class="hidden-xs text-center"><?=long2ip($row['mem_logip'])?></td>
<td class="text-center"><button type="button" class="btn btn-sm btn-danger"><i class="far fa-trash"></i> 삭제</button></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<div class="grid-wrapper" data-fit-content>
<div id="grid-container" class="grid-container"></div>
</div>
<div class="H10"></div>
<script>
var grid = new GRID('#grid-container', {
columns: [
{caption:'순번', dataField:'nums', alignment:'right', dataType:'number', format:'fixedPoint', width:60},
{caption:'상태', dataField:'mem_status', alignment:'center', width:80,
customizeText:function(cell){
if(cell.value == 'Y') return '정상';
else if (cell.value == 'D') return '접근금지';
else if (cell.value == 'H') return '휴면';
else if (cell.value == 'N') return '탈퇴';
}
},
{caption:'아이디', dataField:'mem_userid', alignment:'left', width:150},
{caption:'닉네임', dataField:'mem_nickname', alignment:'left', width:150},
{caption:'E-mail', dataField:'mem_email', alignment:'left', width:150},
{caption:'레벨', dataField:'mem_auth', alignment:'right', width:60, dataType:'number', format:'fixedPoint'},
{caption:'<?=$this->site->config('point_name')?>', dataField:'mem_point', alignment:'right', width:80, dataType:'number', format:'fixedPoint'},
{caption:'EMAIL', dataField:'mem_recv_email', alignment:'center', width:60,
customizeText: function(cell) {return cell.value == 'Y'?'수신':'미수신'}
},
{caption:'SMS', dataField:'mem_recv_sms', alignment:'center', width:60,
customizeText: function(cell) {return cell.value == 'Y'?'수신':'미수신'}
},
{caption:'가입일시', dataField:'mem_regtime', alignment:'center', width:150},
{caption:'가입IP', dataField:'mem_regip', alignment:'center', width:150},
{caption:'최근로그인', dataField:'mem_logtime', alignment:'center', width:150},
{caption:'최근IP', dataField:'mem_logip', alignment:'center', width:150},
{caption:'', calculateCellValue:function(e) {return ''}}
],
onContextMenuPreparing: function(e) {
if (e.row.rowType === "data") {
e.items = APP.memberMenuObject(e, <?=$this->site->config('point_use')=='Y'?'"'.$this->site->config('point_name').'"':'false'?>);
}
},
dataSource: new DevExpress.data.DataSource({
key : 'mem_idx',
load: function(loadOptions) {
var d = $.Deferred();
var params = grid.getSearchParam(loadOptions);
<div class="bottom-actions">
<div class="left">
<button type="button" class="btn btn-default btn-sm"><i class="far fa-gift"></i> 선택 <?=$this->site->config('point_name')?> 지급</button>
<button type="button" class="btn btn-default btn-sm"><i class="fas fa-mobile-alt"></i> 선택 SMS 발송</button>
<button type="button" class="btn btn-default btn-sm"><i class="fas fa-envelope"></i> 선택 메일 발송</button>
</div>
<div class="center">
<?=$pagination?>
</div>
<div class="right">
<a href="<?=base_url('admin/members/add')?>" class="btn btn-primary"><i class="far fa-plus-circle"></i> 신규 회원 등록</a>
</div>
</div>
</div>
$.ajax({
url : base_url + '/admin/ajax/members',
type: 'GET',
async: false,
cache: false,
data: params
}).done(function(res) {
d.resolve(res.lists, {
totalCount : res.totalCount
});
});
return d.promise();
}
}),
});
$(function() {
grid.init();
})
</script>

140
wheeparam/views/themes/admin/members/log.php

@ -1,72 +1,86 @@
<div class="page-header">
<div class="page-header" data-fit-aside>
<h1 class="page-title">회원 로그인 기록<small>회원 관리 &gt; 회원 로그인 기록</small></h1> <h1 class="page-title">회원 로그인 기록<small>회원 관리 &gt; 회원 로그인 기록</small></h1>
</div> </div>
<?=form_open(NULL, array("method"=>'get', 'class'=>'form-flex'))?>
<div class="form-group">
<label class="control-label control-label-sm">기간검색</label>
<div class="controls">
<input class="form-control form-control-inline" name="startdate" data-toggle="datepicker" value="<?=$startdate?>">
<input class="form-control form-control-inline" name="enddate" data-toggle="datepicker" value="<?=$enddate?>">
<form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>기간 검색</div>
<div data-ax-td-wrap>
<input class="form-control" data-chained-datepicker="[name='enddate']" name="startdate" data-toggle="datepicker" value="<?=date('Y-m-d',strtotime('-1 month'))?>">
</div>
<div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="<?=date('Y-m-d')?>">
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>검색어 입력</div>
<div data-ax-td-wrap>
<select class="form-control form-control-inline" name="sc">
<option value="userid" <?=$sc=='userid'?'selected':''?>>아이디</option>
<option value="nickname" <?=$sc=='nickname'?'selected':''?>>닉네임</option>
<option value="idx" <?=$sc=='idx'?'selected':''?>>회원번호</option>
</select>
</div>
</div>
<div data-ax-td>
<div data-ax-td-wrap>
<input class="form-control" name="st" value="<?=$st?>">
</div>
<div data-ax-td-wrap>
<button class="btn btn-default btn-sm"><i class="fal fa-search"></i> 필터적용</button>
</div>
</div>
</div>
</div> </div>
</div>
<div class="form-group">
<label class="control-label control-label-sm">검색어 입력</label>
<div class="controls">
<select class="form-control form-control-inline" name="sc">
<option value="userid" <?=$sc=='userid'?'selected':''?>>아이디</option>
<option value="nickname" <?=$sc=='nickname'?'selected':''?>>닉네임</option>
<option value="idx" <?=$sc=='idx'?'selected':''?>>회원번호</option>
</select>
<input class="form-control form-control-inline" name="st" value="<?=$st?>">
</div>
</div>
<div class="form-group">
<label class="control-label control-label-sm"></label>
<div class="controls">
<button class="btn btn-primary"><i class="fal fa-search"></i> 필터적용</button>
</div>
</div>
<?=form_close()?>
</form>
<div class="H10" data-fit-aside></div>
<div class="H10"></div>
<div class="grid">
<table>
<thead>
<tr>
<th>일시</th>
<th>아이디</th>
<th>닉네임</th>
<th>브라우져</th>
<th>버젼</th>
<th>OS</th>
<th>모바일</th>
<th>접속 IP</th>
</tr>
</thead>
<tbody>
<?php foreach($log_list['list'] as $row) :?>
<tr>
<td class="text-center"><?=$row['mlg_regtime']?></td>
<td class="text-center"><?=$row['mem_userid']?></td>
<td class="text-center"><?=$row['mem_nickname']?><?=display_member_menu($row['mem_idx'], "<i class='far fa-cog'></i>", $row['mem_status'])?></td>
<td><?=$row['mlg_browser']?></td>
<td><?=$row['mlg_version']?></td>
<td><?=$row['mlg_platform']?></td>
<td><?=$row['mlg_is_mobile']?></td>
<td><?=long2ip($row['mlg_ip'])?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class="grid-wrapper" data-fit-content>
<div id="grid-container" class="grid-wrapper"></div>
</div> </div>
<div class="H10"></div>
<script>
var grid = new GRID('#grid-container', {
paging: {
pageSize:15
},
columns: [
{caption:'순번', dataField:'nums', alignment:'right', width:80, dataType:'number', format:'fixedPoint'},
{caption:'일시', dataField:'mlg_regtime', alignment:'center', width:160},
{caption:'아이디', dataField:'mem_userid', alignment:'left', width:160},
{caption:'이름', dataField:'mem_nickanem', alignment:'left', width:100},
{caption:'브라우져', dataField:'mlg_browser', alignment:'left', width:80},
{caption:'OS', dataField:'mlg_platform', alignment:'left', width:80},
{caption:'모바일', dataField:'mlg_is_mobile', alignment:'center', width:60},
{caption:'IP', dataField:'mlg_ip', alignment:'center', width:120},
{caption:'', calculateCellValue:function(e) {return ''}}
],
dataSource: new DevExpress.data.DataSource({
key : 'mlg_idx',
load: function(loadOptions) {
var d = $.Deferred();
var params = grid.getSearchParam(loadOptions);
<div class="ax-button-group ax-button-group-bottom">
<div class="left">
<?=$pagination?>
</div>
</div>
$.ajax({
url : base_url + '/admin/ajax/members/logs',
type: 'GET',
async: false,
cache: false,
data: params
}).done(function(res) {
d.resolve(res.lists, {
totalCount : res.totalCount
});
});
<div class="H30"></div>
return d.promise();
}
}),
})
$(function() {
grid.init();
});
</script>

4
wheeparam/views/themes/admin/members/login.php

@ -13,11 +13,11 @@
<label for="login-id"><i class="far fa-pen-square"></i> ID</label> <label for="login-id"><i class="far fa-pen-square"></i> ID</label>
<input class="form-control" id="login-id" name="login_id" placeholder="ID" value="<?=set_value('login_id')?>" maxlength="50" autofocus="1"> <input class="form-control" id="login-id" name="login_id" placeholder="ID" value="<?=set_value('login_id')?>" maxlength="50" autofocus="1">
</div> </div>
<div class="form-group">
<div class="form-group MT10">
<label for="login-pass"><i class="far fa-key"></i> PASSWORD</label> <label for="login-pass"><i class="far fa-key"></i> PASSWORD</label>
<input type="password" class="form-control" id="login-pass" name="login_pass" placeholder="PASSWORD" value="" maxlength="20"> <input type="password" class="form-control" id="login-pass" name="login_pass" placeholder="PASSWORD" value="" maxlength="20">
</div> </div>
<button class="btn btn-block">LOGIN</button>
<button class="btn btn-block MT10">LOGIN</button>
<?=$form_close?> <?=$form_close?>
</div> </div>
</div> </div>

130
wheeparam/views/themes/admin/members/modify.php

@ -5,80 +5,78 @@
<?=form_open_multipart(NULL,array('autocomplete'=>'off','class'=>'form-flex'))?> <?=form_open_multipart(NULL,array('autocomplete'=>'off','class'=>'form-flex'))?>
<?=validation_errors('<p class="alert alert-danger">');?> <?=validation_errors('<p class="alert alert-danger">');?>
<input type="hidden" name="mem_idx" value="<?=$mem['mem_idx']?>"> <input type="hidden" name="mem_idx" value="<?=$mem['mem_idx']?>">
<div class="form-group">
<label class="control-label">아이디 <span class="text-danger">*</span></label>
<div class="controls">
<input class="form-control form-control-inline" name="mem_userid" id="mem_userid" value="<?=$mem['mem_userid']?>" readonly>
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>닉네임 <span class="text-danger">*</span></div>
<div data-ax-td-wrap>
<input class="form-control" name="mem_nickname" id="mem_nickname" value="<?=$mem['mem_nickname']?>" required>
</div>
</div>
</div> </div>
</div>
<div class="form-group">
<label class="control-label">닉네임 <span class="text-danger">*</span></label>
<div class="controls">
<input class="form-control form-control-inline" name="mem_nickname" id="mem_nickname" value="<?=$mem['mem_nickname']?>">
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>아이디 <span class="text-danger">*</span></div>
<div data-ax-td-wrap>
<input class="form-control" name="mem_userid" id="mem_userid" value="<?=$mem['mem_userid']?>" readonly>
</div>
</div>
</div> </div>
</div>
<div class="form-group">
<label class="control-label">이메일 <span class="text-danger">*</span></label>
<div class="controls">
<input class="form-control form-control-inline" name="mem_email" value="<?=$mem['mem_email']?>">
<?php if(USE_EMAIL_VERFY) : ?>
<label><input type="checkbox" name="mem_verfy_email" value="Y" <?=$mem['mem_verfy_email']=='Y'?'checked':''?>>인증 완료</label>
<?php else :?>
<input type="hidden" name="mem_verfy_email" value="Y">
<?php endif;?>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>이메일 <span class="text-danger">*</span></div>
<div data-ax-td-wrap>
<input class="form-control" name="mem_email" data-regex="email-address" value="<?=$mem['mem_email']?>" required>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>휴대폰</div>
<div data-ax-td-wrap>
<input class="form-control" name="mem_phone" data-regex="phone-number" value="<?=$mem['mem_phone']?>">
</div>
</div>
</div> </div>
</div>
<div class="H30"></div>
<div class="form-group">
<label class="control-label">휴대폰</label>
<div class="controls">
<input class="form-control form-control-inline" name="mem_phone" data-regex="phone" value="<?=$mem['mem_phone']?>">
</div>
</div>
<div class="form-group">
<label class="control-label">권한레벨</label>
<div class="controls">
<select class="form-control form-control-inline" name="mem_auth">
<?php for($i=1; $i<=10; $i++):?>
<option value="<?=$i?>" <?=$mem['mem_auth']==$i?'selected':''?>><?=$i?></option>
<?php endfor;?>
</select>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>성별</div>
<div data-ax-td-wrap>
<select class="form-control" name="mem_gender">
<option value="M" <?=$mem['mem_gender']=='M'?'selected':''?>>남</option>
<option value="F" <?=$mem['mem_gender']=='F'?'selected':''?>>여</option>
<option value="U" <?=$mem['mem_gender']=='U'?'selected':''?>>미설정</option>
</select>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>권한레벨</div>
<div data-ax-td-wrap>
<select class="form-control" name="mem_auth">
<?php for($i=1; $i<=10; $i++):?>
<option value="<?=$i?>" <?=$mem['mem_auth']==$i?'selected':''?>><?=$i?></option>
<?php endfor;?>
</select>
</div>
</div>
</div> </div>
</div>
<div class="form-group">
<label class="control-label">성별</label>
<div class="controls">
<label class="w-radio"><input type="radio" name="mem_gender" value="M" <?=$mem['mem_gender']=='M'?'checked':''?>><span>남</span></label>
<label class="w-radio"><input type="radio" name="mem_gender" value="F" <?=$mem['mem_gender']=='F'?'checked':''?>><span>여</span></label>
<label class="w-radio"><input type="radio" name="mem_gender" value="U" <?=$mem['mem_gender']=='U'?'checked':''?>><span>미설정</span></label>
</div>
</div>
<div class="form-group">
<label class="control-label">이메일 수신</label>
<div class="controls">
<label class="w-radio"><input type="radio" name="mem_recv_email" value="Y" <?=$mem['mem_recv_email']=='Y'?'checked':''?>><span>수신</span></label>
<label class="w-radio"><input type="radio" name="mem_recv_email" value="N" <?=$mem['mem_recv_email']=='N'?'checked':''?>><span>거부</span></label>
</div>
</div>
<div class="form-group">
<label class="control-label">SMS 수신</label>
<div class="controls">
<label class="w-radio"><input type="radio" name="mem_recv_sms" value="Y" <?=$mem['mem_recv_sms']=='Y'?'checked':''?>><span>수신</span></label>
<label class="w-radio"><input type="radio" name="mem_recv_sms" value="N" <?=$mem['mem_recv_sms']=='N'?'checked':''?>><span>거부</span></label>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>E-mail</div>
<div data-ax-td-wrap>
<label class="w-radio"><input type="radio" name="mem_recv_email" value="Y" <?=$mem['mem_recv_email']=='Y'?'checked':''?>><span>수신 동의</span></label>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>SMS</div>
<div data-ax-td-wrap>
<label class="w-radio"><input type="radio" name="mem_recv_sms" value="Y" <?=$mem['mem_recv_sms']=='Y'?'checked':''?>><span>수신 동의</span></label>
</div>
</div>
</div> </div>
</div> </div>
<div class="H10"></div>
<div class="text-center">
<button class="btn btn-lg btn-primary">정보 수정하기</button>
<div class="text-center MT15">
<button class="btn btn-primary">정보 수정하기</button>
</div> </div>
<?=form_close()?> <?=form_close()?>

31
wheeparam/views/themes/admin/members/password.php

@ -3,22 +3,23 @@
</div> </div>
<?=validation_errors('<p class="alert alert-danger">')?> <?=validation_errors('<p class="alert alert-danger">')?>
<?=form_open(NULL, array('autocomplete'=>'off','class'=>'form-flex'))?> <?=form_open(NULL, array('autocomplete'=>'off','class'=>'form-flex'))?>
<div class="form-group">
<label class="control-label"> 비밀번호 <span class="text-danger">*</span></label>
<div class="controls">
<input type="password" class="form-control form-control-inline" name="mem_password">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label> 비밀번호 <span class="text-danger">*</span></div>
<div data-ax-td-wrap>
<input type="password" class="form-control" name="mem_password" required>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>비밀번호 확인 <span class="text-danger">*</span></div>
<div data-ax-td-wrap>
<input type="password" class="form-control" name="mem_password2" required>
</div>
</div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label"> 비밀번호 확인 <span class="text-danger">*</span></label>
<div class="controls">
<input type="password" class="form-control form-control-inline" name="mem_password2">
</div>
</div>
<div class="form-group">
<label class="control-label"></label>
<div class="controls">
<button class="btn btn-primary" onclick="return confirm('해당 사용자의 비밀번호를 변경하시겠습니까?');">비밀번호 변경</button>
</div>
<div class="text-center MT15">
<button class="btn btn-primary" onclick="return confirm('해당 사용자의 비밀번호를 변경하시겠습니까?');">비밀번호 변경</button>
</div> </div>
<?=form_close()?> <?=form_close()?>

151
wheeparam/views/themes/admin/members/point.php

@ -2,69 +2,104 @@
<h1 class="page-title"><?=$mem['mem_nickname']?>님의 <?=$this->site->config('point_name')?> 정보</h1> <h1 class="page-title"><?=$mem['mem_nickname']?>님의 <?=$this->site->config('point_name')?> 정보</h1>
</div> </div>
<?=form_open(NULL, array('method'=>'get', 'class'=>'form-flex','autocomplete'=>'off'))?>
<div class="form-group">
<label class="control-label control-label-sm"><?=$this->site->config('point_name')?> 유형</label>
<div class="controls">
<select class="form-control form-control-inline" name="target_type">
<option value="">전체보기</option>
<?php foreach($point_type as $key=>$val) :?>
<option value="<?=$key?>" <?=$target_type==$key?'selected':''?>><?=$val?></option>
<?php endforeach;?>
</select>
<form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label><?=$this->site->config('point_name')?> 유형</div>
<div data-ax-td-wrap>
<select class="form-control form-control-inline" name="target_type">
<option value="">전체보기</option>
<?php foreach($point_type as $key=>$val) :?>
<option value="<?=$key?>" <?=$target_type==$key?'selected':''?>><?=$val?></option>
<?php endforeach;?>
</select>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>기간검색</div>
<div data-ax-td-wrap>
<input class="form-control" data-chained-datepicker="[name='enddate']" name="startdate" data-toggle="datepicker" value="">
</div>
<div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="">
</div>
</div>
<div data-ax-td class="W100">
<div data-ax-td-wrap>
<button class="btn btn-default btn-sm"><i class="fal fa-search"></i> 필터적용</button>
</div>
</div>
</div>
</div> </div>
</div>
<div class="form-group">
<label class="control-label control-label-sm">기간 검색</label>
<div class="controls">
<input class="form-control form-control-inline" name="startdate" value="<?=$startdate?>" data-toggle="datepicker">
<input class="form-control form-control-inline" name="enddate" value="<?=$enddate?>" data-toggle="datepicker">
</div>
</div>
</form>
<div class="form-group">
<label class="control-label control-label-sm"></label>
<div class="controls">
<button class="btn btn-default"><i class="far fa-search"></i> 필터적용</button>
</div>
</div>
<?=form_close()?>
<div class="H10"></div> <div class="H10"></div>
<div class="grid">
<table>
<thead>
<tr>
<th>번호</th>
<th>일시</th>
<th>유형</th>
<th class="col-sm-6">내용</th>
</tr>
</thead>
<tbody>
<?php foreach($point_list['list'] as $row) :?>
<tr>
<td><?=$row['nums']?></td>
<td><?=$row['mpo_regtime']?></td>
<td><?=point_type($row['target_type'])?></td>
<td><?=$row['mpo_description']?></td>
</tr>
<?php endforeach;?>
<?php if(count($point_list['list']) == 0) :?>
<tr>
<td colspan="4" class="empty"><?=$this->site->config('point_name')?> 내역이 없습니다.</td>
</tr>
<?php endif;?>
</tbody>
</table>
</div>
<div class="H10"></div>
<div class="ax-button-group ax-button-group-bottom">
<div class="ax-button-group">
<div class="left"> <div class="left">
<?=$pagination?>
</div>
<div class="right">
<button type="button" class="btn btn-default" onclick="APP.MEMBER.POP_POINT_FORM_ADMIN('<?=$mem['mem_idx']?>');"><i class="far fa-plus-circle"></i> <?=$this->site->config('point_name')?> 등록</button> <button type="button" class="btn btn-default" onclick="APP.MEMBER.POP_POINT_FORM_ADMIN('<?=$mem['mem_idx']?>');"><i class="far fa-plus-circle"></i> <?=$this->site->config('point_name')?> 등록</button>
</div> </div>
</div> </div>
<div id="grid-container"></div>
<script>
var grid = new GRID('#grid-container', {
paging: {
pageSize: 10
},
columns: [
{caption:'번호', dataField:'nums', alignment:'right', width:60, dataType:'number', format:'fixedPoint'},
{caption:'일시', dataField:'reg_datetime', alignment:'center', width:120},
{caption:'구분', dataField:'target_type', alignment:'center', width:120},
{
caption: '증가', name:'mpo_value_plus', dataField:'mpo_value', alignment:'right', dataType:'number', format:'fixedPoint', width:120,
calculateCellValue: function(cell) {
if(cell.mpo_flag == 1) return cell.mpo_value.numberFormat()
}
},
{
caption: '감소',name:'mpo_value_minus', dataField:'mpo_value', alignment:'right', dataType:'number', format:'fixedPoint', width:120,
calculateCellValue: function(cell) {
if(cell.mpo_flag == -1) return cell.mpo_value.numberFormat()
}
},
{caption:'내용', dataField:'mpo_description', alignment:'left', minWidth:120},
],
onCellPrepared: function(e) {
if(e.rowType == 'data') {
if(e.column.name == 'mpo_value_plus') {
e.cellElement.css("color", '#3498db');
}
else if (e.column.name == 'mpo_value_minus') {
e.cellElement.css("color", '#e32815');
}
}
},
dataSource: new DevExpress.data.DataSource({
key : 'mpo_idx',
load: function(loadOptions) {
var d = $.Deferred();
var params = grid.getSearchParam(loadOptions);
params.mem_idx = '<?=$mem['mem_idx']?>';
$.ajax({
url : base_url + '/admin/ajax/members/points',
type: 'GET',
async: false,
cache: false,
data: params
}).done(function(res) {
d.resolve(res.lists, {
totalCount : res.totalCount
});
});
return d.promise();
}
}),
});
$(function() {
grid.init();
})
</script>

33
wheeparam/views/themes/admin/members/point_form.php

@ -2,17 +2,30 @@
<input type="hidden" name="mem_idx" value="<?=$mem_idx?>"> <input type="hidden" name="mem_idx" value="<?=$mem_idx?>">
<input type="hidden" name="target_type" value="NONE"> <input type="hidden" name="target_type" value="NONE">
<?=validation_errors('<p class="alert alert-danger">')?> <?=validation_errors('<p class="alert alert-danger">')?>
<div class="form-group">
<label class="control-label control-label-sm"><?=$this->site->config('point_name')?></label>
<div class="controls">
<input class="form-control form-control-inline text-right" name="mpo_value">
<p class="help-block"><?=$this->site->config('point_name')?> 차감시 - 를 사용해주세요</p>
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="W500">
<div data-ax-td-label><?=$this->site->config('point_name')?></div>
<div data-ax-td-wrap>
<input class="form-control" name="mpo_value" required>
</div>
</div>
<div data-ax-td>
<div data-ax-td-wrap>
<select class="form-control" name="mpo_flag">
<option value="1">증가</option>
<option value="-1">감소</option>
</select>
</div>
</div>
</div> </div>
</div>
<div class="form-group">
<label class="control-label control-label-sm"><?=$this->site->config('point_name')?> 내용</label>
<div class="controls">
<input class="form-control" name="mpo_description">
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label><?=$this->site->config('point_name')?> 내용</div>
<div data-ax-td-wrap>
<input class="form-control" name="mpo_description">
</div>
</div>
</div> </div>
</div> </div>
<div class="text-center MT10"> <div class="text-center MT10">

136
wheeparam/views/themes/admin/members/points.php

@ -1,37 +1,109 @@
<div class="page-header">
<div class="page-header" data-fit-aside>
<h2 class="page-title"><?=$this->site->config('point_name')?> 관리</h2> <h2 class="page-title"><?=$this->site->config('point_name')?> 관리</h2>
</div> </div>
<div class="grid">
<table>
<thead>
<tr>
<th class="W100">#</th>
<th class="W150">일시</th>
<th class="W150">사용자</th>
<th class="W100"><?=$this->site->config('point_name')?></th>
<th>내용</th>
</tr>
</thead>
<tbody>
<?php foreach($list['list'] as $row) :?>
<tr>
<td class="text-right"><?=number_format($row['nums'])?></td>
<td class="text-center"><?=$row['mpo_regtime']?></td>
<td class="text-center"><?=$row['mem_nickname']?><?=display_member_menu($row['mem_idx'], '<i class="far fa-cog"></i>', $row['mem_status'])?></td>
<td class="text-right"><?=$row['mpo_value']>0?'+':''?><?=$row['mpo_value']?></td>
<td><?=$row['mpo_description']?></td>
</tr>
<?php endforeach;?>
<?php if(count($list['list']) == 0) :?>
<tr>
<td class="empty" colspan="5">검색된 내역이 없습니다.</td>
</tr>
<?php endif;?>
</tbody>
</table>
<form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label><?=$this->site->config('point_name')?> 유형</div>
<div data-ax-td-wrap>
<select class="form-control form-control-inline" name="target_type">
<option value="">전체보기</option>
<?php foreach($point_type as $key=>$val) :?>
<option value="<?=$key?>" <?=$target_type==$key?'selected':''?>><?=$val?></option>
<?php endforeach;?>
</select>
</div>
</div>
<div data-ax-td>
<div data-ax-td-label>기간검색</div>
<div data-ax-td-wrap>
<input class="form-control" data-chained-datepicker="[name='enddate']" name="startdate" data-toggle="datepicker" value="">
</div>
<div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="">
</div>
</div>
<div data-ax-td class="W100">
<div data-ax-td-wrap>
<button class="btn btn-default btn-sm"><i class="fal fa-search"></i> 필터적용</button>
</div>
</div>
</div>
</div>
</form>
<div class="H10" data-fit-aside></div>
<div class="grid-wrapper" data-fit-content>
<div class="grid-container" id="grid-container"></div>
</div> </div>
<div class="text-center MT10">
<?=$pagination?>
</div>
<script>
var grid = new GRID('#grid-container', {
paging: {
pageSize: 20
},
columns: [
{caption:'번호', dataField:'nums', alignment:'right', width:60, dataType:'number', format:'fixedPoint'},
{caption:'일시', dataField:'reg_datetime', alignment:'center', width:120},
{caption:'회원명', dataField:'mem_nickname', alignment:'center', width:80},
{caption:'회원ID', dataField:'mem_userid', alignment:'left', width:180},
{caption:'구분', dataField:'target_type', alignment:'center', width:120},
{
caption: '증가', name:'mpo_value_plus', dataField:'mpo_value', alignment:'right', dataType:'number', format:'fixedPoint', width:120,
calculateCellValue: function(cell) {
if(cell.mpo_flag == 1) return cell.mpo_value.numberFormat()
}
},
{
caption: '감소',name:'mpo_value_minus', dataField:'mpo_value', alignment:'right', dataType:'number', format:'fixedPoint', width:120,
calculateCellValue: function(cell) {
if(cell.mpo_flag == -1) return cell.mpo_value.numberFormat()
}
},
{caption:'내용', dataField:'mpo_description', alignment:'left', minWidth:120},
],
onCellPrepared: function(e) {
if(e.rowType == 'data') {
if(e.column.name == 'mpo_value_plus') {
e.cellElement.css("color", '#3498db');
}
else if (e.column.name == 'mpo_value_minus') {
e.cellElement.css("color", '#e32815');
}
}
},
onContextMenuPreparing: function(e) {
if (e.row.rowType === "data") {
e.items = APP.memberMenuObject(e, <?=$this->site->config('point_use')=='Y'?'"'.$this->site->config('point_name').'"':'false'?>);
}
},
dataSource: new DevExpress.data.DataSource({
key : 'mpo_idx',
load: function(loadOptions) {
var d = $.Deferred();
var params = grid.getSearchParam(loadOptions);
$.ajax({
url : base_url + '/admin/ajax/members/points',
type: 'GET',
async: false,
cache: false,
data: params
}).done(function(res) {
d.resolve(res.lists, {
totalCount : res.totalCount
});
});
return d.promise();
}
}),
});
$(function() {
grid.init();
})
</script>

3
wheeparam/views/themes/admin/setting/admin.php

@ -1,4 +1,3 @@
<div class="W600 margin-auto">
<div class="page-header" data-fit-aside> <div class="page-header" data-fit-aside>
<h1 class="page-title">관리자 관리</h1> <h1 class="page-title">관리자 관리</h1>
</div> </div>
@ -12,7 +11,6 @@
<div class="grid-wrapper" data-fit-content> <div class="grid-wrapper" data-fit-content>
<div class="grid-container" id="grid-container"></div> <div class="grid-container" id="grid-container"></div>
</div> </div>
</div>
<script> <script>
var grid = new GRID('#grid-container', { var grid = new GRID('#grid-container', {
columns: [ columns: [
@ -23,6 +21,7 @@
{caption:'가입IP', dataField:'regip', alignment:'center', width:120}, {caption:'가입IP', dataField:'regip', alignment:'center', width:120},
{caption:'최근로그인', dataField:'mem_logtime', alignment:'center', width:120}, {caption:'최근로그인', dataField:'mem_logtime', alignment:'center', width:120},
{caption:'최근로그인IP', dataField:'logip', alignment:'center', width:120}, {caption:'최근로그인IP', dataField:'logip', alignment:'center', width:120},
{caption:'', calculateCellValue:function(e) {return ''}}
], ],
dataSource: new DevExpress.data.DataSource({ dataSource: new DevExpress.data.DataSource({
key : 'mem_idx', key : 'mem_idx',

2
wheeparam/views/themes/admin/statics/visit.php

@ -2,7 +2,7 @@
<h1 class="page-title">사용자 접속 로그<small>방문통계 &gt; 사용자 접속 로그</small></h1> <h1 class="page-title">사용자 접속 로그<small>방문통계 &gt; 사용자 접속 로그</small></h1>
</div> </div>
<form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside>
<form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
<div data-ax-tbl class="ax-search-tbl" data-grid-search> <div data-ax-tbl class="ax-search-tbl" data-grid-search>
<div data-ax-tr> <div data-ax-tr>
<div data-ax-td> <div data-ax-td>

2
wheeparam/views/themes/admin/theme.php

@ -39,7 +39,7 @@ $this->site->add_js('https://unpkg.com/devextreme-intl@19.1/dist/devextreme-intl
<li data-active="management/banner"><a href="<?=base_url('admin/management/banner')?>">배너 관리</a></li> <li data-active="management/banner"><a href="<?=base_url('admin/management/banner')?>">배너 관리</a></li>
<li data-active="management/menu"><a href="<?=base_url('admin/management/menu')?>">메뉴 관리</a></li> <li data-active="management/menu"><a href="<?=base_url('admin/management/menu')?>">메뉴 관리</a></li>
<li data-active="management/faq"><a href="<?=base_url('admin/management/faq')?>">FAQ 관리</a></li> <li data-active="management/faq"><a href="<?=base_url('admin/management/faq')?>">FAQ 관리</a></li>
<li data-active="management/qna"><a href="<?=base_url('admin/management/qna')?>">Q&A 관리</a></li>
</ul> </ul>
</li> </li>
<li> <li>

41
wheeparam/views/themes/desktop/customer/qna/lists.php

@ -0,0 +1,41 @@
<form class="form-inline" autocomplete="off" method="get" accept-charset="UTF-8">
<select class="form-control">
<option value="title">질문제목</option>
<option value="name">질문자</option>
</select>
<input class="form-control" required>
<button class="btn btn-default"><i class="fal fa-search"></i> 검색하기</button>
</form>
<table class="table">
<thead>
<tr>
<th>순번</th>
<th>질문유형</th>
<th>질문제목</th>
<th>질문자</th>
<th>답변여부</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<?php if(count($lists) == 0) :?>
<tr>
<td colspan="5" class="text-center empty">등록된 질문이 없습니다.</td>
</tr>
<?php endif;?>
<?php foreach($lists as $row):?>
<tr>
<td class="text-right"><?=$row['nums']?></td>
<td class="text-right"><?=$row['qnc_title']?></td>
<td class="text-left">
<a href="<?=base_url('customer/qna/'.$row['qna_idx'])?>"><i class="fal fa-lock"></i> <?=$row['qna_title']?></a>
</td>
<td class="text-center"><?=$row['qna_name']?></td>
<td class="text-center"><?=$row['is_answered']?'답변완료':'미답변'?></td>
<td class="text-center"><?=$row['reg_datetime']?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class="text-center"><?=$pagination?></div>
<a href="<?=base_url('customer/qna/write')?>"><i class="fal fa-pencil"></i> 질문작성하기</a>

39
wheeparam/views/themes/desktop/customer/qna/write.php

@ -0,0 +1,39 @@
<?=form_open_multipart()?>
<?=validation_errors('<p class="alert alert-danger">')?>
<?php if(! $this->member->is_login()) :?>
<input placeholder="작성자" name="qna_name" required>
<input type="password" placeholder="비밀번호" name="qna_password" required>
<?php endif;?>
<input placeholder="연락처" data-regex="phone-number" name="qna_phone" value="<?=$this->member->info('phone')?>" required>
<input placeholder="E-mail" data-regex="email-address" name="qna_email" value="<?=$this->member->info('email')?>" required>
<?php if(count($qna_category) > 0) :?>
<select name="qnc_idx">
<?php foreach($qna_category as $row):?>
<option value="<?=$row['qnc_idx']?>"><?=$row['qnc_title']?></option>
<?php endforeach;?>
</select>
<?php endif;?>
<input placeholder="질문 제목" name="qna_title" required>
<textarea placeholder="질문 내용" name="qna_content" rows="10" required></textarea>
<div data-container="file-input"></div>
<script id="tmpl-file-input" type="text/x-jquery-tmpl">
<input type="file" name="userfile[]">
</script>
<button type="button" data-button="add-file-input"><i class="fal fa-plus"></i> 파일 추가</button>
<button>질문 등록하기</button>
<?=form_close()?>
<script>
$(function() {
$('[data-button="add-file-input"]').click(function() {
$('[data-container="file-input"]').append( $('#tmpl-file-input').tmpl() );
});
});
</script>
Loading…
Cancel
Save