장선근
5 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
-
217wheeparam/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
-
34wheeparam/views/themes/admin/management/menu.php
-
129wheeparam/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> |
@ -1,91 +1,152 @@ |
|||
<div class="page-header"> |
|||
<div class="page-header" data-fit-aside> |
|||
<h1 class="page-title">게시판 관리</h1> |
|||
</div> |
|||
|
|||
<div class="grid"> |
|||
<table> |
|||
<thead> |
|||
<tr> |
|||
<th>번호</th> |
|||
<th>고유키</th> |
|||
<th>게시판 이름</th> |
|||
<th>목록 스킨</th> |
|||
<th>페이지당 글</th> |
|||
<th>등록된 글</th> |
|||
<th>카테고리</th> |
|||
<th>답글</th> |
|||
<th>댓글</th> |
|||
<th>목록</th> |
|||
<th>첨부파일</th> |
|||
<th>내용</th> |
|||
<th>쓰기</th> |
|||
<th>관리</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<?php foreach($board_list['list'] as $brd) :?>
|
|||
<tr> |
|||
<td class="text-center"><?=$brd['nums']?></td>
|
|||
<td class="text-center"><?=$brd['brd_key']?></td>
|
|||
<td class="text-center"><?=$brd['brd_title']?><a class="btn btn-default btn-xs ML10" data-toggle="tooltip" title="게시판 바로가기" target="_blank" href="<?=base_url('board/'.$brd['brd_key'])?>"><i class="fal fa-external-link-square"></i></a></td>
|
|||
<td class="text-center"><?=$brd['brd_skin_l']?></td>
|
|||
<td class="text-center"><?=$brd['brd_page_limit']=='Y'?$brd['brd_page_rows']:'미사용'?></td>
|
|||
<td class="text-center"><?=number_format($brd['brd_count_post'])?></td>
|
|||
<td class="text-center"><?=$brd['brd_use_category']=='Y'?'사용':'미사용'?></td>
|
|||
<td class="text-center"><?=$brd['brd_use_reply']=='Y'?'사용':'미사용'?></td>
|
|||
<td class="text-center"><?=$brd['brd_use_comment']=='Y'?'사용':'미사용'?></td>
|
|||
<td class="text-center"><?=$brd['brd_use_attach']=='Y'?'사용':'미사용'?></td>
|
|||
<td class="text-center"><?=$brd['brd_lv_list']?></td>
|
|||
<td class="text-center"><?=$brd['brd_lv_read']?></td>
|
|||
<td class="text-center"><?=$brd['brd_lv_write']?></td>
|
|||
<td class="text-center"> |
|||
<?php if($brd['brd_use_category']=='Y') :?>
|
|||
<a class="btn btn-default btn-xs" href="<?=base_url('admin/board/category/'.$brd['brd_key'])?>" data-toggle="tooltip" title="카테고리 관리"><i class="far fa-sitemap"></i></a> |
|||
<?php endif;?>
|
|||
<button class="btn btn-default btn-xs" data-button="copy-board" data-key="<?=$brd['brd_key']?>" data-toggle="tooltip" title="게시판 복사"><i class="far fa-copy"></i></button> |
|||
<a class="btn btn-default btn-xs" href="<?=base_url('admin/board/form/'.$brd['brd_key'])?>" data-toggle="tooltip" title="정보 수정"><i class="far fa-pencil"></i></a> |
|||
<a class="btn btn-danger btn-xs" href="<?=base_url('admin/board/remove/'.$brd['brd_key'])?>" onclick="return confirm('해당 게시판을 삭제하시겠습니까?');" data-toggle="tooltip" title="게시판 삭제"><i class="far fa-trash"></i></a> |
|||
</td> |
|||
</tr> |
|||
<?php endforeach;?>
|
|||
|
|||
<?php if(count($board_list['list']) == 0) :?>
|
|||
<tr> |
|||
<td colspan="14" class="empty">등록된 게시판이 없습니다.</td> |
|||
</tr> |
|||
<?php endif;?>
|
|||
</tbody> |
|||
</table> |
|||
<div class="ax-button-group" data-fit-aside> |
|||
<button type="button" class="btn btn-primary" onclick="grid.form();"><i class="fal fa-plus"></i> 게시판 신규등록</button> |
|||
</div> |
|||
|
|||
<div class="ax-button-group ax-button-group-bottom"> |
|||
<div class="right"> |
|||
<a href="<?=base_url('admin/board/form')?>" class="btn btn-default"><i class="far fa-plus-circle"></i> 게시판 추가하기</a> |
|||
</div> |
|||
<div class="grid-wrapper" data-fit-content> |
|||
<div id="grid-container" class="grid-container"></div> |
|||
</div> |
|||
|
|||
<script> |
|||
$(document).ready(function(){ |
|||
$('[data-toggle="tooltip"]').tooltip(); |
|||
var grid = new GRID('#grid-container', { |
|||
columns: [ |
|||
{caption:'고유KEY', dataField:'brd_key', width:80, alignment:'left'}, |
|||
{caption:'게시판이름', dataField:'brd_title', minWidth:100, alignment:'left'}, |
|||
{ |
|||
caption:'스킨', |
|||
columns: [ |
|||
{caption:'목록', dataField:'brd_skin_l', width:80, alignment:'left'}, |
|||
{caption:'목록(M)', dataField:'brd_skin_l_m', width:80, alignment:'left'}, |
|||
{caption:'글쓰기', dataField:'brd_skin_w', width:80, alignment:'left'}, |
|||
{caption:'글쓰기(M)', dataField:'brd_skin_w_m', width:80, alignment:'left'}, |
|||
{caption:'글보기', dataField:'brd_skin_v', width:80, alignment:'left'}, |
|||
{caption:'글보기(M)', dataField:'brd_skin_v_m', width:80, alignment:'left'}, |
|||
{caption:'댓글', dataField:'brd_skin_c', width:80, alignment:'left'}, |
|||
{caption:'댓글 (M)', dataField:'brd_skin_c_m', width:80, alignment:'left'}, |
|||
] |
|||
}, |
|||
{caption:'목록개수', dataField:'brd_page_rows', width:60, alignment:'right', dataType:'number', format:'fixedPoint'}, |
|||
{caption:'현재글수', dataField:'brd_count_post', width:60, alignment:'right', dataType:'number', format:'fixedPoint'}, |
|||
{ |
|||
caption:'기능사용', |
|||
columns: [ |
|||
{caption:'카테고리', dataField:'brd_use_category', alignment:'center', width:60, customizeText:function(cell){return cell.value == 'Y'?'사용':''}}, |
|||
{caption:'답글기능', dataField:'brd_use_reply', alignment:'center', width:60, customizeText:function(cell){return cell.value == 'Y'?'사용':''}}, |
|||
{caption:'댓글기능', dataField:'brd_use_comment', alignment:'center', width:60, customizeText:function(cell){return cell.value == 'Y'?'사용':''}}, |
|||
{caption:'익명', dataField:'brd_use_category', alignment:'center', width:60, customizeText:function(cell){return cell.value == 'Y'?'사용':(cell.value == 'A'?'강제사용':'')}}, |
|||
{caption:'비밀글', dataField:'brd_use_category', alignment:'center', width:60, customizeText:function(cell){return cell.value == 'Y'?'사용':(cell.value == 'A'?'강제사용':'')}}, |
|||
{caption:'첨부파일', dataField:'brd_use_attach', alignment:'center', width:60, customizeText:function(cell){return cell.value == 'Y'?'사용':''}}, |
|||
{caption:'이름가리기', dataField:'brd_blind_nickname', alignment:'center', width:75, customizeText:function(cell){return cell.value == 'Y'?'사용':''}}, |
|||
] |
|||
}, |
|||
{ |
|||
caption:'권한레벨', |
|||
columns: [ |
|||
{caption:'목록', dataField:'brd_lv_list', width:60, alignment:'right', dataType:'number', format:'fixedPoint'}, |
|||
{caption:'글쓰기', dataField:'brd_lv_write', width:60, alignment:'right', dataType:'number', format:'fixedPoint'}, |
|||
{caption:'글보기', dataField:'brd_lv_read', width:60, alignment:'right', dataType:'number', format:'fixedPoint'}, |
|||
{caption:'답글', dataField:'brd_lv_reply', width:60, alignment:'right', dataType:'number', format:'fixedPoint'}, |
|||
{caption:'댓글', dataField:'brd_lv_comment', width:60, alignment:'right', dataType:'number', format:'fixedPoint'}, |
|||
{caption:'다운로드', dataField:'brd_lv_download', width:60, alignment:'right', dataType:'number', format:'fixedPoint'}, |
|||
] |
|||
}, |
|||
], |
|||
dataSource: new DevExpress.data.DataSource({ |
|||
key : 'brd_key', |
|||
load: function(loadOptions) { |
|||
var d = $.Deferred(); |
|||
var params = grid.getSearchParam(loadOptions); |
|||
|
|||
$.ajax({ |
|||
url : base_url + '/admin/ajax/board', |
|||
type: 'GET', |
|||
async: false, |
|||
cache: false, |
|||
data: params |
|||
}).done(function(res) { |
|||
d.resolve(res.lists, { |
|||
totalCount : res.totalCount |
|||
}); |
|||
}); |
|||
|
|||
$('[data-button="copy-board"]').click(function(){ |
|||
var brd_key = $(this).data('key'); |
|||
APP.MODAL.callback = function() { |
|||
location.reload(); |
|||
}; |
|||
APP.MODAL.open({ |
|||
iframe : { |
|||
url : '/admin/board/board_copy/'+brd_key, |
|||
param : { |
|||
brd_key : brd_key |
|||
return d.promise(); |
|||
} |
|||
}), |
|||
onRowDblClick: function(e) { |
|||
grid.form(e.data.brd_key); |
|||
}, |
|||
onContextMenuPreparing: function(e) { |
|||
if (e.row.rowType === "data") { |
|||
e.items = [ |
|||
{ |
|||
icon: 'edit', |
|||
text: '정보 수정', |
|||
onItemClick: function () { |
|||
grid.form(e.row.data.brd_key); |
|||
} |
|||
}, |
|||
{ |
|||
icon: 'edit', |
|||
text: '게시판복사', |
|||
onItemClick: function () { |
|||
grid.copy_board(e.row.data.brd_key); |
|||
} |
|||
}, |
|||
{ |
|||
icon : 'trash', |
|||
text: "삭제", |
|||
onItemClick: function () { |
|||
grid.delete(e.row.data); |
|||
} |
|||
} |
|||
}, |
|||
header : { |
|||
title : '게시판 복사하기' |
|||
}, |
|||
width:400, |
|||
height:300 |
|||
}); |
|||
] |
|||
} |
|||
}, |
|||
}); |
|||
|
|||
grid.form = function(brd_key) { |
|||
brd_key = typeof brd_key != 'undefined' && brd_key ? brd_key : ''; |
|||
|
|||
APP.MODAL.callback = function() { |
|||
APP.MODAL.close(); |
|||
grid.refresh(); |
|||
} |
|||
APP.MODAL.open({ |
|||
iframe: { |
|||
url :base_url + '/admin/board/form/' + brd_key |
|||
}, |
|||
width: 940, |
|||
height: 600, |
|||
header: { |
|||
title: '게시판 정보 입력' |
|||
} |
|||
}) |
|||
}; |
|||
|
|||
grid.copy_board = function(brd_key) { |
|||
APP.MODAL.callback = function() { |
|||
APP.MODAL.close(); |
|||
grid.refresh(); |
|||
}; |
|||
APP.MODAL.open({ |
|||
iframe : { |
|||
url : base_url + '/admin/board/board_copy/'+brd_key, |
|||
param : { |
|||
brd_key : brd_key |
|||
} |
|||
}, |
|||
header : { |
|||
title : '게시판 복사하기' |
|||
}, |
|||
width:400, |
|||
height:300 |
|||
}); |
|||
}; |
|||
|
|||
$(function() { |
|||
grid.init(); |
|||
}); |
|||
</script> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue