first commit 2
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
include_once('../../../../../common.php');
|
||||
|
||||
// 관리자가 아니면 실행 중단
|
||||
if (!$is_admin) {
|
||||
die(json_encode(['error' => '관리자만 접근 가능합니다.']));
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$bo_table = isset($_POST['bo_table']) ? trim($_POST['bo_table']) : '';
|
||||
$wr_id = isset($_POST['wr_id']) ? intval($_POST['wr_id']) : 0;
|
||||
$status = isset($_POST['status']) ? trim($_POST['status']) : '1';
|
||||
|
||||
if (!$bo_table || !$wr_id || !$status) {
|
||||
die(json_encode(['error' => '필수 정보가 누락되었습니다.']));
|
||||
}
|
||||
|
||||
// '숨김' 상태일 때는 wr_10 필드에 1을, '보임' 상태일 때는 0을 저장합니다.
|
||||
$new_value = $status ;
|
||||
|
||||
$write_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
$sql = " UPDATE {$write_table} SET wr_10 = '{$new_value}' WHERE wr_id = '{$wr_id}' ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
if ($result) {
|
||||
// 성공 시 새로운 상태를 반환
|
||||
echo json_encode(['success' => true, 'new_status' => ($new_value == '1' ? 'hidden' : 'visible')]);
|
||||
} else {
|
||||
echo json_encode(['error' => '데이터베이스 업데이트에 실패했습니다.']);
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<dwsync>
|
||||
<file name="btn_close.gif" server="happyjung.com:5001/www/" local="131979082007552031" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_1.gif" server="happyjung.com:5001/www/" local="131979082006962424" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_10.gif" server="happyjung.com:5001/www/" local="131979082006772542" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_11.gif" server="happyjung.com:5001/www/" local="131979082006232877" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_12.gif" server="happyjung.com:5001/www/" local="131979082005803143" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_13.gif" server="happyjung.com:5001/www/" local="131979082005253594" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_14.gif" server="happyjung.com:5001/www/" local="131979082004743798" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_15.gif" server="happyjung.com:5001/www/" local="131979082003824369" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_16.gif" server="happyjung.com:5001/www/" local="131979082003684453" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_17.gif" server="happyjung.com:5001/www/" local="131979082003164776" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_18.gif" server="happyjung.com:5001/www/" local="131979082002515176" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_19.gif" server="happyjung.com:5001/www/" local="131979082002055462" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_2.gif" server="happyjung.com:5001/www/" local="131979082001565747" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_20.gif" server="happyjung.com:5001/www/" local="131979082001026095" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_21.gif" server="happyjung.com:5001/www/" local="131979082000586371" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_22.gif" server="happyjung.com:5001/www/" local="131979082000106668" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_23.gif" server="happyjung.com:5001/www/" local="131979081999616945" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_24.gif" server="happyjung.com:5001/www/" local="131979081998767473" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_25.gif" server="happyjung.com:5001/www/" local="131979081998677552" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_26.gif" server="happyjung.com:5001/www/" local="131979081998177863" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_27.gif" server="happyjung.com:5001/www/" local="131979081997628202" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_28.gif" server="happyjung.com:5001/www/" local="131979081997108523" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_29.gif" server="happyjung.com:5001/www/" local="131979081996478914" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_3.gif" server="happyjung.com:5001/www/" local="131979081996059173" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_30-1.gif" server="happyjung.com:5001/www/" local="131979081995559497" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_30.gif" server="happyjung.com:5001/www/" local="131979081995109763" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_4.gif" server="happyjung.com:5001/www/" local="131979081994650045" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_5.gif" server="happyjung.com:5001/www/" local="131979081994130368" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_6.gif" server="happyjung.com:5001/www/" local="131979081993300882" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_7.gif" server="happyjung.com:5001/www/" local="131979081993250910" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_8.gif" server="happyjung.com:5001/www/" local="131979081992281511" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_9.gif" server="happyjung.com:5001/www/" local="131979081992191568" remote="131980119000000000" Dst="0" />
|
||||
<file name="bull_a.gif" server="happyjung.com:5001/www/" local="131979081991262143" remote="131980119000000000" Dst="0" />
|
||||
<file name="cal.gif" server="happyjung.com:5001/www/" local="131979081991202152" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon.gif" server="happyjung.com:5001/www/" local="131979081990362720" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_file.gif" server="happyjung.com:5001/www/" local="131979081990302736" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_hot.gif" server="happyjung.com:5001/www/" local="131979081989483215" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_img.gif" server="happyjung.com:5001/www/" local="131979081989433276" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_link.gif" server="happyjung.com:5001/www/" local="131979081988553808" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_mobile.gif" server="happyjung.com:5001/www/" local="131979081988503855" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_movie.gif" server="happyjung.com:5001/www/" local="131979081987634370" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_new.gif" server="happyjung.com:5001/www/" local="131979081987584419" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_reply.gif" server="happyjung.com:5001/www/" local="131979081986765031" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_secret.gif" server="happyjung.com:5001/www/" local="131979081986715074" remote="131980119000000000" Dst="0" />
|
||||
<file name="icon_sound.gif" server="happyjung.com:5001/www/" local="131979081985855489" remote="131980119000000000" Dst="0" />
|
||||
<file name="m_next.gif" server="happyjung.com:5001/www/" local="131979081985805519" remote="131980119000000000" Dst="0" />
|
||||
<file name="m_prev.gif" server="happyjung.com:5001/www/" local="131979081985035998" remote="131980119000000000" Dst="0" />
|
||||
<file name="point.gif" server="happyjung.com:5001/www/" local="131979081984896083" remote="131980119000000000" Dst="0" />
|
||||
<file name="y_next.gif" server="happyjung.com:5001/www/" local="131979081984436368" remote="131980119000000000" Dst="0" />
|
||||
<file name="y_prev.gif" server="happyjung.com:5001/www/" local="131979081983207101" remote="131980119000000000" Dst="0" />
|
||||
</dwsync>
|
||||
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 136 B |
|
After Width: | Height: | Size: 145 B |
|
After Width: | Height: | Size: 145 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 191 B |
|
After Width: | Height: | Size: 145 B |
|
After Width: | Height: | Size: 857 B |
|
After Width: | Height: | Size: 141 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 105 B |
|
After Width: | Height: | Size: 97 B |
|
After Width: | Height: | Size: 107 B |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 206 B |
|
After Width: | Height: | Size: 324 B |
|
After Width: | Height: | Size: 323 B |
|
After Width: | Height: | Size: 102 B |
|
After Width: | Height: | Size: 73 B |
|
After Width: | Height: | Size: 80 B |
|
After Width: | Height: | Size: 102 B |
|
After Width: | Height: | Size: 105 B |
|
After Width: | Height: | Size: 105 B |
|
After Width: | Height: | Size: 207 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 76 B |
|
After Width: | Height: | Size: 105 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 100 B |
|
After Width: | Height: | Size: 145 B |
|
After Width: | Height: | Size: 931 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 91 B |
|
After Width: | Height: | Size: 107 B |
|
After Width: | Height: | Size: 97 B |
|
After Width: | Height: | Size: 145 B |
|
After Width: | Height: | Size: 104 B |
|
After Width: | Height: | Size: 62 B |
|
After Width: | Height: | Size: 110 B |
|
After Width: | Height: | Size: 71 B |
|
After Width: | Height: | Size: 77 B |
|
After Width: | Height: | Size: 97 B |
|
After Width: | Height: | Size: 113 B |
|
After Width: | Height: | Size: 908 B |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 67 B |
|
After Width: | Height: | Size: 77 B |
|
After Width: | Height: | Size: 78 B |
@@ -0,0 +1,260 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
add_javascript('<script src="'.$board_skin_url.'/script.js"></script>', 10);
|
||||
|
||||
// 뷰 모드 설정 (기본값: card)
|
||||
$default_view_mode = 'card';
|
||||
$view_mode = get_cookie('board_' . $bo_table . '_view_mode') ?: $default_view_mode;
|
||||
|
||||
// 💡 [추가] 페이지 목록 수 설정
|
||||
$page_rows = (isset($_GET['page_rows']) && (int)$_GET['page_rows'] > 0) ? (int)$_GET['page_rows'] : $board['bo_page_rows'];
|
||||
?>
|
||||
|
||||
<!-- 게시판 목록 시작 { -->
|
||||
<div id="bo_gall" style="width:<?php echo $width; ?>" class="view-mode-<?php echo $view_mode; ?>">
|
||||
|
||||
<?php if ($is_category) { ?>
|
||||
<nav id="bo_cate">
|
||||
<h2><?php echo $board['bo_subject'] ?> 카테고리</h2>
|
||||
<ul id="bo_cate_ul">
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php } ?>
|
||||
|
||||
<div class="bo_fx">
|
||||
<div class="bo_fx_left">
|
||||
<div id="bo_list_total">
|
||||
<span>Total <?php echo number_format($total_count) ?>건</span>
|
||||
/ <?php echo $page ?> 페이지
|
||||
</div>
|
||||
</div>
|
||||
<div class="bo_fx_right">
|
||||
<!-- 💡 [추가] 페이지 목록 수 선택 UI -->
|
||||
<?php if ($is_admin) { ?>
|
||||
<div class="bo_page_rows_selector">
|
||||
<label for="page_rows" class="sound_only">페이지당 목록 수</label>
|
||||
<select id="page_rows" class="select">
|
||||
<option value="10" <?php if ($page_rows == 10) echo 'selected'; ?>>10개씩</option>
|
||||
<option value="20" <?php if ($page_rows == 20) echo 'selected'; ?>>20개씩</option>
|
||||
<option value="30" <?php if ($page_rows == 30) echo 'selected'; ?>>30개씩</option>
|
||||
<option value="50" <?php if ($page_rows == 50) echo 'selected'; ?>>50개씩</option>
|
||||
<option value="100" <?php if ($page_rows == 100) echo 'selected'; ?>>100개씩</option>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="view-mode-switcher">
|
||||
<button type="button" class="btn_view_mode <?php echo ($view_mode === 'card') ? 'active' : ''; ?>" data-mode="card" title="카드형으로 보기"><i class="fas fa-th-large"></i></button>
|
||||
<button type="button" class="btn_view_mode <?php echo ($view_mode === 'list') ? 'active' : ''; ?>" data-mode="list" title="리스트형으로 보기"><i class="fas fa-bars"></i></button>
|
||||
</div>
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01 btn"><i class="fas fa-rss" aria-hidden="true"></i> RSS</a></li><?php } ?>
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn"><i class="fas fa-user-circle" aria-hidden="true"></i> 관리자</a></li><?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02 btn"><i class="fas fa-pencil-alt" aria-hidden="true"></i> 글쓰기</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form name="fboardlist" id="fboardlist" action="<?php echo G5_BBS_URL; ?>/board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="sw" value="">
|
||||
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<div id="gall_allchk">
|
||||
<label for="chkall" class="sound_only">현재 페이지 게시물 전체</label>
|
||||
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 카드형 목록 -->
|
||||
<div class="card-list-view">
|
||||
<ul id="gall_ul" class="gall_row">
|
||||
<?php for ($i=0; $i<count($list); $i++) {
|
||||
$classes = array('gall_li', 'col-gn-'.$bo_gallery_cols);
|
||||
if( $i && ($i % $bo_gallery_cols == 0) ){ $classes[] = 'box_clear'; }
|
||||
if( $wr_id && $wr_id == $list[$i]['wr_id'] ){ $classes[] = 'gall_now'; }
|
||||
?>
|
||||
<li class="<?php echo implode(' ', $classes); ?>">
|
||||
<div class="gall_box">
|
||||
<div class="gall_chk">
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<label for="chk_wr_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject'] ?></label>
|
||||
<input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>">
|
||||
<?php } ?>
|
||||
<span class="sound_only"><?php if ($wr_id == $list[$i]['wr_id']) { echo "열람중"; } else { echo $list[$i]['num']; } ?></span>
|
||||
</div>
|
||||
<div class="gall_con">
|
||||
<div class="gall_img">
|
||||
<a href="<?php echo $list[$i]['href'] ?>">
|
||||
<?php
|
||||
if ($list[$i]['is_notice']) {
|
||||
echo '<span class="is_notice">공지</span>';
|
||||
} else {
|
||||
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
|
||||
if($thumb['src']) {
|
||||
echo '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" >';
|
||||
} else {
|
||||
echo '<span class="no_image">no image</span>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="gall_text_href">
|
||||
<?php if ($is_category && $list[$i]['ca_name']) { ?>
|
||||
<a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"><?php echo $list[$i]['ca_name'] ?></a>
|
||||
<?php } ?>
|
||||
<a href="<?php echo $list[$i]['href'] ?>" class="bo_tit_link">
|
||||
<?php echo $list[$i]['subject'] ?>
|
||||
<?php if ($list[$i]['comment_cnt']) { ?><span class="cnt_cmt">+ <?php echo $list[$i]['comment_cnt']; ?></span><?php } ?>
|
||||
<?php if (isset($list[$i]['icon_new']) && $list[$i]['icon_new'] !='') echo $list[$i]['icon_new']; ?>
|
||||
<?php if (isset($list[$i]['icon_hot']) && $list[$i]['icon_hot'] !='') echo $list[$i]['icon_hot']; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="gall_name">
|
||||
<span class="profile_img"><?php echo $list[$i]['name'] ?></span>
|
||||
</div>
|
||||
<div class="gall_info">
|
||||
<span><i class="far fa-eye" aria-hidden="true"></i> <?php echo $list[$i]['wr_hit'] ?></span>
|
||||
<?php if ($is_admin) { ?>
|
||||
<div class="status-toggle-wrap">
|
||||
<span class="status-label">노출</span>
|
||||
<div class="status-toggle-switch <?php echo ($list[$i]['wr_10'] == '1') ? 'off' : 'on'; ?>" data-wr-id="<?php echo $list[$i]['wr_id']; ?>" data-status="<?php echo ($list[$i]['wr_10'] == '1') ? '1' : '0'; ?>">
|
||||
<div class="switch-handle"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<span><i class="far fa-clock" aria-hidden="true"></i> <?php echo $list[$i]['datetime2'] ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { echo "<li class=\"empty_list\">게시물이 없습니다.</li>"; } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 리스트형 목록 -->
|
||||
<div class="list-view">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-header">
|
||||
<div class="list-cell num">번호</div>
|
||||
<div class="list-cell title">제목</div>
|
||||
<div class="list-cell name">글쓴이</div>
|
||||
<div class="list-cell date">날짜</div>
|
||||
<div class="list-cell hit">조회</div>
|
||||
<?php if ($is_admin) { ?><div class="list-cell status">노출</div><?php } ?>
|
||||
</li>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li class="list-group-item">
|
||||
<div class="list-cell num">
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_list_<?php echo $i ?>">
|
||||
<?php } ?>
|
||||
<?php echo $list[$i]['num']; ?>
|
||||
</div>
|
||||
<div class="list-cell title">
|
||||
<?php if ($is_category && $list[$i]['ca_name']) { ?>
|
||||
<a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"><?php echo $list[$i]['ca_name'] ?></a>
|
||||
<?php } ?>
|
||||
<a href="<?php echo $list[$i]['href']; ?>">
|
||||
<?php echo $list[$i]['subject']; ?>
|
||||
<?php if ($list[$i]['comment_cnt']) { ?><span class="cnt_cmt">+ <?php echo $list[$i]['comment_cnt']; ?></span><?php } ?>
|
||||
<?php if (isset($list[$i]['icon_new'])) echo $list[$i]['icon_new']; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="list-cell name"><?php echo $list[$i]['name']; ?></div>
|
||||
<div class="list-cell date"><?php echo $list[$i]['datetime2']; ?></div>
|
||||
<div class="list-cell hit"><?php echo $list[$i]['wr_hit']; ?></div>
|
||||
<?php if ($is_admin) { ?>
|
||||
<div class="list-cell status">
|
||||
<div class="status-toggle-switch <?php echo ($list[$i]['wr_10'] == '1') ? 'off' : 'on'; ?>" data-wr-id="<?php echo $list[$i]['wr_id']; ?>" data-status="<?php echo ($list[$i]['wr_10'] == '1') ? '1' : '0'; ?>">
|
||||
<div class="switch-handle"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { echo "<li class=\"empty_list\">게시물이 없습니다.</li>"; } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php if ($list_href || $is_checkbox || $write_href) { ?>
|
||||
<div class="bo_fx">
|
||||
<div class="bo_fx_left">
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<ul class="btn_bo_user">
|
||||
<li><button type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value" class="btn btn_admin"><i class="far fa-trash-alt" aria-hidden="true"></i> 선택삭제</button></li>
|
||||
<li><button type="submit" name="btn_submit" value="선택복사" onclick="document.pressed=this.value" class="btn btn_admin"><i class="far fa-copy" aria-hidden="true"></i> 선택복사</button></li>
|
||||
<li><button type="submit" name="btn_submit" value="선택이동" onclick="document.pressed=this.value" class="btn btn_admin"><i class="fas fa-arrows-alt" aria-hidden="true"></i> 선택이동</button></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="bo_fx_right">
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($list_href) { ?><li><a href="<?php echo $list_href ?>" class="btn_b01 btn"><i class="fas fa-list" aria-hidden="true"></i> 목록</a></li><?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02 btn"><i class="fas fa-pencil-alt" aria-hidden="true"></i> 글쓰기</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</form>
|
||||
|
||||
<!-- 💡 [수정] 페이지네이션 & 더보기 버튼 -->
|
||||
<div class="pagination_wrap">
|
||||
<div class="list-pagination">
|
||||
<?php echo $write_pages; ?>
|
||||
</div>
|
||||
<div class="card-more-btn">
|
||||
<?php if ($page < $total_page) { ?>
|
||||
<button type="button" id="btn_more_list" class="btn_b01 btn" data-page="<?php echo $page; ?>">더보기</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset id="bo_sch">
|
||||
<legend>게시물 검색</legend>
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="wr_subject"<?php echo get_selected($sfl, 'wr_subject', true); ?>>제목</option>
|
||||
<option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>내용</option>
|
||||
<option value="wr_subject||wr_content"<?php echo get_selected($sfl, 'wr_subject||wr_content'); ?>>제목+내용</option>
|
||||
<option value="mb_id,1"<?php echo get_selected($sfl, 'mb_id,1'); ?>>회원아이디</option>
|
||||
<option value="wr_name,1"<?php echo get_selected($sfl, 'wr_name,1'); ?>>이름</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어</label>
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="sch_input" size="25" maxlength="20" placeholder="검색어를 입력해주세요">
|
||||
<button type="submit" value="검색" class="sch_btn"><i class="fas fa-search" aria-hidden="true"></i> 검색</button>
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<?php if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||
</noscript>
|
||||
<?php } ?>
|
||||
|
||||
<script>
|
||||
// PHP 변수를 JavaScript로 전달
|
||||
var gallery_general_config = {
|
||||
bo_table: "<?php echo $bo_table; ?>",
|
||||
is_checkbox: <?php echo $is_checkbox ? 'true' : 'false'; ?>,
|
||||
total_page: <?php echo (int)$total_page; ?>
|
||||
};
|
||||
</script>
|
||||
<!-- } 게시판 목록 끝 -->
|
||||
@@ -0,0 +1,291 @@
|
||||
// theme/rd.laser/skin/board/gallery_general/script.js
|
||||
|
||||
(function($) {
|
||||
// ==========================================================================
|
||||
// 게시판 목록 (list.skin.php)
|
||||
// ==========================================================================
|
||||
|
||||
$(document).ready(function() {
|
||||
if ($('#bo_gall').length) {
|
||||
// 뷰 모드 전환
|
||||
const viewModeButtons = document.querySelectorAll('.btn_view_mode');
|
||||
const boardContainer = document.getElementById('bo_gall');
|
||||
const boTable = (typeof gallery_general_config !== 'undefined') ? gallery_general_config.bo_table : '';
|
||||
|
||||
viewModeButtons.forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
const mode = this.dataset.mode;
|
||||
viewModeButtons.forEach(btn => btn.classList.remove('active'));
|
||||
this.classList.add('active');
|
||||
boardContainer.classList.remove('view-mode-card', 'view-mode-list');
|
||||
boardContainer.classList.add('view-mode-' + mode);
|
||||
set_cookie('board_' + boTable + '_view_mode', mode, 365);
|
||||
});
|
||||
});
|
||||
|
||||
// 💡 [추가] 노출 상태 토글 기능
|
||||
$('.status-toggle-switch').on('click', function() {
|
||||
var $this = $(this);
|
||||
var wr_id = $this.data('wr-id');
|
||||
var current_status = $this.data('status');
|
||||
var new_status = (current_status == '1') ? '0' : '1';
|
||||
var bo_table = gallery_general_config.bo_table;
|
||||
|
||||
$.ajax({
|
||||
url: './ajax.status_update.php',
|
||||
type: 'POST',
|
||||
data: {
|
||||
'bo_table': bo_table,
|
||||
'wr_id': wr_id,
|
||||
'status': new_status
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.success) {
|
||||
$this.data('status', new_status);
|
||||
if (new_status == '1') {
|
||||
$this.removeClass('on').addClass('off');
|
||||
} else {
|
||||
$this.removeClass('off').addClass('on');
|
||||
}
|
||||
} else {
|
||||
alert(data.message || '상태 변경에 실패했습니다.');
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
alert('서버와의 통신 중 오류가 발생했습니다.');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 전체 선택
|
||||
window.all_checked = function(sw) {
|
||||
var f = document.fboardlist;
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_wr_id[]")
|
||||
f.elements[i].checked = sw;
|
||||
}
|
||||
}
|
||||
|
||||
// 목록 폼 제출
|
||||
window.fboardlist_submit = function(f) {
|
||||
var chk_count = 0;
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
|
||||
chk_count++;
|
||||
}
|
||||
|
||||
if (!chk_count) {
|
||||
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택복사") {
|
||||
select_copy("copy");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택이동") {
|
||||
select_copy("move");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
|
||||
return false;
|
||||
f.removeAttribute("target");
|
||||
f.action = g5_bbs_url+"/board_list_update.php";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 선택 복사/이동
|
||||
window.select_copy = function(sw) {
|
||||
var f = document.fboardlist;
|
||||
if (sw == "copy") str = "복사";
|
||||
else str = "이동";
|
||||
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
f.sw.value = sw;
|
||||
f.target = "move";
|
||||
f.action = g5_bbs_url+"/move.php";
|
||||
f.submit();
|
||||
}
|
||||
|
||||
|
||||
// ==========================================================================
|
||||
// 게시판 읽기 (view.skin.php)
|
||||
// ==========================================================================
|
||||
|
||||
// 게시물 이동/복사 창
|
||||
window.board_move = function(href) {
|
||||
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
}
|
||||
|
||||
// 뷰 페이지 초기화
|
||||
$(function() {
|
||||
if ($('#bo_v').length) {
|
||||
|
||||
// 더보기 메뉴 토글
|
||||
$('.btn_more_opt.is_view_btn').on('click', function(e) {
|
||||
e.stopPropagation(); // 이벤트 버블링 중단
|
||||
$(this).next('.more_opt.is_view_btn').toggle();
|
||||
});
|
||||
|
||||
// 외부 클릭 시 더보기 메뉴 닫기
|
||||
$(document).on('click', function(e) {
|
||||
if (!$(e.target).closest('.more_opt_wrapper').length) {
|
||||
$('.more_opt.is_view_btn').hide();
|
||||
}
|
||||
});
|
||||
|
||||
// 파일 다운로드 클릭
|
||||
$("a.view_file_download").click(function() {
|
||||
if (typeof gallery_general_config !== 'undefined' && gallery_general_config.bo_download_point < 0) {
|
||||
if(!g5_is_member) {
|
||||
alert("다운로드 권한이 없습니다.\n회원이시라면 로그인 후 이용해 보십시오.");
|
||||
return false;
|
||||
}
|
||||
var msg = "파일을 다운로드 하시면 포인트가 차감(" + number_format(String(Math.abs(gallery_general_config.bo_download_point))) + "점)됩니다.\n\n포인트는 게시물당 한번만 차감됩니다.\n\n그래도 다운로드 하시겠습니까?";
|
||||
if(confirm(msg)) {
|
||||
var href = $(this).attr("href");
|
||||
$('#bo_v_file_down').attr('src', href);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// 이미지 크게 보기
|
||||
$("a.view_image").click(function() {
|
||||
window.open(this.href, "large_image", "location=yes,links=yes,toolbar=yes,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=yes,status=yes");
|
||||
return false;
|
||||
});
|
||||
|
||||
// 추천, 비추천
|
||||
$("#good_button, #nogood_button").click(function() {
|
||||
var $tx = $(this);
|
||||
var ex = $tx.attr('href');
|
||||
|
||||
if(ex) {
|
||||
$.post(ex, { js: "on" }, function(data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (data.count) {
|
||||
$tx.find("strong").text(number_format(String(data.count)));
|
||||
if($tx.attr("id").search("nogood") > -1) {
|
||||
$tx.attr("href", ex.replace("nogood", "good"));
|
||||
$tx.find("i").removeClass("far fa-thumbs-down").addClass("far fa-thumbs-up");
|
||||
} else {
|
||||
$tx.attr("href", ex.replace("good", "nogood"));
|
||||
$tx.find("i").removeClass("far fa-thumbs-up").addClass("far fa-thumbs-down");
|
||||
}
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// 이미지 리사이즈
|
||||
$("#bo_v_atc").viewimageresize();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// ==========================================================================
|
||||
// 게시판 쓰기 (write.skin.php)
|
||||
// ==========================================================================
|
||||
|
||||
$(function() {
|
||||
if ($('#bo_w').length) {
|
||||
// Datepicker
|
||||
if ($.fn.datepicker) {
|
||||
$(".datepicker").datepicker({
|
||||
dateFormat: 'yy-mm-dd',
|
||||
prevText: '이전 달',
|
||||
nextText: '다음 달',
|
||||
monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||
monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||
dayNames: ['일', '월', '화', '수', '목', '금', '토'],
|
||||
dayNamesShort: ['일', '월', '화', '수', '목', '금', '토'],
|
||||
dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
|
||||
showMonthAfterYear: true,
|
||||
yearSuffix: '년'
|
||||
});
|
||||
}
|
||||
|
||||
// 예약 노출 토글
|
||||
$('input[name="wr_9"]').change(function() {
|
||||
if ($(this).val() === 'RESERVED') {
|
||||
$('#reservation_fields').show();
|
||||
} else {
|
||||
$('#reservation_fields').hide();
|
||||
}
|
||||
});
|
||||
|
||||
// 에디터(textarea) 높이 자동 조절
|
||||
var $wr_content = $("#wr_content");
|
||||
$wr_content.css("overflow-y", "hidden").on("input keyup paste change", function() {
|
||||
this.style.height = "auto";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
});
|
||||
// 초기 높이 설정
|
||||
$wr_content.trigger("input");
|
||||
|
||||
// 글자수 제한
|
||||
if (typeof gallery_general_config !== 'undefined' && (gallery_general_config.write_min || gallery_general_config.write_max)) {
|
||||
check_byte("wr_content", "char_count");
|
||||
$("#wr_content").on("keyup", function() {
|
||||
check_byte("wr_content", "char_count");
|
||||
});
|
||||
}
|
||||
|
||||
// 💡 [추가] 수동 임시저장
|
||||
$("#btn_manual_autosave").click(function() {
|
||||
if (typeof(autosave) == "undefined") return;
|
||||
|
||||
var subject = $.trim($("#wr_subject").val());
|
||||
var content = $.trim(get_editor_content());
|
||||
|
||||
if (!subject || !content) {
|
||||
alert("제목과 내용을 모두 입력해야 임시저장할 수 있습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
autosave();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
window.html_auto_br = function(obj) {
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "html2";
|
||||
else
|
||||
obj.value = "html1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
// 예약 노출 유효성 검사 (fwrite_submit 내부에서 호출)
|
||||
window.validate_reservation = function(f) {
|
||||
if (document.querySelector('input[name="wr_9"]:checked').value === 'RESERVED') {
|
||||
if (f.wr_2.value === '' || f.wr_3.value === '') {
|
||||
alert('예약 시작일과 종료일을 모두 선택해주세요.');
|
||||
return false;
|
||||
}
|
||||
if (f.wr_2.value > f.wr_3.value) {
|
||||
alert('예약 종료일은 시작일보다 빠를 수 없습니다.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,383 @@
|
||||
@charset "utf-8";
|
||||
|
||||
/*
|
||||
* gallery_general 스킨 전용 CSS
|
||||
*/
|
||||
|
||||
/* --- 공통 유틸리티 클래스 --- */
|
||||
.sound_only { display: inline-block !important; position: absolute; top: 0; left: 0; margin: 0 !important; padding: 0 !important; font-size: 0; line-height: 0; border: 0 !important; overflow: hidden !important; width: 0 !important; height: 0 !important; }
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
게시판 목록 (list.skin.php)
|
||||
========================================================================== */
|
||||
#bo_gall { margin-bottom: 30px; }
|
||||
#bo_gall h2 { margin: 0; padding: 0; width: 1px; height: 1px; font-size: 0; line-height: 0; overflow: hidden; }
|
||||
|
||||
/* 카테고리 */
|
||||
#bo_gall #bo_cate { margin: 25px 0; }
|
||||
#bo_gall #bo_cate h2 { position: absolute; font-size: 0; line-height: 0; overflow: hidden; }
|
||||
#bo_gall #bo_cate ul { zoom: 1; }
|
||||
#bo_gall #bo_cate ul:after { display: block; visibility: hidden; clear: both; content: ""; }
|
||||
#bo_gall #bo_cate li { display: inline-block; padding: 2px; }
|
||||
#bo_gall #bo_cate a { display: block; background: #f8f9fa; color: #666; padding: 8px 15px; border-radius: 20px; border: 1px solid #e9ecef; transition: all 0.2s; }
|
||||
#bo_gall #bo_cate a:focus, #bo_gall #bo_cate a:hover, #bo_gall #bo_cate a:active { text-decoration: none; background: #e7f1ff; color: #4a90e2; border-color: #4a90e2; }
|
||||
#bo_gall #bo_cate #bo_cate_on { z-index: 2; background: #4a90e2; color: #fff; font-weight: bold; border: 1px solid #4a90e2; box-shadow: 0 2px 5px rgba(74, 144, 226, 0.3); }
|
||||
|
||||
/* 상단 공통 영역 */
|
||||
#bo_gall .bo_fx { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
|
||||
#bo_gall .bo_fx_left { display: flex; align-items: center; gap: 10px; }
|
||||
#bo_gall .bo_fx_right { display: flex; align-items: center; gap: 10px; }
|
||||
|
||||
#bo_gall #bo_list_total { line-height: 34px; font-size: 0.95em; color: #666; }
|
||||
|
||||
#bo_gall .btn_bo_user { margin: 0; padding: 0; list-style: none; display: flex; gap: 5px; }
|
||||
|
||||
/* 뷰 모드 전환 버튼 */
|
||||
#bo_gall .view-mode-switcher { display: flex; border: 1px solid #e9ecef; border-radius: 8px; overflow: hidden; background: #fff; }
|
||||
#bo_gall .view-mode-switcher .btn_view_mode { background: #fff; border: none; padding: 6px 12px; cursor: pointer; color: #adb5bd; font-size: 1.1em; transition: all 0.2s; }
|
||||
#bo_gall .view-mode-switcher .btn_view_mode:hover { color: #4a90e2; background: #f8f9fa; }
|
||||
#bo_gall .view-mode-switcher .btn_view_mode.active { background: #e7f1ff; color: #4a90e2; }
|
||||
#bo_gall .view-mode-switcher .btn_view_mode:not(:last-child) { border-right: 1px solid #e9ecef; }
|
||||
|
||||
/* 뷰 모드에 따른 표시/숨김 */
|
||||
#bo_gall.view-mode-card .list-view { display: none; }
|
||||
#bo_gall.view-mode-list .card-list-view { display: none; }
|
||||
|
||||
/* --- 카드형 목록 스타일 --- */
|
||||
#bo_gall .card-list-view #gall_ul { margin: 0; padding: 0; list-style: none; border-top: none; }
|
||||
#bo_gall .card-list-view #gall_ul:after { display: block; visibility: hidden; clear: both; content: ""; }
|
||||
#bo_gall .card-list-view .gall_li { float: left; margin: 20px 0 0; padding: 0 10px; box-sizing: border-box; }
|
||||
#bo_gall .card-list-view .gall_box { position: relative; border: 1px solid #eee; background: #fff; border-radius: 12px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
|
||||
#bo_gall .card-list-view .gall_box:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
|
||||
#bo_gall .card-list-view .gall_chk { position: absolute; top: 10px; left: 10px; z-index: 1; }
|
||||
#bo_gall .card-list-view .gall_con { margin: 0; padding: 0; }
|
||||
#bo_gall .card-list-view .gall_img { overflow: hidden; position: relative; padding-top: 65%; border-bottom: 1px solid #f1f1f1; }
|
||||
#bo_gall .card-list-view .gall_img a { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
#bo_gall .card-list-view .gall_img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
|
||||
#bo_gall .card-list-view .gall_box:hover .gall_img img { transform: scale(1.05); }
|
||||
#bo_gall .card-list-view .gall_img .no_image { display: block; width: 100%; height: 100%; background: #f8f9fa; text-align: center; line-height: 150px; color: #ccc; }
|
||||
#bo_gall .card-list-view .gall_img .is_notice { display: block; width: 100%; height: 100%; background: #f8f9fa; text-align: center; line-height: 150px; color: #999; font-weight: bold; }
|
||||
|
||||
#bo_gall .card-list-view .gall_text_href { padding: 15px; }
|
||||
#bo_gall .card-list-view .gall_text_href a { color: #333; font-weight: 600; text-decoration: none; }
|
||||
#bo_gall .card-list-view .bo_cate_link { display: inline-block; margin-bottom: 5px; font-size: 0.85em; color: #4a90e2 !important; font-weight: 500 !important; background: #e7f1ff; padding: 2px 8px; border-radius: 4px; }
|
||||
#bo_gall .card-list-view .bo_tit_link { display: block; font-size: 1.1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-wrap: normal; margin-top: 5px; }
|
||||
#bo_gall .card-list-view .cnt_cmt { display: inline-block; margin: 0 0 0 5px; font-weight: bold; color: #ff6b6b; font-size: 0.85em; background: #fff0f0; padding: 0 5px; border-radius: 10px; }
|
||||
|
||||
#bo_gall .card-list-view .gall_name { padding: 0 15px 10px; font-size: 0.9em; color: #666; }
|
||||
#bo_gall .card-list-view .gall_name .profile_img img { border-radius: 50%; width: 20px; height: 20px; vertical-align: middle; margin-right: 5px; }
|
||||
#bo_gall .card-list-view .gall_info { padding: 12px 15px; border-top: 1px solid #f1f1f1; font-size: 0.85em; color: #999; background: #fcfcfc; display: flex; justify-content: space-between; }
|
||||
#bo_gall .card-list-view .gall_info i { margin-right: 3px; }
|
||||
|
||||
/* --- 리스트형 목록 스타일 --- */
|
||||
#bo_gall .list-view { margin-top: 20px; border-top: 2px solid #333; }
|
||||
#bo_gall .list-view .list-group { list-style: none; padding: 0; margin: 0; }
|
||||
#bo_gall .list-view .list-group-header,
|
||||
#bo_gall .list-view .list-group-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #eee; }
|
||||
#bo_gall .list-view .list-group-header { background: #f8f9fa; font-weight: 600; color: #555; font-size: 0.95em; }
|
||||
#bo_gall .list-view .list-cell { padding: 0 10px; box-sizing: border-box; }
|
||||
#bo_gall .list-view .list-cell.num { width: 80px; text-align: center; color: #888; }
|
||||
#bo_gall .list-view .list-cell.title { flex-grow: 1; }
|
||||
#bo_gall .list-view .list-cell.name { width: 120px; text-align: center; color: #666; }
|
||||
#bo_gall .list-view .list-cell.date { width: 100px; text-align: center; color: #888; font-size: 0.9em; }
|
||||
#bo_gall .list-view .list-cell.hit { width: 80px; text-align: center; color: #888; font-size: 0.9em; }
|
||||
#bo_gall .list-view .list-cell.status { width: 80px; text-align: center; }
|
||||
|
||||
#bo_gall .list-view .list-group-item:hover { background: #fbfbfb; }
|
||||
#bo_gall .list-view .list-group-item .bo_cate_link { font-size: 0.85em; color: #4a90e2; margin-right: 8px; background: #e7f1ff; padding: 2px 6px; border-radius: 4px; }
|
||||
#bo_gall .list-view .list-group-item a { text-decoration: none; color: #333; font-weight: 500; }
|
||||
#bo_gall .list-view .list-group-item a:hover { text-decoration: underline; color: #4a90e2; }
|
||||
#bo_gall .list-view .list-group-item .cnt_cmt { font-size: 0.85em; color: #ff6b6b; margin-left: 5px; font-weight: bold; }
|
||||
|
||||
#bo_gall .empty_list { padding: 100px 0; text-align: center; color: #999; font-size: 1.1em; }
|
||||
|
||||
/* 💡 [추가] 노출여부 토글 스위치 */
|
||||
#bo_gall .status-toggle-wrap { display: flex; align-items: center; gap: 5px; }
|
||||
#bo_gall .status-label { font-size: 0.9em; color: #666; }
|
||||
#bo_gall .status-toggle-switch {
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 22px;
|
||||
border-radius: 11px;
|
||||
background-color: #ccc;
|
||||
position: relative;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
#bo_gall .status-toggle-switch .switch-handle {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
#bo_gall .status-toggle-switch.on {
|
||||
background-color: #28a745; /* Green for 'on' */
|
||||
}
|
||||
#bo_gall .status-toggle-switch.off {
|
||||
background-color: #666; /* Red for 'off' */
|
||||
}
|
||||
#bo_gall .status-toggle-switch.on .switch-handle {
|
||||
transform: translateX(18px);
|
||||
}
|
||||
#bo_gall .status-toggle-switch.off .switch-handle {
|
||||
transform: translateX(0);
|
||||
}
|
||||
#bo_gall .list-view .list-cell.status {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 반응형 컬럼 */
|
||||
#bo_gall .col-gn-1 { width: 100%; }
|
||||
#bo_gall .col-gn-2 { width: 50%; }
|
||||
#bo_gall .col-gn-3 { width: 33.3333%; }
|
||||
#bo_gall .col-gn-4 { width: 25%; }
|
||||
#bo_gall .col-gn-5 { width: 20%; }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
#bo_gall .col-gn-3, #bo_gall .col-gn-4, #bo_gall .col-gn-5 { width: 50%; }
|
||||
#bo_gall .box_clear { clear: none; }
|
||||
#bo_gall .gall_li:nth-child(2n+1) { clear: both; }
|
||||
|
||||
#bo_gall .list-view .list-cell.name,
|
||||
#bo_gall .list-view .list-cell.date,
|
||||
#bo_gall .list-view .list-cell.hit { width: 80px; font-size: 0.85em; }
|
||||
#bo_gall .list-view .list-cell.num { width: 60px; }
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
#bo_gall .col-gn-2, #bo_gall .col-gn-3, #bo_gall .col-gn-4, #bo_gall .col-gn-5 { width: 100%; }
|
||||
#bo_gall .gall_li:nth-child(2n+1) { clear: none; }
|
||||
|
||||
#bo_gall .list-view .list-group-header { display: none; } /* 모바일 헤더 숨김 */
|
||||
#bo_gall .list-view .list-group-item { flex-wrap: wrap; padding: 15px 0; }
|
||||
#bo_gall .list-view .list-cell.num { display: none; }
|
||||
#bo_gall .list-view .list-cell.title { width: 100%; margin-bottom: 5px; font-size: 1.1em; }
|
||||
#bo_gall .list-view .list-cell.name { width: auto; text-align: left; margin-right: 10px; font-size: 0.9em; }
|
||||
#bo_gall .list-view .list-cell.date { width: auto; text-align: left; margin-right: 10px; font-size: 0.9em; }
|
||||
#bo_gall .list-view .list-cell.hit { width: auto; text-align: left; font-size: 0.9em; }
|
||||
}
|
||||
|
||||
/* 검색 */
|
||||
#bo_sch { text-align: center; margin: 40px 0; }
|
||||
#bo_sch legend { position: absolute; margin: 0; padding: 0; font-size: 0; line-height: 0; text-indent: -9999em; overflow: hidden; }
|
||||
#bo_sch select { border: 1px solid #ddd; height: 40px; padding: 0 10px; border-radius: 20px 0 0 20px; border-right: 0; outline: none; color: #666; }
|
||||
#bo_sch .sch_input { border: 1px solid #ddd; height: 40px; padding: 0 15px; width: 250px; border-radius: 0; border-left: 1px solid #eee; outline: none; }
|
||||
#bo_sch .sch_btn { background: #4a90e2; color: #fff; border: 0; height: 40px; padding: 0 20px; cursor: pointer; border-radius: 0 20px 20px 0; font-weight: bold; transition: background 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
|
||||
#bo_sch .sch_btn:hover { background: #357abd; }
|
||||
|
||||
/* 하단 버튼 그룹 좌우 정렬 */
|
||||
#bo_gall form .bo_fx {
|
||||
margin-top: 20px;
|
||||
border-top: 1px solid #eee;
|
||||
padding-top: 15px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#bo_gall form .bo_fx .bo_fx_left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#bo_gall form .bo_fx .bo_fx_right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
게시판 쓰기 (write.skin.php)
|
||||
========================================================================== */
|
||||
#bo_w { max-width: 900px; margin: 0 auto; padding: 20px; background: #fff; border: 1px solid #eee; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
|
||||
#bo_w h2.sound_only { display: none; } /* 페이지 제목 숨김 */
|
||||
|
||||
#bo_w .write_div { margin: 15px 0; position: relative; }
|
||||
#bo_w .bo_w_info:after { display: block; visibility: hidden; clear: both; content: ""; }
|
||||
#bo_w .bo_w_info .frm_input { float: left; width: 32%; }
|
||||
#bo_w .bo_w_info .frm_input.required { margin-right: 2%; }
|
||||
#bo_w .bo_w_info .frm_input.email { float: right; margin: 0; }
|
||||
#bo_w .bo_w_tit { position: relative; }
|
||||
#bo_w .bo_w_tit .frm_input { width: 100%; }
|
||||
#bo_w .bo_w_link .frm_input { width: 100%; }
|
||||
#bo_w .bo_w_flie .file_writ_div { border: 1px solid #e9ecef; background: #f8f9fa; padding: 15px; border-radius: 8px; }
|
||||
#bo_w .bo_w_flie .file_input_wrap { margin: 8px 0; }
|
||||
#bo_w .bo_w_flie .lb_icon { display: inline-block; width: 30px; text-align: center; color: #888; }
|
||||
#bo_w .bo_w_flie .frm_file { width: 100%; }
|
||||
#bo_w .bo_w_select select { border: 1px solid #ddd; height: 40px; padding: 0 10px; width: 100%; border-radius: 4px; }
|
||||
|
||||
#bo_w .frm_label { font-weight: bold; color: #333; margin-bottom: 8px; display: block; }
|
||||
#bo_w .frm_input { border: 1px solid #ddd; height: 40px; padding: 0 10px; border-radius: 4px; outline: none; transition: border-color 0.2s; width: 100%; box-sizing: border-box; }
|
||||
#bo_w .frm_input:focus { border-color: #4a90e2; }
|
||||
#bo_w textarea.frm_input { height: 100px; padding: 10px; } /* textarea 기본 높이 */
|
||||
|
||||
#bo_w .btn_confirm { text-align: right; margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
|
||||
|
||||
/* 💡 [수정] 옵션 및 임시저장글 영역 */
|
||||
#bo_w .write_options { display: flex; justify-content: space-between; align-items: center; }
|
||||
#bo_w .write_options .left_area { display: flex; align-items: center; gap: 15px; }
|
||||
#bo_w .write_options .right_area { position: relative; }
|
||||
#bo_w #autosave_wrapper { position: static; } /* 기본 position으로 변경 */
|
||||
#bo_w #autosave_pop { right: 0; top: 100%; margin-top: 5px; display: none; } /* 처음에는 숨김 */
|
||||
|
||||
/* 버튼 스타일 */
|
||||
#bo_w .btn_submit { background: #4a90e2; color: #fff; border: 0; padding: 10px 25px; font-weight: 600; border-radius: 25px; cursor: pointer; transition: all 0.2s; font-size: 15px; box-shadow: 0 4px 6px rgba(74, 144, 226, 0.2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
|
||||
#bo_w .btn_submit:hover { background: #357abd; transform: translateY(-2px); box-shadow: 0 6px 8px rgba(74, 144, 226, 0.3); }
|
||||
|
||||
#bo_w .btn_cancel { background: #f1f3f5; color: #495057; border: 1px solid #e9ecef; padding: 10px 25px; font-weight: 600; border-radius: 25px; text-decoration: none; display: inline-block; transition: all 0.2s; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
|
||||
#bo_w .btn_cancel:hover { background: #e9ecef; color: #333; }
|
||||
|
||||
/* 커스텀 라디오/체크박스 스타일 */
|
||||
#bo_w .option_group { display: flex; align-items: center; margin-top: 10px; flex-wrap: wrap; gap: 15px; }
|
||||
#bo_w .option_group label { display: inline-flex; align-items: center; cursor: pointer; font-size: 0.95em; color: #555; }
|
||||
#bo_w .option_group input[type="radio"],
|
||||
#bo_w .option_group input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
|
||||
#bo_w .option_group .custom-radio,
|
||||
#bo_w .option_group .custom-checkbox { display: inline-block; width: 18px; height: 18px; border: 1px solid #ccc; background: #fff; margin-right: 8px; position: relative; flex-shrink: 0; transition: all 0.2s; }
|
||||
#bo_w .option_group .custom-radio { border-radius: 50%; }
|
||||
#bo_w .option_group .custom-checkbox { border-radius: 4px; }
|
||||
|
||||
#bo_w .option_group input[type="radio"]:checked + .custom-radio { border-color: #4a90e2; }
|
||||
#bo_w .option_group input[type="radio"]:checked + .custom-radio::after { content: ''; display: block; width: 10px; height: 10px; background: #4a90e2; border-radius: 50%; position: absolute; top: 3px; left: 3px; }
|
||||
|
||||
#bo_w .option_group input[type="checkbox"]:checked + .custom-checkbox { border-color: #4a90e2; background: #4a90e2; }
|
||||
#bo_w .option_group input[type="checkbox"]:checked + .custom-checkbox::after { content: ''; display: block; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); position: absolute; top: 2px; left: 6px; }
|
||||
|
||||
#bo_w .option_group input:disabled + .custom-radio,
|
||||
#bo_w .option_group input:disabled + .custom-checkbox { background: #e9ecef; border-color: #dee2e6; }
|
||||
#bo_w .option_group input:disabled:checked + .custom-radio::after { background: #adb5bd; }
|
||||
#bo_w .option_group input:disabled:checked + .custom-checkbox { background: #adb5bd; border-color: #adb5bd; }
|
||||
|
||||
#bo_w .date_picker_group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
||||
#bo_w .date_picker_group .date_item { display: flex; flex-direction: column; }
|
||||
#bo_w .date_picker_group .frm_label { font-size: 0.9em; color: #666; margin-bottom: 5px; }
|
||||
#bo_w .date_picker_group .datepicker { width: 120px; height: 38px; padding: 0 10px; border: 1px solid #ddd; border-radius: 4px; }
|
||||
#bo_w .date_picker_group .date_divider { font-size: 1.2em; color: #888; margin-top: 20px; }
|
||||
|
||||
#bo_w .wr_content { margin-top: 10px; }
|
||||
#bo_w .wr_content .text_right { text-align: right; margin-bottom: 5px; color: #888; }
|
||||
#bo_w .wr_content .cke_chrome { border: 1px solid #ddd !important; border-radius: 4px !important; }
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
게시판 읽기 (view.skin.php)
|
||||
========================================================================== */
|
||||
#bo_v { margin-bottom: 20px; background: #fff; border: 1px solid #eee; padding: 30px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
|
||||
#bo_v #bo_v_title { font-size: 1.6em; margin: 0 0 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; word-break: break-all; font-weight: 700; color: #333; display: flex; align-items: center; flex-wrap: wrap; }
|
||||
#bo_v #bo_v_title .bo_v_cate { display: inline-block; font-size: 0.55em; vertical-align: middle; background: #e7f1ff; color: #4a90e2; padding: 4px 8px; border-radius: 4px; margin-right: 8px; font-weight: 600; }
|
||||
#bo_v #bo_v_info { margin-bottom: 30px; position: relative; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
|
||||
#bo_v #bo_v_info h2 { position: absolute; font-size: 0; line-height: 0; overflow: hidden; }
|
||||
#bo_v #bo_v_info .profile_info { display: flex; align-items: center; }
|
||||
#bo_v #bo_v_info .profile_info .pf_img { margin-right: 12px; }
|
||||
#bo_v #bo_v_info .profile_info .pf_img img { border-radius: 50%; width: 45px; height: 45px; object-fit: cover; border: 1px solid #eee; }
|
||||
#bo_v #bo_v_info .profile_info .profile_info_ct { font-size: 0.95em; color: #666; }
|
||||
#bo_v #bo_v_info .profile_info strong { color: #333; font-weight: 600; margin-right: 5px; }
|
||||
#bo_v #bo_v_info .profile_info .if_date { display: block; color: #999; font-size: 0.9em; margin-top: 3px; font-weight: normal; }
|
||||
#bo_v #bo_v_info .profile_info a { color: #4a90e2; text-decoration: none; }
|
||||
#bo_v #bo_v_info .profile_info a:hover { text-decoration: underline; }
|
||||
#bo_v #bo_v_info .profile_info i { margin-right: 5px; }
|
||||
|
||||
#bo_v #bo_v_top { margin-top: 0; }
|
||||
#bo_v #bo_v_top .btn_bo_user { margin: 0; padding: 0; list-style: none; display: flex; gap: 5px; }
|
||||
#bo_v #bo_v_top .btn_bo_user li { float: none; margin: 0; }
|
||||
|
||||
|
||||
|
||||
#bo_gall .btn_b01, #bo_v .btn_b01 { border: 1px solid #e9ecef; background: #fff; color: #555; }
|
||||
#bo_gall .btn_b01:hover, #bo_v .btn_b01:hover { background: #f8f9fa; color: #333; border-color: #dee2e6; }
|
||||
|
||||
#bo_gall .btn_b02, #bo_v .btn_b02 { border: 1px solid #4a90e2; background: #4a90e2; color: #fff; }
|
||||
#bo_gall .btn_b02:hover, #bo_v .btn_b02:hover { background: #357abd; border-color: #357abd; color: #fff; box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2); }
|
||||
|
||||
#bo_gall .btn_admin, #bo_v .btn_admin { border: 1px solid #ff6b6b; background: #fff; color: #ff6b6b; }
|
||||
#bo_gall .btn_admin:hover, #bo_v .btn_admin:hover { background: #ff6b6b; color: #fff; }
|
||||
|
||||
|
||||
#bo_v #bo_v_atc { min-height: 200px; padding: 20px 0; }
|
||||
#bo_v #bo_v_atc_title { position: absolute; font-size: 0; line-height: 0; overflow: hidden; }
|
||||
#bo_v #bo_v_img { width: 100%; overflow: hidden; zoom: 1; margin-bottom: 20px; }
|
||||
#bo_v #bo_v_img:after { display: block; visibility: hidden; clear: both; content: ""; }
|
||||
#bo_v #bo_v_img a { display: block; width: 100%; }
|
||||
#bo_v #bo_v_img img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
|
||||
#bo_v #bo_v_con { margin: 10px 0 30px; width: 100%; line-height: 1.8em; word-break: break-all; overflow: hidden; font-size: 1.05em; color: #333; }
|
||||
#bo_v #bo_v_con img { max-width: 100%; height: auto; }
|
||||
|
||||
#bo_v #bo_v_act { margin-bottom: 30px; text-align: center; padding-top: 30px; border-top: 1px solid #eee; }
|
||||
#bo_v #bo_v_act .btn_b01 { margin: 0 5px; padding: 10px 25px; border-radius: 30px; font-size: 1em; }
|
||||
#bo_v #bo_v_act .bo_v_act_gng { position: relative; }
|
||||
#bo_v #bo_v_act_good, #bo_v #bo_v_act_nogood { display: none; position: absolute; top: -35px; left: 50%; margin-left: -20px; z-index: 2; padding: 5px 10px; background: rgba(0,0,0,0.8); color: #fff; border-radius: 4px; font-size: 12px; }
|
||||
|
||||
/* 상태 배지 스타일 */
|
||||
#bo_v .status-badge { font-size: 13px; vertical-align: middle; margin-left: 10px; padding: 4px 10px; border-radius: 15px; color: #fff; background-color: #888; font-weight: 500; }
|
||||
#bo_v .status-active { background-color: #28a745 !important; }
|
||||
#bo_v .status-scheduled { background-color: #17a2b8 !important; }
|
||||
#bo_v .status-expired { background-color: #dc3545 !important; }
|
||||
#bo_v .status-hidden { background-color: #6c757d !important; }
|
||||
|
||||
/* 💡 [수정] 더보기 메뉴 개선 */
|
||||
#bo_v .more_opt_wrapper { position: relative; }
|
||||
#bo_v .more_opt.is_view_btn {
|
||||
display: none; /* 기본적으로 숨김 */
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
min-width: 140px;
|
||||
margin-top: 8px;
|
||||
padding: 8px 0;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e0e0e0;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
z-index: 1000;
|
||||
}
|
||||
#bo_v .more_opt.is_view_btn.show {
|
||||
display: block; /* JS로 .show 클래스 추가 시 보임 */
|
||||
}
|
||||
#bo_v .more_opt.is_view_btn li {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
#bo_v .more_opt.is_view_btn li a {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 16px;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#bo_v .more_opt.is_view_btn li a:hover {
|
||||
background-color: #f5f5f5;
|
||||
color: #000;
|
||||
}
|
||||
#bo_v .more_opt.is_view_btn li a i {
|
||||
margin-left: 10px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
/* 커스텀 필드 (view.skin.php) */
|
||||
#bo_v .custom-fields { margin-bottom: 30px; padding: 20px; background: #f9f9f9; border-radius: 8px; }
|
||||
#bo_v .custom-fields .subtitle { font-size: 1.2em; color: #555; margin-bottom: 15px; }
|
||||
#bo_v .custom-fields .custom-image { text-align: center; margin-bottom: 20px; }
|
||||
#bo_v .custom-fields .custom-image img { max-width: 100%; height: auto; border-radius: 4px; }
|
||||
#bo_v .custom-fields .image-caption { font-size: 0.9em; color: #777; margin-top: 5px; }
|
||||
|
||||
/* 커스텀 서명 (view.skin.php) */
|
||||
#bo_v .custom-signature { margin-top: 40px; text-align: right; border-top: 1px solid #eee; padding-top: 20px; }
|
||||
#bo_v .custom-signature .sign-name { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
|
||||
#bo_v .custom-signature .sign-company { color: #666; }
|
||||
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
add_javascript('<script src="'.G5_JS_URL.'/viewimageresize.js"></script>', 0);
|
||||
add_javascript('<script src="'.$board_skin_url.'/script.js"></script>', 10);
|
||||
|
||||
// 💡 [추가] 노출 상태 계산
|
||||
$status_text = '정보 없음';
|
||||
$status_class = 'expired';
|
||||
$is_hidden = ($view['wr_10'] == '1');
|
||||
$today = G5_TIME_YMD;
|
||||
|
||||
if ($is_hidden) {
|
||||
$status_text = '숨김 (노출 안 함)';
|
||||
$status_class = 'hidden';
|
||||
} else if ($view['wr_9'] == 'RESERVED') {
|
||||
$start_date = $view['wr_2'];
|
||||
$end_date = $view['wr_3'];
|
||||
|
||||
if ($today >= $start_date && $today <= $end_date) {
|
||||
$status_text = '노출중 (예약)';
|
||||
$status_class = 'active';
|
||||
} elseif ($today < $start_date) {
|
||||
$status_text = '예약됨 (대기)';
|
||||
$status_class = 'scheduled';
|
||||
} else {
|
||||
$status_text = '기간만료';
|
||||
$status_class = 'expired';
|
||||
}
|
||||
} else {
|
||||
$status_text = '즉시 노출';
|
||||
$status_class = 'active';
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- 게시물 읽기 시작 { -->
|
||||
<article id="bo_v" style="width:<?php echo $width; ?>">
|
||||
<header>
|
||||
<h2 id="bo_v_title">
|
||||
<?php if ($category_name) { ?>
|
||||
<span class="bo_v_cate"><?php echo $view['ca_name']; // 분류 출력 끝 ?></span>
|
||||
<?php } ?>
|
||||
<span class="bo_v_tit">
|
||||
<?php
|
||||
echo cut_str(get_text($view['wr_subject']), 70); // 글제목 출력
|
||||
?></span>
|
||||
<!-- 💡 [추가] 노출 상태 배지 -->
|
||||
<span class="status-badge status-<?php echo $status_class; ?>">
|
||||
<?php echo $status_text; ?>
|
||||
</span>
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section id="bo_v_info">
|
||||
<div class="profile_info">
|
||||
<div class="pf_img"><?php echo get_member_profile_img($view['mb_id']) ?></div>
|
||||
<div class="profile_info_ct">
|
||||
<strong><?php echo $view['name'] ?><?php if ($is_ip_view) { echo " ($ip)"; } ?></strong><br>
|
||||
<a href="#bo_vc"> <i class="far fa-comment-dots" aria-hidden="true"></i> <?php echo number_format($view['wr_comment']) ?>건</a>
|
||||
<span><i class="far fa-eye" aria-hidden="true"></i> <?php echo number_format($view['wr_hit']) ?>회</span>
|
||||
<strong class="if_date"><i class="far fa-clock" aria-hidden="true"></i> <?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 💡 [수정] 게시물 상단 버튼 구조 원복 -->
|
||||
<div id="bo_v_top">
|
||||
<ul class="btn_bo_user bo_v_com">
|
||||
<li><a href="<?php echo $list_href ?>" class="btn_b01 btn"><i class="fas fa-list" aria-hidden="true"></i> 목록</a></li>
|
||||
<?php if ($reply_href) { ?><li><a href="<?php echo $reply_href ?>" class="btn_b01 btn"><i class="fas fa-reply" aria-hidden="true"></i> 답변</a></li><?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02 btn"><i class="fas fa-pencil-alt" aria-hidden="true"></i> 글쓰기</a></li><?php } ?>
|
||||
|
||||
<?php if($update_href || $delete_href || $copy_href || $move_href || $search_href) { ?>
|
||||
<li class="more_opt_wrapper">
|
||||
<button type="button" class="btn_more_opt is_view_btn btn_b01 btn">
|
||||
<i class="fas fa-ellipsis-v" aria-hidden="true"></i> 더보기
|
||||
</button>
|
||||
<ul class="more_opt is_view_btn">
|
||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>">수정<i class="fas fa-pencil-alt" aria-hidden="true"></i></a></li><?php } ?>
|
||||
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;">삭제<i class="far fa-trash-alt" aria-hidden="true"></i></a></li><?php } ?>
|
||||
<?php if ($copy_href) { ?><li><a href="<?php echo $copy_href ?>" onclick="board_move(this.href); return false;">복사<i class="far fa-copy" aria-hidden="true"></i></a></li><?php } ?>
|
||||
<?php if ($move_href) { ?><li><a href="<?php echo $move_href ?>" onclick="board_move(this.href); return false;">이동<i class="fas fa-arrows-alt" aria-hidden="true"></i></a></li><?php } ?>
|
||||
<?php if ($search_href) { ?><li><a href="<?php echo $search_href ?>">검색<i class="fas fa-search" aria-hidden="true"></i></a></li><?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- } 게시물 상단 버튼 끝 -->
|
||||
</section>
|
||||
|
||||
<section id="bo_v_atc">
|
||||
<h2 id="bo_v_atc_title">본문</h2>
|
||||
|
||||
<!-- 💡 [추가] 커스텀 필드 출력 -->
|
||||
<div class="custom-fields">
|
||||
<?php if ($view['wr_1']) { ?>
|
||||
<h3 class="subtitle"><?php echo $view['wr_1']; ?></h3>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// 파일 출력
|
||||
$v_img_count = count($view['file']);
|
||||
if($v_img_count) {
|
||||
echo "<div id=\"bo_v_img\">\n";
|
||||
for ($i=0; $i<=count($view['file']); $i++) {
|
||||
if ($view['file'][$i]['view']) {
|
||||
// 파일의 내용(bf_content)을 이미지 설명으로 사용
|
||||
$alt_text = $view['file'][$i]['bf_content'] ? get_text($view['file'][$i]['bf_content']) : get_text($view['subject']);
|
||||
echo get_view_thumbnail($view['file'][$i]['view'], $alt_text);
|
||||
}
|
||||
}
|
||||
echo "</div>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- 본문 내용 시작 { -->
|
||||
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
|
||||
<!-- } 본문 내용 끝 -->
|
||||
|
||||
<!-- 💡 [추가] 서명 출력 -->
|
||||
<?php if ($view['wr_6'] || $view['wr_7']) { ?>
|
||||
<div class="custom-signature">
|
||||
<?php if ($view['wr_6']) { ?>
|
||||
<p class="sign-name"><?php echo $view['wr_6']; ?></p>
|
||||
<?php } ?>
|
||||
<?php if ($view['wr_7']) { ?>
|
||||
<p class="sign-company"><?php echo $view['wr_7']; ?></p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>
|
||||
|
||||
<!-- 스크랩 추천 비추천 시작 { -->
|
||||
<?php if ($scrap_href || $good_href || $nogood_href) { ?>
|
||||
<div id="bo_v_act">
|
||||
<?php if ($scrap_href) { ?><a href="<?php echo $scrap_href; ?>" target="_blank" class="btn_b01 btn" onclick="win_scrap(this.href); return false;"><i class="fas fa-thumbtack" aria-hidden="true"></i> 스크랩</a><?php } ?>
|
||||
<?php if ($good_href) { ?>
|
||||
<span class="bo_v_act_gng">
|
||||
<a href="<?php echo $good_href.'&'.$qstr ?>" id="good_button" class="btn_b01 btn"><i class="far fa-thumbs-up" aria-hidden="true"></i> 추천 <strong><?php echo number_format($view['wr_good']) ?></strong></a>
|
||||
<b id="bo_v_act_good"></b>
|
||||
</span>
|
||||
<?php } ?>
|
||||
<?php if ($nogood_href) { ?>
|
||||
<span class="bo_v_act_gng">
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="btn_b01 btn"><i class="far fa-thumbs-down" aria-hidden="true"></i> 비추천 <strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<b id="bo_v_act_nogood"></b>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- } 스크랩 추천 비추천 끝 -->
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once(G5_BBS_PATH.'/view_comment.php');
|
||||
?>
|
||||
</article>
|
||||
<!-- } 게시물 읽기 끝 -->
|
||||
|
||||
<script>
|
||||
// PHP 변수를 JavaScript로 전달
|
||||
var gallery_general_config = {
|
||||
bo_download_point: <?php echo (int)$board['bo_download_point']; ?>
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,355 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<script>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $comment_min ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
</script>
|
||||
<button type="button" class="cmt_btn"><span class="total"><b>댓글</b> <?php echo $view['wr_comment']; ?></span><span class="cmt_more"></span></button>
|
||||
<!-- 댓글 시작 { -->
|
||||
<section id="bo_vc">
|
||||
<h2>댓글목록</h2>
|
||||
<?php
|
||||
$cmt_amt = count($list);
|
||||
for ($i=0; $i<$cmt_amt; $i++) {
|
||||
$comment_id = $list[$i]['wr_id'];
|
||||
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 50;
|
||||
$comment = $list[$i]['content'];
|
||||
/*
|
||||
if (strstr($list[$i]['wr_option'], "secret")) {
|
||||
$str = $str;
|
||||
}
|
||||
*/
|
||||
$comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment);
|
||||
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
<div class="pf_img"><?php echo get_member_profile_img($list[$i]['mb_id']); ?></div>
|
||||
|
||||
<div class="cm_wrap">
|
||||
|
||||
<header style="z-index:<?php echo $cmt_sv; ?>">
|
||||
<h2><?php echo get_text($list[$i]['wr_name']); ?>님의 <?php if ($cmt_depth) { ?><span class="sound_only">댓글의</span><?php } ?> 댓글</h2>
|
||||
<?php echo $list[$i]['name'] ?>
|
||||
<?php if ($is_ip_view) { ?>
|
||||
<span class="sound_only">아이피</span>
|
||||
<span>(<?php echo $list[$i]['ip']; ?>)</span>
|
||||
<?php } ?>
|
||||
<span class="sound_only">작성일</span>
|
||||
<span class="bo_vc_hdinfo"><i class="fa fa-clock-o" aria-hidden="true"></i> <time datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo $list[$i]['datetime'] ?></time></span>
|
||||
<?php
|
||||
include(G5_SNS_PATH.'/view_comment_list.sns.skin.php');
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- 댓글 출력 -->
|
||||
<div class="cmt_contents">
|
||||
<p>
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||
<?php echo $comment ?>
|
||||
</p>
|
||||
<?php if($is_comment_reply_edit) {
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (isset($cmt)) {
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) {
|
||||
$cmt['wr_content'] = '';
|
||||
}
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<span id="edit_<?php echo $comment_id ?>" class="bo_vc_w"></span><!-- 수정 -->
|
||||
<span id="reply_<?php echo $comment_id ?>" class="bo_vc_w"></span><!-- 답변 -->
|
||||
|
||||
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
</div>
|
||||
<?php if($is_comment_reply_edit) { ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b01 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
<?php if ($list[$i]['is_reply']) { ?><li><a href="<?php echo $c_reply_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'c'); return false;">답변</a></li><?php } ?>
|
||||
<?php if ($list[$i]['is_edit']) { ?><li><a href="<?php echo $c_edit_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'cu'); return false;">수정</a></li><?php } ?>
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
$(".btn_cm_opt").on("click", function(){
|
||||
$(this).parent("div").children(".bo_vc_act").show();
|
||||
});
|
||||
|
||||
// 댓글 옵션창 닫기
|
||||
$(document).mouseup(function (e){
|
||||
var container = $(".bo_vc_act");
|
||||
if( container.has(e.target).length === 0)
|
||||
container.hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</article>
|
||||
<?php } ?>
|
||||
<?php if ($i == 0) { //댓글이 없다면 ?><p id="bo_vc_empty">등록된 댓글이 없습니다.</p><?php } ?>
|
||||
|
||||
</section>
|
||||
<!-- } 댓글 끝 -->
|
||||
|
||||
<?php if ($is_comment_write) {
|
||||
if($w == '')
|
||||
$w = 'c';
|
||||
?>
|
||||
<!-- 댓글 쓰기 시작 { -->
|
||||
<aside id="bo_vc_w" class="bo_vc_w">
|
||||
<h2>댓글쓰기</h2>
|
||||
<form name="fviewcomment" id="fviewcomment" action="<?php echo $comment_action_url; ?>" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||
<input type="hidden" name="comment_id" value="<?php echo $c_id ?>" id="comment_id">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="is_good" value="">
|
||||
|
||||
<span class="sound_only">내용</span>
|
||||
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
|
||||
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" title="내용" placeholder="댓글내용을 입력해주세요"
|
||||
<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>
|
||||
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
|
||||
<script>
|
||||
$(document).on("keyup change", "textarea#wr_content[maxlength]", function() {
|
||||
var str = $(this).val()
|
||||
var mx = parseInt($(this).attr("maxlength"))
|
||||
if (str.length > mx) {
|
||||
$(this).val(str.substr(0, mx));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="bo_vc_w_wr">
|
||||
<div class="bo_vc_w_info">
|
||||
<?php if ($is_guest) { ?>
|
||||
<label for="wr_name" class="sound_only">이름<strong> 필수</strong></label>
|
||||
<input type="text" name="wr_name" value="<?php echo get_cookie("ck_sns_name"); ?>" id="wr_name" required class="frm_input required" size="25" placeholder="이름">
|
||||
<label for="wr_password" class="sound_only">비밀번호<strong> 필수</strong></label>
|
||||
<input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="25" placeholder="비밀번호">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) {
|
||||
?>
|
||||
<span class="sound_only">SNS 동시등록</span>
|
||||
<span id="bo_vc_send_sns"></span>
|
||||
<?php } ?>
|
||||
<?php if ($is_guest) { ?>
|
||||
<?php echo $captcha_html; ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="btn_confirm">
|
||||
<span class="secret_cm chk_box">
|
||||
<input type="checkbox" name="wr_secret" value="secret" id="wr_secret" class="selec_chk">
|
||||
<label for="wr_secret"><span></span>비밀글</label>
|
||||
</span>
|
||||
<button type="submit" id="btn_submit" class="btn_submit">댓글등록</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
<script>
|
||||
var save_before = '';
|
||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
|
||||
function good_and_write()
|
||||
{
|
||||
var f = document.fviewcomment;
|
||||
if (fviewcomment_submit(f)) {
|
||||
f.is_good.value = 1;
|
||||
f.submit();
|
||||
} else {
|
||||
f.is_good.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
f.is_good.value = 0;
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": "",
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 양쪽 공백 없애기
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||
if (char_min > 0 || char_max > 0)
|
||||
{
|
||||
check_byte('wr_content', 'char_count');
|
||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||
if (char_min > 0 && char_min > cnt)
|
||||
{
|
||||
alert("댓글은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
} else if (char_max > 0 && char_max < cnt)
|
||||
{
|
||||
alert("댓글은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!document.getElementById('wr_content').value)
|
||||
{
|
||||
alert("댓글을 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('비밀번호가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
<?php if($is_guest) echo chk_captcha_js(); ?>
|
||||
|
||||
set_comment_token(f);
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function comment_box(comment_id, work)
|
||||
{
|
||||
var el_id,
|
||||
form_el = 'fviewcomment',
|
||||
respond = document.getElementById(form_el);
|
||||
|
||||
// 댓글 아이디가 넘어오면 답변, 수정
|
||||
if (comment_id)
|
||||
{
|
||||
if (work == 'c')
|
||||
el_id = 'reply_' + comment_id;
|
||||
else
|
||||
el_id = 'edit_' + comment_id;
|
||||
}
|
||||
else
|
||||
el_id = 'bo_vc_w';
|
||||
|
||||
if (save_before != el_id)
|
||||
{
|
||||
if (save_before)
|
||||
{
|
||||
document.getElementById(save_before).style.display = 'none';
|
||||
}
|
||||
|
||||
document.getElementById(el_id).style.display = '';
|
||||
document.getElementById(el_id).appendChild(respond);
|
||||
//입력값 초기화
|
||||
document.getElementById('wr_content').value = '';
|
||||
|
||||
// 댓글 수정
|
||||
if (work == 'cu')
|
||||
{
|
||||
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
||||
if (typeof char_count != 'undefined')
|
||||
check_byte('wr_content', 'char_count');
|
||||
if (document.getElementById('secret_comment_'+comment_id).value)
|
||||
document.getElementById('wr_secret').checked = true;
|
||||
else
|
||||
document.getElementById('wr_secret').checked = false;
|
||||
}
|
||||
|
||||
document.getElementById('comment_id').value = comment_id;
|
||||
document.getElementById('w').value = work;
|
||||
|
||||
if(save_before)
|
||||
$("#captcha_reload").trigger("click");
|
||||
|
||||
save_before = el_id;
|
||||
}
|
||||
}
|
||||
|
||||
function comment_delete()
|
||||
{
|
||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||
}
|
||||
|
||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||
|
||||
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||
|
||||
$(function() {
|
||||
// sns 등록
|
||||
$("#bo_vc_send_sns").load(
|
||||
"<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>",
|
||||
function() {
|
||||
save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
}
|
||||
);
|
||||
});
|
||||
<?php } ?>
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
//댓글열기
|
||||
$(".cmt_btn").click(function(e){
|
||||
e.preventDefault();
|
||||
$(this).toggleClass("cmt_btn_op");
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,304 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">', 0);
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
|
||||
add_javascript('<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>', 0);
|
||||
add_javascript('<script src="'.$board_skin_url.'/script.js"></script>', 10);
|
||||
|
||||
// PHP 변수를 JavaScript로 전달
|
||||
$gallery_general_config_js = [
|
||||
'write_min' => (int)$write_min,
|
||||
'write_max' => (int)$write_max,
|
||||
];
|
||||
add_javascript('<script>var gallery_general_config = '.json_encode($gallery_general_config_js).';</script>', 0);
|
||||
?>
|
||||
|
||||
<section id="bo_w">
|
||||
<h2 class="sound_only"><?php echo $g5['title'] ?></h2>
|
||||
|
||||
<!-- 게시물 작성/수정 폼 시작 { -->
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
// 💡 [수정] 공지($is_notice) 옵션 제거
|
||||
if ($is_html || $is_secret || $is_mail) {
|
||||
$option = '';
|
||||
|
||||
if ($is_html) {
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">HTML</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_secret) {
|
||||
if ($is_admin || $is_secret==1) {
|
||||
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
|
||||
} else {
|
||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_mail) {
|
||||
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$mail_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
|
||||
}
|
||||
}
|
||||
|
||||
echo $option_hidden;
|
||||
?>
|
||||
|
||||
<?php if ($is_category) { ?>
|
||||
<div class="bo_w_select write_div">
|
||||
<label for="ca_name" class="sound_only">분류<strong>필수</strong></label>
|
||||
<select name="ca_name" id="ca_name" required>
|
||||
<option value="">분류 선택</option>
|
||||
<?php echo $category_option ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="bo_w_info write_div">
|
||||
<?php if ($is_name) { ?>
|
||||
<label for="wr_name" class="sound_only">이름<strong>필수</strong></label>
|
||||
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" placeholder="이름">
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_password) { ?>
|
||||
<label for="wr_password" class="sound_only">비밀번호<strong>필수</strong></label>
|
||||
<input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" placeholder="비밀번호">
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_email) { ?>
|
||||
<label for="wr_email" class="sound_only">이메일</label>
|
||||
<input type="email" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input email" placeholder="이메일">
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_homepage) { ?>
|
||||
<label for="wr_homepage" class="sound_only">홈페이지</label>
|
||||
<input type="url" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input" placeholder="홈페이지">
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<!-- 💡 [수정] 옵션 및 임시저장글 영역 통합 -->
|
||||
<div class="write_div write_options">
|
||||
<div class="left_area">
|
||||
<?php if ($option) { ?>
|
||||
<span class="sound_only">옵션</span>
|
||||
<?php echo $option ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="right_area">
|
||||
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
|
||||
<div id="autosave_wrapper">
|
||||
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
|
||||
<?php if($editor_content_js) echo $editor_content_js; ?>
|
||||
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
|
||||
<div id="autosave_pop">
|
||||
<strong>임시 저장된 글 목록</strong>
|
||||
<ul></ul>
|
||||
<div><button type="button" class="autosave_close">닫기</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bo_w_tit write_div">
|
||||
<label for="wr_subject" class="sound_only">제목<strong>필수</strong></label>
|
||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input full_input required" size="50" maxlength="255" placeholder="제목">
|
||||
</div>
|
||||
|
||||
<!-- 💡 [추가] 노출 설정 UI -->
|
||||
<div class="write_div">
|
||||
<label class="frm_label" style="font-weight:bold; display:block; margin-bottom:10px;">노출 설정</label>
|
||||
<div class="option_group">
|
||||
<label>
|
||||
<input type="radio" name="wr_9" value="IMMEDIATE" <?php if ($w == '' || $write['wr_9'] != 'RESERVED') echo 'checked'; ?>>
|
||||
<span class="custom-radio"></span> 즉시 노출
|
||||
</label>
|
||||
<label style="margin-left: 15px;">
|
||||
<input type="radio" name="wr_9" value="RESERVED" <?php if ($w == 'u' && $write['wr_9'] == 'RESERVED') echo 'checked'; ?>>
|
||||
<span class="custom-radio"></span> 예약 노출
|
||||
</label>
|
||||
<label style="margin-left: 20px;">
|
||||
<input type="hidden" name="wr_10" value="0">
|
||||
<input type="checkbox" name="wr_10" id="wr_10" value="1" <?php echo (( isset($write['wr_10']) && $write['wr_10'] == '1')) ? 'checked' : ''; ?>>
|
||||
<span class="custom-checkbox"></span> 숨김 (노출 안 함)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 💡 [추가] 예약 날짜 설정 UI -->
|
||||
<div id="reservation_fields" class="write_div" style="display: <?php echo ($w == 'u' && $write['wr_9'] == 'RESERVED') ? 'block' : 'none'; ?>; background:#f7f7f7; padding:15px; border-radius:5px;">
|
||||
<div class="date_picker_group" style="display:flex; align-items:center; gap:10px;">
|
||||
<div class="date_item">
|
||||
<label for="wr_2" class="frm_label">시작일</label>
|
||||
<input type="text" name="wr_2" value="<?php echo $wr_2 ?>" id="wr_2" class="frm_input datepicker" maxlength="10" placeholder="YYYY-MM-DD" style="width:120px;">
|
||||
</div>
|
||||
<span class="date_divider">~</span>
|
||||
<div class="date_item">
|
||||
<label for="wr_3" class="frm_label">종료일</label>
|
||||
<input type="text" name="wr_3" value="<?php echo $wr_3 ?>" id="wr_3" class="frm_input datepicker" maxlength="10" placeholder="YYYY-MM-DD" style="width:120px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 💡 [추가] 추가 필드 입력 UI -->
|
||||
<div class="write_div">
|
||||
<label class="frm_label">추가 정보</label>
|
||||
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_1">부제목</label>
|
||||
<input type="text" name="wr_1" value="<?php echo $wr_1 ?>" id="wr_1" class="frm_input full_input" size="50" placeholder="부제목을 입력하세요">
|
||||
</div>
|
||||
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_6">서명 이름</label>
|
||||
<input type="text" name="wr_6" value="<?php echo $wr_6 ?>" id="wr_6" class="frm_input full_input" size="50" placeholder="예: 박준성 / 대표 발행인">
|
||||
</div>
|
||||
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_7">서명 회사명</label>
|
||||
<input type="text" name="wr_7" value="<?php echo $wr_7 ?>" id="wr_7" class="frm_input full_input" size="50" placeholder="예: (주)레이저월드">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="write_div">
|
||||
<label for="wr_content" class="sound_only">내용<strong>필수</strong></label>
|
||||
<div class="wr_content <?php echo $is_dhtml_editor ? $config['cf_editor'] : ''; ?>">
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<p class="text_right font-12">글자 수 : <span id="char_count">0</span>글자</p>
|
||||
<?php } ?>
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($is_link) { ?>
|
||||
<?php for ($i=1; $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_link<?php echo $i ?>"><i class="fas fa-link" aria-hidden="true"></i> 링크 #<?php echo $i ?></label>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo $write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_file) { ?>
|
||||
<div class="bo_w_flie write_div">
|
||||
<div class="file_writ_div">
|
||||
<?php for ($i=0; $i<$file_count; $i++) { ?>
|
||||
<div class="file_input_wrap">
|
||||
<label for="bf_file_<?php echo $i+1 ?>" class="lb_icon"><i class="fas fa-folder-open" aria-hidden="true"></i> 파일 #<?php echo $i+1 ?></label>
|
||||
<input type="file" name="bf_file[]" id="bf_file_<?php echo $i+1 ?>" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file ">
|
||||
<?php if ($is_file_content) { ?>
|
||||
<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50" placeholder="파일 설명">
|
||||
<?php } ?>
|
||||
<?php if($w == 'u' && $file[$i]['file']) { ?>
|
||||
<span class="file_del">
|
||||
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1">
|
||||
<label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_use_captcha) { //자동등록방지 ?>
|
||||
<div class="write_div">
|
||||
<?php echo $captcha_html; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="btn_confirm write_div">
|
||||
<a href="<?php echo get_pretty_url($bo_table); ?>" class="btn_cancel btn">취소</a>
|
||||
<?php if ($is_member) { // 💡 [추가] 수동 임시저장 버튼 ?>
|
||||
<button type="button" id="btn_manual_autosave" class="btn_b01 btn">임시저장</button>
|
||||
<?php } ?>
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="btn_submit btn">작성완료</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
// 💡 [추가] 예약 노출 유효성 검사 (script.js의 함수 호출)
|
||||
if (typeof validate_reservation === 'function') {
|
||||
if (!validate_reservation(f)) return false;
|
||||
}
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.wr_subject.value,
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.wr_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_wr_content) != "undefined")
|
||||
ed_wr_content.returnFalse();
|
||||
else
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.getElementById("char_count")) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
if (char_max > 0 && char_max < cnt) {
|
||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
<!-- } 게시물 작성/수정 폼 끝 -->
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 💡 [참고] 이 파일은 그누보드의 write_update.php 파일이 실행되기 직전에 자동으로 실행됩니다.
|
||||
// 이를 이용해 폼에서 넘어온 데이터의 유효성을 검사하거나, 특정 값을 데이터베이스에 저장하기 전에 가공할 수 있습니다.
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// 예약 기간 중복 검사 (bo_use_reservation_overlap 옵션이 켜져 있을 때만)
|
||||
// -----------------------------------------------------------------------------
|
||||
if ($board['bo_use_reservation_overlap'] && isset($_POST['wr_9']) && $_POST['wr_9'] == 'RESERVED') {
|
||||
|
||||
// 폼에서 전송된 시작일과 종료일을 가져옵니다.
|
||||
$start_date = isset($_POST['wr_2']) ? trim($_POST['wr_2']) : '';
|
||||
$end_date = isset($_POST['wr_3']) ? trim($_POST['wr_3']) : '';
|
||||
|
||||
// 두 날짜가 모두 입력되었을 때만 검사를 실행합니다.
|
||||
if ($start_date && $end_date) {
|
||||
|
||||
// '예약 노출'로 설정된 다른 게시물 중, 날짜가 겹치는 것이 있는지 찾습니다.
|
||||
// (신규 시작일 <= 기존 종료일) AND (신규 종료일 >= 기존 시작일) -> 이 조건이 참이면 겹치는 것입니다.
|
||||
$sql = " SELECT wr_id, wr_subject FROM {$write_table}
|
||||
WHERE wr_is_comment = 0
|
||||
AND wr_9 = 'RESERVED'
|
||||
AND wr_10 = '0' /* 숨김 처리되지 않은 글만 대상으로 함 */
|
||||
AND (
|
||||
'{$start_date}' <= wr_3 AND '{$end_date}' >= wr_2
|
||||
) ";
|
||||
|
||||
// 글 수정($w == 'u') 시에는, 현재 수정 중인 자기 자신은 검사 대상에서 제외합니다.
|
||||
if ($w == 'u' && $wr_id) {
|
||||
$sql .= " AND wr_id != '{$wr_id}' ";
|
||||
}
|
||||
|
||||
$sql .= " LIMIT 1 "; // 겹치는 것이 하나라도 있으면 바로 찾기를 중단합니다.
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
// 만약 겹치는 게시물이 발견되면, 오류 메시지를 띄우고 중단합니다.
|
||||
if (isset($row['wr_id']) && $row['wr_id']) {
|
||||
$colliding_subject = get_text(cut_str($row['wr_subject'], 30));
|
||||
alert("선택하신 예약 기간에 이미 다른 게시물이 등록되어 있습니다.\\n\\n[중복된 게시물: {$colliding_subject}]\\n\\n날짜를 다시 확인해주세요.");
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||