장선근
6 years ago
61 changed files with 796 additions and 667 deletions
-
123_src/admin/js/modules/faq.js
-
29_src/admin/scss/common/_layout.scss
-
10_src/admin/scss/plugins/devextreme/dx.light.compact.scss
-
2public_html/assets/css/admin.min.css
-
2public_html/assets/css/admin.min.css.map
-
BINpublic_html/assets/images/common/error_arr.png
-
BINpublic_html/assets/images/common/error_img.png
-
2public_html/assets/js/admin.min.js
-
2public_html/assets/js/admin.min.js.map
-
1source.info.json
-
17wheeparam/application/controllers/Board.php
-
4wheeparam/application/controllers/admin/Board.php
-
15wheeparam/application/controllers/admin/Management.php
-
22wheeparam/application/controllers/admin/ajax/Board.php
-
76wheeparam/application/controllers/admin/ajax/Management.php
-
82wheeparam/application/controllers/ajax/Faq.php
-
1wheeparam/application/hooks/HookPostControllerConstructor.php
-
46wheeparam/application/libraries/Boardlib.php
-
33wheeparam/application/libraries/Site.php
-
15wheeparam/application/models/Board_model.php
-
8wheeparam/application/models/Faq_model.php
-
60wheeparam/config/wheeparam.sql
-
78wheeparam/views/errors/html/error_404.php
-
74wheeparam/views/errors/html/error_db.php
-
14wheeparam/views/themes/admin/board/category.php
-
2wheeparam/views/themes/admin/board/category_form.php
-
10wheeparam/views/themes/admin/board/form.php
-
193wheeparam/views/themes/admin/board/lists.php
-
58wheeparam/views/themes/admin/board/posts.php
-
10wheeparam/views/themes/admin/board/read.php
-
2wheeparam/views/themes/admin/help/facebook_login.php
-
2wheeparam/views/themes/admin/help/google_analytics.php
-
2wheeparam/views/themes/admin/help/google_login.php
-
2wheeparam/views/themes/admin/help/google_ownership.php
-
2wheeparam/views/themes/admin/help/kakao_login.php
-
2wheeparam/views/themes/admin/help/naver_analytics.php
-
2wheeparam/views/themes/admin/help/naver_login.php
-
2wheeparam/views/themes/admin/help/naver_ownership.php
-
2wheeparam/views/themes/admin/help/recaptcha.php
-
38wheeparam/views/themes/admin/management/banner.php
-
140wheeparam/views/themes/admin/management/faq.php
-
24wheeparam/views/themes/admin/management/faq_category_form.php
-
2wheeparam/views/themes/admin/management/faq_form.php
-
30wheeparam/views/themes/admin/management/menu.php
-
77wheeparam/views/themes/admin/management/menu_form.php
-
2wheeparam/views/themes/admin/management/popup_form.php
-
4wheeparam/views/themes/admin/management/sitemap.php
-
2wheeparam/views/themes/admin/members/add.php
-
10wheeparam/views/themes/admin/members/info.php
-
6wheeparam/views/themes/admin/members/login.php
-
2wheeparam/views/themes/admin/members/point.php
-
4wheeparam/views/themes/admin/setting/apis.php
-
2wheeparam/views/themes/admin/statics/browser.php
-
2wheeparam/views/themes/admin/statics/device.php
-
2wheeparam/views/themes/admin/statics/keyword.php
-
2wheeparam/views/themes/admin/statics/os.php
-
2wheeparam/views/themes/admin/statics/referrer.php
-
2wheeparam/views/themes/admin/statics/times.php
-
2wheeparam/views/themes/admin/statics/visit.php
-
16wheeparam/views/themes/admin/theme.php
-
1wheeparam/views/themes/desktop/theme.php
@ -1,123 +0,0 @@ |
|||
var faq = {}; |
|||
faq.form = function(fac_idx, faq_idx) |
|||
{ |
|||
var faq_idx = (typeof faq_idx == 'string' || typeof faq_idx == 'number' ) ? faq_idx : null; |
|||
var fac_idx = (typeof fac_idx == 'string' || typeof fac_idx == 'number' ) ? fac_idx : null; |
|||
if(! fac_idx) { |
|||
alert('FAQ 분류 정보가 없습니다.'); |
|||
return false; |
|||
} |
|||
|
|||
APP.MODAL.open({ |
|||
width: 800, |
|||
height :650, |
|||
header : { |
|||
title : faq_idx ? 'FAQ 정보 수정' : 'FAQ 추가' |
|||
}, |
|||
callback : function(){ |
|||
location.reload(); |
|||
}, |
|||
iframe : { |
|||
method : 'get', |
|||
url : '/admin/management/faq_form', |
|||
param : { |
|||
fac_idx : fac_idx, |
|||
faq_idx : faq_idx |
|||
} |
|||
} |
|||
}); |
|||
}; |
|||
faq.remove = function(faq_idx) { |
|||
if(typeof faq_idx == 'undefined' || ! faq_idx || faq_idx.trim() == '') { |
|||
alert('잘못된 접근입니다.'); |
|||
} |
|||
|
|||
if(! confirm('해당 FAQ를 삭제하시겠습니까?')) return false; |
|||
|
|||
$.ajax({ |
|||
url : '/ajax/faq/info', |
|||
type : 'delete', |
|||
async:false, |
|||
cache:false, |
|||
data:{faq_idx:faq_idx}, |
|||
success:function(res){ |
|||
alert('FAQ가 삭제되었습니다.'); |
|||
location.reload(); |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
/** |
|||
* FAQ 분류 |
|||
* @type {{}} |
|||
*/ |
|||
faq.category = {}; |
|||
faq.category.form = function(fac_idx) |
|||
{ |
|||
var fac_idx = (typeof fac_idx == 'string' || typeof fac_idx == 'number' ) ? fac_idx : null; |
|||
APP.MODAL.open({ |
|||
width: $(window).width() > 600 ? 600 : $(window).width(), |
|||
height :250, |
|||
header : { |
|||
title : fac_idx ? 'FAQ 분류 정보 수정' : 'FAQ 분류 추가' |
|||
}, |
|||
callback : function(){ |
|||
location.reload(); |
|||
}, |
|||
iframe : { |
|||
method : 'get', |
|||
url : '/admin/management/faq_category_form', |
|||
param : { |
|||
fac_idx : fac_idx |
|||
} |
|||
} |
|||
}); |
|||
}; |
|||
faq.category.exist = function(fac_idx) { |
|||
if(typeof fac_idx == 'undefined' || ! fac_idx || fac_idx.trim() == '') return false; |
|||
var result = false; |
|||
$.ajax({ |
|||
url : '/ajax/faq/category', |
|||
type:'get', |
|||
async:false, |
|||
cache:false, |
|||
data:{fac_idx:fac_idx}, |
|||
success:function (res) { |
|||
result = !(res && typeof res.fac_idx != 'undefined' && res.fac_idx); |
|||
} |
|||
}); |
|||
return result; |
|||
}; |
|||
faq.category.remove = function(fac_idx) { |
|||
if(typeof fac_idx == 'undefined' || ! fac_idx || fac_idx.trim() == '') { |
|||
alert('잘못된 접근입니다.'); |
|||
} |
|||
var count = 0; |
|||
$.ajax({ |
|||
url : '/ajax/faq/lists', |
|||
type : 'get', |
|||
async:false, |
|||
cache: false, |
|||
data : {fac_idx:fac_idx}, |
|||
success:function(res){ |
|||
count = res.total_count; |
|||
} |
|||
}); |
|||
|
|||
var msg = ( count > 0 ) ? '해당 FAQ 분류에 ' + count + '개의 FAQ 목록이 등록되어 있습니다.\nFAQ 분류을 삭제할시 등록된 FAQ 목록도 같이 삭제됩니다.\n\n계속 하시겠습니까?' : 'FAQ 분류을 삭제하시겠습니까?'; |
|||
if(! confirm(msg)) return false; |
|||
|
|||
$.ajax({ |
|||
url : '/ajax/faq/category', |
|||
type : 'delete', |
|||
async:false, |
|||
cache:false, |
|||
data:{fac_idx:fac_idx}, |
|||
success:function(res){ |
|||
alert('FAQ 분류가 삭제되었습니다.'); |
|||
location.href= base_url + "/admin/management/faq"; |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
|
2
public_html/assets/css/admin.min.css
File diff suppressed because it is too large
View File
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
File diff suppressed because it is too large
View File
Before Width: 19 | Height: 19 | Size: 1.1 KiB |
Before Width: 300 | Height: 300 | Size: 38 KiB |
2
public_html/assets/js/admin.min.js
File diff suppressed because it is too large
View File
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
File diff suppressed because it is too large
View File
@ -0,0 +1,22 @@ |
|||
<?php |
|||
defined('BASEPATH') OR exit('No direct script access allowed'); |
|||
require APPPATH . '/libraries/REST_Controller.php'; |
|||
|
|||
class Board extends REST_Controller |
|||
{ |
|||
/******************************************************************** |
|||
* 게시판 목록 가져오기 |
|||
*******************************************************************/ |
|||
function index_get() |
|||
{ |
|||
$return['lists'] = |
|||
$this->db |
|||
->select('SQL_CALC_FOUND_ROWS *', FALSE) |
|||
->order_by('reg_datetime DESC') |
|||
->get('board') |
|||
->result_array(); |
|||
$return['totalCount'] = (int)$this->db->query("SELECT FOUND_ROWS() AS cnt")->row(0)->cnt; |
|||
|
|||
$this->response($return, 200); |
|||
} |
|||
} |
@ -1,82 +0,0 @@ |
|||
<?php |
|||
defined('BASEPATH') OR exit('No direct script access allowed'); |
|||
require APPPATH . '/libraries/REST_Controller.php'; |
|||
/************************************************************** |
|||
* FAQ API |
|||
*************************************************************/ |
|||
class Faq extends REST_Controller { |
|||
|
|||
function __construct() |
|||
{ |
|||
parent::__construct(); |
|||
|
|||
if( !$this->input->is_ajax_request() ) $this->response(["result"=>FALSE,"message"=>langs('공통/msg/invalid_access')], 400); |
|||
} |
|||
|
|||
function info_delete() |
|||
{ |
|||
$this->load->model('faq_model'); |
|||
$faq_idx = $this->delete('faq_idx', TRUE); |
|||
if (empty($faq_idx)) $this->error_return("FAQ 고유키값이 없습니다.", 400); |
|||
|
|||
// 기존 FAQ 값을 불러온다.
|
|||
$faq = $this->faq_model->get_faq($faq_idx); |
|||
|
|||
$this->db->where('faq_idx', $faq_idx)->set('faq_status','N')->update('faq'); |
|||
$this->faq_model->update_category_count($faq['fac_idx']); |
|||
} |
|||
|
|||
function sort_post() |
|||
{ |
|||
$sort_idx = $this->input->post("sort_idx", TRUE); |
|||
for($i=1; $i<=count($sort_idx); $i++) |
|||
{ |
|||
$this->db->where("faq_idx", $sort_idx[$i-1]); |
|||
$this->db->set("faq_sort", $i); |
|||
$this->db->update("faq"); |
|||
} |
|||
} |
|||
|
|||
function category_get() |
|||
{ |
|||
$this->load->model('faq_model'); |
|||
|
|||
$fac_idx = trim($this->get('fac_idx', TRUE)); |
|||
if (empty($fac_idx)) $this->error_return("FAQ 그룹 고유키값이 없습니다.", 400); |
|||
|
|||
$result = $this->faq_model->get_category($fac_idx); |
|||
|
|||
$this->response($result, 200); |
|||
} |
|||
|
|||
function category_sort_post() |
|||
{ |
|||
$sort_idx = $this->input->post("sort_idx", TRUE); |
|||
for($i=1; $i<=count($sort_idx); $i++) |
|||
{ |
|||
$this->db->where("fac_idx", $sort_idx[$i-1]); |
|||
$this->db->set("fac_sort", $i); |
|||
$this->db->update("faq_category"); |
|||
} |
|||
} |
|||
|
|||
function category_delete() |
|||
{ |
|||
$fac_idx = $this->delete('fac_idx', TRUE); |
|||
if (empty($fac_idx)) $this->error_return("FAQ 그룹 고유키값이 없습니다.", 400); |
|||
|
|||
$this->db->where('fac_idx', $fac_idx)->set('fac_status','N')->set('fac_sort','0')->update('faq_category'); |
|||
$this->db->where('fac_idx', $fac_idx)->set('faq_status','N')->set('faq_sort','0')->update('faq'); |
|||
} |
|||
|
|||
function lists_get() |
|||
{ |
|||
$this->load->model('faq_model'); |
|||
|
|||
$fac_idx = trim($this->get('fac_idx', TRUE)); |
|||
if (empty($fac_idx)) $this->error_return("FAQ 그룹 고유키값이 없습니다.", 400); |
|||
|
|||
$faq_list = $this->faq_model->get_detail_list($fac_idx); |
|||
$this->response($faq_list, 200); |
|||
} |
|||
} |
@ -0,0 +1,46 @@ |
|||
<?php |
|||
/********************************************************************************************************* |
|||
* Class Boardlib |
|||
* ====================================================================================================== |
|||
* |
|||
* 게시판용 라이브러리 |
|||
*********************************************************************************************************/ |
|||
class Boardlib { |
|||
|
|||
protected $CI; |
|||
|
|||
function __construct() |
|||
{ |
|||
$this->CI =& get_instance(); |
|||
} |
|||
|
|||
function initialize($brd_key = "") |
|||
{ |
|||
if(empty($brd_key)) return; |
|||
} |
|||
|
|||
/****************************************************************************************************** |
|||
* 새글이 올라온 게시글 목록을 보여줍니다. |
|||
*****************************************************************************************************/ |
|||
function getNewPostBoards () |
|||
{ |
|||
$cnt_query = |
|||
$this->CI->db |
|||
->select('brd_key, COUNT(brd_key) AS new_cnt') |
|||
->from('board_post') |
|||
->where('reg_datetime >=', date('Y-m-d H:i:s', strtotime('-1 days'))) |
|||
->where('post_status','Y') |
|||
->group_by('brd_key') |
|||
->get_compiled_select(); |
|||
|
|||
$board_list = |
|||
$this->CI->db |
|||
->select('B.*, IF(ISNULL(BC.new_cnt), 0, new_cnt) AS new_cnt') |
|||
->from('board AS B') |
|||
->join("($cnt_query) AS BC", 'BC.brd_key=B.brd_key','left') |
|||
->get() |
|||
->result_array(); |
|||
|
|||
return $board_list; |
|||
} |
|||
} |
@ -1,78 +1,24 @@ |
|||
<!DOCTYPE html> |
|||
<?php |
|||
defined('BASEPATH') OR exit('No direct script access allowed'); |
|||
?><!DOCTYPE html>
|
|||
<html lang="ko"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>404 Page Not Found</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"> |
|||
<style type="text/css"> |
|||
|
|||
::selection { background-color: #E13300; color: white; }
|
|||
::-moz-selection { background-color: #E13300; color: white; }
|
|||
|
|||
body { |
|||
background-color: #fff;
|
|||
margin: 60px 40px; |
|||
font: 13px/20px normal Helvetica, Arial, sans-serif; |
|||
color: #4F5155;
|
|||
} |
|||
.error_contents {display:table; margin:0 auto; border:1px solid #eee;}
|
|||
.error_contents .img-responsive {display: table-cell; vertical-align: middle;} |
|||
.error_contents .text-box{display: table-cell; vertical-align: middle; } |
|||
.error_contents h2 {font-size:50px; line-height:1.35; padding-right:40px;} |
|||
.error_contents h2 > strong {color:#d6040d;}
|
|||
.img-responsive {max-width:100%;} |
|||
a.button{ |
|||
background-color: #f7f7f7;
|
|||
color: #747474;
|
|||
display: inline-block; |
|||
margin-bottom: 15px; |
|||
cursor: pointer; |
|||
border: 0; |
|||
-webkit-border-radius: 5px; |
|||
border-radius: 5px; |
|||
position: relative; |
|||
overflow: hidden; |
|||
-webkit-box-shadow: inset 0 0 0 1px rgba(0,0,0,.03); |
|||
box-shadow: inset 0 0 0 1px rgba(0,0,0,.03); |
|||
background-image: url('/assets/images/common/box_shadow_button.png'); |
|||
background-repeat: repeat-x; |
|||
} |
|||
a.button .button_icon { |
|||
display: block; |
|||
float: left; |
|||
background: rgba(0,0,0,.05); |
|||
padding:11px 11px; |
|||
} |
|||
a.button .button_label { |
|||
display: block; |
|||
float: left; |
|||
position: relative; |
|||
z-index: 2; |
|||
padding:11px 20px; |
|||
} |
|||
@media (max-width: 800px) { |
|||
.error_contents .img-responsive {display: table; vertical-align: middle;} |
|||
.error_contents .text-box{display: table; vertical-align: middle; margin:0 auto; } |
|||
.error_contents h2 {font-size:24px; line-height:1.35; padding-right:0px; text-align:center; text-align: center;} |
|||
|
|||
} |
|||
html, body { background-color: #fff; margin:0; font-family: Nunito, sans-serif; color: #636b6f; height:100vh; }
|
|||
.error-wrap {height: 100vh;display:-ms-flex;display:-webkit-flex; display:flex;justify-content:center;align-items: center;position:relative;} |
|||
.error-wrap .code {border-right:2px solid; font-size:26px; padding:0 15px; text-align:center;} |
|||
.error-wrap .message {padding:10px; font-size:18px; text-align: center} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<article class="container" id="container"> |
|||
<div class="error_contents"> |
|||
<img src="/assets/images/common/error_img.png" alt="" class="img-responsive"> |
|||
<div class="text-box"> |
|||
<h2><strong>404</strong><br>Page Not Found</h2> |
|||
<a class="button button_left button_size_2 button_js kill_the_icon" href="https://www.wheeparam.com/"> |
|||
<span class="button_icon"><img src="/assets/images/common/error_arr.png" alt="" class="img-responsive"></span> |
|||
<span class="button_label">HOME</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
</article> |
|||
<div class="error-wrap"> |
|||
<div class="code">404</div> |
|||
<div class="message">Not Found</div> |
|||
</div> |
|||
</body> |
|||
</html> |
@ -1,64 +1,26 @@ |
|||
<?php |
|||
defined('BASEPATH') OR exit('No direct script access allowed'); |
|||
?><?php
|
|||
defined('BASEPATH') OR exit('No direct script access allowed'); |
|||
?><!DOCTYPE html>
|
|||
<html lang="en"> |
|||
<html lang="ko"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>Database Error</title> |
|||
<style type="text/css"> |
|||
|
|||
::selection { background-color: #E13300; color: white; }
|
|||
::-moz-selection { background-color: #E13300; color: white; }
|
|||
|
|||
body { |
|||
background-color: #fff;
|
|||
margin: 40px; |
|||
font: 13px/20px normal Helvetica, Arial, sans-serif; |
|||
color: #4F5155;
|
|||
} |
|||
|
|||
a { |
|||
color: #003399;
|
|||
background-color: transparent; |
|||
font-weight: normal; |
|||
} |
|||
|
|||
h1 { |
|||
color: #444;
|
|||
background-color: transparent; |
|||
border-bottom: 1px solid #D0D0D0;
|
|||
font-size: 19px; |
|||
font-weight: normal; |
|||
margin: 0 0 14px 0; |
|||
padding: 14px 15px 10px 15px; |
|||
} |
|||
|
|||
code { |
|||
font-family: Consolas, Monaco, Courier New, Courier, monospace; |
|||
font-size: 12px; |
|||
background-color: #f9f9f9;
|
|||
border: 1px solid #D0D0D0;
|
|||
color: #002166;
|
|||
display: block; |
|||
margin: 14px 0 14px 0; |
|||
padding: 12px 10px 12px 10px; |
|||
} |
|||
|
|||
#container {
|
|||
margin: 10px; |
|||
border: 1px solid #D0D0D0;
|
|||
box-shadow: 0 0 8px #D0D0D0;
|
|||
} |
|||
|
|||
p { |
|||
margin: 12px 15px 12px 15px; |
|||
} |
|||
</style> |
|||
<meta charset="utf-8"> |
|||
<title>404 Page Not Found</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"> |
|||
<style type="text/css"> |
|||
html, body { background-color: #fff; margin:0; font-family: Nunito, sans-serif; color: #636b6f; height:100vh; }
|
|||
.error-wrap {height: 100vh;display:-ms-flex;display:-webkit-flex; display:flex;justify-content:center;align-items: center;position:relative; flex-direction: column} |
|||
.error-wrap .code {font-size:26px; padding:0 15px; text-align:center;} |
|||
.error-wrap .message {padding:10px; font-size:14px; text-align: left} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div id="container"> |
|||
<h1><?php echo $heading; ?></h1>
|
|||
<?php echo $message; ?>
|
|||
</div> |
|||
<div class="error-wrap"> |
|||
<div class="code"><?php echo $heading; ?></div>
|
|||
<div class="message"><?php echo $message; ?></div>
|
|||
</div> |
|||
</body> |
|||
</html> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue