update
This commit is contained in:
parent
2c6a4e0e96
commit
81df73bda7
8 changed files with 1171 additions and 1103 deletions
|
|
@ -1,4 +1,2 @@
|
||||||
<?php
|
<?php
|
||||||
include_once('../../../common.php');
|
include_once '../../../common.php';
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_'))
|
||||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
exit; // 개별 페이지 접근 불가
|
||||||
if($board['bo_type']=='board')$category_option = get_category_option($bo_table, $sca);
|
include_once G5_LIB_PATH . '/thumbnail.lib.php';
|
||||||
if($board['bo_table_width']==0) $width="100%";
|
if ($board['bo_type'] == 'board')
|
||||||
|
$category_option = get_category_option($bo_table, $sca);
|
||||||
|
if ($board['bo_table_width'] == 0)
|
||||||
|
$width = "100%";
|
||||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||||
|
|
||||||
|
|
@ -33,6 +36,7 @@ if($board['bo_2']){
|
||||||
#gall_ul .gall_li {
|
#gall_ul .gall_li {
|
||||||
margin-bottom: <?= $gall_mh ?>px;
|
margin-bottom: <?= $gall_mh ?>px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#gall_ul .gall_li:not(.bo_notice) {
|
#gall_ul .gall_li:not(.bo_notice) {
|
||||||
width: <?= $gall_w ?>px;
|
width: <?= $gall_w ?>px;
|
||||||
height: <?= $gall_h ?>px;
|
height: <?= $gall_h ?>px;
|
||||||
|
|
@ -44,20 +48,20 @@ if($board['bo_2']){
|
||||||
|
|
||||||
|
|
||||||
<!-- 게시판 카테고리 시작 { -->
|
<!-- 게시판 카테고리 시작 { -->
|
||||||
<? if ($is_category) { ?>
|
<?php if ($is_category) { ?>
|
||||||
<nav id="navi_category">
|
<nav id="navi_category">
|
||||||
<?if($board['bo_type']=='board'){?>
|
<?php if ($board['bo_type'] == 'board') { ?>
|
||||||
<select name="sca" id="sca" onchange="location.href='?bo_table=<?= $bo_table ?>&sca=' + this.value;">
|
<select name="sca" id="sca" onchange="location.href='?bo_table=<?= $bo_table ?>&sca=' + this.value;">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<? echo $category_option ?>
|
<?php echo $category_option ?>
|
||||||
</select>
|
</select>
|
||||||
<?}else {?>
|
<?php } else { ?>
|
||||||
<ul>
|
<ul>
|
||||||
<?php echo $category_option ?>
|
<?php echo $category_option ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?}?>
|
<?php } ?>
|
||||||
</nav>
|
</nav>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<!-- } 게시판 카테고리 끝 -->
|
<!-- } 게시판 카테고리 끝 -->
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -65,14 +69,17 @@ if($board['bo_2']){
|
||||||
<div id="bo_btn_top">
|
<div id="bo_btn_top">
|
||||||
<?php if ($rss_href || $write_href) { ?>
|
<?php if ($rss_href || $write_href) { ?>
|
||||||
<ul class="btn_bo_user">
|
<ul class="btn_bo_user">
|
||||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" target="_black" class="admin ui-btn">게시판관리</a></li><?php } ?>
|
<?php if ($admin_href) { ?>
|
||||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="ui-btn point">글쓰기</a></li><?php } ?>
|
<li><a href="<?php echo $admin_href ?>" target="_black" class="admin ui-btn">게시판관리</a></li><?php } ?>
|
||||||
|
<?php if ($write_href) { ?>
|
||||||
|
<li><a href="<?php echo $write_href ?>" class="ui-btn point">글쓰기</a></li><?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
|
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
|
||||||
|
|
||||||
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
<form name="fboardlist" id="fboardlist" action="./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="bo_table" value="<?php echo $bo_table ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
|
@ -92,17 +99,20 @@ if($board['bo_2']){
|
||||||
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $gall_w, $gall_h, false, true);
|
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $gall_w, $gall_h, false, true);
|
||||||
if ($thumb['src'])
|
if ($thumb['src'])
|
||||||
$img_content = "url('" . $thumb['src'] . "') center no-repeat;background-size:cover";
|
$img_content = "url('" . $thumb['src'] . "') center no-repeat;background-size:cover";
|
||||||
else $img_content="none";
|
else
|
||||||
|
$img_content = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<li class="gall_li<? if ($list[$i]['is_notice']) echo " bo_notice";?>">
|
<li class="gall_li<?php if ($list[$i]['is_notice'])
|
||||||
|
echo " bo_notice"; ?>">
|
||||||
<div class="gall_box theme-box" style="background:<?= $img_content ?>;">
|
<div class="gall_box theme-box" style="background:<?= $img_content ?>;">
|
||||||
<div class="gall_chk">
|
<div class="gall_chk">
|
||||||
<?php if ($is_checkbox) { ?>
|
<?php if ($is_checkbox) { ?>
|
||||||
<label for="chk_wr_id_<?php echo $i ?>"><span class="sound_only"><?php echo $list[$i]['subject'] ?></span>
|
<label for="chk_wr_id_<?php echo $i ?>"><span class="sound_only"><?php echo $list[$i]['subject'] ?></span>
|
||||||
<input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>"></label>
|
<input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>"
|
||||||
|
id="chk_wr_id_<?php echo $i ?>"></label>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<span class="sound_only">
|
<span class="sound_only">
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -114,12 +124,14 @@ if($board['bo_2']){
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="gall_con">
|
<div class="gall_con">
|
||||||
<a href="#" onclick="<?=$board['bo_read_level']<=$member['mb_level'] ? "open_view('".$bo_table."','".$list[$i]['wr_id']."');return false;": "void(0);";?>" class="bo_tit" >
|
<a href="#"
|
||||||
|
onclick="<?= $board['bo_read_level'] <= $member['mb_level'] ? "open_view('" . $bo_table . "','" . $list[$i]['wr_id'] . "');return false;" : "void(0);"; ?>"
|
||||||
|
class="bo_tit">
|
||||||
<?php if ($list[$i]['is_notice']) { // 공지사항 ?>
|
<?php if ($list[$i]['is_notice']) { // 공지사항 ?>
|
||||||
<i class="ui-btn point notice_icon">!</i>
|
<i class="ui-btn point notice_icon">!</i>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<strong <?php if (!$list[$i]['is_notice']) { ?>class="sound_only"<?}?>>
|
<strong <?php if (!$list[$i]['is_notice']) { ?>class="sound_only" <?php } ?>>
|
||||||
<?
|
<?php
|
||||||
// echo $list[$i]['icon_reply']; 갤러리는 reply 를 사용 안 할 것 같습니다. - 지운아빠 2013-03-04
|
// echo $list[$i]['icon_reply']; 갤러리는 reply 를 사용 안 할 것 같습니다. - 지운아빠 2013-03-04
|
||||||
if ($is_category && $list[$i]['ca_name']) {
|
if ($is_category && $list[$i]['ca_name']) {
|
||||||
?>
|
?>
|
||||||
|
|
@ -132,7 +144,9 @@ if($board['bo_2']){
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (count($list) == 0) { echo "<li class=\"empty_list\">게시물이 없습니다.</li>"; } ?>
|
<?php if (count($list) == 0) {
|
||||||
|
echo "<li class=\"empty_list\">게시물이 없습니다.</li>";
|
||||||
|
} ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<?php if ($list_href || $is_checkbox || $write_href) { ?>
|
<?php if ($list_href || $is_checkbox || $write_href) { ?>
|
||||||
|
|
@ -141,13 +155,19 @@ if($board['bo_2']){
|
||||||
<ul class="btn_bo_user">
|
<ul class="btn_bo_user">
|
||||||
<?php if ($is_checkbox) { ?>
|
<?php if ($is_checkbox) { ?>
|
||||||
<li><input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
|
<li><input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
|
||||||
<label for="chkall"><span id="checkall" class="ui-btn etc" >전체</span></label></li>
|
<label for="chkall"><span id="checkall" class="ui-btn etc">전체</span></label>
|
||||||
<li><input type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value" class="ui-btn admin"></li>
|
</li>
|
||||||
<li><input type="submit" name="btn_submit" value="선택복사" onclick="document.pressed=this.value" class="ui-btn admin"></li>
|
<li><input type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value"
|
||||||
<li><input type="submit" name="btn_submit" value="선택이동" onclick="document.pressed=this.value" class="ui-btn admin"></li>
|
class="ui-btn admin"></li>
|
||||||
|
<li><input type="submit" name="btn_submit" value="선택복사" onclick="document.pressed=this.value"
|
||||||
|
class="ui-btn admin"></li>
|
||||||
|
<li><input type="submit" name="btn_submit" value="선택이동" onclick="document.pressed=this.value"
|
||||||
|
class="ui-btn admin"></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($list_href) { ?><li><a href="<?php echo $list_href ?>" class="ui-btn">목록</a></li><?php } ?>
|
<?php if ($list_href) { ?>
|
||||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="ui-btn point">글쓰기</a></li><?php } ?>
|
<li><a href="<?php echo $list_href ?>" class="ui-btn">목록</a></li><?php } ?>
|
||||||
|
<?php if ($write_href) { ?>
|
||||||
|
<li><a href="<?php echo $write_href ?>" class="ui-btn point">글쓰기</a></li><?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -164,7 +184,7 @@ if($board['bo_2']){
|
||||||
<input type="hidden" name="sop" value="and">
|
<input type="hidden" name="sop" value="and">
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
<select name="sfl" id="sfl">
|
<select name="sfl" id="sfl">
|
||||||
<option value="wr_subject"<?php echo get_selected($sfl, 'wr_subject', true); ?>>제목</option>
|
<option value="wr_subject" <?php echo get_selected($sfl, 'wr_subject'); ?>>제목</option>
|
||||||
<!-- <option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>내용</option>
|
<!-- <option value="wr_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="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="mb_id,1" <?php echo get_selected($sfl, 'mb_id,1'); ?>>회원아이디</option>
|
||||||
|
|
@ -173,7 +193,8 @@ if($board['bo_2']){
|
||||||
<!-- <option value="wr_name,0"<?php echo get_selected($sfl, 'wr_name,0'); ?>>글쓴이(코)</option>-->
|
<!-- <option value="wr_name,0"<?php echo get_selected($sfl, 'wr_name,0'); ?>>글쓴이(코)</option>-->
|
||||||
</select>
|
</select>
|
||||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="sch_input" size="25" maxlength="20" placeholder="검색">
|
<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="ui-btn">검색</button>
|
<button type="submit" value="검색" class="ui-btn">검색</button>
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once './_common.php';
|
||||||
|
|
||||||
$write_table = $g5['write_prefix'] . $bo_table;
|
$write_table = $g5['write_prefix'] . $bo_table;
|
||||||
|
|
||||||
if ($w == 's') {
|
if ($w == 's') {
|
||||||
$qstr = 'bo_table=' . $bo_table . '&sfl=' . $sfl . '&stx=' . $stx . '&sop=' . $sop . '&wr_id=' . $wr_id . '&page=' . $page;
|
$qstr = 'bo_table=' . $bo_table . '&sfl=' . $sfl . '&stx=' . $stx . '&sop=' . $sop . '&wr_id=' . $wr_id . '&page=' . $page;
|
||||||
|
|
||||||
|
|
@ -34,7 +36,6 @@ if ($w == 's') {
|
||||||
$is_viewer = true;
|
$is_viewer = true;
|
||||||
echo $wr_id;
|
echo $wr_id;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
echo help('w 값이 제대로 넘어오지 않았습니다.');
|
echo help('w 값이 제대로 넘어오지 않았습니다.');
|
||||||
|
}
|
||||||
?>
|
|
||||||
|
|
|
||||||
19
readme.md
Normal file
19
readme.md
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
## 게시판 갤러리형 게시판 (고정사이즈) 스킨
|
||||||
|
|
||||||
|
작성자: 대하 (Extra Shot)
|
||||||
|
원본주소: https://extrashot.tistory.com/76
|
||||||
|
|
||||||
|
오류 수정 및 일부 코드에 최적화 작업을 진행했습니다.
|
||||||
|
|
||||||
|
### 주요 수정 사항
|
||||||
|
- short open tag 제거
|
||||||
|
|
||||||
|
모든 아보카도 버전에 호환됩니다.
|
||||||
|
|
||||||
|
## 설치방법
|
||||||
|
|
||||||
|
아보카도가 설치된 폴더의 하위 폴더인 `skin/board/` 에 `gallery_fix` 라는 폴더를 생성하고 파일을 업로드합니다.
|
||||||
|
|
||||||
|
```
|
||||||
|
php 최소 버전: 5.6 이상 (5.3부터 사용 가능)
|
||||||
|
```
|
||||||
49
view.php
49
view.php
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once './_common.php';
|
||||||
$view = sql_fetch("select * from {$write_table} where wr_id='{$wr_id}'");
|
$view = sql_fetch("select * from {$write_table} where wr_id='{$wr_id}'");
|
||||||
// 윗글을 얻음
|
// 윗글을 얻음
|
||||||
$prev = sql_fetch(" select wr_id, wr_num from {$write_table} where wr_is_comment = 0 and wr_num < '{$view['wr_num']}' and wr_parent=wr_id order by wr_num desc limit 1 ");
|
$prev = sql_fetch(" select wr_id, wr_num from {$write_table} where wr_is_comment = 0 and wr_num < '{$view['wr_num']}' and wr_parent=wr_id order by wr_num desc limit 1 ");
|
||||||
|
|
@ -23,12 +23,14 @@ include_once('./_common.php');
|
||||||
<!-- 게시물 읽기 시작 { -->
|
<!-- 게시물 읽기 시작 { -->
|
||||||
|
|
||||||
<div class="bo_v_nb">
|
<div class="bo_v_nb">
|
||||||
<? if ($prev['wr_id']) { ?><a href="javascript:open_view('<?=$bo_table?>','<?=$prev['wr_id']?>');" class="prev" ><span>이전글</span></a><? } ?>
|
<?php if ($prev['wr_id']) { ?><a href="javascript:open_view('<?= $bo_table ?>','<?= $prev['wr_id'] ?>');"
|
||||||
<? if ($next['wr_id']) { ?><a href="javascript:open_view('<?=$bo_table?>','<?=$next['wr_id']?>');" class="next" ><span>다음글</span></a><? } ?>
|
class="prev"><span>이전글</span></a><?php } ?>
|
||||||
|
<?php if ($next['wr_id']) { ?><a href="javascript:open_view('<?= $bo_table ?>','<?= $next['wr_id'] ?>');"
|
||||||
|
class="next"><span>다음글</span></a><?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<article id="bo_v" class="theme-box">
|
<article id="bo_v" class="theme-box">
|
||||||
|
|
||||||
<?if($view['wr_protect']!=''){
|
<?php if ($view['wr_protect'] != '') {
|
||||||
if (get_session("ss_secret_{$bo_table}_{$view['wr_num']}") || $view['mb_id'] && $view['mb_id'] == $member['mb_id'] || $is_admin)
|
if (get_session("ss_secret_{$bo_table}_{$view['wr_num']}") || $view['mb_id'] && $view['mb_id'] == $member['mb_id'] || $is_admin)
|
||||||
$is_viewer = true;
|
$is_viewer = true;
|
||||||
else {
|
else {
|
||||||
|
|
@ -48,7 +50,8 @@ include_once('./_common.php');
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<fieldset class="box-pw">
|
<fieldset class="box-pw">
|
||||||
<input type="text" name="wr_password" id="password_wr_password" required class="frm_input required" size="15" maxlength="20">
|
<input type="text" name="wr_password" id="password_wr_password" required class="frm_input required" size="15"
|
||||||
|
maxlength="20">
|
||||||
<input type="submit" value="확인" class="pass-btn btn_submit ui-btn">
|
<input type="submit" value="확인" class="pass-btn btn_submit ui-btn">
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
@ -57,7 +60,8 @@ include_once('./_common.php');
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<? }}else if(strstr($view['wr_option'],'secret')){
|
<?php }
|
||||||
|
} else if (strstr($view['wr_option'], 'secret')) {
|
||||||
if (!$view['mb_id'] && get_session("ss_secret_{$bo_table}_{$view['wr_num']}") || $view['mb_id'] && $view['mb_id'] == $member['mb_id'] || $is_admin)
|
if (!$view['mb_id'] && get_session("ss_secret_{$bo_table}_{$view['wr_num']}") || $view['mb_id'] && $view['mb_id'] == $member['mb_id'] || $is_admin)
|
||||||
$is_viewer = true;
|
$is_viewer = true;
|
||||||
else {
|
else {
|
||||||
|
|
@ -78,7 +82,8 @@ include_once('./_common.php');
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<fieldset class="box-pw">
|
<fieldset class="box-pw">
|
||||||
<input type="password" name="wr_password" id="password_wr_password" required class="frm_input required" size="15" maxlength="20">
|
<input type="password" name="wr_password" id="password_wr_password" required class="frm_input required"
|
||||||
|
size="15" maxlength="20">
|
||||||
<input type="submit" value="확인" class="pass-btn btn_submit ui-btn">
|
<input type="submit" value="확인" class="pass-btn btn_submit ui-btn">
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
@ -86,26 +91,32 @@ include_once('./_common.php');
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?}else {?>
|
<?php } else { ?>
|
||||||
<div id="password_box">
|
<div id="password_box">
|
||||||
<p class="txt-center" style="padding:30px 0;"><strong>비밀글입니다.</strong></p>
|
<p class="txt-center" style="padding:30px 0;"><strong>비밀글입니다.</strong></p>
|
||||||
</div>
|
</div>
|
||||||
<?}
|
<?php }
|
||||||
}}else if ($view['wr_secret'] && !$is_member){
|
}
|
||||||
|
} else if ($view['wr_secret'] && !$is_member) {
|
||||||
$is_viewer = false; ?>
|
$is_viewer = false; ?>
|
||||||
<div id="password_box">
|
<div id="password_box">
|
||||||
<p class="txt-center" style="padding:30px 0;"><strong>멤버공개글입니다.</strong></p>
|
<p class="txt-center" style="padding:30px 0;"><strong>멤버공개글입니다.</strong></p>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?php
|
||||||
}else {if($board['bo_read_level']<=$member['mb_level'] ) $is_viewer=true;}
|
} else {
|
||||||
|
if ($board['bo_read_level'] <= $member['mb_level'])
|
||||||
|
$is_viewer = true;
|
||||||
|
}
|
||||||
if ($is_viewer) { ?>
|
if ($is_viewer) { ?>
|
||||||
<div class="bo_block"> </div>
|
<div class="bo_block"> </div>
|
||||||
|
|
||||||
<!-- 게시물 상단 버튼 시작 { -->
|
<!-- 게시물 상단 버튼 시작 { -->
|
||||||
<div id="bo_v_top">
|
<div id="bo_v_top">
|
||||||
<ul class="bo_v_com">
|
<ul class="bo_v_com">
|
||||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>" >M</a></li><?php } ?>
|
<?php if ($update_href) { ?>
|
||||||
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;">D</a></li><?php } ?>
|
<li><a href="<?php echo $update_href ?>">M</a></li><?php } ?>
|
||||||
|
<?php if ($delete_href) { ?>
|
||||||
|
<li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;">D</a></li><?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- } 게시물 상단 버튼 끝 -->
|
<!-- } 게시물 상단 버튼 끝 -->
|
||||||
|
|
@ -118,12 +129,11 @@ include_once('./_common.php');
|
||||||
} else {
|
} else {
|
||||||
if ($view['wr_file'] > 0) { /* view 인 경우 */
|
if ($view['wr_file'] > 0) { /* view 인 경우 */
|
||||||
$result = sql_query(" select * from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' order by bf_no ");
|
$result = sql_query(" select * from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' order by bf_no ");
|
||||||
for ($k=0;$file = sql_fetch_array($result);$k++)
|
for ($k = 0; $file = sql_fetch_array($result); $k++) {
|
||||||
{
|
|
||||||
$file_url = G5_DATA_URL . "/file/" . $file['bo_table'] . "/" . $file['bf_file'];
|
$file_url = G5_DATA_URL . "/file/" . $file['bo_table'] . "/" . $file['bf_file'];
|
||||||
?>
|
?>
|
||||||
<p><img src="<?= $file_url ?>"></p>
|
<p><img src="<?= $file_url ?>"></p>
|
||||||
<?}
|
<?php }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -145,11 +155,12 @@ include_once('./_common.php');
|
||||||
<!--
|
<!--
|
||||||
<span class="sound_only">작성자</span> <strong><?php echo $view['wr_name'] ?></strong>
|
<span class="sound_only">작성자</span> <strong><?php echo $view['wr_name'] ?></strong>
|
||||||
-->
|
-->
|
||||||
<strong class="if_date"><span class="sound_only">작성일</span><?php echo date("Y/m/d", strtotime($view['wr_datetime'])) ?></strong>
|
<strong class="if_date"><span
|
||||||
|
class="sound_only">작성일</span><?php echo date("Y/m/d", strtotime($view['wr_datetime'])) ?></strong>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<!-- 게시물 하단 영역 끝-->
|
<!-- 게시물 하단 영역 끝-->
|
||||||
<?}?>
|
<?php } ?>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<!-- } 게시글 읽기 끝 -->
|
<!-- } 게시글 읽기 끝 -->
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_'))
|
||||||
|
exit; // 개별 페이지 접근 불가
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 글자수 제한
|
// 글자수 제한
|
||||||
var char_min = parseInt(<?php echo $comment_min ?>); // 최소
|
var char_min = parseInt(<?php echo $comment_min ?>); // 최소
|
||||||
|
|
@ -27,14 +27,24 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||||
|
|
||||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0" <?php } ?>>
|
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0" <?php } ?>>
|
||||||
<header style="z-index:<?php echo $cmt_sv; ?>">
|
<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>
|
<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 echo $list[$i]['name'] ?>
|
||||||
<span class="sound_only">작성일</span>
|
<span class="sound_only">작성일</span>
|
||||||
<span class="bo_vc_hdinfo"><time datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo $list[$i]['datetime'] ?></time></span>
|
<span class="bo_vc_hdinfo"><time
|
||||||
|
datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo $list[$i]['datetime'] ?></time></span>
|
||||||
<ul class="bo_vc_act">
|
<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;" class="ui-btn small">답변</a></li><?php } ?>
|
<?php if ($list[$i]['is_reply']) { ?>
|
||||||
<?php if ($list[$i]['is_edit']) { ?><li><a href="<?php echo $c_edit_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'cu'); return false;" class="ui-btn small">수정</a></li><?php } ?>
|
<li><a href="<?php echo $c_reply_href; ?>"
|
||||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();" class="ui-btn small">삭제</a></li><?php } ?>
|
onclick="comment_box('<?php echo $comment_id ?>', 'c'); return false;" class="ui-btn small">답변</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;" class="ui-btn small">수정</a></li>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($list[$i]['is_del']) { ?>
|
||||||
|
<li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();"
|
||||||
|
class="ui-btn small">삭제</a></li><?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
@ -63,8 +73,10 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||||
<span id="edit_<?php echo $comment_id ?>" class="bo_vc_w"></span><!-- 수정 -->
|
<span id="edit_<?php echo $comment_id ?>" class="bo_vc_w"></span><!-- 수정 -->
|
||||||
<span id="reply_<?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 ?>">
|
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'], "secret") ?>"
|
||||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
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>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
<hr class="line" />
|
<hr class="line" />
|
||||||
|
|
@ -81,7 +93,8 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||||
<!-- 댓글 쓰기 시작 { -->
|
<!-- 댓글 쓰기 시작 { -->
|
||||||
<aside id="bo_vc_w" class="bo_vc_w">
|
<aside id="bo_vc_w" class="bo_vc_w">
|
||||||
<h2>댓글쓰기</h2>
|
<h2>댓글쓰기</h2>
|
||||||
<form name="fviewcomment" id="fviewcomment" action="<?php echo $comment_action_url; ?>" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
|
<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="w" value="<?php echo $w ?>" id="w">
|
||||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
<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="wr_id" value="<?php echo $wr_id ?>">
|
||||||
|
|
@ -95,9 +108,9 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||||
|
|
||||||
<span class="sound_only">내용</span>
|
<span class="sound_only">내용</span>
|
||||||
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
|
<?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="내용"
|
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" title="내용" <?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) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>
|
<?php if ($comment_min || $comment_max) { ?>
|
||||||
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
|
<script> check_byte('wr_content', 'char_count'); </script><?php } ?>
|
||||||
<script>
|
<script>
|
||||||
$(document).on("keyup change", "textarea#wr_content[maxlength]", function () {
|
$(document).on("keyup change", "textarea#wr_content[maxlength]", function () {
|
||||||
var str = $(this).val()
|
var str = $(this).val()
|
||||||
|
|
@ -112,9 +125,11 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||||
<div class="bo_vc_w_info">
|
<div class="bo_vc_w_info">
|
||||||
<?php if ($is_guest) { ?>
|
<?php if ($is_guest) { ?>
|
||||||
<label for="wr_name" class="sound_only">이름<strong> 필수</strong></label>
|
<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="이름">
|
<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>
|
<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="비밀번호">
|
<input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="25"
|
||||||
|
placeholder="비밀번호">
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -134,8 +149,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||||
var save_before = '';
|
var save_before = '';
|
||||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||||
|
|
||||||
function good_and_write()
|
function good_and_write() {
|
||||||
{
|
|
||||||
var f = document.fviewcomment;
|
var f = document.fviewcomment;
|
||||||
if (fviewcomment_submit(f)) {
|
if (fviewcomment_submit(f)) {
|
||||||
f.is_good.value = 1;
|
f.is_good.value = 1;
|
||||||
|
|
@ -145,8 +159,7 @@ function good_and_write()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fviewcomment_submit(f)
|
function fviewcomment_submit(f) {
|
||||||
{
|
|
||||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||||
|
|
||||||
f.is_good.value = 0;
|
f.is_good.value = 0;
|
||||||
|
|
@ -178,49 +191,42 @@ function fviewcomment_submit(f)
|
||||||
// 양쪽 공백 없애기
|
// 양쪽 공백 없애기
|
||||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||||
if (char_min > 0 || char_max > 0)
|
if (char_min > 0 || char_max > 0) {
|
||||||
{
|
|
||||||
check_byte('wr_content', 'char_count');
|
check_byte('wr_content', 'char_count');
|
||||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||||
if (char_min > 0 && char_min > cnt)
|
if (char_min > 0 && char_min > cnt) {
|
||||||
{
|
|
||||||
alert("댓글은 " + char_min + "글자 이상 쓰셔야 합니다.");
|
alert("댓글은 " + char_min + "글자 이상 쓰셔야 합니다.");
|
||||||
return false;
|
return false;
|
||||||
} else if (char_max > 0 && char_max < cnt)
|
} else if (char_max > 0 && char_max < cnt) {
|
||||||
{
|
|
||||||
alert("댓글은 " + char_max + "글자 이하로 쓰셔야 합니다.");
|
alert("댓글은 " + char_max + "글자 이하로 쓰셔야 합니다.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!document.getElementById('wr_content').value)
|
else if (!document.getElementById('wr_content').value) {
|
||||||
{
|
|
||||||
alert("댓글을 입력하여 주십시오.");
|
alert("댓글을 입력하여 주십시오.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof(f.wr_name) != 'undefined')
|
if (typeof (f.wr_name) != 'undefined') {
|
||||||
{
|
|
||||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||||
if (f.wr_name.value == '')
|
if (f.wr_name.value == '') {
|
||||||
{
|
|
||||||
alert('이름이 입력되지 않았습니다.');
|
alert('이름이 입력되지 않았습니다.');
|
||||||
f.wr_name.focus();
|
f.wr_name.focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof(f.wr_password) != 'undefined')
|
if (typeof (f.wr_password) != 'undefined') {
|
||||||
{
|
|
||||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||||
if (f.wr_password.value == '')
|
if (f.wr_password.value == '') {
|
||||||
{
|
|
||||||
alert('비밀번호가 입력되지 않았습니다.');
|
alert('비밀번호가 입력되지 않았습니다.');
|
||||||
f.wr_password.focus();
|
f.wr_password.focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<?php if(($board['bo_use_captcha'] && $w !== 'u') && !$is_admin) echo chk_captcha_js(); ?>
|
<?php if (($board['bo_use_captcha'] && $w !== 'u') && !$is_admin)
|
||||||
|
echo chk_captcha_js(); ?>
|
||||||
|
|
||||||
set_comment_token(f);
|
set_comment_token(f);
|
||||||
|
|
||||||
|
|
@ -229,15 +235,13 @@ function fviewcomment_submit(f)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function comment_box(comment_id, work)
|
function comment_box(comment_id, work) {
|
||||||
{
|
|
||||||
var el_id,
|
var el_id,
|
||||||
form_el = 'fviewcomment',
|
form_el = 'fviewcomment',
|
||||||
respond = document.getElementById(form_el);
|
respond = document.getElementById(form_el);
|
||||||
|
|
||||||
// 댓글 아이디가 넘어오면 답변, 수정
|
// 댓글 아이디가 넘어오면 답변, 수정
|
||||||
if (comment_id)
|
if (comment_id) {
|
||||||
{
|
|
||||||
if (work == 'c')
|
if (work == 'c')
|
||||||
el_id = 'reply_' + comment_id;
|
el_id = 'reply_' + comment_id;
|
||||||
else
|
else
|
||||||
|
|
@ -246,10 +250,8 @@ function comment_box(comment_id, work)
|
||||||
else
|
else
|
||||||
el_id = 'bo_vc_w';
|
el_id = 'bo_vc_w';
|
||||||
|
|
||||||
if (save_before != el_id)
|
if (save_before != el_id) {
|
||||||
{
|
if (save_before) {
|
||||||
if (save_before)
|
|
||||||
{
|
|
||||||
document.getElementById(save_before).style.display = 'none';
|
document.getElementById(save_before).style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -259,8 +261,7 @@ function comment_box(comment_id, work)
|
||||||
document.getElementById('wr_content').value = '';
|
document.getElementById('wr_content').value = '';
|
||||||
|
|
||||||
// 댓글 수정
|
// 댓글 수정
|
||||||
if (work == 'cu')
|
if (work == 'cu') {
|
||||||
{
|
|
||||||
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
||||||
if (typeof char_count != 'undefined')
|
if (typeof char_count != 'undefined')
|
||||||
check_byte('wr_content', 'char_count');
|
check_byte('wr_content', 'char_count');
|
||||||
|
|
@ -280,8 +281,7 @@ function comment_box(comment_id, work)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function comment_delete()
|
function comment_delete() {
|
||||||
{
|
|
||||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_'))
|
||||||
|
exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||||
|
|
@ -9,7 +10,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||||
<hr class="padding">
|
<hr class="padding">
|
||||||
<section id="bo_w">
|
<section id="bo_w">
|
||||||
<!-- 게시물 작성/수정 시작 { -->
|
<!-- 게시물 작성/수정 시작 { -->
|
||||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
<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="uid" value="<?php echo get_uniqid(); ?>">
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||||
|
|
@ -46,7 +48,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||||
|
|
||||||
if ($is_secret) {
|
if ($is_secret) {
|
||||||
if ($is_admin || $is_secret == 1) {
|
if ($is_admin || $is_secret == 1) {
|
||||||
if($secret_checked)$sec_select="selected";
|
if ($secret_checked)
|
||||||
|
$sec_select = "selected";
|
||||||
$sec .= '<option value="secret" ' . $sec_select . '>비밀글</option>';
|
$sec .= '<option value="secret" ' . $sec_select . '>비밀글</option>';
|
||||||
} else {
|
} else {
|
||||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||||
|
|
@ -55,17 +58,22 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $option_hidden;
|
echo $option_hidden;
|
||||||
if($write['wr_secret']=='1') $mem_select="selected";
|
if ($write['wr_secret'] == '1')
|
||||||
if($write['wr_protect']!='') $pro_select="selected";
|
$mem_select = "selected";
|
||||||
if($is_member) {$sec .='<option value="protect" '.$pro_select.'>보호글</option>';
|
if ($write['wr_protect'] != '')
|
||||||
$sec .='<option value="member" '.$mem_select.'>멤버공개</option>';}
|
$pro_select = "selected";
|
||||||
|
if ($is_member) {
|
||||||
|
$sec .= '<option value="protect" ' . $pro_select . '>보호글</option>';
|
||||||
|
$sec .= '<option value="member" ' . $mem_select . '>멤버공개</option>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="board-write theme-box">
|
<div class="board-write theme-box">
|
||||||
<?php if ($is_category) { ?>
|
<?php if ($is_category) { ?>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>CATEGORY</dt>
|
<dt>CATEGORY</dt>
|
||||||
<dd><nav id="write_category">
|
<dd>
|
||||||
|
<nav id="write_category">
|
||||||
<select name="ca_name" id="ca_name" required class="required">
|
<select name="ca_name" id="ca_name" required class="required">
|
||||||
<option value="">선택하세요</option>
|
<option value="">선택하세요</option>
|
||||||
<?php echo $category_option ?>
|
<?php echo $category_option ?>
|
||||||
|
|
@ -73,17 +81,18 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||||
</nav>
|
</nav>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<?}?>
|
<?php } ?>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>OPTION</dt>
|
<dt>OPTION</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<?if($is_secret!=2||$is_admin){?>
|
<?php if ($is_secret != 2 || $is_admin) { ?>
|
||||||
<select name="set_secret" id="set_secret">
|
<select name="set_secret" id="set_secret">
|
||||||
<option value="">전체공개</option>
|
<option value="">전체공개</option>
|
||||||
<?= $sec ?>
|
<?= $sec ?>
|
||||||
</select>
|
</select>
|
||||||
<?}?>
|
<?php } ?>
|
||||||
<?php echo $option ?></dd>
|
<?php echo $option ?>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl id="set_protect" style="display:<?= $w == 'u' && $pro_select ? 'block' : 'none' ?>;">
|
<dl id="set_protect" style="display:<?= $w == 'u' && $pro_select ? 'block' : 'none' ?>;">
|
||||||
<dt><label for="wr_protect">보호글 암호</label></dt>
|
<dt><label for="wr_protect">보호글 암호</label></dt>
|
||||||
|
|
@ -91,57 +100,68 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>SUBJECT</dt>
|
<dt>SUBJECT</dt>
|
||||||
<dd><input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required full" size="50" maxlength="255"></dd>
|
<dd><input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required
|
||||||
|
class="frm_input required full" size="50" maxlength="255"></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>CONTENT</dt>
|
<dt>CONTENT</dt>
|
||||||
<dd><div class="wr_content">
|
<dd>
|
||||||
|
<div class="wr_content">
|
||||||
<?php if ($write_min || $write_max) { ?>
|
<?php if ($write_min || $write_max) { ?>
|
||||||
<!-- 최소/최대 글자 수 사용 시 -->
|
<!-- 최소/최대 글자 수 사용 시 -->
|
||||||
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대
|
||||||
|
<strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||||
<?php if ($write_min || $write_max) { ?>
|
<?php if ($write_min || $write_max) { ?>
|
||||||
<!-- 최소/최대 글자 수 사용 시 -->
|
<!-- 최소/최대 글자 수 사용 시 -->
|
||||||
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div></dd>
|
</div>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<?if(!$board['bo_use_dhtml_editor']){?>
|
<?php if (!$board['bo_use_dhtml_editor']) { ?>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>FILES</dt>
|
<dt>FILES</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<?for($i=0;$i<$board['bo_upload_count'];$i++){?>
|
<?php for ($i = 0; $i < $board['bo_upload_count']; $i++) { ?>
|
||||||
<input type="file" name="bf_file[]" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input full">
|
<input type="file" name="bf_file[]"
|
||||||
|
title="파일첨부 <?php echo $i + 1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능"
|
||||||
|
class="frm_file frm_input full">
|
||||||
<?php if ($is_file_content) { ?>
|
<?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">
|
<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>"
|
||||||
|
title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($w == 'u' && $file[$i]['file']) { ?>
|
<?php if ($w == 'u' && $file[$i]['file']) { ?>
|
||||||
<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>
|
<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>
|
||||||
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?}?>
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<?}?>
|
<?php } ?>
|
||||||
|
|
||||||
<?if(!$is_member){?>
|
<?php if (!$is_member) { ?>
|
||||||
<dl>
|
<dl>
|
||||||
<dt></dt>
|
<dt></dt>
|
||||||
<dd class="txt-right">
|
<dd class="txt-right">
|
||||||
<?php if ($is_name) { ?>
|
<?php if ($is_name) { ?>
|
||||||
<label for="wr_name">NAME<strong class="sound_only">필수</strong></label>
|
<label for="wr_name">NAME<strong class="sound_only">필수</strong></label>
|
||||||
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" >
|
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required
|
||||||
|
class="frm_input required">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($is_password) { ?>
|
<?php if ($is_password) { ?>
|
||||||
|
|
||||||
<label for="wr_password">PASSWORD<strong class="sound_only">필수</strong></label>
|
<label for="wr_password">PASSWORD<strong class="sound_only">필수</strong></label>
|
||||||
<input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" >
|
<input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?>
|
||||||
|
class="frm_input <?php echo $password_required ?>">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<?}?>
|
<?php } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -166,8 +186,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||||
});
|
});
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
function html_auto_br(obj)
|
function html_auto_br(obj) {
|
||||||
{
|
|
||||||
if (obj.checked) {
|
if (obj.checked) {
|
||||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||||
if (result)
|
if (result)
|
||||||
|
|
@ -179,8 +198,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||||
obj.value = "";
|
obj.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function fwrite_submit(f)
|
function fwrite_submit(f) {
|
||||||
{
|
|
||||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||||
|
|
||||||
var subject = "";
|
var subject = "";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
if (!defined("_GNUBOARD_"))
|
||||||
|
exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
$temp = sql_fetch("select * from {$write_table}");
|
$temp = sql_fetch("select * from {$write_table}");
|
||||||
if (!isset($temp['wr_protect'])) {
|
if (!isset($temp['wr_protect'])) {
|
||||||
sql_query(" ALTER TABLE `{$write_table}` ADD `wr_protect` varchar(255) NOT NULL DEFAULT '' AFTER `wr_url` ");
|
sql_query(" ALTER TABLE `{$write_table}` ADD `wr_protect` varchar(255) NOT NULL DEFAULT '' AFTER `wr_url` ");
|
||||||
|
|
@ -17,15 +19,13 @@ if($set_secret) {
|
||||||
|
|
||||||
if ($set_secret == 'secret') {
|
if ($set_secret == 'secret') {
|
||||||
$sec = "secret";
|
$sec = "secret";
|
||||||
}
|
} else if ($set_secret == 'member') {
|
||||||
else if ($set_secret=='member'){
|
|
||||||
$mem = 1;
|
$mem = 1;
|
||||||
}
|
} else if ($set_secret == 'protect' && $wr_protect != '') {
|
||||||
else if($set_secret == 'protect' && $wr_protect!=''){
|
|
||||||
$protect = $wr_protect;
|
$protect = $wr_protect;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sql_query("update {$write_table} set wr_option='$html,$sec', wr_secret='{$mem}', wr_protect= '{$wr_protect}' where wr_id='{$wr_id}'");
|
sql_query("update {$write_table} set wr_option='$html,$sec', wr_secret='{$mem}', wr_protect= '{$wr_protect}' where wr_id='{$wr_id}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_url(G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table . $qstr);
|
goto_url(G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table . $qstr);
|
||||||
?>
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue