update admin page and codes

This commit is contained in:
Amberstone 2024-09-19 21:06:35 +09:00
parent 837d9bb990
commit 95f8ded246
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
29 changed files with 418 additions and 805 deletions

View file

@ -2,7 +2,7 @@
if (!defined('_GNUBOARD_')) if (!defined('_GNUBOARD_'))
exit; exit;
$begin_time = get_microtime(); $begin_time = get_microtime();
include_once(G5_PATH . '/head.sub.php'); include_once G5_PATH . '/head.sub.php';
function print_menu1($key, $no) function print_menu1($key, $no)
{ {
@ -89,7 +89,7 @@ function print_menu2($key, $no)
<ul> <ul>
<li style="border-bottom:1px solid #444;"> <li style="border-bottom:1px solid #444;">
<a href="<?= G5_URL ?>" target="_blank"> <a href="<?= G5_URL ?>" target="_blank">
커뮤니티 홈페이지 보기
</a> </a>
</li> </li>
</ul> </ul>

View file

@ -463,6 +463,7 @@ while ($entry = $tmp->read()) {
$amenu[$m[1]] = $entry; $amenu[$m[1]] = $entry;
include_once(G5_ADMIN_PATH . '/' . $entry); include_once(G5_ADMIN_PATH . '/' . $entry);
} }
@ksort($amenu); @ksort($amenu);
$arr_query = array(); $arr_query = array();
@ -477,6 +478,3 @@ if (isset($stx))
if (isset($page)) if (isset($page))
$arr_query[] = 'page=' . $page; $arr_query[] = 'page=' . $page;
$qstr = implode("&amp;", $arr_query); $qstr = implode("&amp;", $arr_query);
// 관리자에서는 추가 스크립트는 사용하지 않는다.
//$config['cf_add_script'] = '';

View file

@ -1,7 +1,7 @@
<?php <?php
$menu['menu200'] = array( $menu['menu200'] = [
array('200000', '회원관리', G5_ADMIN_URL . '/member_list.php', ''), ['200000', '회원관리', G5_ADMIN_URL . '/member_list.php', ''],
array('200100', '회원관리', G5_ADMIN_URL . '/member_list.php', ''), ['200100', '회원관리', G5_ADMIN_URL . '/member_list.php', ''],
array('200800', '접속자집계', G5_ADMIN_URL . '/visit_list.php', ''), ['200800', '접속자집계', G5_ADMIN_URL . '/visit_list.php', ''],
array('200820', '접속자로그삭제', G5_ADMIN_URL . '/visit_delete.php', '') ['200820', '접속자로그삭제', G5_ADMIN_URL . '/visit_delete.php', ''],
); ];

View file

@ -1,7 +1,7 @@
<?php <?php
$menu['menu300'] = array( $menu['menu300'] = [
array('300000', '게시판관리', '' . G5_ADMIN_URL . '/board_list.php', 'board'), ['300000', '게시판관리', '' . G5_ADMIN_URL . '/board_list.php', 'board'],
array('300100', '게시판관리', '' . G5_ADMIN_URL . '/board_list.php', 'bbs_board'), ['300100', '게시판관리', '' . G5_ADMIN_URL . '/board_list.php', 'bbs_board'],
array('300200', '게시판그룹관리', '' . G5_ADMIN_URL . '/boardgroup_list.php', 'bbs_group'), ['300200', '게시판그룹관리', '' . G5_ADMIN_URL . '/boardgroup_list.php', 'bbs_group'],
array('300600', '내용관리', G5_ADMIN_URL . '/contentlist.php', 'scf_contents', 1), ['300600', '내용관리', G5_ADMIN_URL . '/contentlist.php', 'scf_contents', 1],
); ];

View file

@ -1,7 +1,7 @@
<?php <?php
$menu['menu900'] = array( $menu['menu900'] = [
array('900000', '기타관리', G5_ADMIN_URL . '/session_file_delete.php', ''), ['900000', '기타관리', G5_ADMIN_URL . '/session_file_delete.php', ''],
array('900100', '홈페이지 상세관리', G5_ADMIN_URL . '/config_form.php', 'cf_thumbnail', 1), ['900100', '홈페이지 상세관리', G5_ADMIN_URL . '/config_form.php', 'cf_thumbnail', 1],
array('900200', '세션파일 일괄삭제', G5_ADMIN_URL . '/session_file_delete.php', 'cf_session', 1), ['900200', '세션파일 일괄삭제', G5_ADMIN_URL . '/session_file_delete.php', 'cf_session', 1],
array('900300', '캐시파일 일괄삭제', G5_ADMIN_URL . '/cache_file_delete.php', 'cf_cache', 1) ['900300', '캐시파일 일괄삭제', G5_ADMIN_URL . '/cache_file_delete.php', 'cf_cache', ],
); ];

View file

@ -2,15 +2,9 @@
if (!defined('_GNUBOARD_')) if (!defined('_GNUBOARD_'))
exit; exit;
?> ?>
</section> </section>
</div> </div>
<!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> --> <!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> -->
<script src="<?php echo G5_ADMIN_URL ?>/js/admin.js?ver=<?php echo G5_JS_VER; ?>"></script> <script src="<?php echo G5_ADMIN_URL ?>/js/admin.js?ver=<?php echo G5_JS_VER; ?>"></script>
<script src="<?php echo G5_ADMIN_URL ?>/js/admin.ajax.js?ver=<?php echo G5_JS_VER; ?>"></script> <script src="<?php echo G5_ADMIN_URL ?>/js/admin.ajax.js?ver=<?php echo G5_JS_VER; ?>"></script>
<script> <script>
@ -52,9 +46,6 @@ if (!defined('_GNUBOARD_'))
$('#gnb .check').addClass('on').parents('li').addClass('on').find('.gnb_2dul').show(); $('#gnb .check').addClass('on').parents('li').addClass('on').find('.gnb_2dul').show();
}); });
</script><?php
</script>
<?php
include_once(G5_PATH . '/tail.sub.php'); include_once(G5_PATH . '/tail.sub.php');
?>

View file

@ -141,8 +141,9 @@ $pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">기본 설정</a></li> <li><a href="#anc_001">기본 설정</a></li>
<li><a href="#anc_002">권한 설정</a></li> <li><a href="#anc_002">권한 설정</a></li>
<li><a href="#anc_003">기능 설정</a></li> <li><a href="#anc_003">기능 설정</a></li>
<li><a href="#anc_006">확장 기능 설정</a></li>
<li><a href="#anc_004">디자인/양식</a></li> <li><a href="#anc_004">디자인/양식</a></li>
<li><a href="#anc_006">여분필드</a></li> <li><a href="#anc_007">여분필드</a></li>
</ul>'; </ul>';
?> ?>
@ -189,7 +190,7 @@ $pg_anchor = '<ul class="anchor">
<table> <table>
<caption>게시판 기본 설정</caption> <caption>게시판 기본 설정</caption>
<colgroup> <colgroup>
<col style="width: 150px;"> <col style="width: 160px;">
<col> <col>
<col style="width: 180px;"> <col style="width: 180px;">
</colgroup> </colgroup>
@ -273,7 +274,7 @@ $pg_anchor = '<ul class="anchor">
<table> <table>
<caption>게시판 권한 설정</caption> <caption>게시판 권한 설정</caption>
<colgroup> <colgroup>
<col style="width: 150px;"> <col style="width: 160px;">
<col> <col>
<col style="width: 180px;"> <col style="width: 180px;">
</colgroup> </colgroup>
@ -351,7 +352,7 @@ $pg_anchor = '<ul class="anchor">
<table> <table>
<caption>게시판 기능 설정</caption> <caption>게시판 기능 설정</caption>
<colgroup> <colgroup>
<col style="width: 150px;"> <col style="width: 160px;">
<col> <col>
<col style="width: 180px;"> <col style="width: 180px;">
</colgroup> </colgroup>
@ -438,15 +439,21 @@ $pg_anchor = '<ul class="anchor">
</div> </div>
</section> </section>
<?php
$skin_path = G5_PATH . "/" . G5_SKIN_DIR . "/board/" . $board['bo_skin'] . "/extra.config.php";
if (file_exists($skin_path)) {
include_once $skin_path;
}
?>
<section id="anc_004"> <section id="anc_004">
<h2 class="h2_frm">게시판 디자인/양식</h2> <h2 class="h2_frm">게시판 디자인/양식</h2>
<?php echo $pg_anchor ?> <?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap"> <div class="tbl_frm01 tbl_wrap">
<table> <table>
<caption>게시판 디자인/양식</caption> <caption>게시판 디자인/양식</caption>
<colgroup> <colgroup>
<col style="width: 150px;"> <col style="width: 160px;">
<col> <col>
<col style="width: 180px;"> <col style="width: 180px;">
</colgroup> </colgroup>
@ -595,12 +602,13 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="chk_all_sort_field" value="1" id="chk_all_sort_field"> <input type="checkbox" name="chk_all_sort_field" value="1" id="chk_all_sort_field">
<label for="chk_all_sort_field">전체적용</label> <label for="chk_all_sort_field">전체적용</label>
</td> </td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</section> </section>
<section id="anc_006"> <section id="anc_007">
<h2 class="h2_frm">게시판 여분필드 설정</h2> <h2 class="h2_frm">게시판 여분필드 설정</h2>
<?php echo $pg_anchor ?> <?php echo $pg_anchor ?>
@ -608,7 +616,7 @@ $pg_anchor = '<ul class="anchor">
<table> <table>
<caption>게시판 여분필드 설정</caption> <caption>게시판 여분필드 설정</caption>
<colgroup> <colgroup>
<col style="width: 150px;"> <col style="width: 160px;">
<col> <col>
<col style="width: 180px;"> <col style="width: 180px;">
</colgroup> </colgroup>

View file

@ -1,6 +1,6 @@
<?php <?php
/** /**
* @suppress php0410 * @suppress PHP0410
*/ */
$sub_menu = "300100"; $sub_menu = "300100";
include_once('./_common.php'); include_once('./_common.php');
@ -132,7 +132,7 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_gallery_width = '{$_POST['bo_gallery_width']}', bo_gallery_width = '{$_POST['bo_gallery_width']}',
bo_gallery_height = '{$_POST['bo_gallery_height']}', bo_gallery_height = '{$_POST['bo_gallery_height']}',
bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}', bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}',
bo_mobile_gallery_height= '{$_POST['bo_mobile_gallery_height']}', bo_mobile_gallery_height = '{$_POST['bo_mobile_gallery_height']}',
bo_upload_count = '{$_POST['bo_upload_count']}', bo_upload_count = '{$_POST['bo_upload_count']}',
bo_upload_size = '{$_POST['bo_upload_size']}', bo_upload_size = '{$_POST['bo_upload_size']}',
bo_reply_order = '{$_POST['bo_reply_order']}', bo_reply_order = '{$_POST['bo_reply_order']}',
@ -192,6 +192,10 @@ if ($w == '') {
sql_query($sql, FALSE); sql_query($sql, FALSE);
} else if ($w == 'u') { } else if ($w == 'u') {
$skin_path = G5_PATH . "/" . G5_SKIN_DIR . "/board/" . $board['bo_skin'] . "/extra.config_update.php";
if (file_exists($skin_path)) {
include_once $skin_path;
}
// 게시판의 글 수 // 게시판의 글 수
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 "; $sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";

View file

@ -1,6 +1,6 @@
<?php <?php
$sub_menu = "300100"; $sub_menu = "300100";
include_once('./_common.php'); include_once './_common.php';
check_demo(); check_demo();

View file

@ -1,14 +1,12 @@
@charset "utf-8"; @charset "utf-8";
@import url(./jquery.minicolors.css); @import url(./jquery.minicolors.css);
@import url(//fonts.googleapis.com/earlyaccess/notosanskr.css); @import url(//fonts.googleapis.com/earlyaccess/notosanskr.css);
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");
@font-face { @font-face {
font-family: 'icon'; font-family: 'icon';
src: url('../../css/fonts/icomoon.eot?y5isk6'); src: url("../../css/fonts/bootstrap-icons.woff2") format("woff2"),
src: url('../../css/fonts/icomoon.eot?y5isk6#iefix') format('embedded-opentype'), url("../../css/fonts/bootstrap-icons.woff") format("woff");
url('../../css/fonts/icomoon.ttf?y5isk6') format('truetype'),
url('../../css/fonts/icomoon.woff?y5isk6') format('woff'),
url('../../css/fonts/icomoon.svg?y5isk6#icomoon') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@ -236,12 +234,17 @@ label+input {
font-weight: 300; font-weight: 300;
margin-bottom: 10px; margin-bottom: 10px;
line-height: 30px; line-height: 30px;
display: flex;
gap: 8px;
} }
#container h2:before { #container h2:before {
content: "\e90b"; content: "\F675";
font-family: 'icon'; font-family: 'icon';
padding-right: 5px; padding-right: 5px;
font-size: 20px;
height: 20px;
width: 20px;
color: #4b4b47; color: #4b4b47;
} }
@ -792,8 +795,20 @@ table {
} }
#theme_list li .tmli_if { #theme_list li .tmli_if {
border: 1px solid #d1dee2; border: 1px solid #b9cec5;
width: 302px; width: 300px;
box-sizing: border-box;
min-height: 240px;
display: flex;
flex-direction: column;
}
#theme_list li .tmli_if::before {
content: "";
height: 220px;
background-image: var(--bg);
background-size: cover;
background-position: center;
} }
#theme_list li .tmli_if>img { #theme_list li .tmli_if>img {
@ -811,8 +826,8 @@ table {
#theme_list li .tmli_tit { #theme_list li .tmli_tit {
position: relative; position: relative;
border-top: 1px solid #d1dee2; border-top: 1px solid #b9cec5;
background: #e5ecef; background: #e0fff2;
} }
#theme_list li .tmli_tit p { #theme_list li .tmli_tit p {
@ -880,7 +895,6 @@ table {
height: 26px; height: 26px;
border: 1px solid #ccc; border: 1px solid #ccc;
background: #fafafa; background: #fafafa;
margin-right: 3px
} }
#theme_detail { #theme_detail {
@ -996,3 +1010,8 @@ table {
padding: 0 6px; padding: 0 6px;
border-radius: 5px border-radius: 5px
} }
#theme_detail h2:before {
content: "\F45D";
font-size: 16px;
}

View file

@ -108,10 +108,10 @@ body {
} }
#admin_prof .logout:before { #admin_prof .logout:before {
content: "\e984"; content: "\F1C3";
font-family: 'icon'; font-family: 'icon';
color: #fff; color: #fff;
font-size: 12px; font-size: 16px;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
@ -173,20 +173,6 @@ body {
text-indent: 0; text-indent: 0;
} }
#page_top a:hover {
color: #fff;
background: #e7604a;
border-color: #a6240d;
}
#page_top a.ico-home:before {
content: "\e900";
}
#page_top a.ico-dev:before {
content: "\e995";
}
.btn_confirm { .btn_confirm {
display: block; display: block;
position: fixed; position: fixed;
@ -279,8 +265,17 @@ body {
padding-right: 7px; padding-right: 7px;
} }
#gnb .gnb_2dli.check {
background: #e7614820;
}
#gnb .gnb_2dli.check>a:before {
color: #e76148;
}
#gnb .gnb_2dli.check:after { #gnb .gnb_2dli.check:after {
content: "\ea10"; font-size: 16px;
content: "\F633";
font-family: 'icon'; font-family: 'icon';
display: block; display: block;
position: absolute; position: absolute;
@ -294,7 +289,6 @@ body {
color: #fff; color: #fff;
background: #484c58; background: #484c58;
text-decoration: none; text-decoration: none;
font-weight: 100;
} }
#gnb .gnb_2dul { #gnb .gnb_2dul {
@ -302,6 +296,11 @@ body {
background: #262931; background: #262931;
} }
#gnb .gnb_2dli>a {
display: flex;
align-items: center;
}
#gnb .gnb_2dli.check>a:after { #gnb .gnb_2dli.check>a:after {
content: ""; content: "";
display: block; display: block;
@ -309,62 +308,77 @@ body {
} }
#gnb .gnb_2dli>a:before { #gnb .gnb_2dli>a:before {
content: "\e994"; content: "\F3E3";
font-size: 16px !important;
width: 16px;
height: 16px;
} }
#gnb .gnb_2dli>a[data-text="메뉴 설정"]:before { #gnb .gnb_2dli>a[data-text="메뉴 설정"]:before {
content: "\EA72"; content: "\F488";
} }
#gnb .gnb_2dli>a[data-text="환경설정"]:before { #gnb .gnb_2dli>a[data-text="환경설정"]:before {
content: "\e994"; content: "\F3E3";
} }
#gnb .gnb_2dli>a[data-text="메인 편집"]:before { #gnb .gnb_2dli>a[data-text="메인 편집"]:before {
content: "\e956"; content: "\F6CF";
}
#gnb .gnb_2dli>a[data-text="테마 설정"]:before {
content: "\F4B1";
} }
#gnb .gnb_2dli>a[data-text="디자인 설정"]:before { #gnb .gnb_2dli>a[data-text="디자인 설정"]:before {
content: "\e90c"; content: "\F7BF";
} }
#gnb .gnb_2dli>a[data-text="DB관리"]:before { #gnb .gnb_2dli>a[data-text="DB관리"]:before {
content: "\e964"; content: "\F8C4";
} }
#gnb .gnb_2dli>a[data-text="회원관리"]:before { #gnb .gnb_2dli>a[data-text="회원관리"]:before {
content: "\e923"; content: "\F4D6";
} }
#gnb .gnb_2dli>a[data-text="접속자집계"]:before { #gnb .gnb_2dli>a[data-text="접속자집계"]:before {
content: "\e99c"; content: "\F17E";
} }
#gnb .gnb_2dli>a[data-text="접속자검색"]:before { #gnb .gnb_2dli>a[data-text="접속자검색"]:before {
content: "\e986"; content: "\F52A";
} }
#gnb .gnb_2dli>a[data-text="접속자로그삭제"]:before { #gnb .gnb_2dli>a[data-text="접속자로그삭제"]:before {
content: "\e988"; content: "\F5DE";
} }
#gnb .gnb_2dli>a[data-text="게시판관리"]:before { #gnb .gnb_2dli>a[data-text="게시판관리"]:before {
content: "\e9ba"; content: "\F463";
} }
#gnb .gnb_2dli>a[data-text="게시판그룹관리"]:before { #gnb .gnb_2dli>a[data-text="게시판그룹관리"]:before {
content: "\e9bc"; content: "\F2EE";
} }
#gnb .gnb_2dli>a[data-text="내용관리"]:before { #gnb .gnb_2dli>a[data-text="내용관리"]:before {
content: "\e908"; content: "\F4CB";
} }
#gnb .gnb_2dli>a[data-text="이모티콘관리"]:before { #gnb .gnb_2dli>a[data-text="이모티콘관리"]:before {
content: "\e9e1"; content: "\e9e1";
} }
#gnb .gnb_2dli>a[data-text="세션파일 일괄삭제"]:before {
content: "\F8C1";
}
#gnb .gnb_2dli>a[data-text="캐시파일 일괄삭제"]:before {
content: "\F8C1";
}
#container { #container {
padding: 25px; padding: 25px;

View file

@ -20,8 +20,15 @@ for ($i = 0; $row = sql_fetch_array($design_result); $i++) {
$de[$row['cs_name']] = $row; $de[$row['cs_name']] = $row;
} }
$theme_name = "";
if ($config['cf_theme'] && defined("G5_THEME_PATH") && file_exists(G5_THEME_PATH . "/config/design_form.php")) {
$theme_name = $config['cf_theme'] ? "<li><a href=\"#anc_009\">{$config['cf_theme']} 테마 설정</a></li>" : "";
}
$pg_anchor = '<ul class="anchor"> $pg_anchor = '<ul class="anchor">
<li><a href="#anc_007">커스텀 코드</a></li> <li><a href="#anc_007">커스텀 코드</a></li>
' . $theme_name . '
<li><a href="#anc_001">화면 디자인</a></li> <li><a href="#anc_001">화면 디자인</a></li>
<li><a href="#anc_008">메뉴 디자인</a></li> <li><a href="#anc_008">메뉴 디자인</a></li>
<li><a href="#anc_002">대문 디자인</a></li> <li><a href="#anc_002">대문 디자인</a></li>
@ -31,8 +38,6 @@ $pg_anchor = '<ul class="anchor">
<li><a href="#anc_005">기타 디자인</a></li> <li><a href="#anc_005">기타 디자인</a></li>
</ul>'; </ul>';
// 폰트 입력용 CSS 추가 // 폰트 입력용 CSS 추가
if (!isset($config['cf_add_fonts'])) { if (!isset($config['cf_add_fonts'])) {
sql_query(" ALTER TABLE `{$g5['config_table']}` sql_query(" ALTER TABLE `{$g5['config_table']}`
@ -155,8 +160,11 @@ $editor_list = array();
</table> </table>
</div> </div>
</section> </section>
<?php
if (defined("G5_THEME_PATH") && file_exists(G5_THEME_PATH . "/config/design_form.php")) {
include_once G5_THEME_PATH . "/config/design_form.php";
}
?>
<section id="anc_001"> <section id="anc_001">
<h2 class="h2_frm">화면 디자인 설정</h2> <h2 class="h2_frm">화면 디자인 설정</h2>
<?php echo $pg_anchor ?> <?php echo $pg_anchor ?>

View file

@ -90,6 +90,15 @@ if ($new == 'new' || !$code) {
list += " <input type=\"hidden\" name=\"me_level[]\" value=\"\" />"; list += " <input type=\"hidden\" name=\"me_level[]\" value=\"\" />";
list += " <input type=\"text\" name=\"me_name[]\" value=\"" + name + "\" id=\"me_name_" + ms + "\" required class=\"required frm_input full_input\" />"; list += " <input type=\"text\" name=\"me_name[]\" value=\"" + name + "\" id=\"me_name_" + ms + "\" required class=\"required frm_input full_input\" />";
list += "</td>"; list += "</td>";
list += "<td class=\"td_numsmall\">";
list += " ";
list += "</td>";
list += "<td class=\"td_numsmall\">";
list += " <input type=\"text\" name=\"me_parent[]\" value=\"\" class=\"frm_input\" size=\"5\">";
list += "</td>";
list += "<td class=\"td_numsmall\">";
list += " <input type=\"text\" name=\"me_depth[]\" value=\"0\" class=\"frm_input\" size=\"5\">";
list += "</td>";
list += "<td></td>"; list += "<td></td>";
list += "<td>"; list += "<td>";
list += " <input type=\"text\" name=\"me_icon[]\" class=\"frm_input full_input\" />"; list += " <input type=\"text\" name=\"me_icon[]\" class=\"frm_input full_input\" />";
@ -140,5 +149,5 @@ if ($new == 'new' || !$code) {
</script> </script>
<?php <?php
include_once(G5_PATH . '/tail.sub.php'); include_once G5_PATH . '/tail.sub.php';
?> ?>

View file

@ -1,5 +1,5 @@
<?php <?php
include_once('./_common.php'); include_once ('./_common.php');
if ($is_admin != 'super') if ($is_admin != 'super')
die('최고관리자만 접근 가능합니다.'); die('최고관리자만 접근 가능합니다.');

View file

@ -1,17 +1,30 @@
<?php <?php
$sub_menu = "100400"; $sub_menu = "100400";
include_once('./_common.php'); include_once ('./_common.php');
if ($is_admin != 'super') if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.'); alert('최고관리자만 접근 가능합니다.');
$menu_update = sql_query("SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '" . G5_MYSQL_DB . "' AND TABLE_NAME = '{$g5['menu_table']}'");
$columns = [];
while ($row = sql_fetch_array($menu_update)) {
$columns[] = $row["COLUMN_NAME"];
}
/* add menu depth */
if (!in_array("me_depth", $columns)) {
sql_query("ALTER TABLE {$g5['menu_table']} ADD COLUMN me_depth INT DEFAULT 0");
}
if (!in_array("me_parent", $columns)) {
sql_query("ALTER TABLE {$g5['menu_table']} ADD COLUMN me_parent VARCHAR(50) DEFAULT ''");
}
$sql = " select * from {$g5['menu_table']} order by me_order*1, me_id "; $sql = " select * from {$g5['menu_table']} order by me_order*1, me_id ";
$result = sql_query($sql); $result = sql_query($sql);
$g5['title'] = "메뉴설정"; $g5['title'] = "메뉴설정";
include_once('./admin.head.php'); include_once ('./admin.head.php');
$colspan = 8; $colspan = 9;
?> ?>
<div class="local_desc01 local_desc"> <div class="local_desc01 local_desc">
@ -21,7 +34,6 @@ $colspan = 8;
<p>아이콘 항목에 사용할 구글 아이콘 이름을 입력해주세요. ( ex. <span style="color:red">&lt;span <p>아이콘 항목에 사용할 구글 아이콘 이름을 입력해주세요. ( ex. <span style="color:red">&lt;span
class="material-icons"&gt;<strong>home</strong>&lt;/span&gt;</span> <strong>home</strong> 입력하기 )</p> class="material-icons"&gt;<strong>home</strong>&lt;/span&gt;</span> <strong>home</strong> 입력하기 )</p>
</div> </div>
<form name="fmenulist" id="fmenulist" method="post" action="./menu_list_update.php" <form name="fmenulist" id="fmenulist" method="post" action="./menu_list_update.php"
onsubmit="return fmenulist_submit(this);" enctype="multipart/form-data"> onsubmit="return fmenulist_submit(this);" enctype="multipart/form-data">
<input type="hidden" name="token" value=""> <input type="hidden" name="token" value="">
@ -41,6 +53,9 @@ $colspan = 8;
<caption><?php echo $g5['title']; ?> 목록</caption> <caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup> <colgroup>
<col style="width:140px;"> <col style="width:140px;">
<col style="width:80px;">
<col style="width:80px;">
<col style="width:80px;">
<col style="width:50px;"> <col style="width:50px;">
<col style="width:150px;"> <col style="width:150px;">
<col> <col>
@ -52,6 +67,9 @@ $colspan = 8;
<thead> <thead>
<tr> <tr>
<th scope="col">메뉴</th> <th scope="col">메뉴</th>
<th scope="col">ID</th>
<th scope="col">부모 ID</th>
<th scope="col">깊이</th>
<th scope="col" colspan="2">아이콘</th> <th scope="col" colspan="2">아이콘</th>
<th scope="col">링크</th> <th scope="col">링크</th>
<th scope="col">새창</th> <th scope="col">새창</th>
@ -84,6 +102,15 @@ $colspan = 8;
<input type="text" name="me_name[]" value="<?php echo $me_name; ?>" required <input type="text" name="me_name[]" value="<?php echo $me_name; ?>" required
class="required frm_input full_input" /> class="required frm_input full_input" />
</td> </td>
<td class="td_mng">
<?=$row['me_code']?>
</td>
<td class="td_mng">
<input type="text" name="me_parent[]" value="<?=$row['me_parent']?>" id="me_parent_<?=$i?>" class="frm_input full_input">
</td>
<td class="td_mng">
<input type="text" name="me_depth[]" value="<?=$row['me_depth']?>" id="me_depth_<?=$i?>" class="frm_input full_input">
</td>
<td> <td>
<i class="material-icons"><?= $row['me_icon'] ?></i> <i class="material-icons"><?= $row['me_icon'] ?></i>
</td> </td>
@ -105,7 +132,6 @@ $colspan = 8;
<input type="text" name="me_order[]" value="<?php echo $row['me_order'] ?>" id="me_order_<?php echo $i; ?>" <input type="text" name="me_order[]" value="<?php echo $row['me_order'] ?>" id="me_order_<?php echo $i; ?>"
class="frm_input full_input"> class="frm_input full_input">
</td> </td>
<td class="td_mng"> <td class="td_mng">
<input type="checkbox" name="me_use[]" id="me_use_<?php echo $i; ?>" value="1" <?= $row['me_use'] == 1 ? "checked" : ""; ?>> <input type="checkbox" name="me_use[]" id="me_use_<?php echo $i; ?>" value="1" <?= $row['me_use'] == 1 ? "checked" : ""; ?>>
</td> </td>

View file

@ -1,6 +1,6 @@
<?php <?php
$sub_menu = "100400"; $sub_menu = "100400";
include_once('./_common.php'); include_once ('./_common.php');
check_demo(); check_demo();
@ -18,17 +18,15 @@ $primary_code = null;
$count = count($_POST['code']); $count = count($_POST['code']);
for ($i = 0; $i < $count; $i++) { for ($i = 0; $i < $count; $i++) {
$_POST = array_map_deep('trim', $_POST); $_POST = array_map_deep('trim', $_POST);
$code = $_POST['code'][$i]; $code = $_POST['code'][$i];
$me_name = $_POST['me_name'][$i]; $me_name = $_POST['me_name'][$i];
// kve-2021-0755 gnuboard 3a3434104c // kve-2021-0755 gnuboard 3a3434104c
$me_link = html_purifier($_POST['me_link'][$i]); $me_link = html_purifier($_POST['me_link'][$i]);
$me_depth = $_POST['me_depth'][$i];
$me_parent = $_POST['me_parent'][$i];
if (!$code || !$me_name) if (!$code || !$me_name)
continue; continue;
$sub_code = ''; $sub_code = '';
if ($group_code == $code) { if ($group_code == $code) {
$sql = " select MAX(SUBSTRING(me_code,3,2)) as max_me_code $sql = " select MAX(SUBSTRING(me_code,3,2)) as max_me_code
@ -56,14 +54,16 @@ for ($i = 0; $i < $count; $i++) {
} }
// 메뉴 등록 // 메뉴 등록
$sql = " insert into {$g5['menu_table']} $sql = "INSERT INTO {$g5['menu_table']}
set me_code = '{$me_code}', SET me_code = '{$me_code}',
me_icon = '{$_POST['me_icon'][$i]}', me_icon = '{$_POST['me_icon'][$i]}',
me_name = '{$me_name}', me_name = '{$me_name}',
me_link = '{$me_link}', me_link = '{$me_link}',
me_target = '{$_POST['me_target'][$i]}', me_target = '{$_POST['me_target'][$i]}',
me_order = '{$_POST['me_order'][$i]}', me_order = '{$_POST['me_order'][$i]}',
me_use = '{$_POST['me_use'][$i]}' "; me_use = '{$_POST['me_use'][$i]}',
me_depth = '{$me_depth}',
me_parent = '{$me_parent}'";
sql_query($sql); sql_query($sql);
} }

View file

@ -1,14 +1,13 @@
<?php <?php
$sub_menu = "100280"; $sub_menu = "100280";
include_once('./_common.php'); include_once './_common.php';
if ($is_admin != 'super') if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.'); alert('최고관리자만 접근 가능합니다.');
// 테마 필드 추가 // 테마 필드 추가
if (!isset($config['cf_theme'])) { if (!isset($config['cf_theme'])) {
sql_query(" ALTER TABLE `{$g5['config_table']}` sql_query(" ALTER TABLE `{$g5['config_table']}` ADD `cf_theme` varchar(255) NOT NULL DEFAULT '' AFTER `cf_title` ", true);
ADD `cf_theme` varchar(255) NOT NULL DEFAULT '' AFTER `cf_title` ", true);
} }
$theme = get_theme_dir(); $theme = get_theme_dir();
@ -22,7 +21,7 @@ if ($config['cf_theme'] && !in_array($config['cf_theme'], $theme))
sql_query(" update {$g5['config_table']} set cf_theme = '' "); sql_query(" update {$g5['config_table']} set cf_theme = '' ");
$g5['title'] = "테마설정"; $g5['title'] = "테마설정";
include_once('./admin.head.php'); include_once './admin.head.php';
?> ?>
<script src="<?php echo G5_ADMIN_URL; ?>/js/theme.js"></script> <script src="<?php echo G5_ADMIN_URL; ?>/js/theme.js"></script>
<div class="local_wr"> <div class="local_wr">
@ -32,37 +31,34 @@ include_once('./admin.head.php');
<?php if ($total_count > 0) { ?> <?php if ($total_count > 0) { ?>
<ul id="theme_list"> <ul id="theme_list">
<?php <?php
for ($i = 0; $i < $total_count; $i++) { foreach($theme as $tm) {
$info = get_theme_info($theme[$i]); $info = get_theme_info($tm);
$name = get_text($info['theme_name']); $name = get_text($info['theme_name']);
if ($info['screenshot']) if ($info['screenshot'])
$screenshot = '<img src="' . $info['screenshot'] . '" alt="' . $name . '">'; $screenshot = $info['screenshot'];
else else
$screenshot = '<img src="' . G5_ADMIN_URL . '/img/theme_img.jpg" alt="">'; $screenshot = G5_ADMIN_URL . '/img/theme_img.jpg';
if ($config['cf_theme'] == $theme[$i]) { if ($config['cf_theme'] == $tm) {
$btn_active = '<span class="theme_sl theme_sl_use">사용중</span><button type="button" class="theme_sl theme_deactive" data-theme="' . $theme[$i] . '" ' . 'data-name="' . $name . '">사용안함</button>'; $btn_active = '<span class="theme_sl theme_sl_use">사용중</span><button type="button" class="theme_sl theme_deactive" data-theme="' . $tm . '" ' . 'data-name="' . $name . '">사용안함</button>';
} else { } else {
$tconfig = get_theme_config_value($theme[$i], 'set_default_skin'); $tconfig = get_theme_config_value($tm, 'set_default_skin');
if ($tconfig['set_default_skin']) if ($tconfig['set_default_skin'])
$set_default_skin = 'true'; $set_default_skin = 'true';
else else
$set_default_skin = 'false'; $set_default_skin = 'false';
$btn_active = '<button type="button" class="theme_sl theme_active" data-theme="' . $theme[$i] . '" ' . 'data-name="' . $name . '" data-set_default_skin="' . $set_default_skin . '">테마적용</button>'; $btn_active = '<button type="button" class="theme_sl theme_active" data-theme="' . $tm . '" ' . 'data-name="' . $name . '" data-set_default_skin="' . $set_default_skin . '">테마적용</button>';
} }
?> ?>
<li> <li>
<div class="tmli_if"> <div class="tmli_if" style="--bg:url(<?=$screenshot?>">
<?php echo $screenshot; ?>
<div class="tmli_tit"> <div class="tmli_tit">
<p><?php echo get_text($info['theme_name']); ?></p> <p><?= get_text($info['theme_name']); ?></p>
</div> </div>
</div> </div>
<?php echo $btn_active; ?> <?php echo $btn_active; ?>
<!--a href="./theme_preview.php?theme=<?php echo $theme[$i]; ?>" class="theme_pr" target="theme_preview">미리보기</a--> <button type="button" class="tmli_dt theme_preview" data-theme="<?php echo $tm; ?>">상세보기</button>
<button type="button" class="tmli_dt theme_preview" data-theme="<?php echo $theme[$i]; ?>">상세보기</button>
</li> </li>
<?php <?php
} }
@ -72,4 +68,4 @@ include_once('./admin.head.php');
<p class="no_theme">설치된 테마가 없습니다.</p> <p class="no_theme">설치된 테마가 없습니다.</p>
<?php } <?php }
include_once('./admin.tail.php'); include_once './admin.tail.php';

View file

@ -1,7 +1,7 @@
<?php <?php
$sub_menu = "100250"; $sub_menu = "100250";
include_once('./_common.php'); include_once './_common.php';
include_once(G5_EDITOR_LIB); include_once G5_EDITOR_LIB;
auth_check($auth[$sub_menu], 'r'); auth_check($auth[$sub_menu], 'r');
@ -9,18 +9,15 @@ if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.'); alert('최고관리자만 접근 가능합니다.');
$g5['title'] = '메인 편집'; $g5['title'] = '메인 편집';
include_once('./admin.head.php'); include_once './admin.head.php';
// -- 내용관리의 기능을 통해 메뉴와 메인 내용을 가져온다. if (defined("G5_THEME_PATH") && file_exists(G5_THEME_PATH . "/config/viewer_form.php")) {
// -- 메인 정보 가져오기 include_once G5_THEME_PATH . "/config/viewer_form.php";
$sql = " select * from {$g5['content_table']} where co_id = 'site_main' "; } else {
$main_co = sql_fetch($sql); $sql = " select * from {$g5['content_table']} where co_id = 'site_main' ";
$main_co = sql_fetch($sql);
?>
?> <form name="fviewerform" id="fviewerform" method="post" onsubmit="return fviewerform_submit(this);"
<form name="fviewerform" id="fviewerform" method="post" onsubmit="return fviewerform_submit(this);"
enctype="multipart/form-data"> enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token"> <input type="hidden" name="token" value="" id="token">
<div class="btn_confirm"> <div class="btn_confirm">
@ -29,7 +26,6 @@ $main_co = sql_fetch($sql);
<input type="submit" value="저장" class="btn_submit" accesskey="s"> <input type="submit" value="저장" class="btn_submit" accesskey="s">
</div> </div>
</div> </div>
<div class="tbl_frm01 tbl_wrap"> <div class="tbl_frm01 tbl_wrap">
<table> <table>
<colgroup> <colgroup>
@ -42,22 +38,18 @@ $main_co = sql_fetch($sql);
<?php echo editor_html('main_content', get_text($main_co['co_content'], 0)); ?> <?php echo editor_html('main_content', get_text($main_co['co_content'], 0)); ?>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</form>
</form> <script>
<script>
function fviewerform_submit(f) { function fviewerform_submit(f) {
f.action = "./viewer_form_update.php"; f.action = "./viewer_form_update.php";
<?php echo get_editor_js('main_content'); ?> <?php echo get_editor_js('main_content'); ?>
return true; return true;
} }
</script> </script>
<?php
<?php }
include_once('./admin.tail.php'); include_once './admin.tail.php';
?>

View file

@ -1,27 +1,31 @@
<?php <?php
$sub_menu = "100250"; $sub_menu = "100250";
include_once('./_common.php'); include_once './_common.php';
$sql_common = " co_html = '1', if (defined("G5_THEME_PATH") && file_exists(G5_THEME_PATH . "/config/viewer_form_update.php")) {
include_once G5_THEME_PATH . "/config/viewer_form_update.php";
} else {
$sql_common = " co_html = '1',
co_tag_filter_use = '0' "; co_tag_filter_use = '0' ";
// -- 메인 정보 가져오기 // -- 메인 정보 가져오기
$sql = " select co_id from {$g5['content_table']} where co_id = 'site_main' "; $sql = " select co_id from {$g5['content_table']} where co_id = 'site_main' ";
$main_co = sql_fetch($sql); $main_co = sql_fetch($sql);
if (!$main_co['co_id']) { if (!$main_co['co_id']) {
// Insert // Insert
$sql = " insert {$g5['content_table']} $sql = " insert {$g5['content_table']}
set co_id = 'site_main', set co_id = 'site_main',
co_content = '{$main_content}', co_content = '{$main_content}',
{$sql_common} "; {$sql_common} ";
sql_query($sql); sql_query($sql);
} else { } else {
// Update // Update
$sql = " update {$g5['content_table']} $sql = " update {$g5['content_table']}
set co_content = '{$main_content}', set co_content = '{$main_content}',
{$sql_common} {$sql_common}
where co_id = 'site_main' "; where co_id = 'site_main' ";
sql_query($sql); sql_query($sql);
}
} }
goto_url('./viewer_form.php'); goto_url('./viewer_form.php');

View file

@ -102,6 +102,50 @@ function sql_escape_string($str)
return $str; return $str;
} }
/**
* custom function from arcturus
* https://info.drk.st/about
* @param string $currentDir
* @return string
*/
function get_url_path_from_root($currentDir = __DIR__) {
$documentRoot = rtrim($_SERVER["DOCUMENT_ROOT"], '/');
$relativePath = str_replace($documentRoot, '', $currentDir);
$urlPath = str_replace(DIRECTORY_SEPARATOR, '/', $relativePath);
return rtrim($urlPath, '/');
}
/**
* custom function from arcturus
* https://info.drk.st/about
* @param string $type
* @param string $path
* @param array $args
* @return string|void
*/
function get_embed_file($type, $path, ...$args) {
if (file_exists($path)) {
$full_path = "";
if (strstr($path, $_SERVER["DOCUMENT_ROOT"])) {
$full_path = $path;
$path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
} else {
$full_path = $_SERVER["DOCUMENT_ROOT"] . $path;
}
$url_path = get_url_path_from_root(dirname($full_path));
$url = $url_path . '/' . basename($path);
switch($type) {
case "script":
return "<script src=\"" . $url . "?t=" . filemtime($full_path) . "\"></script>";
case "css":
case "stylesheet":
return "<link href=\"" . $url . "?t=" . filemtime($full_path) . "\" rel=\"stylesheet\">";
}
}
}
//============================================================================== //==============================================================================
// SQL Injection 등으로 부터 보호를 위해 sql_escape_string() 적용 // SQL Injection 등으로 부터 보호를 위해 sql_escape_string() 적용
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View file

@ -7,7 +7,7 @@
********************/ ********************/
define('G5_VERSION', '아보카도 에디션 : Amber'); define('G5_VERSION', '아보카도 에디션 : Amber');
define('G5_GNUBOARD_VER', '2.2.3'); define('G5_GNUBOARD_VER', '2.2.5');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true); define('_GNUBOARD_', true);

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 297 KiB

View file

@ -75,9 +75,9 @@ $html_class .= $_COOKIE['header_close'] == 'close' ? " close-header" : "";
rel="stylesheet"> rel="stylesheet">
<?php <?php
if (defined('G5_IS_ADMIN')) { if (defined('G5_IS_ADMIN')) {
echo '<link rel="stylesheet" href="' . G5_ADMIN_URL . '/css/admin.css" type="text/css">' . PHP_EOL; echo get_embed_file("css", G5_ADMIN_PATH . '/css/admin.css') . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_ADMIN_URL . '/css/admin.layout.css" type="text/css">' . PHP_EOL; echo get_embed_file("css", G5_ADMIN_PATH . '/css/admin.layout.css') . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_ADMIN_URL . '/css/amberstone.cp.css" type="text/css">' . PHP_EOL; echo get_embed_file("css", G5_ADMIN_PATH . '/css/amberstone.cp.css') . PHP_EOL;
} else { } else {
echo '<link rel="stylesheet" href="' . G5_CSS_URL . '/default.css" type="text/css">' . PHP_EOL; echo '<link rel="stylesheet" href="' . G5_CSS_URL . '/default.css" type="text/css">' . PHP_EOL;
echo '<link rel="stylesheet" href="' . G5_CSS_URL . '/style.css" type="text/css">' . PHP_EOL; echo '<link rel="stylesheet" href="' . G5_CSS_URL . '/style.css" type="text/css">' . PHP_EOL;
@ -112,6 +112,7 @@ $html_class .= $_COOKIE['header_close'] == 'close' ? " close-header" : "";
<?php } else { ?> <?php } else { ?>
<script src="<?php echo G5_JS_URL ?>/jquery-1.12.3.min.js"></script> <script src="<?php echo G5_JS_URL ?>/jquery-1.12.3.min.js"></script>
<?php } ?> <?php } ?>
<script src="<?php echo G5_JS_URL ?>/amberstone.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery.cookie.js"></script> <script src="<?php echo G5_JS_URL ?>/jquery.cookie.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery.rwdImageMaps.js"></script> <script src="<?php echo G5_JS_URL ?>/jquery.rwdImageMaps.js"></script>
<script src="<?php echo G5_JS_URL ?>/common.js"></script> <script src="<?php echo G5_JS_URL ?>/common.js"></script>