update
This commit is contained in:
parent
adf8c56665
commit
a82695bb4e
52 changed files with 4016 additions and 991 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -62,3 +62,6 @@
|
|||
error.log
|
||||
access.log
|
||||
build.log
|
||||
net.json # for traffic
|
||||
/net.json
|
||||
[Aa]vocado[Aa]mber/net.json
|
||||
|
|
|
|||
3
AvocadoAmber/.htaccess
Normal file
3
AvocadoAmber/.htaccess
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
RewriteEngine On
|
||||
|
||||
RewriteRule ^(\.git|\.ht|\.travis|codeception\.|composer\.|Gruntfile\.js|package\.json|CONTRIBUTING|COPYRIGHT|LICENSE|README) - [L,F]
|
||||
12
AvocadoAmber/adm/_admin.mgirate.db.php
Normal file
12
AvocadoAmber/adm/_admin.mgirate.db.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
if (!defined("_G5_ADMIN_")) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$ext_table = [
|
||||
"migrate" => G5_TABLE_PREFIX . "migrations"
|
||||
];
|
||||
|
||||
if (!sql_table_exists($ext_table["migrate"])) {
|
||||
|
||||
}
|
||||
|
|
@ -30,6 +30,8 @@ $menu["content"]->getLastAddedMenu()->addSubFile("/board_form_update.php");
|
|||
$menu["content"]->getLastAddedMenu()->addSubFile("/board_delete.php");
|
||||
$menu["content"]->getLastAddedMenu()->addSubFile("/board_copy.php");
|
||||
$menu["content"]->getLastAddedMenu()->addSubFile("/board_copy_update.php");
|
||||
$menu["content"]->getLastAddedMenu()->addSubFile("/board_move_list.php");
|
||||
$menu["content"]->getLastAddedMenu()->addSubFile("/board_move_check.php");
|
||||
|
||||
$menu["content"]->addChildMenu("content", "게시판그룹관리", G5_ADMIN_URL . "/boardgroup_list.php", true, 100, "\F2EE", 0);
|
||||
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroup_list_update.php");
|
||||
|
|
|
|||
|
|
@ -31,15 +31,15 @@ include_once G5_PATH . '/head.sub.php';
|
|||
<header id="header">
|
||||
<div id="admin_prof">
|
||||
<h1>
|
||||
<a href="<?php echo G5_ADMIN_URL ?>"><img src="<?= G5_ADMIN_URL ?>/img/logo.png" alt="Avocado Edition" /></a>
|
||||
<a href="<?php echo G5_ADMIN_URL ?>"><img src="<?= G5_ADMIN_URL ?>/img/logo.png" alt="Avocado Edition: Amber" /></a>
|
||||
</h1>
|
||||
<p>
|
||||
<a href="<?php echo G5_ADMIN_URL ?>/member_form.php?w=u&mb_id=<?php echo $member['mb_id'] ?>" class="name">
|
||||
<?= $member['mb_name'] ?>
|
||||
</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/logout.php" class="logout">로그아웃</a>
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<a href="<?php echo G5_ADMIN_URL ?>/member_form.php?w=u&mb_id=<?php echo $member['mb_id'] ?>" class="name">
|
||||
<?= $member['mb_name'] ?>
|
||||
</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/logout.php" class="logout">로그아웃</a>
|
||||
</p>
|
||||
<nav id="gnb">
|
||||
<ul>
|
||||
<li style="border-bottom:1px solid #444;">
|
||||
|
|
@ -65,7 +65,8 @@ include_once G5_PATH . '/head.sub.php';
|
|||
</nav>
|
||||
</header>
|
||||
<section id="wrapper">
|
||||
<aside id="page_top">
|
||||
<h2><?php echo $g5['title'] ?></h2>
|
||||
</aside>
|
||||
<div id="container">
|
||||
<div class="admin-content">
|
||||
<aside id="page_top">
|
||||
<h2><?php echo $g5['title'] ?></h2>
|
||||
</aside>
|
||||
<div id="container">
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
if (!defined('_GNUBOARD_'))
|
||||
exit;
|
||||
?>
|
||||
</div>
|
||||
<div class="footer-copyright">
|
||||
<a href="https://amberst.one/amber/AvocadoAmber" target="_blank"> Avocado Amber v<?= G5_GNUBOARD_VER ?> </a>
|
||||
</div>
|
||||
|
|
@ -11,6 +12,17 @@ if (!defined('_GNUBOARD_'))
|
|||
<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>
|
||||
// give section active class
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.querySelectorAll('section[id^=anc_]').forEach((section) => {
|
||||
let section_id = section.getAttribute('id');
|
||||
if (section_id) {
|
||||
let anc = section.querySelector(`a[href='#${section_id}']`);
|
||||
anc.classList.add('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
var hide_menu = false;
|
||||
var mouse_event = false;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ CREATE TABLE `__TABLE_NAME__` (
|
|||
`ca_name` varchar(255) NOT NULL,
|
||||
`wr_option` set('html1','html2','secret','mail') NOT NULL,
|
||||
`wr_subject` varchar(255) NOT NULL,
|
||||
`wr_content` text NOT NULL,
|
||||
`wr_content` mediumtext NOT NULL,
|
||||
`wr_extra_vars` text NOT NULL,
|
||||
`wr_link1` text NOT NULL,
|
||||
`wr_link2` text NOT NULL,
|
||||
`wr_link1_hit` int(11) NOT NULL DEFAULT '0',
|
||||
|
|
@ -19,6 +20,7 @@ CREATE TABLE `__TABLE_NAME__` (
|
|||
`wr_nogood` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(20) NOT NULL,
|
||||
`wr_password` varchar(255) NOT NULL,
|
||||
`wr_extrapassword` varchar(255) NOT NULL,
|
||||
`wr_name` varchar(255) NOT NULL,
|
||||
`wr_email` varchar(255) NOT NULL,
|
||||
`wr_homepage` varchar(255) NOT NULL,
|
||||
|
|
|
|||
|
|
@ -99,8 +99,10 @@
|
|||
* @var string|int $bo_8
|
||||
* @var string|int $bo_9
|
||||
* @var string|int $bo_10
|
||||
* @var string $bo_version
|
||||
*/
|
||||
include_once "./_common.php";
|
||||
include_once "./board_migration.inc.php";
|
||||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
|
@ -263,7 +265,8 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
|
|||
bo_7 = '{$_POST['bo_7']}',
|
||||
bo_8 = '{$_POST['bo_8']}',
|
||||
bo_9 = '{$_POST['bo_9']}',
|
||||
bo_10 = '{$_POST['bo_10']}' ";
|
||||
bo_10 = '{$_POST['bo_10']}',
|
||||
bo_version = '". BOARD_MIGRATION_VERSION . "'";
|
||||
|
||||
if ($w == '') {
|
||||
|
||||
|
|
@ -317,12 +320,6 @@ if ($w == '') {
|
|||
$sql = "SELECT a.wr_id, (count(b.wr_parent) - 1) AS cnt FROM {$g5['write_prefix']}{$bo_table} a, {$g5['write_prefix']}{$bo_table} b WHERE a.wr_id=b.wr_parent AND a.wr_is_comment=0 GROUP BY a.wr_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
/*
|
||||
// 코멘트수를 얻습니다.
|
||||
$sql2 = "SELECT count(*) as cnt FROM {$g5['write_prefix']}$bo_table where wr_parent = '{$row['wr_id']}' and wr_is_comment = 1 ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
*/
|
||||
|
||||
sql_query("UPDATE {$g5['write_prefix']}{$bo_table} SET wr_comment = '{$row['cnt']}' where wr_id = '{$row['wr_id']}' ");
|
||||
}
|
||||
}
|
||||
|
|
@ -352,7 +349,6 @@ if ($w == '') {
|
|||
|
||||
}
|
||||
|
||||
|
||||
// 같은 그룹내 게시판 동일 옵션 적용
|
||||
$grp_fields = '';
|
||||
if (is_checked('chk_grp_device'))
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
<?php
|
||||
include_once "./_common.php";
|
||||
include_once "./board_migration.inc.php";
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
// 마이그레이션 체크
|
||||
$boards_need_update = check_all_boards_migration();
|
||||
|
||||
$sql_common = " from {$g5['board_table']} a ";
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
|
|
@ -66,6 +70,11 @@ $colspan = 11;
|
|||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
생성된 게시판수 <?php echo number_format($total_count) ?>개
|
||||
<?php if (count($boards_need_update) > 0) { ?>
|
||||
<span style="font-weight: bold; margin-left: 20px;">
|
||||
업데이트 필요: <?php echo count($boards_need_update) ?>개
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
|
|
@ -111,7 +120,8 @@ $colspan = 11;
|
|||
<th scope="col" style="width:80px;">글쓰기</th>
|
||||
<th scope="col" style="width:80px;">글답변</th>
|
||||
<th scope="col" style="width:80px;">댓글쓰기</th>
|
||||
<th scope="col" style="width:60px;">관리</th>
|
||||
<th scope="col" style="width:80px;">버전</th>
|
||||
<th scope="col" style="width:150px;">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -119,6 +129,16 @@ $colspan = 11;
|
|||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
$one_update = '<a href="./board_form.php?w=u&bo_table=' . $row['bo_table'] . '&' . $qstr . '">수정</a>';
|
||||
$one_copy = '<a href="./board_copy.php?bo_table=' . $row['bo_table'] . '" class="board_copy" target="win_board_copy">복사</a>';
|
||||
$s_move = '<a href="./board_move_list.php?bo_table=' . $row['bo_table'] . '">게시물이동</a>';
|
||||
|
||||
// 마이그레이션 필요 여부 체크
|
||||
$need_migration = false;
|
||||
foreach ($boards_need_update as $board_update) {
|
||||
if ($board_update['bo_table'] == $row['bo_table']) {
|
||||
$need_migration = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$bg = 'bg' . ($i % 2);
|
||||
?>
|
||||
|
|
@ -163,14 +183,27 @@ $colspan = 11;
|
|||
<?php echo get_member_level_select('bo_comment_level[' . $i . ']', 1, 10, $row['bo_comment_level']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $one_update ?>
|
||||
<?php echo $one_copy ?>
|
||||
<?php if ($need_migration) { ?>
|
||||
<span style="color: #ff6b6b; font-weight: bold;">업데이트 필요</span>
|
||||
<?php } else { ?>
|
||||
<span><?php echo htmlspecialchars($row['bo_version']); ?></span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage_buttons">
|
||||
<?php echo $one_update ?>
|
||||
<?php echo $one_copy ?>
|
||||
<?php echo $s_move ?>
|
||||
<?php if ($need_migration) { ?>
|
||||
<br><a href="#" class="btn_migrate" data-bo-table="<?php echo $row['bo_table'] ?>">업데이트</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
echo '<tr><td colspan="' . ($colspan + 1) . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -186,6 +219,12 @@ $colspan = 11;
|
|||
<span class="material-icons">delete</span>
|
||||
<input type="submit" name="act_button" value="선택삭제" title="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
<?php if (count($boards_need_update) > 0) { ?>
|
||||
<div class="btn ty4">
|
||||
<span class="material-icons">update</span>
|
||||
<input type="submit" name="act_button" value="선택마이그레이션" title="선택마이그레이션" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<a href="./board_form.php" title="게시판 추가" class="btn"><span class="material-icons">add</span></a>
|
||||
<?php } ?>
|
||||
|
|
@ -195,7 +234,7 @@ $colspan = 11;
|
|||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'] . '?' . $qstr . '&page='); ?>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
function fboardlist_submit(f) {
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
||||
|
|
@ -208,6 +247,12 @@ $colspan = 11;
|
|||
}
|
||||
}
|
||||
|
||||
if (document.pressed == "선택마이그레이션") {
|
||||
if (!confirm("선택한 게시판을 마이그레이션 하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -216,6 +261,36 @@ $colspan = 11;
|
|||
window.open(this.href, "win_board_copy", "left=100,top=100,width=550,height=450");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".btn_migrate").click(function (e) {
|
||||
e.preventDefault();
|
||||
var bo_table = $(this).data('bo-table');
|
||||
|
||||
if (!confirm(bo_table + ' 게시판을 업데이트 하시겠습니까?')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: './board_list_update.php',
|
||||
type: 'POST',
|
||||
data: {
|
||||
act_button: '단일마이그레이션',
|
||||
bo_table: bo_table,
|
||||
token: '<?php echo $token ?>'
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
location.reload();
|
||||
} else {
|
||||
alert('오류: ' + response.message);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert('마이그레이션 중 오류가 발생했습니다.');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,63 @@
|
|||
<?php
|
||||
include_once "./_common.php";
|
||||
include_once "./board_migration.inc.php";
|
||||
|
||||
check_demo();
|
||||
|
||||
// 단일 마이그레이션 처리 (AJAX)
|
||||
if ($_POST['act_button'] == "단일마이그레이션") {
|
||||
header('Content-Type: application/json');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$bo_table = sql_real_escape_string(strip_tags($_POST['bo_table']));
|
||||
|
||||
if (empty($bo_table)) {
|
||||
echo json_encode(['success' => false, 'message' => '게시판 테이블명이 없습니다.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$result = migrate_board_table($bo_table);
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
}
|
||||
|
||||
// 선택 마이그레이션 처리
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
if ($_POST['act_button'] == "선택마이그레이션") {
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert("마이그레이션 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
$success_count = 0;
|
||||
$fail_count = 0;
|
||||
$messages = [];
|
||||
|
||||
for ($i = 0; $i < count($_POST['chk']); $i++) {
|
||||
$k = $_POST['chk'][$i];
|
||||
$bo_table = sql_real_escape_string(strip_tags($_POST['board_table'][$k]));
|
||||
|
||||
if (empty($bo_table)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$result = migrate_board_table($bo_table);
|
||||
|
||||
if ($result['success']) {
|
||||
$success_count++;
|
||||
$messages[] = "{$bo_table}: 성공 (컬럼 {$result['updated']}개 추가)";
|
||||
} else {
|
||||
$fail_count++;
|
||||
$messages[] = "{$bo_table}: 실패 - {$result['message']}";
|
||||
}
|
||||
}
|
||||
} else if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
|
|
@ -28,7 +78,7 @@ if ($_POST['act_button'] == "선택수정") {
|
|||
|
||||
$purify_keys = ["gr_id", "bo_subject", "bo_skin", "bo_list_level", "bo_read_level", "bo_write_level", "bo_comment_level", "bo_reply_level", "board_table"];
|
||||
|
||||
foreach($_POST as $key => $value) {
|
||||
foreach ($_POST as $key => $value) {
|
||||
if (in_array($key, $purify_keys)) {
|
||||
if (is_array($_POST[$key])) {
|
||||
$_POST[$key][$k] = sql_real_escape_string(strip_tags($_POST[$key][$k]));
|
||||
|
|
|
|||
319
AvocadoAmber/adm/board_migration.inc.php
Normal file
319
AvocadoAmber/adm/board_migration.inc.php
Normal file
|
|
@ -0,0 +1,319 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_'))
|
||||
exit;
|
||||
|
||||
// 현재 마이그레이션 버전
|
||||
define('BOARD_MIGRATION_VERSION', '2.0.1');
|
||||
|
||||
// 표준 게시판 테이블 구조 정의
|
||||
function get_standard_board_structure()
|
||||
{
|
||||
return [
|
||||
'wr_id' => 'int(11) NOT NULL AUTO_INCREMENT',
|
||||
'wr_num' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_reply' => 'varchar(10) NOT NULL',
|
||||
'wr_parent' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_is_comment' => 'tinyint(4) NOT NULL DEFAULT 0',
|
||||
'wr_comment' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_comment_reply' => 'varchar(5) NOT NULL',
|
||||
'ca_name' => 'varchar(255) NOT NULL',
|
||||
'wr_option' => "set('html1','html2','secret','mail') NOT NULL",
|
||||
'wr_subject' => 'varchar(255) NOT NULL',
|
||||
'wr_content' => 'mediumtext NOT NULL',
|
||||
'wr_extra_vars' => 'text NOT NULL',
|
||||
'wr_link1' => 'text NOT NULL',
|
||||
'wr_link2' => 'text NOT NULL',
|
||||
'wr_link1_hit' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_link2_hit' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_hit' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_good' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_nogood' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'mb_id' => 'varchar(20) NOT NULL',
|
||||
'wr_password' => 'varchar(255) NOT NULL',
|
||||
'wr_extrapassword' => 'varchar(255) NOT NULL',
|
||||
'wr_name' => 'varchar(255) NOT NULL',
|
||||
'wr_email' => 'varchar(255) NOT NULL',
|
||||
'wr_homepage' => 'varchar(255) NOT NULL',
|
||||
'wr_datetime' => "datetime NOT NULL DEFAULT '1970-01-01 00:00:00'",
|
||||
'wr_file' => 'tinyint(4) NOT NULL DEFAULT 0',
|
||||
'wr_last' => 'varchar(19) NOT NULL',
|
||||
'wr_ip' => 'varchar(255) NOT NULL',
|
||||
'wr_facebook_user' => 'varchar(255) NOT NULL',
|
||||
'wr_twitter_user' => 'varchar(255) NOT NULL',
|
||||
'wr_dice1' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_dice2' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_log' => 'text NOT NULL',
|
||||
'wr_item' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_item_log' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_action' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_secret' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_adult' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_wide' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_plip' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_noname' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_ing' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'ch_id' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'ch_side' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'ch_class' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'ti_id' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'ma_id' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_width' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_height' => 'int(11) NOT NULL DEFAULT 0',
|
||||
'wr_url' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_type' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_1' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_2' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_3' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_4' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_5' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_6' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_7' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_8' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_9' => "varchar(255) NOT NULL DEFAULT ''",
|
||||
'wr_10' => "varchar(255) NOT NULL DEFAULT ''"
|
||||
];
|
||||
}
|
||||
|
||||
// bo_version 컬럼 체크 및 추가
|
||||
function check_and_add_bo_version()
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$sql = "SHOW COLUMNS FROM {$g5['board_table']} LIKE 'bo_version'";
|
||||
$result = sql_query($sql);
|
||||
|
||||
if (sql_num_rows($result) == 0) {
|
||||
$sql = "ALTER TABLE {$g5['board_table']} ADD `bo_version` varchar(255) NOT NULL DEFAULT '0'";
|
||||
sql_query($sql);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// 컬럼 정의 정규화 (비교를 위해)
|
||||
function normalize_column_definition($definition)
|
||||
{
|
||||
// 소문자로 변환
|
||||
$def = strtolower($definition);
|
||||
|
||||
// 공백 정규화
|
||||
$def = preg_replace('/\s+/', ' ', $def);
|
||||
$def = trim($def);
|
||||
|
||||
// AUTO_INCREMENT 제거 (비교 시 제외)
|
||||
$def = str_replace('auto_increment', '', $def);
|
||||
|
||||
// int(11) -> int 형식 통일
|
||||
$def = preg_replace('/int\(\d+\)/', 'int', $def);
|
||||
$def = preg_replace('/tinyint\(\d+\)/', 'tinyint', $def);
|
||||
|
||||
// varchar/char 길이는 유지
|
||||
|
||||
// 따옴표 통일 (single quote)
|
||||
$def = str_replace('"', "'", $def);
|
||||
|
||||
return trim($def);
|
||||
}
|
||||
|
||||
// 현재 테이블 구조 가져오기 (원본 정의 포함)
|
||||
function get_current_table_structure($table_name)
|
||||
{
|
||||
$sql = "SHOW COLUMNS FROM `{$table_name}`";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$structure = [];
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$type = $row['Type'];
|
||||
$null = $row['Null'] == 'NO' ? 'NOT NULL' : '';
|
||||
$default = '';
|
||||
|
||||
if ($row['Default'] !== null) {
|
||||
if (in_array(strtolower($row['Default']), ['current_timestamp'])) {
|
||||
$default = "DEFAULT {$row['Default']}";
|
||||
} else {
|
||||
$default = "DEFAULT '{$row['Default']}'";
|
||||
}
|
||||
} else if ($row['Null'] == 'NO' && $row['Default'] === null && $row['Extra'] != 'auto_increment') {
|
||||
// NOT NULL이고 DEFAULT가 없는 경우 처리
|
||||
if (strpos($type, 'int') !== false) {
|
||||
$default = 'DEFAULT 0';
|
||||
} else if (strpos($type, 'text') !== false) {
|
||||
// text 타입은 default를 설정할 수 없음
|
||||
$default = '';
|
||||
} else {
|
||||
$default = "DEFAULT ''";
|
||||
}
|
||||
}
|
||||
|
||||
$extra = $row['Extra'];
|
||||
if ($extra == 'auto_increment') {
|
||||
$extra = 'AUTO_INCREMENT';
|
||||
}
|
||||
|
||||
$definition = trim("{$type} {$null} {$default} {$extra}");
|
||||
$structure[$row['Field']] = $definition;
|
||||
}
|
||||
|
||||
return $structure;
|
||||
}
|
||||
|
||||
// 테이블 구조 비교 (누락 및 변경된 컬럼 모두 감지)
|
||||
function compare_table_structure($table_name)
|
||||
{
|
||||
$standard = get_standard_board_structure();
|
||||
$current = get_current_table_structure($table_name);
|
||||
|
||||
$missing_columns = []; // 누락된 컬럼
|
||||
$modified_columns = []; // 속성이 다른 컬럼
|
||||
|
||||
foreach ($standard as $column => $definition) {
|
||||
if (!isset($current[$column])) {
|
||||
// 컬럼이 존재하지 않음
|
||||
$missing_columns[$column] = $definition;
|
||||
} else {
|
||||
// 컬럼은 존재하지만 속성 비교
|
||||
$standard_normalized = normalize_column_definition($definition);
|
||||
$current_normalized = normalize_column_definition($current[$column]);
|
||||
|
||||
if ($standard_normalized !== $current_normalized) {
|
||||
// 속성이 다름
|
||||
$modified_columns[$column] = [
|
||||
'current' => $current[$column],
|
||||
'standard' => $definition
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'missing' => $missing_columns,
|
||||
'modified' => $modified_columns
|
||||
];
|
||||
}
|
||||
|
||||
// 게시판 테이블 마이그레이션 실행
|
||||
function migrate_board_table($bo_table)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$write_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
// 테이블 존재 확인
|
||||
$sql = "SHOW TABLES LIKE '{$write_table}'";
|
||||
$result = sql_query($sql);
|
||||
if (sql_num_rows($result) == 0) {
|
||||
return ['success' => false, 'message' => '테이블이 존재하지 않습니다.'];
|
||||
}
|
||||
|
||||
// 누락 및 변경된 컬럼 확인
|
||||
$comparison = compare_table_structure($write_table);
|
||||
$missing_columns = $comparison['missing'];
|
||||
$modified_columns = $comparison['modified'];
|
||||
|
||||
if (empty($missing_columns) && empty($modified_columns)) {
|
||||
// 버전 업데이트만 수행
|
||||
$sql = "UPDATE {$g5['board_table']} SET bo_version = '" . BOARD_MIGRATION_VERSION . "' WHERE bo_table = '{$bo_table}'";
|
||||
sql_query($sql);
|
||||
return [
|
||||
'success' => true,
|
||||
'message' => '이미 최신 버전입니다.',
|
||||
'added' => 0,
|
||||
'modified' => 0
|
||||
];
|
||||
}
|
||||
|
||||
$added_count = 0;
|
||||
$modified_count = 0;
|
||||
$errors = [];
|
||||
|
||||
// 누락된 컬럼 추가
|
||||
foreach ($missing_columns as $column => $definition) {
|
||||
$sql = "ALTER TABLE `{$write_table}` ADD `{$column}` {$definition}";
|
||||
if (sql_query($sql)) {
|
||||
$added_count++;
|
||||
} else {
|
||||
$errors[] = "컬럼 추가 실패: {$column}";
|
||||
}
|
||||
}
|
||||
|
||||
// 변경된 컬럼 수정
|
||||
foreach ($modified_columns as $column => $info) {
|
||||
$sql = "ALTER TABLE `{$write_table}` MODIFY `{$column}` {$info['standard']}";
|
||||
if (sql_query($sql)) {
|
||||
$modified_count++;
|
||||
} else {
|
||||
$errors[] = "컬럼 수정 실패: {$column}";
|
||||
}
|
||||
}
|
||||
|
||||
// 버전 업데이트
|
||||
$sql = "UPDATE {$g5['board_table']} SET bo_version = '" . BOARD_MIGRATION_VERSION . "' WHERE bo_table = '{$bo_table}'";
|
||||
sql_query($sql);
|
||||
|
||||
$message = '마이그레이션이 완료되었습니다.';
|
||||
if (!empty($errors)) {
|
||||
$message .= ' (일부 오류: ' . implode(', ', $errors) . ')';
|
||||
}
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
'message' => $message,
|
||||
'added' => $added_count,
|
||||
'modified' => $modified_count,
|
||||
'errors' => $errors
|
||||
];
|
||||
}
|
||||
|
||||
// 모든 게시판 체크
|
||||
function check_all_boards_migration()
|
||||
{
|
||||
global $g5;
|
||||
|
||||
check_and_add_bo_version();
|
||||
|
||||
$sql = "SELECT bo_table, bo_version FROM {$g5['board_table']}";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$boards_need_update = [];
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
if ($row['bo_version'] != BOARD_MIGRATION_VERSION) {
|
||||
$write_table = $g5['write_prefix'] . $row['bo_table'];
|
||||
$comparison = compare_table_structure($write_table);
|
||||
|
||||
$boards_need_update[] = [
|
||||
'bo_table' => $row['bo_table'],
|
||||
'current_version' => $row['bo_version'],
|
||||
'missing_columns' => count($comparison['missing']),
|
||||
'modified_columns' => count($comparison['modified'])
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $boards_need_update;
|
||||
}
|
||||
|
||||
// 특정 게시판의 상세 차이점 확인
|
||||
function get_board_migration_details($bo_table)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$write_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
// 테이블 존재 확인
|
||||
$sql = "SHOW TABLES LIKE '{$write_table}'";
|
||||
$result = sql_query($sql);
|
||||
if (sql_num_rows($result) == 0) {
|
||||
return ['success' => false, 'message' => '테이블이 존재하지 않습니다.'];
|
||||
}
|
||||
|
||||
$comparison = compare_table_structure($write_table);
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
'bo_table' => $bo_table,
|
||||
'missing_columns' => $comparison['missing'],
|
||||
'modified_columns' => $comparison['modified']
|
||||
];
|
||||
}
|
||||
48
AvocadoAmber/adm/board_move_check.php
Normal file
48
AvocadoAmber/adm/board_move_check.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
include_once "./_common.php";
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$source_board = isset($_POST['source_board']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['source_board']) : '';
|
||||
$target_board = isset($_POST['target_board']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['target_board']) : '';
|
||||
|
||||
if (!$source_board || !$target_board) {
|
||||
echo json_encode(['warning' => false, 'message' => '']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$source_table = $g5['write_prefix'] . $source_board;
|
||||
$target_table = $g5['write_prefix'] . $target_board;
|
||||
|
||||
$source_exists = sql_query("SHOW TABLES LIKE '{$source_table}'", false);
|
||||
$target_exists = sql_query("SHOW TABLES LIKE '{$target_table}'", false);
|
||||
|
||||
if (!sql_num_rows($source_exists) || !sql_num_rows($target_exists)) {
|
||||
echo json_encode(['warning' => true, 'message' => '게시판 테이블이 존재하지 않습니다.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$source_columns = [];
|
||||
$result = sql_query("SHOW COLUMNS FROM {$source_table}");
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$source_columns[] = $row['Field'];
|
||||
}
|
||||
|
||||
$target_columns = [];
|
||||
$result = sql_query("SHOW COLUMNS FROM {$target_table}");
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$target_columns[] = $row['Field'];
|
||||
}
|
||||
|
||||
$missing_columns = array_diff($source_columns, $target_columns);
|
||||
|
||||
$exclude_columns = ['wr_id', 'wr_num', 'wr_reply', 'wr_parent'];
|
||||
$missing_columns = array_diff($missing_columns, $exclude_columns);
|
||||
|
||||
if (count($missing_columns) > 0) {
|
||||
$message = '대상 게시판에 존재하지 않는 필드가 있어 해당 데이터는 복사되지 않습니다: ' . implode(', ', $missing_columns);
|
||||
echo json_encode(['warning' => true, 'message' => $message]);
|
||||
} else {
|
||||
echo json_encode(['warning' => false, 'message' => '']);
|
||||
}
|
||||
?>
|
||||
295
AvocadoAmber/adm/board_move_list.php
Normal file
295
AvocadoAmber/adm/board_move_list.php
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
<?php
|
||||
include_once "./_common.php";
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$bo_table = isset($_GET['bo_table']) ? preg_replace('/[^a-z0-9_]/i', '', $_GET['bo_table']) : '';
|
||||
|
||||
if (!$bo_table) {
|
||||
alert('게시판을 선택해주세요.');
|
||||
}
|
||||
|
||||
$board = sql_fetch(" SELECT * FROM {$g5['board_table']} WHERE bo_table = '{$bo_table}' ");
|
||||
if (!$board) {
|
||||
alert('존재하지 않는 게시판입니다.');
|
||||
}
|
||||
|
||||
$write_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
$sfl = isset($_GET['sfl']) ? clean_xss_tags($_GET['sfl']) : '';
|
||||
$stx = isset($_GET['stx']) ? clean_xss_tags($_GET['stx']) : '';
|
||||
$sst = isset($_GET['sst']) ? preg_replace('/[^a-z0-9_]/i', '', $_GET['sst']) : 'wr_num';
|
||||
$sod = isset($_GET['sod']) && in_array($_GET['sod'], ['asc', 'desc']) ? $_GET['sod'] : 'desc';
|
||||
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
|
||||
|
||||
$sql_common = " FROM {$write_table} ";
|
||||
$sql_search = " WHERE (1) ";
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " AND ( ";
|
||||
switch ($sfl) {
|
||||
case "wr_subject":
|
||||
case "wr_content":
|
||||
$sql_search .= " ({$sfl} LIKE '%{$stx}%') ";
|
||||
break;
|
||||
case "wr_name":
|
||||
$sql_search .= " (wr_name LIKE '%{$stx}%') ";
|
||||
break;
|
||||
default:
|
||||
$sql_search .= " (wr_subject LIKE '%{$stx}%' OR wr_content LIKE '%{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
$sql_order = " ORDER BY {$sst} {$sod} ";
|
||||
|
||||
$sql = " SELECT COUNT(*) AS cnt {$sql_common} {$sql_search} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows);
|
||||
if ($page < 1)
|
||||
$page = 1;
|
||||
$from_record = ($page - 1) * $rows;
|
||||
|
||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} LIMIT {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$board_list = [];
|
||||
$board_sql = " SELECT bo_table, bo_subject FROM {$g5['board_table']} WHERE bo_table != '{$bo_table}' ORDER BY gr_id, bo_table ";
|
||||
$board_result = sql_query($board_sql);
|
||||
while ($row = sql_fetch_array($board_result)) {
|
||||
$board_list[] = $row;
|
||||
}
|
||||
|
||||
$qstr = 'bo_table=' . $bo_table;
|
||||
if ($sfl)
|
||||
$qstr .= '&sfl=' . $sfl;
|
||||
if ($stx)
|
||||
$qstr .= '&stx=' . urlencode($stx);
|
||||
if ($sst)
|
||||
$qstr .= '&sst=' . $sst;
|
||||
if ($sod)
|
||||
$qstr .= '&sod=' . $sod;
|
||||
if ($page)
|
||||
$qstr .= '&page=' . $page;
|
||||
|
||||
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '?bo_table=' . $bo_table . '" class="ov_listall">처음</a>';
|
||||
|
||||
$g5['title'] = '게시물 이동/복사';
|
||||
include_once "./admin.head.php";
|
||||
|
||||
$colspan = 8;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
<strong><?php echo get_text($board['bo_subject']) ?> (<?php echo $bo_table ?>)</strong>
|
||||
전체게시물 <?php echo number_format($total_count) ?>개
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="wr_subject" <?php echo get_selected($sfl, "wr_subject"); ?>>제목</option>
|
||||
<option value="wr_content" <?php echo get_selected($sfl, "wr_content"); ?>>내용</option>
|
||||
<option value="wr_name" <?php echo get_selected($sfl, "wr_name"); ?>>작성자</option>
|
||||
<option value="wr_subject||wr_content" <?php echo get_selected($sfl, "wr_subject||wr_content"); ?>>제목+내용</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어</label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" class="frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</form>
|
||||
|
||||
<br />
|
||||
|
||||
<form name="fwritelist" id="fwritelist" action="./board_move_update.php" onsubmit="return fwritelist_submit(this);"
|
||||
method="post">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="act_button" value="">
|
||||
<input type="hidden" name="target_board" id="target_board_hidden" value="">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<div class="btn_left">
|
||||
<label for="target_board_select">대상 게시판 선택:</label>
|
||||
<select name="target_board_select" id="target_board_select" class="frm_input">
|
||||
<option value="">선택하세요</option>
|
||||
<?php foreach ($board_list as $b) { ?>
|
||||
<option value="<?php echo $b['bo_table'] ?>"><?php echo get_text($b['bo_subject']) ?>
|
||||
(<?php echo $b['bo_table'] ?>)</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<span id="warning_msg" style="color:#ff0000;margin-left:10px;display:none;"></span>
|
||||
</div>
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width:45px;">
|
||||
<col style="width:80px;">
|
||||
<col>
|
||||
<col style="width:120px;">
|
||||
<col style="width:80px;">
|
||||
<col style="width:80px;">
|
||||
<col style="width:120px;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">전체선택</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">번호</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">작성자</th>
|
||||
<th scope="col">조회</th>
|
||||
<th scope="col">댓글</th>
|
||||
<th scope="col">작성일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$list = [];
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
$list[$i] = get_list($row, $board, $board['bo_subject'], $board['bo_mobile_subject']);
|
||||
$bg = 'bg' . ($i % 2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_num"><?php echo $list[$i]['wr_id'] ?></td>
|
||||
<td class="td_subject">
|
||||
<?php echo $list[$i]['reply'] ?>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>&wr_id=<?php echo $list[$i]['wr_id'] ?>"
|
||||
target="_blank">
|
||||
<?php echo $list[$i]['subject'] ?>
|
||||
<?php if ($list[$i]['icon_file'])
|
||||
echo ' ' . $list[$i]['icon_file']; ?>
|
||||
<?php if ($list[$i]['icon_new'])
|
||||
echo ' ' . $list[$i]['icon_new']; ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="td_name"><?php echo $list[$i]['name'] ?></td>
|
||||
<td class="td_num"><?php echo $list[$i]['wr_hit'] ?></td>
|
||||
<td class="td_num"><?php echo $list[$i]['wr_comment'] ?></td>
|
||||
<td class="td_date"><?php echo $list[$i]['datetime2'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<div class="btn ty3">
|
||||
<span class="material-icons">drive_file_move</span>
|
||||
<input type="submit" name="act_btn" value="선택이동" title="선택이동" onclick="document.pressed='move'">
|
||||
</div>
|
||||
<div class="btn ty3">
|
||||
<span class="material-icons">content_copy</span>
|
||||
<input type="submit" name="act_btn" value="선택복사" title="선택복사" onclick="document.pressed='copy'">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
|
||||
<?php
|
||||
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'] . '?' . $qstr . '&page=');
|
||||
echo $pagelist;
|
||||
?>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
<strong>이동:</strong> 선택한 게시물을 대상 게시판으로 이동합니다. 원본 게시물은 삭제됩니다.<br>
|
||||
<strong>복사:</strong> 선택한 게시물을 대상 게시판에 복사합니다. 원본 게시물은 유지됩니다.<br>
|
||||
게시판 테이블 구조가 다른 경우, 존재하는 필드만 복사되며 경고 메시지가 표시됩니다.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var warningShown = false;
|
||||
|
||||
function fwritelist_submit(f) {
|
||||
var targetBoard = document.getElementById('target_board_select').value;
|
||||
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed === 'move' ? '이동' : '복사' + "할 게시물을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!targetBoard) {
|
||||
alert('대상 게시판을 선택하세요.');
|
||||
document.getElementById('target_board_select').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
f.target_board.value = targetBoard;
|
||||
f.act_button.value = document.pressed;
|
||||
|
||||
var actionText = (document.pressed === 'move') ? '이동' : '복사';
|
||||
var confirmMsg = '선택한 게시물을 ' + actionText + '하시겠습니까?';
|
||||
|
||||
if (document.pressed === 'move') {
|
||||
confirmMsg += '\n\n원본 게시물은 삭제됩니다.';
|
||||
}
|
||||
|
||||
if (warningShown) {
|
||||
confirmMsg += '\n\n경고: 일부 필드가 복사되지 않을 수 있습니다.';
|
||||
}
|
||||
|
||||
if (!confirm(confirmMsg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
document.getElementById('target_board_select').addEventListener('change', function () {
|
||||
var targetBoard = this.value;
|
||||
var sourceBoard = '<?php echo $bo_table ?>';
|
||||
|
||||
warningShown = false;
|
||||
document.getElementById('warning_msg').style.display = 'none';
|
||||
document.getElementById('warning_msg').innerHTML = '';
|
||||
|
||||
if (!targetBoard) {
|
||||
return;
|
||||
}
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', './board_move_check.php', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
xhr.onload = function () {
|
||||
if (xhr.status === 200) {
|
||||
try {
|
||||
var response = JSON.parse(xhr.responseText);
|
||||
if (response.warning) {
|
||||
warningShown = true;
|
||||
document.getElementById('warning_msg').innerHTML = '⚠ ' + response.message;
|
||||
document.getElementById('warning_msg').style.display = 'inline';
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Error parsing response:', e);
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.send('source_board=' + sourceBoard + '&target_board=' + targetBoard);
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once "./admin.tail.php";
|
||||
?>
|
||||
286
AvocadoAmber/adm/board_move_update.php
Normal file
286
AvocadoAmber/adm/board_move_update.php
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
<?php
|
||||
include_once "./_common.php";
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$bo_table = isset($_POST['bo_table']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table']) : '';
|
||||
$target_board = isset($_POST['target_board']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['target_board']) : '';
|
||||
$act_button = isset($_POST['act_button']) ? $_POST['act_button'] : '';
|
||||
$chk = isset($_POST['chk']) ? $_POST['chk'] : [];
|
||||
|
||||
if (!in_array($act_button, ['move', 'copy'])) {
|
||||
alert('잘못된 요청입니다.');
|
||||
}
|
||||
|
||||
if (!$bo_table || !$target_board || !$act_button || empty($chk)) {
|
||||
alert('필수 항목이 누락되었습니다.');
|
||||
}
|
||||
|
||||
if ($bo_table === $target_board) {
|
||||
alert('같은 게시판으로는 이동/복사할 수 없습니다.');
|
||||
}
|
||||
|
||||
$source_board = sql_fetch("SELECT * FROM {$g5['board_table']} WHERE bo_table = '{$bo_table}'");
|
||||
$dest_board = sql_fetch("SELECT * FROM {$g5['board_table']} WHERE bo_table = '{$target_board}'");
|
||||
|
||||
if (!$source_board || !$dest_board) {
|
||||
alert('존재하지 않는 게시판입니다.');
|
||||
}
|
||||
|
||||
$source_table = $g5['write_prefix'] . $bo_table;
|
||||
$target_table = $g5['write_prefix'] . $target_board;
|
||||
|
||||
$source_columns = [];
|
||||
$result = sql_query("SHOW COLUMNS FROM {$source_table}");
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$source_columns[$row['Field']] = $row;
|
||||
}
|
||||
|
||||
$target_columns = [];
|
||||
$result = sql_query("SHOW COLUMNS FROM {$target_table}");
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$target_columns[$row['Field']] = $row;
|
||||
}
|
||||
|
||||
$exclude_fields = ['wr_id', 'wr_num'];
|
||||
$common_columns = [];
|
||||
foreach ($source_columns as $col_name => $col_info) {
|
||||
if (isset($target_columns[$col_name]) && !in_array($col_name, $exclude_fields)) {
|
||||
$common_columns[] = $col_name;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($common_columns)) {
|
||||
alert('복사할 수 있는 공통 컬럼이 없습니다.');
|
||||
}
|
||||
|
||||
$success_count = 0;
|
||||
$fail_count = 0;
|
||||
$error_messages = [];
|
||||
|
||||
foreach ($chk as $wr_id) {
|
||||
$wr_id = (int) $wr_id;
|
||||
|
||||
$write = sql_fetch("SELECT * FROM {$source_table} WHERE wr_id = '{$wr_id}'");
|
||||
|
||||
if (!$write) {
|
||||
$fail_count++;
|
||||
$error_messages[] = "게시물 ID {$wr_id}를 찾을 수 없습니다.";
|
||||
continue;
|
||||
}
|
||||
|
||||
$is_reply = $write['wr_reply'] ? true : false;
|
||||
|
||||
if ($is_reply && $act_button === 'move') {
|
||||
$parent_id = $write['wr_parent'];
|
||||
$parent_check = sql_fetch("SELECT wr_id FROM {$source_table} WHERE wr_id = '{$parent_id}'");
|
||||
if (!$parent_check) {
|
||||
$write['wr_reply'] = '';
|
||||
$write['wr_parent'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$insert_values = [];
|
||||
$insert_fields = [];
|
||||
|
||||
foreach ($common_columns as $col) {
|
||||
if ($col === 'wr_num')
|
||||
continue;
|
||||
|
||||
if ($col === 'wr_reply' || $col === 'wr_parent') {
|
||||
if ($col === 'wr_reply') {
|
||||
$insert_fields[] = $col;
|
||||
$insert_values[] = "''";
|
||||
} else if ($col === 'wr_parent') {
|
||||
$insert_fields[] = $col;
|
||||
$insert_values[] = "0";
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$insert_fields[] = $col;
|
||||
$value = $write[$col];
|
||||
|
||||
if ($col === 'bo_table') {
|
||||
$insert_values[] = "'{$target_board}'";
|
||||
} else {
|
||||
$insert_values[] = "'" . sql_real_escape_string($value) . "'";
|
||||
}
|
||||
}
|
||||
|
||||
$row = sql_fetch("SELECT MIN(wr_num) AS min_wr_num FROM {$target_table}");
|
||||
$wr_num = $row['min_wr_num'] - 1;
|
||||
|
||||
$insert_fields[] = 'wr_num';
|
||||
$insert_values[] = "'{$wr_num}'";
|
||||
|
||||
$sql = "INSERT INTO {$target_table} (" . implode(', ', $insert_fields) . ")
|
||||
VALUES (" . implode(', ', $insert_values) . ")";
|
||||
|
||||
sql_query($sql);
|
||||
$new_wr_id = sql_insert_id();
|
||||
|
||||
if (isset($write['wr_is_comment']) && $write['wr_is_comment'] == 0) {
|
||||
sql_query("UPDATE {$target_table} SET wr_parent = '{$new_wr_id}' WHERE wr_id = '{$new_wr_id}'");
|
||||
}
|
||||
|
||||
if ($write['wr_file']) {
|
||||
copy_board_files($bo_table, $wr_id, $target_board, $new_wr_id, $write);
|
||||
}
|
||||
|
||||
if ($act_button === 'move') {
|
||||
sql_query("DELETE FROM {$g5['board_new_table']} WHERE bo_table = '{$bo_table}' AND wr_id = '{$wr_id}'");
|
||||
sql_query("DELETE FROM {$g5['board_good_table']} WHERE bo_table = '{$bo_table}' AND wr_id = '{$wr_id}'");
|
||||
|
||||
sql_query("DELETE FROM {$source_table} WHERE wr_id = '{$wr_id}'");
|
||||
|
||||
move_board_files($bo_table, $wr_id, $target_board, $new_wr_id);
|
||||
}
|
||||
|
||||
sql_query("UPDATE {$g5['board_table']} SET bo_count_write = bo_count_write + 1 WHERE bo_table = '{$target_board}'");
|
||||
|
||||
if ($act_button === 'move') {
|
||||
sql_query("UPDATE {$g5['board_table']} SET bo_count_write = bo_count_write - 1 WHERE bo_table = '{$bo_table}'");
|
||||
}
|
||||
|
||||
$success_count++;
|
||||
|
||||
} catch (Exception $e) {
|
||||
$fail_count++;
|
||||
$error_messages[] = "게시물 ID {$wr_id} 처리 중 오류: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
$action_text = ($act_button === 'move') ? '이동' : '복사';
|
||||
$message = "{$success_count}개의 게시물이 {$action_text}되었습니다.";
|
||||
|
||||
if ($fail_count > 0) {
|
||||
$message .= "\\n{$fail_count}개의 게시물 처리 중 오류가 발생했습니다.";
|
||||
if (!empty($error_messages)) {
|
||||
$message .= "\\n\\n상세 오류:\\n" . implode("\\n", array_slice($error_messages, 0, 5));
|
||||
if (count($error_messages) > 5) {
|
||||
$message .= "\\n... 외 " . (count($error_messages) - 5) . "건";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$qstr = 'bo_table=' . $bo_table;
|
||||
if (isset($_POST['sod']))
|
||||
$qstr .= '&sod=' . $_POST['sod'];
|
||||
if (isset($_POST['sfl']))
|
||||
$qstr .= '&sfl=' . $_POST['sfl'];
|
||||
if (isset($_POST['stx']))
|
||||
$qstr .= '&stx=' . urlencode($_POST['stx']);
|
||||
if (isset($_POST['page']))
|
||||
$qstr .= '&page=' . $_POST['page'];
|
||||
|
||||
goto_url('./board_move_list.php?' . $qstr, false, $message);
|
||||
|
||||
function copy_board_files($source_bo_table, $source_wr_id, $target_bo_table, $target_wr_id, $write_data)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$source_dir = G5_DATA_PATH . '/file/' . $source_bo_table;
|
||||
$target_dir = G5_DATA_PATH . '/file/' . $target_bo_table;
|
||||
|
||||
if (!is_dir($target_dir)) {
|
||||
@mkdir($target_dir, G5_DIR_PERMISSION);
|
||||
@chmod($target_dir, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
$file_field = 'wr_file' . $i;
|
||||
$source_field = 'bf_source' . $i;
|
||||
|
||||
if (isset($write_data[$file_field]) && $write_data[$file_field]) {
|
||||
$source_file = $source_dir . '/' . $write_data[$file_field];
|
||||
|
||||
if (file_exists($source_file)) {
|
||||
$new_filename = $target_wr_id . '_' . $i . '_' . time() . substr($write_data[$file_field], strrpos($write_data[$file_field], '.'));
|
||||
$target_file = $target_dir . '/' . $new_filename;
|
||||
|
||||
if (@copy($source_file, $target_file)) {
|
||||
@chmod($target_file, G5_FILE_PERMISSION);
|
||||
|
||||
$bf_source = isset($write_data[$source_field]) ? $write_data[$source_field] : basename($write_data[$file_field]);
|
||||
$bf_filesize = filesize($target_file);
|
||||
$bf_width = 0;
|
||||
$bf_height = 0;
|
||||
$bf_type = 0;
|
||||
|
||||
if (preg_match("/\.(gif|jpg|jpeg|png)$/i", $new_filename)) {
|
||||
$size = @getimagesize($target_file);
|
||||
if ($size) {
|
||||
$bf_width = $size[0];
|
||||
$bf_height = $size[1];
|
||||
$bf_type = $size[2];
|
||||
}
|
||||
}
|
||||
|
||||
$sql = " INSERT INTO {$g5['board_file_table']}
|
||||
SET bo_table = '{$target_bo_table}',
|
||||
wr_id = '{$target_wr_id}',
|
||||
bf_no = '{$i}',
|
||||
bf_source = '" . sql_real_escape_string($bf_source) . "',
|
||||
bf_file = '{$new_filename}',
|
||||
bf_download = 0,
|
||||
bf_content = '',
|
||||
bf_filesize = '{$bf_filesize}',
|
||||
bf_width = '{$bf_width}',
|
||||
bf_height = '{$bf_height}',
|
||||
bf_type = '{$bf_type}',
|
||||
bf_datetime = '" . G5_TIME_YMDHIS . "' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function move_board_files($source_bo_table, $source_wr_id, $target_bo_table, $target_wr_id)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$sql = "SELECT * FROM {$g5['board_file_table']}
|
||||
WHERE bo_table = '{$source_bo_table}' AND wr_id = '{$source_wr_id}'
|
||||
ORDER BY bf_no";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$source_dir = G5_DATA_PATH . '/file/' . $source_bo_table;
|
||||
$target_dir = G5_DATA_PATH . '/file/' . $target_bo_table;
|
||||
|
||||
if (!is_dir($target_dir)) {
|
||||
@mkdir($target_dir, G5_DIR_PERMISSION);
|
||||
@chmod($target_dir, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$source_file = $source_dir . '/' . $row['bf_file'];
|
||||
|
||||
if (file_exists($source_file)) {
|
||||
$new_filename = $target_wr_id . '_' . $row['bf_no'] . '_' . time() . substr($row['bf_file'], strrpos($row['bf_file'], '.'));
|
||||
$target_file = $target_dir . '/' . $new_filename;
|
||||
|
||||
if (@rename($source_file, $target_file)) {
|
||||
$sql = " INSERT INTO {$g5['board_file_table']}
|
||||
SET bo_table = '{$target_bo_table}',
|
||||
wr_id = '{$target_wr_id}',
|
||||
bf_no = '{$row['bf_no']}',
|
||||
bf_source = '" . sql_real_escape_string($row['bf_source']) . "',
|
||||
bf_file = '{$new_filename}',
|
||||
bf_download = '{$row['bf_download']}',
|
||||
bf_content = '" . sql_real_escape_string($row['bf_content']) . "',
|
||||
bf_filesize = '{$row['bf_filesize']}',
|
||||
bf_width = '{$row['bf_width']}',
|
||||
bf_height = '{$row['bf_height']}',
|
||||
bf_type = '{$row['bf_type']}',
|
||||
bf_datetime = '{$row['bf_datetime']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sql_query("DELETE FROM {$g5['board_file_table']} WHERE bo_table = '{$source_bo_table}' AND wr_id = '{$source_wr_id}'");
|
||||
}
|
||||
?>
|
||||
|
|
@ -33,4 +33,4 @@ EventHandler::triggerEvent("amber.admin.community_form_update");
|
|||
|
||||
sql_query($sql);
|
||||
|
||||
goto_url('./community_form.php');
|
||||
goto_url(G5_ADMIN_URL . '/community_form.php');
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ th a {
|
|||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
padding: 3px 10px;
|
||||
background: var(--theme-color-a);
|
||||
background: var(--theme-sub-500);
|
||||
color: #fff;
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
|
|
@ -12,33 +12,30 @@ th a+a {
|
|||
margin-top: 3px;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
html>body #container {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.addon_conf_form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#container {
|
||||
padding: 0 !important;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#container section.addon_config {
|
||||
#container .addon_config {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
height: auto;
|
||||
gap: 8px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
width: calc(100% - 8px);
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.addon_config>nav {
|
||||
min-width: 200px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--theme-color-d);
|
||||
border-radius: 4px;
|
||||
background: var(--theme-gray-800);
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
|
|
@ -48,12 +45,13 @@ th a+a {
|
|||
}
|
||||
|
||||
.addon_config>nav>a.selected {
|
||||
background: var(--theme-color-a);
|
||||
background: var(--theme-sub-300);
|
||||
color: var(--black);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.addon_config>nav>span {
|
||||
background: var(--theme-color-d);
|
||||
background: var(--theme-gray-500);
|
||||
color: #FFF;
|
||||
line-height: 48px;
|
||||
font-size: 14px;
|
||||
|
|
@ -71,10 +69,6 @@ td a {
|
|||
color: var(--theme-color-d);
|
||||
}
|
||||
|
||||
.footer-copyright {
|
||||
padding: 20px !important;
|
||||
}
|
||||
|
||||
span.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
|||
1950
AvocadoAmber/adm/css/default.css
Normal file
1950
AvocadoAmber/adm/css/default.css
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -19,89 +19,89 @@ include_once G5_ADMIN_PATH . '/admin.head.php';
|
|||
|
||||
add_stylesheet(get_embed_file("css", G5_PATH . "/adm/css/addon_config.css"), 1);
|
||||
?>
|
||||
<section class="addon_config">
|
||||
<nav><span>설치된 애드온 목록</span><?php
|
||||
if (!empty(AddonLoader::$addons)) {
|
||||
foreach (AddonLoader::$addons as $menu) {
|
||||
$selected = isset($_GET["addon"]) && $_GET["addon"] == $menu->className ? " selected" : "";
|
||||
echo "<a href=\"./addon_config.php?addon={$menu->className}\" class=\"addon_menu{$selected}\">{$menu->name}</a>";
|
||||
}
|
||||
} else {
|
||||
echo "<a href=\"#\">설치된 애드온이 없습니다.</a>";
|
||||
}
|
||||
?></nav>
|
||||
<section>
|
||||
<?php
|
||||
if (isset($_GET["addon"])) {
|
||||
if (array_key_exists($_GET["addon"], AddonLoader::$addons)) {
|
||||
$addon = AddonLoader::$addons[$addon];
|
||||
?>
|
||||
<header>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 140px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
애드온 이름
|
||||
</th>
|
||||
<td>
|
||||
<?= $addon->name ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
애드온 제작자
|
||||
</th>
|
||||
<td>
|
||||
<?= $addon->link ? "<a href=\"" . $addon->link . "\" target=\"_blank\">" . $addon->author . "</a> <span style=\"font-size: 11px\">[{$addon->link}]</span>" : $addon->author ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
애드온 설명
|
||||
</th>
|
||||
<td>
|
||||
<?= $addon->description ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
애드온 버전
|
||||
</th>
|
||||
<td>
|
||||
<?= $addon->version ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</header>
|
||||
<content>
|
||||
<form method="POST" action="./addon_config_update.php">
|
||||
<input type="hidden" name="addon" value="<?= $addon->className ?>" />
|
||||
<?php
|
||||
if (method_exists($addon, "printConfigForm")) {
|
||||
$addon->printConfigForm();
|
||||
}
|
||||
?>
|
||||
<div class="btn_confirm">
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="저장" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</content><?php
|
||||
<form method="POST" action="./addon_config_update.php" class="addon_conf_form">
|
||||
<section class="addon_config">
|
||||
<nav><span>설치된 애드온 목록</span><?php
|
||||
if (!empty(AddonLoader::$addons)) {
|
||||
foreach (AddonLoader::$addons as $menu) {
|
||||
$selected = isset($_GET["addon"]) && $_GET["addon"] == $menu->className ? " selected" : "";
|
||||
echo "<a href=\"./addon_config.php?addon={$menu->className}\" class=\"addon_menu{$selected}\">{$menu->name}</a>";
|
||||
}
|
||||
} else {
|
||||
echo "<span class=\"empty\">애드온을 선택하세요</span>";
|
||||
echo "<a href=\"#\">설치된 애드온이 없습니다.</a>";
|
||||
}
|
||||
?>
|
||||
?></nav>
|
||||
<section>
|
||||
<?php
|
||||
if (isset($_GET["addon"])) {
|
||||
if (array_key_exists($_GET["addon"], AddonLoader::$addons)) {
|
||||
$addon = AddonLoader::$addons[$addon];
|
||||
?>
|
||||
<header>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 140px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
애드온 이름
|
||||
</th>
|
||||
<td>
|
||||
<?= $addon->name ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
애드온 제작자
|
||||
</th>
|
||||
<td>
|
||||
<?= $addon->link ? "<a href=\"" . $addon->link . "\" target=\"_blank\">" . $addon->author . "</a> <span style=\"font-size: 11px\">[{$addon->link}]</span>" : $addon->author ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
애드온 설명
|
||||
</th>
|
||||
<td>
|
||||
<?= $addon->description ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
애드온 버전
|
||||
</th>
|
||||
<td>
|
||||
<?= $addon->version ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</header>
|
||||
<content>
|
||||
<input type="hidden" name="addon" value="<?= $addon->className ?>" />
|
||||
<?php
|
||||
if (method_exists($addon, "printConfigForm")) {
|
||||
$addon->printConfigForm();
|
||||
}
|
||||
?>
|
||||
</content><?php
|
||||
}
|
||||
} else {
|
||||
echo "<span class=\"empty\">애드온을 선택하세요</span>";
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
<div class="btn_confirm">
|
||||
<div class="btn">
|
||||
<span class="material-icons">save</span>
|
||||
<input type="submit" value="저장" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
include_once G5_ADMIN_PATH . '/admin.tail.php';
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ if (!sql_fetch_array(sql_query("DESC {$g5['font_table']}"))) {
|
|||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3";
|
||||
sql_query($sql, false);
|
||||
|
||||
sql_query("INSERT INTO `avo_editor_fonts`
|
||||
sql_query("INSERT INTO `{$g5['font_table']}`
|
||||
(`font_name`, `font_family`, `font_url`, `font_weight`, `font_style`)
|
||||
VALUES ('에스코어드림', 'S-CoreDream-3Light', 'url(\'https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-3Light.woff\') format(\'woff\')', 'normal', 'normal');");
|
||||
sql_query("INSERT INTO `avo_editor_fonts` (`font_name`, `font_family`, `font_url`, `font_weight`, `font_style`)
|
||||
sql_query("INSERT INTO `{$g5['font_table']}` (`font_name`, `font_family`, `font_url`, `font_weight`, `font_style`)
|
||||
VALUES ('평창평화체', 'PyeongChangPeace-Light', 'url(\'https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2206-02@1.0/PyeongChangPeace-Light.woff2\') format(\'woff2\')', '300', 'normal');");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ $colspan = 11;
|
|||
$me_name = str_replace($search, $replace, $row['me_name']);
|
||||
?>
|
||||
<article class="<?php echo $bg; ?> menu_list menu_group_<?php echo substr($row['me_code'], 0, 2); ?>"
|
||||
data-code="<?php echo substr($row['me_code'], 0, 2); ?>"
|
||||
data-name="<?php echo $me_name; ?>">
|
||||
<div class="menu_reqset">
|
||||
<div class="al_menu" style="width: 50px">
|
||||
|
|
@ -250,23 +251,7 @@ $colspan = 11;
|
|||
if (!confirm("메뉴를 삭제하시겠습니까?"))
|
||||
return false;
|
||||
|
||||
var $tr = $(this).closest("tr");
|
||||
if ($tr.find("td.sub_menu_class").size() > 0) {
|
||||
$tr.remove();
|
||||
} else {
|
||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||
$("tr.menu_group_" + code).remove();
|
||||
}
|
||||
|
||||
if ($("#menulist tr.menu_list").size() < 1) {
|
||||
var list = "<tr id=\"empty_menu_list\"><td colspan=\"<?php echo $colspan; ?>\" class=\"empty_table\">자료가 없습니다.</td></tr>\n";
|
||||
$("#menulist table tbody").append(list);
|
||||
} else {
|
||||
$("#menulist tr.menu_list").each(function (index) {
|
||||
$(this).removeClass("bg0 bg1")
|
||||
.addClass("bg" + (index % 2));
|
||||
});
|
||||
}
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ if ($is_admin && $is_admin == "super") {
|
|||
}
|
||||
|
||||
if (!sql_table_exists($g5["article_table"])) {
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `avo_article` (
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `{$g5["article_table"]}` (
|
||||
`ar_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`ar_theme` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`ar_code` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
|
|
@ -53,7 +53,7 @@ if ($is_admin && $is_admin == "super") {
|
|||
}
|
||||
|
||||
if (!sql_table_exists($g5["article_default_table"])) {
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `avo_article_default` (
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `{$g5["article_default_table"]}` (
|
||||
`ad_id` INT(11) NOT NULL AUTO_INCREMENT ,
|
||||
`ad_use_thumb` INT(11) NOT NULL DEFAULT '0',
|
||||
`ad_use_head` INT(11) NOT NULL DEFAULT '0',
|
||||
|
|
@ -83,7 +83,7 @@ if ($is_admin && $is_admin == "super") {
|
|||
}
|
||||
|
||||
if (!sql_table_exists($g5["value_table"])) {
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `avo_article_value` (
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `{$g5["value_table"]}` (
|
||||
`av_id` INT(11) NOT NULL AUTO_INCREMENT ,
|
||||
`ch_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`ar_theme` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
|
|
|
|||
|
|
@ -276,7 +276,126 @@ function getWebServerDiskUsage()
|
|||
// $documentRoot = $_SERVER['DOCUMENT_ROOT'] ?? '/var/www/html';
|
||||
return getDiskUsage();
|
||||
}
|
||||
|
||||
function getNetworkTraffic()
|
||||
{
|
||||
// G5_PATH의 마지막 폴더명 확인
|
||||
$pathParts = explode('/', rtrim(G5_PATH, '/'));
|
||||
$lastFolder = end($pathParts);
|
||||
|
||||
if ($lastFolder === 'AvocadoAmber') {
|
||||
$netJsonPath = dirname(G5_PATH) . '/net.json';
|
||||
|
||||
if (file_exists($netJsonPath)) {
|
||||
$jsonContent = file_get_contents($netJsonPath);
|
||||
$data = json_decode($jsonContent, true);
|
||||
|
||||
if ($data && isset($data['interfaces'][0]['traffic']['fiveminute'])) {
|
||||
$fiveminute = $data['interfaces'][0]['traffic']['fiveminute'];
|
||||
|
||||
if (count($fiveminute) > 0) {
|
||||
// 현재 날짜 (오늘)
|
||||
$today = getdate();
|
||||
$todayYear = $today['year'];
|
||||
$todayMonth = $today['mon'];
|
||||
$todayDay = $today['mday'];
|
||||
|
||||
$rx = 0;
|
||||
$tx = 0;
|
||||
|
||||
// fiveminute 데이터에서 오늘 날짜와 일치하는 데이터만 합산
|
||||
foreach ($fiveminute as $entry) {
|
||||
$entryYear = $entry['date']['year'];
|
||||
$entryMonth = $entry['date']['month'];
|
||||
$entryDay = $entry['date']['day'];
|
||||
$entryHour = $entry['time']['hour'];
|
||||
$entryMinute = $entry['time']['minute'];
|
||||
|
||||
// 오늘 날짜와 일치하고, 0시 0분이 아닌 경우만 합산
|
||||
if (
|
||||
$entryYear == $todayYear &&
|
||||
$entryMonth == $todayMonth &&
|
||||
$entryDay == $todayDay &&
|
||||
!($entryHour == 0 && $entryMinute == 0)
|
||||
) {
|
||||
$rx += $entry['rx'];
|
||||
$tx += $entry['tx'];
|
||||
}
|
||||
}
|
||||
|
||||
$total = $rx + $tx;
|
||||
|
||||
// 일일 최대 트래픽 35GB (바이트로 변환)
|
||||
$maxTraffic = 35 * 1024 * 1024 * 1024;
|
||||
$usagePercent = round(($total / $maxTraffic) * 100, 2);
|
||||
|
||||
// 오늘 날짜 정보
|
||||
$todayDate = $todayYear . '-' .
|
||||
str_pad($todayMonth, 2, '0', STR_PAD_LEFT) . '-' .
|
||||
str_pad($todayDay, 2, '0', STR_PAD_LEFT);
|
||||
|
||||
return [
|
||||
'rx' => $rx,
|
||||
'tx' => $tx,
|
||||
'total' => $total,
|
||||
'max' => $maxTraffic,
|
||||
'usage_percent' => $usagePercent,
|
||||
'date' => $todayDate,
|
||||
'available' => true
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ['available' => false];
|
||||
}
|
||||
|
||||
$webDiskUsage = getWebServerDiskUsage();
|
||||
$networkTraffic = getNetworkTraffic();
|
||||
?>
|
||||
<style>
|
||||
.server-info {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.server-info-item {
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.server-info-item h3 {
|
||||
margin: 0 0 15px 0;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
position: relative;
|
||||
height: 200px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.info-text {
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.info-text strong {
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
|
||||
|
||||
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);"
|
||||
enctype="multipart/form-data">
|
||||
<input type="hidden" name="token" value="" id="token">
|
||||
|
|
@ -289,40 +408,161 @@ function getWebServerDiskUsage()
|
|||
<section id="anc_001">
|
||||
<h2 class="h2_frm">서버 정보</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<?php
|
||||
|
||||
echo "<h3>디스크 용량</h3>";
|
||||
$webDiskUsage = getWebServerDiskUsage();
|
||||
echo "총 용량: " . formatBytes($webDiskUsage['total']) . "<br>";
|
||||
echo "사용 중: " . formatBytes($webDiskUsage['used']) . "<br>";
|
||||
echo "사용 가능: " . formatBytes($webDiskUsage['free']) . "<br>";
|
||||
echo "사용률: " . $webDiskUsage['usage_percent'] . "%<br>";
|
||||
?>
|
||||
<div class="server-info">
|
||||
<!-- 디스크 용량 -->
|
||||
<div class="server-info-item">
|
||||
<h3>디스크 용량</h3>
|
||||
<div class="chart-container">
|
||||
<canvas id="diskChart"></canvas>
|
||||
</div>
|
||||
<div class="info-text">
|
||||
<strong>총 용량:</strong> <?php echo formatBytes($webDiskUsage['total']); ?><br>
|
||||
<strong>사용 중:</strong> <?php echo formatBytes($webDiskUsage['used']); ?><br>
|
||||
<strong>사용 가능:</strong> <?php echo formatBytes($webDiskUsage['free']); ?><br>
|
||||
<strong>사용률:</strong> <?php echo $webDiskUsage['usage_percent']; ?>%
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($networkTraffic['available']): ?>
|
||||
<!-- 일일 트래픽 -->
|
||||
<div class="server-info-item">
|
||||
<h3>일일 트래픽 (<?php echo $networkTraffic['date']; ?>)</h3>
|
||||
<div class="chart-container">
|
||||
<canvas id="trafficChart"></canvas>
|
||||
</div>
|
||||
<div class="info-text">
|
||||
<strong>수신(RX):</strong> <?php echo formatBytes($networkTraffic['rx']); ?><br>
|
||||
<strong>송신(TX):</strong> <?php echo formatBytes($networkTraffic['tx']); ?><br>
|
||||
<strong>총 사용량:</strong> <?php echo formatBytes($networkTraffic['total']); ?><br>
|
||||
<strong>일일 한도:</strong> <?php echo formatBytes($networkTraffic['max']); ?><br>
|
||||
<strong>사용률:</strong> <?php echo $networkTraffic['usage_percent']; ?>%
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
// 디스크 용량 차트
|
||||
const diskCtx = document.getElementById('diskChart').getContext('2d');
|
||||
new Chart(diskCtx, {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: ['사용 중', '사용 가능'],
|
||||
datasets: [{
|
||||
data: [
|
||||
<?php echo $webDiskUsage['used']; ?>,
|
||||
<?php echo $webDiskUsage['free']; ?>
|
||||
],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.8)',
|
||||
'rgba(75, 192, 192, 0.8)'
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)',
|
||||
'rgba(75, 192, 192, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: 'bottom',
|
||||
},
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
label: function (context) {
|
||||
const label = context.label || '';
|
||||
const value = context.parsed;
|
||||
const total = context.dataset.data.reduce((a, b) => a + b, 0);
|
||||
const percentage = ((value / total) * 100).toFixed(2);
|
||||
|
||||
// 바이트를 GB로 변환
|
||||
const gb = (value / (1024 * 1024 * 1024)).toFixed(2);
|
||||
return label + ': ' + gb + ' GB (' + percentage + '%)';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
<?php if ($networkTraffic['available']): ?>
|
||||
// 트래픽 차트
|
||||
const trafficCtx = document.getElementById('trafficChart').getContext('2d');
|
||||
new Chart(trafficCtx, {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: ['사용량', '남은 용량'],
|
||||
datasets: [{
|
||||
data: [
|
||||
<?php echo $networkTraffic['total']; ?>,
|
||||
<?php echo max(0, $networkTraffic['max'] - $networkTraffic['total']); ?>
|
||||
],
|
||||
backgroundColor: [
|
||||
'rgba(54, 162, 235, 0.8)',
|
||||
'rgba(201, 203, 207, 0.8)'
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(201, 203, 207, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: 'bottom',
|
||||
},
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
label: function (context) {
|
||||
const label = context.label || '';
|
||||
const value = context.parsed;
|
||||
const total = <?php echo $networkTraffic['max']; ?>;
|
||||
const percentage = ((value / total) * 100).toFixed(2);
|
||||
|
||||
// 바이트를 GB로 변환
|
||||
const gb = (value / (1024 * 1024 * 1024)).toFixed(2);
|
||||
return label + ': ' + gb + ' GB (' + percentage + '%)';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
|
||||
<section id="anc_002">
|
||||
<h2 class="h2_frm">홈페이지 기본환경 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<?php
|
||||
$sql = "SELECT mb_id, mb_nick FROM {$g5['member_table']} WHERE mb_level >= '{$level}' ";
|
||||
$accounts = sql_query($sql);
|
||||
$accountList = [];
|
||||
while($row = sql_fetch_array($accounts)) {
|
||||
$accountList[$row['mb_id']] = "{$row['mb_nick']} ({$row['mb_id']})";
|
||||
}
|
||||
<?php
|
||||
$sql = "SELECT mb_id, mb_nick FROM {$g5['member_table']} WHERE mb_level >= '{$level}' ";
|
||||
$accounts = sql_query($sql);
|
||||
$accountList = [];
|
||||
while ($row = sql_fetch_array($accounts)) {
|
||||
$accountList[$row['mb_id']] = "{$row['mb_nick']} ({$row['mb_id']})";
|
||||
}
|
||||
|
||||
setOptionList("최고관리자", "홈페이지의 최고 관리자 계정을 지정합니다.", $accountList, "cf_admin", '', $config, true);
|
||||
setTextInput("홈페이지 이름", "", "cf_title", $config);
|
||||
setTextInput("홈페이지 설명", "", "cf_site_descript", $config);
|
||||
setCheckbox("홈페이지 공개", "로그인을 하지 않아도 홈페이지를 확인할 수 있도록 설정합니다.", "cf_open", "1", $config);
|
||||
setCheckbox("계정 생성", "홈페이지 가입이 가능하도록 설정합니다.", "cf_1", "1", $config);
|
||||
setCheckbox("커뮤니티 기능", "홈페이지 내에 커뮤니티 관련 기능을 활성화 합니다.<br>데이터베이스를 설정했더라도 <b>사용하지 않음</b> 상태인 경우 관련 메뉴가 출력되지 않습니다.", "cf_community", "1", $config);
|
||||
setImageFile("파비콘 설정", "홈페이지에 적용할 파비콘 이미지를 설정합니다.", "cf_favicon", $config);
|
||||
setImageFile("커서 설정", "홈페이지에 적용할 커서 이미지를 설정합니다.", "cf_cursor", $config);
|
||||
setImageFile("SNS 카드 이미지 설정", "SNS등에서 링크 시 카드 이미지에 등록될 이미지를 설정합니다. 290px × 160px 크기로 설정하는 것이 좋습니다.", "cf_site_img", $config);
|
||||
setListEditInput("접근 가능 IP", "입력된 IP의 컴퓨터만 접근할 수 있습니다. 123.123.+ 도 입력 가능.", "cf_possible_ip", $config, "\n");
|
||||
setListEditInput("접근 차단 IP", "입력된 IP의 컴퓨터는 접근할 수 없음. 123.123.+ 도 입력 가능.", "cf_intercept_ip", $config, "\n");
|
||||
setCheckbox("보안 연결(https) 강제 비활성화", "<b>※ 이 옵션을 사용하는 경우 제3자에 의해 홈페이지와 통신하는 내용이 감청될 가능성이 있습니다.</b><br>호스팅 환경이 정상적으로 https 를 지원하지 않는 경우에만 설정하세요.", "cf_use_http", "1", $config);
|
||||
setOptionList("최고관리자", "홈페이지의 최고 관리자 계정을 지정합니다.", $accountList, "cf_admin", '', $config, true);
|
||||
setTextInput("홈페이지 이름", "", "cf_title", $config);
|
||||
setTextInput("홈페이지 설명", "", "cf_site_descript", $config);
|
||||
setCheckbox("홈페이지 공개", "로그인을 하지 않아도 홈페이지를 확인할 수 있도록 설정합니다.", "cf_open", "1", $config);
|
||||
setCheckbox("계정 생성", "홈페이지 가입이 가능하도록 설정합니다.", "cf_1", "1", $config);
|
||||
setCheckbox("커뮤니티 기능", "홈페이지 내에 커뮤니티 관련 기능을 활성화 합니다.<br>데이터베이스를 설정했더라도 <b>사용하지 않음</b> 상태인 경우 관련 메뉴가 출력되지 않습니다.", "cf_community", "1", $config);
|
||||
setImageFile("파비콘 설정", "홈페이지에 적용할 파비콘 이미지를 설정합니다.", "cf_favicon", $config);
|
||||
setImageFile("커서 설정", "홈페이지에 적용할 커서 이미지를 설정합니다.", "cf_cursor", $config);
|
||||
setImageFile("SNS 카드 이미지 설정", "SNS등에서 링크 시 카드 이미지에 등록될 이미지를 설정합니다. 290px × 160px 크기로 설정하는 것이 좋습니다.", "cf_site_img", $config);
|
||||
setListEditInput("접근 가능 IP", "입력된 IP의 컴퓨터만 접근할 수 있습니다. 123.123.+ 도 입력 가능.", "cf_possible_ip", $config, "\n");
|
||||
setListEditInput("접근 차단 IP", "입력된 IP의 컴퓨터는 접근할 수 없음. 123.123.+ 도 입력 가능.", "cf_intercept_ip", $config, "\n");
|
||||
setCheckbox("보안 연결(https) 강제 비활성화", "<b>※ 이 옵션을 사용하는 경우 제3자에 의해 홈페이지와 통신하는 내용이 감청될 가능성이 있습니다.</b><br>호스팅 환경이 정상적으로 https 를 지원하지 않는 경우에만 설정하세요.", "cf_use_http", "1", $config);
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -335,22 +575,22 @@ function getWebServerDiskUsage()
|
|||
</div>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<?php
|
||||
$herfList = [
|
||||
"_blank" => "_blank",
|
||||
"_self" => "_self",
|
||||
"_top" => "_top",
|
||||
"_new" => "_new"
|
||||
];
|
||||
$memberSkinList = array_merge(['' => '선택'], getSkinList('member'));
|
||||
$memberLevelList = getMemberLevels();
|
||||
$herfList = [
|
||||
"_blank" => "_blank",
|
||||
"_self" => "_self",
|
||||
"_top" => "_top",
|
||||
"_new" => "_new"
|
||||
];
|
||||
$memberSkinList = array_merge(['' => '선택'], getSkinList('member'));
|
||||
$memberLevelList = getMemberLevels();
|
||||
|
||||
setOptionList("새 창 링크 시 동작 선택", "글 내용 중 자동으로 링크를 변환할 때 동작 방식을 결정합니다.", $herfList, "cf_link_target", '', $config, true);
|
||||
setNumberInput("글쓰기 간격", "게시글 도배 방지를 위해 글 작성이 가능한 최소 시간을 설정합니다.", "cf_delay_sec", $config, "", "초 이후 가능");
|
||||
setListEditInput("단어 필터링", "입력된 단어가 포함된 내용은 게시할 수 없습니다.", "cf_filter", $config, ",");
|
||||
setOptionList("회원 스킨", "", $memberSkinList, "cf_member_skin", '', $config, true);
|
||||
setOptionList("회원 기본 권한", "", $memberLevelList, "cf_register_level", '', $config, true);
|
||||
setListEditInput("아이디 및 닉네임 금지 단어 설정", "회원아이디, 닉네임으로 사용할 수 없는 단어를 정합니다.", "cf_prohibit_id", $config, ",");
|
||||
setNumberInput("회원정보 보존 기간", "회원이 탈퇴한 후 회원의 정보를 보존할 기간을 설정합니다. 기본값은 30일 입니다.", "cf_leave_day", $config, "", "일 이후 자동 삭제");
|
||||
setOptionList("새 창 링크 시 동작 선택", "글 내용 중 자동으로 링크를 변환할 때 동작 방식을 결정합니다.", $herfList, "cf_link_target", '', $config, true);
|
||||
setNumberInput("글쓰기 간격", "게시글 도배 방지를 위해 글 작성이 가능한 최소 시간을 설정합니다.", "cf_delay_sec", $config, "", "초 이후 가능");
|
||||
setListEditInput("단어 필터링", "입력된 단어가 포함된 내용은 게시할 수 없습니다.", "cf_filter", $config, ",");
|
||||
setOptionList("회원 스킨", "", $memberSkinList, "cf_member_skin", '', $config, true);
|
||||
setOptionList("회원 기본 권한", "", $memberLevelList, "cf_register_level", '', $config, true);
|
||||
setListEditInput("아이디 및 닉네임 금지 단어 설정", "회원아이디, 닉네임으로 사용할 수 없는 단어를 정합니다.", "cf_prohibit_id", $config, ",");
|
||||
setNumberInput("회원정보 보존 기간", "회원이 탈퇴한 후 회원의 정보를 보존할 기간을 설정합니다. 기본값은 30일 입니다.", "cf_leave_day", $config, "", "일 이후 자동 삭제");
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ $g5['title'] = "테마설정";
|
|||
include_once "./admin.head.php";
|
||||
?>
|
||||
<script src="<?php echo G5_ADMIN_URL; ?>/js/theme.js"></script>
|
||||
<div class="local_wr">
|
||||
<div class="local_wr admin_theme">
|
||||
<span class="btn_ov01"><span class="ov_txt">설치된 테마</span><span class="ov_num">
|
||||
<?php echo number_format($total_count); ?></span></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -178,9 +178,9 @@ switch ($day) {
|
|||
var plot1 = $.jqplot('chart1', [line1, line2], {
|
||||
seriesDefaults: {
|
||||
<?php if ($graph == 'bar') { ?>
|
||||
renderer: $.jqplot.BarRenderer,
|
||||
renderer: $.jqplot.BarRenderer,
|
||||
<?php } ?>
|
||||
pointLabels: { show: true }
|
||||
pointLabels: { show: true }
|
||||
},
|
||||
axes: {
|
||||
xaxis: {
|
||||
|
|
@ -198,8 +198,10 @@ switch ($day) {
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
include_once "./admin.tail.php";
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
include_once "./admin.tail.php";
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ if (!($w == '' || $w == 'u' || $w == 'r')) {
|
|||
}
|
||||
|
||||
if ($w == 'u' || $w == 'r') {
|
||||
if ($write['wr_id']) {
|
||||
if ($write['wr_id'] || $wr_parent == -1) {
|
||||
// 가변 변수로 $wr_1 .. $wr_10 까지 만든다.
|
||||
for ($i = 1; $i <= 10; $i++) {
|
||||
$vvar = "wr_" . $i;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ if ($w == 'c' && $_SESSION['ss_datetime'] >= (G5_SERVER_TIME - $config['cf_delay
|
|||
set_session('ss_datetime', G5_SERVER_TIME);
|
||||
|
||||
$wr = get_write($write_table, $wr_id);
|
||||
if (empty($wr['wr_id']))
|
||||
if (empty($wr['wr_id']) && $wr_id != -1)
|
||||
alert("글이 존재하지 않습니다.\\n글이 삭제되었거나 이동하였을 수 있습니다.");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ $notice_array = explode(",", $board['bo_notice']);
|
|||
|
||||
if ($w == 'u' || $w == 'r') {
|
||||
$wr = get_write($write_table, $wr_id);
|
||||
if (!$wr['wr_id']) {
|
||||
if (!$wr['wr_id'] && $wr_parent != -1) {
|
||||
alert("글이 존재하지 않습니다.\\n글이 삭제되었거나 이동하였을 수 있습니다.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -478,10 +478,10 @@ class Setting
|
|||
"html" => "<td class=\"bo-right\">{$desc}</td>
|
||||
<td>
|
||||
<div class=\"setter\">
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:120px;justify-content:end;\">X<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[1]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:120px;justify-content:end;\">Y<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[2]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:120px;justify-content:end;\">너비<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[3]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:120px;justify-content:end;\">높이<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[4]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\"><span class=\"css-left-desc\">X</span><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[1]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\"><span class=\"css-left-desc\">Y</span><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[2]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\"><span class=\"css-left-desc\">너비</span><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[3]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\"><span class=\"css-left-desc\">높이</span><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[4]}\"/>px</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>"
|
||||
|
|
@ -514,10 +514,10 @@ class Setting
|
|||
"html" => "<td class=\"bo-right\">{$desc}</td>
|
||||
<td>
|
||||
<div class=\"setter\">
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:100px;justify-content:end;\"><div style=\"width: 16px; height: 16px; background: #866; box-sizing: border-box; border-radius: 8px 0 0 0;\"></div><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[1]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:100px;justify-content:end;\"><div style=\"width: 16px; height: 16px; background: #866; box-sizing: border-box; border-radius: 0 8px 0 0;\"></div><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[2]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:100px;justify-content:end;\"><div style=\"width: 16px; height: 16px; background: #866; box-sizing: border-box; border-radius: 0 0 8px 0;\"></div><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[3]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:100px;justify-content:end;\"><div style=\"width: 16px; height: 16px; background: #866; box-sizing: border-box; border-radius: 0 0 0 8px;\"></div><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[4]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\"><div class=\"css-setting-radius\" style=\"border-radius: 8px 0 0 0;\"></div><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[1]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\"><div class=\"css-setting-radius\" style=\"border-radius: 0 8px 0 0;\"></div><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[2]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\"><div class=\"css-setting-radius\" style=\"border-radius: 0 0 8px 0;\"></div><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[3]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\"><div class=\"css-setting-radius\" style=\"border-radius: 0 0 0 8px;\"></div><input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[4]}\"/>px</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>"
|
||||
|
|
@ -550,10 +550,10 @@ class Setting
|
|||
"html" => "<td class=\"bo-right\">{$desc}</td>
|
||||
<td>
|
||||
<div class=\"setter\">
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:100px;justify-content:end;\">상<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[1]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:100px;justify-content:end;\">하<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[2]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:100px;justify-content:end;\">좌<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[3]}\"/>px</div>
|
||||
<div style=\"display:flex;gap:8px;border:1px solid #F4F4F2;align-items:center;padding:4px 8px;width:100px;justify-content:end;\">우<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[4]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\">상<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[1]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\">하<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[2]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\">좌<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[3]}\"/>px</div>
|
||||
<div class=\"css-setting-multi\">우<input type=\"number\" id=\"cs_etc_{$idx}_1_{$this->cs_name}\" min=\"-9999\" max=\"9999\" size=\"20\" name=\"cs_etc_{$idx}[{$this->idx}][]\" value=\"{$values[4]}\"/>px</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>"
|
||||
|
|
@ -623,9 +623,9 @@ class Setting
|
|||
$key1 = "cs_etc_{$idx}";
|
||||
$key2 = "cs_etc_{$idx2}";
|
||||
if (is_array($default) && isset($default[0]) && isset($default[1])) {
|
||||
if (!isset($this->$key1))
|
||||
if (empty($this->$key1))
|
||||
$this->$key1 = array_key_exists($default[0], $options) ? $default[0] : "";
|
||||
if (!isset($this->$key2))
|
||||
if (empty($this->$key2) && $this->$key2 !== 0)
|
||||
$this->$key2 = intval($default[1]);
|
||||
}
|
||||
$options_html = "";
|
||||
|
|
@ -665,15 +665,15 @@ class Setting
|
|||
$key3 = "cs_etc_{$idx3}";
|
||||
|
||||
if (is_array($default) && isset($default[0]) && isset($default[1])) {
|
||||
if (!isset($this->$key1))
|
||||
if (empty($this->$key1))
|
||||
$this->$key1 = array_key_exists($default[0], $options) ? $default[0] : "";
|
||||
|
||||
if (!isset($this->$key2))
|
||||
if (empty($this->$key2) && $this->$key2 !== 0)
|
||||
$this->$key2 = intval($default[1]);
|
||||
}
|
||||
|
||||
if (is_array($default) && isset($default[2])) {
|
||||
if (!isset($this->$key3))
|
||||
if (empty($this->$key3) && $this->$key3 !== 0) {
|
||||
if ($this->$key3 === "" || !isset($this->$key3))
|
||||
$this->$key3 = intval($default[2]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/*******************************************************************************
|
||||
** 공통 변수, 상수, 코드
|
||||
*******************************************************************************/
|
||||
error_reporting(E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_PARSE | E_USER_ERROR);
|
||||
error_reporting(E_CORE_ERROR | E_COMPILE_ERROR | E_ERROR | E_PARSE | E_USER_ERROR);
|
||||
|
||||
// 보안설정이나 프레임이 달라도 쿠키가 통하도록 설정
|
||||
header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"');
|
||||
|
|
@ -420,10 +420,10 @@ if (file_exists($dbconfig_file)) {
|
|||
<link rel="stylesheet" href="install/install.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="ins_bar">
|
||||
<span id="bar_img">AVOCADO EDITION</span>
|
||||
<span id="bar_txt">Message</span>
|
||||
</div>
|
||||
<?php
|
||||
$RIGHT_MESSAGE = "Message";
|
||||
include G5_PATH . "/install/install_header.php";
|
||||
?>
|
||||
<h1>아보카도 에디션을 먼저 설치해주십시오.</h1>
|
||||
<div class="ins_inner">
|
||||
<p>다음 파일을 찾을 수 없습니다.</p>
|
||||
|
|
@ -462,10 +462,10 @@ if (!defined('G5_IS_ADMIN')) {
|
|||
<link rel="stylesheet" href="<?= G5_URL ?>/install/install.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="ins_bar">
|
||||
<span id="bar_img">AVOCADO EDITION</span>
|
||||
<span id="bar_txt">Message</span>
|
||||
</div>
|
||||
<?php
|
||||
$RIGHT_MESSAGE = "Message";
|
||||
include G5_PATH . "/install/install_header.php";
|
||||
?>
|
||||
<h1>아보카도 에디션 설정을 완료해주십시오.</h1>
|
||||
<br />
|
||||
<div class="ins_inner">
|
||||
|
|
|
|||
BIN
AvocadoAmber/css/fonts/SCDream1.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream1.otf
Normal file
Binary file not shown.
BIN
AvocadoAmber/css/fonts/SCDream2.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream2.otf
Normal file
Binary file not shown.
BIN
AvocadoAmber/css/fonts/SCDream3.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream3.otf
Normal file
Binary file not shown.
BIN
AvocadoAmber/css/fonts/SCDream4.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream4.otf
Normal file
Binary file not shown.
BIN
AvocadoAmber/css/fonts/SCDream5.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream5.otf
Normal file
Binary file not shown.
BIN
AvocadoAmber/css/fonts/SCDream6.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream6.otf
Normal file
Binary file not shown.
BIN
AvocadoAmber/css/fonts/SCDream7.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream7.otf
Normal file
Binary file not shown.
BIN
AvocadoAmber/css/fonts/SCDream8.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream8.otf
Normal file
Binary file not shown.
BIN
AvocadoAmber/css/fonts/SCDream9.otf
Normal file
BIN
AvocadoAmber/css/fonts/SCDream9.otf
Normal file
Binary file not shown.
55
AvocadoAmber/css/scdream.css
Normal file
55
AvocadoAmber/css/scdream.css
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 900;
|
||||
src: url(./fonts/SCDream9.otf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 800;
|
||||
src: url(./fonts/SCDream8.otf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 700;
|
||||
src: url(./fonts/SCDream7.otf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 600;
|
||||
src: url(./fonts/SCDream6.otf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 500;
|
||||
src: url(./fonts/SCDream5.otf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 400;
|
||||
src: url(./fonts/SCDream4.otf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 300;
|
||||
src: url(./fonts/SCDream3.otf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 200;
|
||||
src: url(./fonts/SCDream2.otf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'SCDream';
|
||||
font-weight: 100;
|
||||
src: url(./fonts/SCDream1.otf);
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ Character::resetSearchCount();
|
|||
|
||||
if ($is_admin) {
|
||||
if (!sql_table_exists($g5["article_table"])) {
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `avo_article` (
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `{$g5["article_table"]}` (
|
||||
`ar_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`ar_theme` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`ar_code` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
|
|
@ -26,7 +26,7 @@ if ($is_admin) {
|
|||
}
|
||||
|
||||
if (!sql_table_exists($g5["article_default_table"])) {
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `avo_article_default` (
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `{$g5["article_default_table"]}` (
|
||||
`ad_id` INT(11) NOT NULL AUTO_INCREMENT ,
|
||||
`ad_use_thumb` INT(11) NOT NULL DEFAULT '0',
|
||||
`ad_use_head` INT(11) NOT NULL DEFAULT '0',
|
||||
|
|
@ -56,7 +56,7 @@ if ($is_admin) {
|
|||
}
|
||||
|
||||
if (!sql_table_exists($g5["value_table"])) {
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `avo_article_value` (
|
||||
sql_query("CREATE TABLE IF NOT EXISTS `{$g5["value_table"]}` (
|
||||
`av_id` INT(11) NOT NULL AUTO_INCREMENT ,
|
||||
`ch_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`ar_theme` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
|
|
|
|||
|
|
@ -87,9 +87,10 @@ $html_class .= $_COOKIE['header_close'] == 'close' ? " close-header" : "";
|
|||
include_once __DIR__ . "/_extra_font.php";
|
||||
|
||||
if (defined('G5_IS_ADMIN')) {
|
||||
echo get_embed_file("css", G5_ADMIN_PATH . '/css/admin.css') . PHP_EOL;
|
||||
echo get_embed_file("css", G5_ADMIN_PATH . '/css/admin.layout.css') . PHP_EOL;
|
||||
echo get_embed_file("css", G5_ADMIN_PATH . '/css/admin.amber.lib.css') . PHP_EOL;
|
||||
// echo get_embed_file("css", G5_ADMIN_PATH . '/css/admin.css') . PHP_EOL;
|
||||
// echo get_embed_file("css", G5_ADMIN_PATH . '/css/admin.layout.css') . PHP_EOL;
|
||||
// echo get_embed_file("css", G5_ADMIN_PATH . '/css/admin.amber.lib.css') . PHP_EOL;
|
||||
echo get_embed_file("css", G5_ADMIN_PATH . '/css/default.css') . PHP_EOL;
|
||||
echo get_embed_file("css", G5_ADMIN_PATH . '/css/amberstone.cp.css') . PHP_EOL;
|
||||
} else {
|
||||
if (defined('G5_THEME_PATH') && file_exists(G5_THEME_PATH . "/css/default.css")) {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
include_once "../config.php";
|
||||
|
||||
$theme_1 = "#BEBE8E";
|
||||
$theme_2 = "#7F7F5F";
|
||||
$theme_3 = "#7C7C4C";
|
||||
$theme_1 = "#ecc6c6";
|
||||
$theme_2 = "#e8b0ae";
|
||||
$theme_3 = "#d6817e";
|
||||
|
||||
$theme_4 = "#b0c4de";
|
||||
$theme_5 = "#727F99";
|
||||
$theme_6 = "#7488B2";
|
||||
$theme_5 = "#88a9db";
|
||||
$theme_6 = "#779bdb";
|
||||
|
||||
$title = G5_VERSION . " 라이센스 확인 1/3";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,23 @@
|
|||
@charset "utf-8";
|
||||
/* SIR 지운아빠 */
|
||||
:root {
|
||||
--bg-color: #181926;
|
||||
--text-color: #CAD3F5;
|
||||
--accent-color: #ffbf00;
|
||||
--border-color: #6E738D;
|
||||
--button-bg-color: #ffbf00;
|
||||
--button-bg-hover-color: #CAD3F5;
|
||||
--button-text-color: #000;
|
||||
--header-bg-color: #24273A;
|
||||
}
|
||||
|
||||
/* 공통 */
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: url('img/pat01.png') #edf0f4;
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
font-size: 14px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
||||
font-size: 0.75em;
|
||||
font-family: dotum, helvetica
|
||||
}
|
||||
|
|
@ -25,8 +37,8 @@ label {
|
|||
#ins_bar {
|
||||
margin: 0 0 50px;
|
||||
padding: 20px 30px;
|
||||
background: #383838;
|
||||
color: #a1a4a7;
|
||||
background: var(--header-bg-color);
|
||||
color: var(--text-color);
|
||||
font-family: tahoma, helvetica;
|
||||
font-size: 1.500em;
|
||||
zoom: 1
|
||||
|
|
@ -56,9 +68,9 @@ h1 {
|
|||
.ins_inner {
|
||||
margin: 0 30px 50px;
|
||||
padding: 20px 30px;
|
||||
border-right: 1px solid #dde4e9;
|
||||
border-bottom: 1px solid #dde4e9;
|
||||
background: #fff
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
background: transparent
|
||||
}
|
||||
|
||||
.ins_inner ul {
|
||||
|
|
@ -76,7 +88,8 @@ h1 {
|
|||
}
|
||||
|
||||
.ins_inner p strong {
|
||||
color: red
|
||||
font-size: 1.5em;
|
||||
color: var(--accent-color)
|
||||
}
|
||||
|
||||
.ins_inner .inner_btn {
|
||||
|
|
@ -88,11 +101,32 @@ h1 {
|
|||
.ins_inner .inner_btn input {
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
background: #BEBE8E;
|
||||
color: #fff;
|
||||
background: var(--button-bg-color);
|
||||
color: var(--button-text-color);
|
||||
border-radius: 4px;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.ins_inner .inner_btn a:hover,
|
||||
.ins_inner .inner_btn input:hover,
|
||||
.ins_inner .inner_btn button:hover {
|
||||
background: var(--button-bg-hover-color);
|
||||
}
|
||||
|
||||
.ins_inner pre {
|
||||
font-size: 12px;
|
||||
margin: 10px 0;
|
||||
padding: 10px;
|
||||
overflow: auto
|
||||
}
|
||||
|
||||
.ins_inner pre::before {
|
||||
content: "[AvocadoAmber ~] ";
|
||||
display: inline;
|
||||
height: 0;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.ins_inner .inner_btn input {
|
||||
border: 0;
|
||||
cursor: pointer
|
||||
|
|
@ -114,13 +148,12 @@ h1 {
|
|||
.ins_frm th,
|
||||
.ins_frm td {
|
||||
padding: 5px 3px;
|
||||
border-top: 1px solid #dde4e9;
|
||||
border-bottom: 1px solid #dde4e9
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.ins_frm th {
|
||||
width: 25%;
|
||||
background: #f2f5f9
|
||||
background: var(--header-bg-color)
|
||||
}
|
||||
|
||||
.ins_frm td span {
|
||||
|
|
@ -130,9 +163,18 @@ h1 {
|
|||
letter-spacing: -0.1em
|
||||
}
|
||||
|
||||
.ins_frm input {
|
||||
background: transparent;
|
||||
padding: 4px 8px;
|
||||
border: 1px solid var(--border-color);
|
||||
color: var(--text-color);
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.ins_ta {
|
||||
padding: 5px 0;
|
||||
border: 1px solid #dde4e9;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
|
|
@ -141,11 +183,13 @@ h1 {
|
|||
padding: 0;
|
||||
width: 99%;
|
||||
height: 250px;
|
||||
color: var(--text-color);
|
||||
background: transparent
|
||||
}
|
||||
|
||||
.ins_license {
|
||||
background: #f2f5f9
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color)
|
||||
}
|
||||
|
||||
#ins_ft {
|
||||
|
|
@ -168,8 +212,8 @@ h1 {
|
|||
/* extra */
|
||||
pre {
|
||||
padding: 4px;
|
||||
background: #0d1117;
|
||||
color: #f0f6fc;
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
font-size: 14px;
|
||||
font-family: monospace;
|
||||
user-select: all;
|
||||
|
|
|
|||
|
|
@ -17,12 +17,9 @@ if (!$title)
|
|||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="ins_bar">
|
||||
<span id="bar_img">AVOCADO EDITION</span>
|
||||
<span id="bar_txt">INSTALLATION</span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include "./install_header.php";
|
||||
?>
|
||||
<?php
|
||||
// 파일이 존재한다면 설치할 수 없다.
|
||||
$dbconfig_file = $data_path . '/' . G5_DBCONFIG_FILE;
|
||||
|
|
@ -39,7 +36,7 @@ if (!$title)
|
|||
<?php
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$exists_data_dir = true;
|
||||
// data 디렉토리가 있는가?
|
||||
if (!is_dir($data_path)) {
|
||||
|
|
@ -58,11 +55,11 @@ if (!$title)
|
|||
<?php
|
||||
$exists_data_dir = false;
|
||||
}
|
||||
|
||||
$write_data_dir = true;
|
||||
|
||||
// check datadir and css path
|
||||
|
||||
$write_data_dir = true;
|
||||
|
||||
// check datadir and css path
|
||||
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||
$sapi_type = php_sapi_name();
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
|
@ -70,27 +67,33 @@ if (!$title)
|
|||
?>
|
||||
<div class="ins_inner">
|
||||
<p>
|
||||
<b><?php echo G5_DATA_DIR ?> 디렉토리의 퍼미션을 705로 변경하여 주십시오.</b><br>
|
||||
<pre>#> chmod 705 <?php echo G5_DATA_DIR ?></pre>
|
||||
또는<br>
|
||||
<pre>#> chmod uo+rx <?php echo G5_DATA_DIR ?></pre><br>
|
||||
위 명령 실행후 브라우저를 새로고침 하십시오.
|
||||
<?php echo G5_DATA_DIR ?> 디렉토리의 퍼미션을 705로 변경하여 주십시오.<br>
|
||||
아래 내용을 클릭하면 명령어가 전체 선택됩니다.<br>
|
||||
<pre>chmod 705 <?php echo G5_DATA_DIR ?></pre>
|
||||
또는<br>
|
||||
<pre>chmod uo+rx <?php echo G5_DATA_DIR ?></pre><br>
|
||||
위 명령 실행후 브라우저를 새로고침 하십시오.
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
$write_data_dir = false;
|
||||
}
|
||||
} else {
|
||||
// 생성 시도 후 권한이 없으면 안내
|
||||
if (!file_exists($data_path)) {
|
||||
@mkdir($data_path, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
if (!(is_readable($data_path) && is_writeable($data_path) && is_executable($data_path))) {
|
||||
?>
|
||||
<div class="ins_inner">
|
||||
<p>
|
||||
<b><?php echo G5_DATA_DIR ?> 디렉토리의 퍼미션을 707로 변경하여 주십시오.</b><br>
|
||||
<pre>#> chmod 707 <?php echo G5_DATA_DIR ?></pre>
|
||||
또는<br>
|
||||
<pre>#> chmod uo+rwx <?php echo G5_DATA_DIR ?></pre><br>
|
||||
위 명령 실행후 브라우저를 새로고침 하십시오.
|
||||
<?php echo G5_DATA_DIR ?> 디렉토리의 퍼미션을 707로 변경하여 주십시오.<br>
|
||||
아래 내용을 클릭하면 명령어가 전체 선택됩니다.<br>
|
||||
<pre>chmod 707 <?php echo G5_DATA_DIR ?></pre>
|
||||
또는<br>
|
||||
<pre>chmod uo+rwx <?php echo G5_DATA_DIR ?></pre><br>
|
||||
위 명령 실행후 브라우저를 새로고침 하십시오.
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
|
|
@ -101,11 +104,12 @@ if (!$title)
|
|||
?>
|
||||
<div class="ins_inner">
|
||||
<p>
|
||||
<b><?php echo G5_CSS_DIR ?> 디렉토리의 퍼미션을 707로 변경하여 주십시오.</b><br>
|
||||
<pre>#> chmod 707 <?php echo G5_CSS_DIR ?></pre>
|
||||
또는<br>
|
||||
<pre>#> chmod uo+rwx <?php echo G5_CSS_DIR ?></pre><br>
|
||||
위 명령 실행후 브라우저를 새로고침 하십시오.
|
||||
<?php echo G5_CSS_DIR ?> 디렉토리의 퍼미션을 707로 변경하여 주십시오.<br>
|
||||
아래 내용을 클릭하면 명령어가 전체 선택됩니다.<br>
|
||||
<pre>chmod 707 <?php echo G5_CSS_DIR ?></pre>
|
||||
또는<br>
|
||||
<pre>chmod uo+rwx <?php echo G5_CSS_DIR ?></pre><br>
|
||||
위 명령 실행후 브라우저를 새로고침 하십시오.
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
?><div id="ins_ft">
|
||||
<strong>AVOCADO EDITION</strong>
|
||||
<strong>AVOCADO EDITION: AMBER</strong>
|
||||
<p>GPL! OPEN SOURCE GNUBOARD</p>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ if (!isset($_POST['agree']) || $_POST['agree'] != '동의함') {
|
|||
</table>
|
||||
|
||||
<p>
|
||||
<strong class="st_strong">주의! 이미 <?php echo G5_VERSION ?>이 존재한다면 DB 자료가 망실되므로 주의하십시오.</strong><br>
|
||||
<strong class="st_strong">이미 <?php echo G5_VERSION ?>를 설치한 경우, 재설치 시 기존 데이터베이스를 잃어버리므로 주의해 주시기 바랍니다!</strong><br>
|
||||
주의사항을 이해했으며, 아보카도 에디션 설치를 계속 진행하시려면 다음을 누르십시오.
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ $admin_id = $_POST['admin_id'];
|
|||
$admin_pass = $_POST['admin_pass'];
|
||||
$admin_name = $_POST['admin_name'];
|
||||
$admin_email = $_POST['admin_email'];
|
||||
$absolute_password = $_POST['absolute_password'];
|
||||
$table_url = $_POST['table_url'];
|
||||
|
||||
$dblink = sql_connect($mysql_host, $mysql_user, $mysql_pass, $mysql_db);
|
||||
|
|
@ -273,6 +272,7 @@ unset($row);
|
|||
|
||||
// 디렉토리 생성
|
||||
$dir_arr = array(
|
||||
$data_path . '/css',
|
||||
$data_path . '/cache',
|
||||
$data_path . '/editor',
|
||||
$data_path . '/file',
|
||||
|
|
@ -366,16 +366,9 @@ EOD;
|
|||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
// CSS 설정 파일 생성
|
||||
$css_data_path = $g5_path['path'] . "/css";
|
||||
$css_data_url = $g5_path['url'] . "/css";
|
||||
$css_data_path = $data_path . "/css";
|
||||
|
||||
@mkdir($css_data_path, G5_DIR_PERMISSION);
|
||||
@chmod($css_data_path, G5_DIR_PERMISSION);
|
||||
|
||||
$file = '../' . G5_CSS_DIR . '/_design.config.css';
|
||||
$file_path = $css_data_path . '/_design.config.css';
|
||||
|
||||
@unlink($file_path);
|
||||
$file = $css_data_path . '/_design.config.css';
|
||||
$f = @fopen($file, 'a');
|
||||
?>
|
||||
<li style="display:none;">
|
||||
|
|
@ -403,6 +396,8 @@ EOD;
|
|||
sql_query(" set time_zone = '" . G5_TIMEZONE . "'");
|
||||
}
|
||||
|
||||
$g5['css_table'] = $table_prefix . 'css_config';
|
||||
|
||||
ob_start();
|
||||
include "../adm/design_form_css.php";
|
||||
$css = ob_get_contents();
|
||||
|
|
|
|||
2
AvocadoAmber/install/install_header.php
Normal file
2
AvocadoAmber/install/install_header.php
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
?><div id="ins_bar"><span id="bar_img">AVOCADO EDITION: AMBER</span><span id="bar_txt"><?php echo $RIGHT_MESSAGE ? $RIGHT_MESSAGE : "INSTALLATION" ?></span></div>
|
||||
|
|
@ -95,10 +95,7 @@ nhn.husky.SE2M_AttachQuickPhoto = jindo.$Class({
|
|||
*/
|
||||
_getPhotoTag: function (htPhotoInfo) {
|
||||
// id와 class는 썸네일과 연관이 많습니다. 수정시 썸네일 영역도 Test
|
||||
var sTag = '<img src="{=sOriginalImageURL}" title="{=sName}" >';
|
||||
if (htPhotoInfo.bNewLine) {
|
||||
sTag += '<br style="clear:both;">';
|
||||
}
|
||||
var sTag = '<br><img src="{=sOriginalImageURL}" title="{=sName}" ><br>';
|
||||
sTag = jindo.$Template(sTag).process(htPhotoInfo);
|
||||
|
||||
return sTag;
|
||||
|
|
|
|||
|
|
@ -10,16 +10,11 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.admi
|
|||
<div class="inner">
|
||||
<h1>
|
||||
<em>
|
||||
<strong><?= $config['cf_title'] ?> 관리자</strong> 로그인
|
||||
<?= $config['cf_title'] ?>
|
||||
</em>
|
||||
<span>
|
||||
AVOCADO EDITION Ver.<?= G5_GNUBOARD_VER ?>
|
||||
Ver.<?= G5_GNUBOARD_VER ?>
|
||||
</span>
|
||||
<sup>
|
||||
관리자 비번을 잊을 시, DB 접속을 통해 직접 변경 하여야 합니다.<br />
|
||||
최대한 비밀번호를 잊지 않도록 조심해 주시길 바랍니다.<br />
|
||||
DB 관리툴은 호스팅 업체에 문의해 주시길 바랍니다.
|
||||
</sup>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,265 +1,109 @@
|
|||
@charset "utf-8";
|
||||
@import url(//fonts.googleapis.com/earlyaccess/notosanskr.css);
|
||||
@import url(../../../adm/css/default.css);
|
||||
|
||||
@font-face {
|
||||
font-family: 'icon';
|
||||
src: url('../../../css/fonts/icomoon.eot?y5isk6');
|
||||
src: url('../../../css/fonts/icomoon.eot?y5isk6#iefix') format('embedded-opentype'),
|
||||
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-style: normal;
|
||||
/* override */
|
||||
html, body {
|
||||
display: block;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
background: var(--white);
|
||||
}
|
||||
|
||||
#login_page_box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#login_page_box:before {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 50%;
|
||||
box-sizing: border-box;
|
||||
border-top: 8px solid #ecc6c6;
|
||||
background: url('./img/bak_admin_login_top_pattern.png');
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#login_page_box:after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 50%;
|
||||
|
||||
background: rgba(0, 0, 0, 0);
|
||||
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.5) 100%);
|
||||
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(65%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0.5)));
|
||||
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.5) 100%);
|
||||
background: -o-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.5) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.5) 100%);
|
||||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.5) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000', endColorstr='#000000', GradientType=0);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#login_title {
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 50%;
|
||||
padding-bottom: 130px;
|
||||
box-sizing: border-box;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
#login_title .inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#login_title h1 {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
font-family: 'Noto Sans KR', sans-serif;
|
||||
font-size: 35px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#login_title em {
|
||||
font-style: normal;
|
||||
color: #ecc6c6;
|
||||
text-align: center;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
#login_title em strong {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#login_title span {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#login_title sup {
|
||||
display: block;
|
||||
position: relative;
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
margin-top: 20px;
|
||||
color: #777;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 50vh;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(to top, var(--theme-gray-900) 0%, var(--theme-gray-800) 50%, var(--theme-gray-800) 100%);
|
||||
}
|
||||
|
||||
#mb_login {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 500px;
|
||||
height: 260px;
|
||||
|
||||
border-top: 5px solid #ecc6c6;
|
||||
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
background: #fff;
|
||||
|
||||
-webkit-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.49);
|
||||
-moz-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.49);
|
||||
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.49);
|
||||
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
|
||||
#mb_login:before {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -20px;
|
||||
background: #fff;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#mb_login .inner {
|
||||
position: relative;
|
||||
padding: 30px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#mb_login fieldset.input {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin-bottom: 5px;
|
||||
margin-right: 130px;
|
||||
}
|
||||
|
||||
#mb_login fieldset.input input {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 40px;
|
||||
border-radius: 16px;
|
||||
background: var(--white);
|
||||
min-width: 360px;
|
||||
box-sizing: border-box;
|
||||
|
||||
background: #fff !important;
|
||||
color: #3a3a3b;
|
||||
height: 45px;
|
||||
padding: 0 15px 0 45px;
|
||||
font-size: 15px;
|
||||
font-family: 'Noto Sans KR', sans-serif;
|
||||
outline: none;
|
||||
border: 1px solid #eaeaea;
|
||||
filter: drop-shadow(0 0 15px #0002);
|
||||
}
|
||||
|
||||
#mb_login fieldset.input input:focus {
|
||||
border: 2px solid #ecc6c6;
|
||||
}
|
||||
|
||||
#mb_login fieldset.input label {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
overflow: hidden;
|
||||
text-indent: -999px;
|
||||
|
||||
}
|
||||
|
||||
#mb_login fieldset.input label:before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-indent: 0;
|
||||
text-align: center;
|
||||
font-family: 'icon';
|
||||
font-size: 16px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#mb_login fieldset.input input:focus+label:before {
|
||||
color: #ecc6c6;
|
||||
}
|
||||
|
||||
#mb_login fieldset.input label.login_id:before {
|
||||
content: "\e976";
|
||||
}
|
||||
|
||||
#mb_login fieldset.input label.login_pw:before {
|
||||
content: "\e98e";
|
||||
}
|
||||
|
||||
#mb_login fieldset.input input:-webkit-autofill {
|
||||
transition: background-color 50000s ease-in-out 0s;
|
||||
-webkit-box-shadow: 0 0 0 30px white inset;
|
||||
-webkit-text-fill-color: #3a3a3b !important;
|
||||
}
|
||||
|
||||
#mb_login fieldset.check {
|
||||
#mb_login fieldset {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding: 5px;
|
||||
background: #f6f6f6;
|
||||
border: 1px solid #ebebeb;
|
||||
color: #3a3a3a;
|
||||
margin: 5px 130px 5px 0;
|
||||
font-size: 11px;
|
||||
padding-top: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#mb_login fieldset.check label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#mb_login fieldset.button {
|
||||
#mb_login fieldset label{
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 30px;
|
||||
width: 126px;
|
||||
height: 128px;
|
||||
left: 0;
|
||||
top: 0em;
|
||||
color: var(--theme-gray-500);
|
||||
}
|
||||
|
||||
#mb_login fieldset.button .btn_submit {
|
||||
display: block;
|
||||
#mb_login fieldset input:not([type=checkbox]) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #ecc6c6;
|
||||
font-family: 'Noto Sans KR', sans-serif;
|
||||
font-size: 18px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
padding: 4px 8px;
|
||||
line-height: 2em;
|
||||
height: auto;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#mb_login fieldset button.btn_submit {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
border: unset;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
line-height: 3em;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#copyright {
|
||||
padding-top: 30px;
|
||||
font-size: 12px;
|
||||
color: #aaa;
|
||||
color: var(--theme-gray-500);
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
border-top: 1px solid var(--theme-gray-100);
|
||||
margin-top: 1em;
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
#login_title .inner h1 {
|
||||
color: var(--white);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
line-height: 1.25em;
|
||||
}
|
||||
|
||||
#login_title .inner h1 span {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#login_title .inner h1 sup {
|
||||
font-size: 16px;
|
||||
line-height: 1.25em;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue