update
This commit is contained in:
parent
6dbc841037
commit
0f4b26a142
9 changed files with 833 additions and 246 deletions
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_delete.php");
|
||||||
$menu["content"]->getLastAddedMenu()->addSubFile("/board_copy.php");
|
$menu["content"]->getLastAddedMenu()->addSubFile("/board_copy.php");
|
||||||
$menu["content"]->getLastAddedMenu()->addSubFile("/board_copy_update.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"]->addChildMenu("content", "게시판그룹관리", G5_ADMIN_URL . "/boardgroup_list.php", true, 100, "\F2EE", 0);
|
||||||
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroup_list_update.php");
|
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroup_list_update.php");
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ $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:80px;">댓글쓰기</th>
|
||||||
<th scope="col" style="width:80px;">버전</th>
|
<th scope="col" style="width:80px;">버전</th>
|
||||||
<th scope="col" style="width:90px;">관리</th>
|
<th scope="col" style="width:150px;">관리</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -129,6 +129,7 @@ $colspan = 11;
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
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_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>';
|
$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;
|
$need_migration = false;
|
||||||
|
|
@ -189,11 +190,14 @@ $colspan = 11;
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $one_update ?>
|
<div class="manage_buttons">
|
||||||
<?php echo $one_copy ?>
|
<?php echo $one_update ?>
|
||||||
<?php if ($need_migration) { ?>
|
<?php echo $one_copy ?>
|
||||||
<br><a href="#" class="btn_migrate" data-bo-table="<?php echo $row['bo_table'] ?>">업데이트</a>
|
<?php echo $s_move ?>
|
||||||
<?php } ?>
|
<?php if ($need_migration) { ?>
|
||||||
|
<br><a href="#" class="btn_migrate" data-bo-table="<?php echo $row['bo_table'] ?>">업데이트</a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -230,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='); ?>
|
<?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) {
|
function fboardlist_submit(f) {
|
||||||
if (!is_checked("chk[]")) {
|
if (!is_checked("chk[]")) {
|
||||||
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
|
|
||||||
53
AvocadoAmber/adm/board_move_check.php
Normal file
53
AvocadoAmber/adm/board_move_check.php
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?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' => '']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
302
AvocadoAmber/adm/board_move_list.php
Normal file
302
AvocadoAmber/adm/board_move_list.php
Normal file
|
|
@ -0,0 +1,302 @@
|
||||||
|
<?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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// hidden 필드에 값 설정
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// AJAX로 테이블 구조 비교
|
||||||
|
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";
|
||||||
|
?>
|
||||||
316
AvocadoAmber/adm/board_move_update.php
Normal file
316
AvocadoAmber/adm/board_move_update.php
Normal file
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?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'] : [];
|
||||||
|
|
||||||
|
// act_button 값 검증 (move 또는 copy만 허용)
|
||||||
|
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 쿼리 생성
|
||||||
|
$insert_values = [];
|
||||||
|
$insert_fields = [];
|
||||||
|
|
||||||
|
foreach ($common_columns as $col) {
|
||||||
|
// wr_num은 자동 계산, wr_reply와 wr_parent는 특별 처리
|
||||||
|
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];
|
||||||
|
|
||||||
|
// bo_table 변경
|
||||||
|
if ($col === 'bo_table') {
|
||||||
|
$insert_values[] = "'{$target_board}'";
|
||||||
|
} else {
|
||||||
|
$insert_values[] = "'" . sql_real_escape_string($value) . "'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// wr_num 계산 (새 글이므로 가장 작은 번호 부여)
|
||||||
|
$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 ($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);
|
||||||
|
|
||||||
|
// 파일 정보 DB에 저장
|
||||||
|
$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)) {
|
||||||
|
// 파일 정보 DB 업데이트
|
||||||
|
$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}'");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -1436,15 +1436,53 @@ span.empty {
|
||||||
}
|
}
|
||||||
|
|
||||||
#gnb {
|
#gnb {
|
||||||
|
margin-left: 8px;
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-family: 'Noto Sans KR', sans-serif;
|
font-family: 'Noto Sans KR', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_1dli {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_1dli>a {
|
||||||
|
padding: 8px;
|
||||||
|
line-height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_1dli>ul {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0 0 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_1dli.on>a {
|
||||||
|
color: var(--theme-200);
|
||||||
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_1dli.on>ul {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_1dli.on>ul::before {
|
||||||
|
content:"";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: .25;
|
||||||
|
background: var(--theme-sub-900);
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
#gnb>ul>li>a {
|
#gnb>ul>li>a {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
color: #9da4b3;
|
color: var(--theme-gray-200);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
@ -1482,10 +1520,22 @@ span.empty {
|
||||||
|
|
||||||
#gnb .gnb_2dli>a:hover {
|
#gnb .gnb_2dli>a:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #484c58;
|
background: var(--theme-sub-700);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_2dli>a:hover:before {
|
||||||
|
color: var(--theme-sub-100);
|
||||||
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_2dli.on>a:hover {
|
||||||
|
background: var(--theme-700);
|
||||||
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_2dli.on>a:hover:before {
|
||||||
|
color: var(--theme-100);
|
||||||
|
}
|
||||||
|
|
||||||
#gnb .gnb_2dul {
|
#gnb .gnb_2dul {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
@ -1803,6 +1853,7 @@ body #container {
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn_confirm .btn>input[type=submit],
|
||||||
.btn_confirm .btn>.btn_submit {
|
.btn_confirm .btn>.btn_submit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -1813,18 +1864,26 @@ body #container {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.manage_buttons {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
.btn_confirm .btn,
|
.btn_confirm .btn,
|
||||||
.btn_confirm a,
|
.btn_confirm a,
|
||||||
.btn_confirm button {
|
.btn_confirm button {
|
||||||
background: var(--theme-gray-600);
|
background: var(--theme-gray-600);
|
||||||
margin-left: 1px;
|
margin-left: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn_confirm .btn>span,
|
.btn_confirm .btn>span,
|
||||||
.btn_confirm a>*,
|
.btn_confirm a>*,
|
||||||
.btn_confirm button>* {
|
.btn_confirm button>* {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn_confirm .btn>input[type=submit],
|
||||||
.btn_confirm a,
|
.btn_confirm a,
|
||||||
.btn_confirm button {
|
.btn_confirm button {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,11 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.admi
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h1>
|
<h1>
|
||||||
<em>
|
<em>
|
||||||
<strong><?= $config['cf_title'] ?> 관리자</strong> 로그인
|
<?= $config['cf_title'] ?>
|
||||||
</em>
|
</em>
|
||||||
<span>
|
<span>
|
||||||
AVOCADO EDITION Ver.<?= G5_GNUBOARD_VER ?>
|
Ver.<?= G5_GNUBOARD_VER ?>
|
||||||
</span>
|
</span>
|
||||||
<sup>
|
|
||||||
관리자 비번을 잊을 시, DB 접속을 통해 직접 변경 하여야 합니다.<br />
|
|
||||||
최대한 비밀번호를 잊지 않도록 조심해 주시길 바랍니다.<br />
|
|
||||||
DB 관리툴은 호스팅 업체에 문의해 주시길 바랍니다.
|
|
||||||
</sup>
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,265 +1,109 @@
|
||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
@import url(//fonts.googleapis.com/earlyaccess/notosanskr.css);
|
@import url(../../../adm/css/default.css);
|
||||||
|
|
||||||
@font-face {
|
/* override */
|
||||||
font-family: 'icon';
|
html, body {
|
||||||
src: url('../../../css/fonts/icomoon.eot?y5isk6');
|
display: block;
|
||||||
src: url('../../../css/fonts/icomoon.eot?y5isk6#iefix') format('embedded-opentype'),
|
padding: 0;
|
||||||
url('../../../css/fonts/icomoon.ttf?y5isk6') format('truetype'),
|
margin: 0;
|
||||||
url('../../../css/fonts/icomoon.woff?y5isk6') format('woff'),
|
|
||||||
url('../../../css/fonts/icomoon.svg?y5isk6#icomoon') format('svg');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html,
|
|
||||||
body {
|
body {
|
||||||
position: relative;
|
background: var(--white);
|
||||||
height: 100%;
|
|
||||||
background: #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#login_page_box {
|
#login_page_box {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
#login_page_box:before {
|
justify-content: center;
|
||||||
content: "";
|
align-items: center;
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 50%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-top: 8px solid #ffbf00;
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#login_title {
|
#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;
|
position: absolute;
|
||||||
top: 50%;
|
left: 0;
|
||||||
left: 50%;
|
top: 0;
|
||||||
transform: translateX(-50%) translateY(-50%);
|
width: 100%;
|
||||||
font-family: 'Noto Sans KR', sans-serif;
|
height: 50vh;
|
||||||
font-size: 35px;
|
display: flex;
|
||||||
font-weight: 600;
|
box-sizing: border-box;
|
||||||
}
|
padding: 20px;
|
||||||
|
justify-content: start;
|
||||||
#login_title em {
|
align-items: center;
|
||||||
font-style: normal;
|
flex-direction: column;
|
||||||
color: #ffbf00;
|
background: linear-gradient(to top, rgba(0,0,0,1) 0%, var(--theme-gray-900) 50%, var(--theme-gray-900) 100%);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#mb_login {
|
#mb_login {
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
width: 500px;
|
|
||||||
height: 260px;
|
|
||||||
|
|
||||||
border-top: 5px solid #ffbf00;
|
|
||||||
|
|
||||||
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;
|
position: relative;
|
||||||
padding: 30px;
|
padding: 40px;
|
||||||
z-index: 1;
|
border-radius: 16px;
|
||||||
}
|
background: var(--white);
|
||||||
|
min-width: 360px;
|
||||||
#mb_login fieldset.input {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
margin-right: 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mb_login fieldset.input input {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
filter: drop-shadow(0 0 15px #0002);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#mb_login fieldset.input input:focus {
|
#mb_login fieldset {
|
||||||
border: 2px solid #ffbf00;
|
|
||||||
}
|
|
||||||
|
|
||||||
#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: #ffbf00;
|
|
||||||
}
|
|
||||||
|
|
||||||
#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 {
|
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 5px;
|
padding-top: 1.5em;
|
||||||
background: #f6f6f6;
|
margin-bottom: 1em;
|
||||||
border: 1px solid #ebebeb;
|
|
||||||
color: #3a3a3a;
|
|
||||||
margin: 5px 130px 5px 0;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#mb_login fieldset.check label {
|
#mb_login fieldset label{
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mb_login fieldset.button {
|
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 30px;
|
left: 0;
|
||||||
right: 30px;
|
top: 0em;
|
||||||
width: 126px;
|
color: var(--theme-gray-500);
|
||||||
height: 128px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#mb_login fieldset.button .btn_submit {
|
#mb_login fieldset input:not([type=checkbox]) {
|
||||||
display: block;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
display: block;
|
||||||
background: #ffbf00;
|
box-sizing: border-box;
|
||||||
font-family: 'Noto Sans KR', sans-serif;
|
padding: 4px 8px;
|
||||||
font-size: 18px;
|
line-height: 2em;
|
||||||
border: none;
|
height: auto;
|
||||||
cursor: pointer;
|
border-radius: 4px;
|
||||||
color: #fff;
|
}
|
||||||
|
|
||||||
|
#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 {
|
#copyright {
|
||||||
padding-top: 30px;
|
color: var(--theme-gray-500);
|
||||||
font-size: 12px;
|
|
||||||
color: #aaa;
|
|
||||||
text-align: center;
|
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