This commit is contained in:
Amberstone 2024-10-21 11:29:44 +09:00
parent 99b93b3da9
commit e9f641c35d
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
11 changed files with 1103 additions and 1063 deletions

View file

@ -1,4 +1,2 @@
<?php <?php
include_once('../../../common.php'); include_once '../../../common.php';
?>

View file

@ -1,43 +1,46 @@
<? <?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> if (!defined('_GNUBOARD_'))
<?if($board['bo_4']==2) { exit; ?>
<?php if ($board['bo_4'] == 2) {
add_stylesheet('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css">', 0); ?> add_stylesheet('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css">', 0); ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/js/swiper.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/js/swiper.min.js"></script>
<?}?> <?php } ?>
<? <?php
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0); add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
include_once(G5_LIB_PATH.'/thumbnail.lib.php'); include_once G5_LIB_PATH . '/thumbnail.lib.php';
$au_type = $board['bo_1'] ? $board['bo_1'] : '오리지널'; $au_type = $board['bo_1'] ? $board['bo_1'] : '오리지널';
$slide_space = 10; $slide_space = 10;
$margin = "5px"; $margin = "5px";
$slide_loop = ($board['bo_3']) ? 'true' : 'false'; $slide_loop = ($board['bo_3']) ? 'true' : 'false';
if($board['bo_table_width']==0) $width="100%"; if ($board['bo_table_width'] == 0)
$width = "100%";
$cate = array(); $cate = array();
$lists = array(); $lists = array();
?> ?>
<? if($board['bo_content_head']) { ?> <?php if ($board['bo_content_head']) { ?>
<div class="board-notice"> <div class="board-notice">
<?= stripslashes($board['bo_content_head']); ?> <?= stripslashes($board['bo_content_head']); ?>
</div> </div>
<? } ?> <?php } ?>
<div class="board-skin-basic" style="max-width:<?= $width ?>;"> <div class="board-skin-basic" style="max-width:<?= $width ?>;">
<!-- 게시판 카테고리 시작 { --> <!-- 게시판 카테고리 시작 { -->
<? if ($is_category && !$board['bo_4']) { ?> <?php if ($is_category && !$board['bo_4']) { ?>
<nav id="navi_category"> <nav id="navi_category">
<ul> <ul>
<?php echo $category_option ?> <?php echo $category_option ?>
</ul> </ul>
</nav> </nav>
<? } ?> <?php } ?>
<!-- } 게시판 카테고리 --> <!-- } 게시판 카테고리 -->
<? <?php
if ($board['bo_4'] == '1' && $is_category) { if ($board['bo_4'] == '1' && $is_category) {
$cate = explode('|', $board['bo_category_list']); $cate = explode('|', $board['bo_category_list']);
} }
for ($h = 0; $h <= count($cate); $h++) { for ($h = 0; $h <= count($cate); $h++) {
if(count($cate)>0 && $h==count($cate)) continue; if (count($cate) > 0 && $h == count($cate))
continue;
$list_item = sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1 desc, wr_num"); $list_item = sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1 desc, wr_num");
for ($k = 0; $row = sql_fetch_array($list_item); $k++) { for ($k = 0; $row = sql_fetch_array($list_item); $k++) {
@ -45,18 +48,22 @@ for($h=0;$h<=count($cate);$h++){
} }
?> ?>
<div class="swiper-container"> <div class="swiper-container">
<?if($board['bo_4']=='1' && $is_category){?><h2><?=$cate[$h]?></h2><?}?> <?php if ($board['bo_4'] == '1' && $is_category) { ?>
<ul class="swiper-wrapper"><? <h2><?= $cate[$h] ?></h2><?php } ?>
<ul class="swiper-wrapper">
<?php
if ($board['bo_2']) { if ($board['bo_2']) {
$margins = explode(',', $board['bo_2']); $margins = explode(',', $board['bo_2']);
$margin = trim($margins[0]) . 'px'; $margin = trim($margins[0]) . 'px';
if($margins[1]) $margin.=" ".trim($margins[1]).'px'; if ($margins[1])
$margin .= " " . trim($margins[1]) . 'px';
$slide_space = trim($margins[0]); $slide_space = trim($margins[0]);
} }
if (count($lists) > 0) { if (count($lists) > 0) {
for ($i = 0; $i < count($lists); $i++) { for ($i = 0; $i < count($lists); $i++) {
if ($is_category) { if ($is_category) {
if(($board['bo_4']=='1' && $lists[$i]['ca_name']!=$cate[$h]) || (!$board['bo_4'] && $sca && $lists[$i]['ca_name']!=$sca)) continue; if (($board['bo_4'] == '1' && $lists[$i]['ca_name'] != $cate[$h]) || (!$board['bo_4'] && $sca && $lists[$i]['ca_name'] != $sca))
continue;
} }
if ($lists[$i]['wr_file'] > 0) { if ($lists[$i]['wr_file'] > 0) {
@ -66,8 +73,10 @@ for($h=0;$h<=count($cate);$h++){
else else
$position = "-" . $lists[$i]['wr_width'] . "px 0"; $position = "-" . $lists[$i]['wr_width'] . "px 0";
$thumb_img = get_list_thumbnail($bo_table, $lists[$i]['wr_id'], 0, $board['bo_gallery_height'], true, true, 'custom', false, '', $lists[$i]['wr_height']); $thumb_img = get_list_thumbnail($bo_table, $lists[$i]['wr_id'], 0, $board['bo_gallery_height'], true, true, 'custom', false, '', $lists[$i]['wr_height']);
if($thumb_img['src'])$thumb=$thumb_img['src']; if ($thumb_img['src'])
else $thumb=""; $thumb = $thumb_img['src'];
else
$thumb = "";
} else { } else {
$idx = $lists[$i]['wr_8']; $idx = $lists[$i]['wr_8'];
$thumb = $lists[$i][$idx]; $thumb = $lists[$i][$idx];
@ -76,11 +85,16 @@ for($h=0;$h<=count($cate);$h++){
} else { } else {
$thumb = ""; $thumb = "";
} }
?><li class="<?=$board['bo_4']==2? 'swiper-slide':'bo-list';?>" style="<?if($board['bo_4']<2){?>width:<?=$board['bo_gallery_width']+($margins[0]*2)?>px;margin:<?=$margin?>;<?}?>"> ?>
<a href="<?=$lists[$i]['href']?>" class="ui-thumb theme-box<?if(!$thumb) echo " empty";?> <li class="<?= $board['bo_4'] == 2 ? 'swiper-slide' : 'bo-list'; ?>"
<?if(strstr($lists[$i]['wr_option'],'secret')) echo "secret";?>" style="<?if($board['bo_4']<2){?>width:<?=$board['bo_gallery_width']?>px;<?}?>height:<?=$board['bo_gallery_height']?>px;<?if($thumb){?>background-image:url(<?=$thumb?>);background-repeat:no-repeat;background-position:<?=$position?>;background-size:cover;<?}else{?><?}?>"> style="<?php if ($board['bo_4'] < 2) { ?>width:<?= $board['bo_gallery_width'] + ($margins[0] * 2) ?>px;margin:<?= $margin ?>;<?php } ?>">
<a href="<?= $lists[$i]['href'] ?>" class="ui-thumb theme-box<?php if (!$thumb)
echo " empty"; ?>
<?php if (strstr($lists[$i]['wr_option'], 'secret'))
echo "secret"; ?>"
style="<?php if ($board['bo_4'] < 2) { ?>width:<?= $board['bo_gallery_width'] ?>px;<?php } ?>height:<?= $board['bo_gallery_height'] ?>px;<?php if ($thumb) { ?>background-image:url(<?= $thumb ?>);background-repeat:no-repeat;background-position:<?= $position ?>;background-size:cover;<?php } else { ?><?php } ?>">
</a> </a>
<?if($board['bo_4']<2){?> <?php if ($board['bo_4'] < 2) { ?>
<a href="<?= $lists[$i]['href'] ?>" class="ui-profile"> <a href="<?= $lists[$i]['href'] ?>" class="ui-profile">
<strong class="name"> <strong class="name">
<?= $lists[$i]['wr_subject'] ?> <?= $lists[$i]['wr_subject'] ?>
@ -89,34 +103,34 @@ for($h=0;$h<=count($cate);$h++){
<?= $lists[$i]['wr_type'] ?> <?= $lists[$i]['wr_type'] ?>
</span> </span>
</a> </a>
<?}?> <?php } ?>
</li><? }}?></ul> </li><?php }
} ?>
</ul>
</div> </div>
<?if($board['bo_4']==2){?> <?php if ($board['bo_4'] == 2) { ?>
<div class="swiper-button-next"><a href="javascript:void(0);">&gt;</a></div> <div class="swiper-button-next"><a href="javascript:void(0);">&gt;</a></div>
<div class="swiper-button-prev"><a href="javascript:void(0);">&lt;</a></div> <div class="swiper-button-prev"><a href="javascript:void(0);">&lt;</a></div>
<?}?> <?php } ?>
<?}?> <?php } ?>
<? if ($list_href || $is_checkbox || $write_href) { ?> <?php if ($list_href || $is_checkbox || $write_href) { ?>
<div class="bo_fx txt-right" style="padding: 20px 0;"> <div class="bo_fx txt-right" style="padding: 20px 0;">
<? if ($list_href || $write_href) { ?> <?php if ($list_href || $write_href) { ?>
<? if ($list_href) { ?><a href="<? echo $list_href ?>" class="ui-btn">목록</a><? } ?> <?php if ($list_href) { ?><a href="<?php echo $list_href ?>" class="ui-btn">목록</a><?php } ?>
<? if ($write_href) { ?> <?php if ($write_href) { ?>
<a href="<? echo $write_href ?>" class="ui-btn point">캐릭터 등록</a><? } ?> <a href="<?php echo $write_href ?>" class="ui-btn point">캐릭터 등록</a><?php } ?>
<? } ?> <?php } ?>
<? if($admin_href){?> <?php if ($admin_href) { ?>
<a href="<?=$board_skin_url?>/set_order.php?bo_table=<?=$bo_table?>&write_table=<?=$write_table?>" class="ui-btn">순서 관리</a> <a href="<?= $board_skin_url ?>/set_order.php?bo_table=<?= $bo_table ?>&write_table=<?= $write_table ?>"
<a href="<?=$admin_href?>" class="ui-btn admin">관리자</a><?}?> class="ui-btn">순서
관리</a>
<a href="<?= $admin_href ?>" class="ui-btn admin">관리자</a><?php } ?>
</div> </div>
<? } ?> <?php } ?>
</div> </div>
<?php if ($board['bo_4'] == 2) { ?>
<?if($board['bo_4']==2){?>
<!-- Initialize Swiper --> <!-- Initialize Swiper -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js"></script>
<script> <script>
var win = $(window).width(); var win = $(window).width();
var space = <?= $slide_space ?>; var space = <?= $slide_space ?>;
@ -146,7 +160,6 @@ for($h=0;$h<=count($cate);$h++){
}, },
}); });
$(window).on('resize', _.debounce(function () { $(window).on('resize', _.debounce(function () {
var win = $(window).width(); var win = $(window).width();
var temp = <?= $bo_gallery_cols ?>; var temp = <?= $bo_gallery_cols ?>;
@ -154,8 +167,6 @@ for($h=0;$h<=count($cate);$h++){
else if (win < 450 && temp >= 3) s_w = 3; else if (win < 450 && temp >= 3) s_w = 3;
else if (win < 640 && temp >= 4) s_w = 4; else if (win < 640 && temp >= 4) s_w = 4;
else s_w = <?= $bo_gallery_cols ?>; else s_w = <?= $bo_gallery_cols ?>;
var swiper = new Swiper('.swiper-container', { var swiper = new Swiper('.swiper-container', {
slidesPerView: s_w, slidesPerView: s_w,
spaceBetween: space, spaceBetween: space,
@ -173,11 +184,7 @@ for($h=0;$h<=count($cate);$h++){
prevEl: '.swiper-button-prev', prevEl: '.swiper-button-prev',
}, },
}); });
}, 300)); }, 300));
</script> </script>
<?}?> <?php } ?>
<!-- } 게시판 목록 --> <!-- } 게시판 목록 -->

21
readme.md Normal file
View file

@ -0,0 +1,21 @@
## 게시판 캐릭터 정리 게시판 ver.2 스킨
작성자: 대하 (Extra Shot)
원본주소: https://extrashot.tistory.com/38
오류 수정 및 일부 코드에 최적화 작업을 진행했습니다.
### 주요 수정 사항
- short open tag 제거
모든 아보카도 버전에 호환됩니다.
## 설치방법
아보카도가 설치된 폴더의 하위 폴더인 `skin/board/``es_character` (또는 `character_new`)
라는 폴더를 생성하고 파일을 업로드합니다.
> (폴더명은 기능과 무관하므로 어느 폴더명을 넣으셔도 상관 없습니다.)
```
php 최소 버전: 5.6 이상 (5.3부터 사용 가능)
```

View file

@ -1,6 +1,6 @@
<?php <?php
include_once("./_common.php"); include_once "./_common.php";
include_once(G5_PATH."/head.sub.php"); include_once G5_PATH . "/head.sub.php";
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0); add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
if (!$is_admin) if (!$is_admin)
@ -12,7 +12,7 @@ if($is_admin){
<input type="hidden" name="write_table" value="<?= $write_table ?>"> <input type="hidden" name="write_table" value="<?= $write_table ?>">
<div style="max-width:600px;margin:10px auto;"> <div style="max-width:600px;margin:10px auto;">
<ul> <ul>
<? <?php
$order = sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1 asc"); $order = sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1 asc");
$parent_type = $board['bo_1'] ? $board['bo_1'] : '오리지널'; $parent_type = $board['bo_1'] ? $board['bo_1'] : '오리지널';
for ($i = 0; $row = sql_fetch_array($order); $i++) { ?> for ($i = 0; $row = sql_fetch_array($order); $i++) { ?>
@ -20,38 +20,42 @@ if($is_admin){
<a href="#" onclick="$(this).siblings('div').slideToggle(); return false;"> <a href="#" onclick="$(this).siblings('div').slideToggle(); return false;">
<span style="padding:0 5px">[<?= $parent_type ?>]</span> <span style="padding:0 5px">[<?= $parent_type ?>]</span>
<span style="padding:0 5px"><?= $row['wr_subject'] ?></span></a> <span style="padding:0 5px"><?= $row['wr_subject'] ?></span></a>
<span style="padding:0 5px;"><input name="type[<?=$row['wr_id']?>]" type="text" value="<?=$row['wr_type']?>"></span> <span style="padding:0 5px;"><input name="type[<?= $row['wr_id'] ?>]" type="text"
<span style="padding:0 5px;float:right;"><input type="text" value="<?=$row['wr_10']?>" name="order[<?=$row['wr_id']?>]" size="4" style="height:28px;line-height:26px;"></span> value="<?= $row['wr_type'] ?>"></span>
<?if($board['bo_use_category']&&$board['bo_category_list']){?> <span style="padding:0 5px;float:right;"><input type="text" value="<?= $row['wr_10'] ?>"
name="order[<?= $row['wr_id'] ?>]" size="4" style="height:28px;line-height:26px;"></span>
<?php if ($board['bo_use_category'] && $board['bo_category_list']) { ?>
<select name="category[<?= $row['wr_id'] ?>]" style="float:right;"> <select name="category[<?= $row['wr_id'] ?>]" style="float:right;">
<option value="">카테고리</option> <option value="">카테고리</option>
<?$cate=explode('|',$board['bo_category_list']); <?php $cate = explode('|', $board['bo_category_list']);
for ($h = 0; $h < count($cate); $h++) { ?> for ($h = 0; $h < count($cate); $h++) { ?>
<option value="<?= $cate[$h] ?>" <?= $row['ca_name'] == $cate[$h] ? "selected" : ""; ?>><?= $cate[$h] ?></option> <option value="<?= $cate[$h] ?>" <?= $row['ca_name'] == $cate[$h] ? "selected" : ""; ?>><?= $cate[$h] ?></option>
<?}?> <?php } ?>
</select><?}?> </select><?php } ?>
<input type="hidden" name="idx[]" value="<?= $row['wr_id'] ?>"> <input type="hidden" name="idx[]" value="<?= $row['wr_id'] ?>">
<input type="hidden" name="parents[<?= $row['wr_id'] ?>]" value="<?= $row['wr_parent'] ?>"> <input type="hidden" name="parents[<?= $row['wr_id'] ?>]" value="<?= $row['wr_parent'] ?>">
<? <?php
$sub = sql_query("select * from {$write_table} where wr_reply!='' and (ca_name='{$row['wr_subject']}' or wr_9='{$row['wr_id']}') and wr_id!='{$row['wr_id']}' and wr_is_comment=0 order by wr_10*1 asc"); $sub = sql_query("select * from {$write_table} where wr_reply!='' and (ca_name='{$row['wr_subject']}' or wr_9='{$row['wr_id']}') and wr_id!='{$row['wr_id']}' and wr_is_comment=0 order by wr_10*1 asc");
for ($k = 0; $row2 = sql_fetch_array($sub); $k++) { ?> for ($k = 0; $row2 = sql_fetch_array($sub); $k++) { ?>
<div style="padding-left:10px;clear:both;"> <div style="padding-left:10px;clear:both;">
<span style="padding:0 5px">[AU] [<?= $row2['wr_type'] ?>]</span> <span style="padding:0 5px">[AU] [<?= $row2['wr_type'] ?>]</span>
<span style="padding:0 5px"><?= $row2['wr_subject'] ?></span> <span style="padding:0 5px"><?= $row2['wr_subject'] ?></span>
<span style="padding:0 5px;"><input name="type[<?=$row2['wr_id']?>]" type="text" value="<?=$row2['wr_type']?>"></span> <span style="padding:0 5px;"><input name="type[<?= $row2['wr_id'] ?>]" type="text"
<span style="padding:0 5px;float:right;"><input type="text" value="<?=$row2['wr_10']?>" name="order[<?=$row2['wr_id']?>]" size="4" style="height:28px;line-height:26px;"></span> value="<?= $row2['wr_type'] ?>"></span>
<span style="padding:0 5px;float:right;"><input type="text" value="<?= $row2['wr_10'] ?>"
name="order[<?= $row2['wr_id'] ?>]" size="4" style="height:28px;line-height:26px;"></span>
<input type="hidden" name="idx[]" value="<?= $row2['wr_id'] ?>"> <input type="hidden" name="idx[]" value="<?= $row2['wr_id'] ?>">
<input type="hidden" name="parents[<?= $row2['wr_id'] ?>]" value="<?= $row['wr_parent'] ?>"> <input type="hidden" name="parents[<?= $row2['wr_id'] ?>]" value="<?= $row['wr_parent'] ?>">
</div> </div>
<? } ?> <?php } ?>
</li> </li>
<? } ?> <?php } ?>
</ul> </ul>
<br> <br>
<button type="submit" class="ui-btn point">확인</button> <button type="submit" class="ui-btn point">확인</button>
<a href="<?= G5_BBS_URL ?>/board.php?bo_table=<?= $bo_table ?>" class="ui-btn">목록으로</a> <a href="<?= G5_BBS_URL ?>/board.php?bo_table=<?= $bo_table ?>" class="ui-btn">목록으로</a>
</div> </div>
</form> </form>
<?}?> <?php } ?>

View file

@ -1,5 +1,5 @@
<?php <?php
include_once("./_common.php"); include_once "./_common.php";
for ($i = 0; $i < count($idx); $i++) { for ($i = 0; $i < count($idx); $i++) {
$k = $idx[$i]; $k = $idx[$i];
@ -13,5 +13,5 @@ for ($i=0;$i<count($idx);$i++){
sql_query("update {$write_table} set ca_name='{$category[$k]}' where wr_9='{$k}'"); sql_query("update {$write_table} set ca_name='{$category[$k]}' where wr_9='{$k}'");
} }
} }
goto_url('./set_order.php?bo_table=' . $bo_table . '&write_table=' . $write_table); goto_url('./set_order.php?bo_table=' . $bo_table . '&write_table=' . $write_table);
?>

View file

@ -1,6 +1,10 @@
<?php <?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if (!defined("_GNUBOARD_"))
function upload_c_file($name,$table){ exit;
function upload_c_file($name, $table)
{
global $config, $bo_table;
$files = array(); $files = array();
$tmp_file = $_FILES[$name]['tmp_name']; $tmp_file = $_FILES[$name]['tmp_name'];
@ -10,8 +14,10 @@ function upload_c_file($name,$table){
$timg = @getimagesize($tmp_file); $timg = @getimagesize($tmp_file);
// image type // image type
if ( preg_match("/\.({$config['cf_image_extension']})$/i", $filename) || if (
preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) ) { preg_match("/\.({$config['cf_image_extension']})$/i", $filename) ||
preg_match("/\.({$config['cf_flash_extension']})$/i", $filename)
) {
if ($timg['2'] < 1 || $timg['2'] > 16) if ($timg['2'] < 1 || $timg['2'] > 16)
alert("업로드 불가능한 확장자입니다.", "./board.php?bo_table=" . $bo_table); //@200927 alert("업로드 불가능한 확장자입니다.", "./board.php?bo_table=" . $bo_table); //@200927
} else { } else {
@ -43,4 +49,3 @@ function upload_c_file($name,$table){
return $files; return $files;
} }
} }
?>

View file

@ -1,18 +1,23 @@
<? <?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if (!defined("_GNUBOARD_"))
include_once(G5_LIB_PATH.'/thumbnail.lib.php'); exit;
include_once G5_LIB_PATH . '/thumbnail.lib.php';
// 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);
if($board['bo_table_width']==0) $width="100%"; if ($board['bo_table_width'] == 0)
$width = "100%";
$parent_type = $board['bo_1'] ? $board['bo_1'] : '오리지널'; $parent_type = $board['bo_1'] ? $board['bo_1'] : '오리지널';
// 동일캐릭터 wr_9 묶음, au명은 wr_type 사용, 캐릭터명은 wr_subject 사용. // 동일캐릭터 wr_9 묶음, au명은 wr_type 사용, 캐릭터명은 wr_subject 사용.
$allow_body = 450; $allow_body = 450;
$content_width = 400; $content_width = 400;
if($board['bo_5']) $conts=explode("|",$board['bo_5']); if ($board['bo_5'])
if($conts[0]) $allow_body=trim($conts[0]); $conts = explode("|", $board['bo_5']);
if($conts[1]) $content_width=trim($conts[1]); if ($conts[0])
$allow_body = trim($conts[0]);
if ($conts[1])
$content_width = trim($conts[1]);
$rel = sql_fetch("select wr_id from {$write_table} where wr_9='{$view['wr_9']}' and wr_id!={$view['wr_9']} order by wr_10*1"); $rel = sql_fetch("select wr_id from {$write_table} where wr_9='{$view['wr_9']}' and wr_id!={$view['wr_9']} order by wr_10*1");
$relate = sql_query("select wr_id, wr_type from {$write_table} where wr_9='{$view['wr_9']}' and wr_id!={$view['wr_9']} order by wr_10*1, wr_reply"); $relate = sql_query("select wr_id, wr_type from {$write_table} where wr_9='{$view['wr_9']}' and wr_id!={$view['wr_9']} order by wr_10*1, wr_reply");
@ -28,10 +33,10 @@ for($i=0;$clo=sql_fetch_array($cl_no);$i++){
<div class="board-viewer"> <div class="board-viewer">
<div id="body_img" class="body_img txt-center"> <div id="body_img" class="body_img txt-center">
<?if($view['wr_1']){?> <?php if ($view['wr_1']) { ?>
<div id="body_0" class="body-img"><img src="<?= $view['wr_1'] ?>" onclick="window.open(this.src);"></div> <div id="body_0" class="body-img"><img src="<?= $view['wr_1'] ?>" onclick="window.open(this.src);"></div>
<?}?> <?php } ?>
<? <?php
for ($k = 0; $k < count($cl); $k++) { for ($k = 0; $k < count($cl); $k++) {
$files = get_file($bo_table, $cl[$k]['wr_id']); $files = get_file($bo_table, $cl[$k]['wr_id']);
$filelink = G5_DATA_URL . '/file/' . $bo_table . '/' . $files[0]['file']; $filelink = G5_DATA_URL . '/file/' . $bo_table . '/' . $files[0]['file'];
@ -39,32 +44,38 @@ for($i=0;$clo=sql_fetch_array($cl_no);$i++){
<div id="body_<?= $k + 1 ?>" class="body-img" style="display:none;"> <div id="body_<?= $k + 1 ?>" class="body-img" style="display:none;">
<img src="<?= $filelink ?>" onclick="window.open(this.src);"> <img src="<?= $filelink ?>" onclick="window.open(this.src);">
</div> </div>
<?} ?> <?php } ?> <?php if ($rel['wr_id'] || count($cl) > 0) { ?>
<?if($rel['wr_id'] || count($cl)>0){?> <a href="#" onclick="$(this).next().slideToggle();return false;" id="links-box-open"
<a href="#" onclick="$(this).next().slideToggle();return false;" id="links-box-open" class="ui-btn small full">AU/옷장</a><?}?> class="ui-btn small full">AU/옷장</a><?php } ?>
<div class="links-box"> <div class="links-box">
<div id="rel_link" class="ui-links"> <div id="rel_link" class="ui-links">
<ul> <ul>
<?if($rel['wr_id']){ //@211117 ?> <?php if ($rel['wr_id']) { //@211117 ?>
<li><a href="<?=$or_link?>" class="rel <?=$view['wr_9']!=$wr_id ? ' txt-default': '';?>"><?=($parent['wr_type']&&!$parent['wr_7']) ? $parent['wr_type']: $parent_type?></a></li> <li><a href="<?= $or_link ?>"
<?for($k=0;$re=sql_fetch_array($relate);$k++){ class="rel <?= $view['wr_9'] != $wr_id ? ' txt-default' : ''; ?>"><?= ($parent['wr_type'] && !$parent['wr_7']) ? $parent['wr_type'] : $parent_type ?></a>
</li>
<?php for ($k = 0; $re = sql_fetch_array($relate); $k++) {
$link = './board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $re['wr_id'] . $qstr; ?> $link = './board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $re['wr_id'] . $qstr; ?>
<li><a href="<?=$link?>" class="rel <?=$re['wr_id']!=$wr_id ? ' txt-default': '';?>"><?=$re['wr_type'] ? $re['wr_type'] : $parent_type;?></a></li> <li><a href="<?= $link ?>"
<?}?> class="rel <?= $re['wr_id'] != $wr_id ? ' txt-default' : ''; ?>"><?= $re['wr_type'] ? $re['wr_type'] : $parent_type; ?></a>
<?}?> </li>
<?php } ?>
<?php } ?>
</ul> </ul>
</div> </div>
<div id="clo_link" class="ui-links"> <div id="clo_link" class="ui-links">
<ul> <ul>
<?if(count($cl)>0){?><li><a href="#body_0" class="clo" id="clo_0">기본전신</a></li><?}?> <?php if (count($cl) > 0) { ?>
<? <li><a href="#body_0" class="clo" id="clo_0">기본전신</a></li><?php } ?>
<?php
for ($h = 0; $h < count($cl); $h++) { for ($h = 0; $h < count($cl); $h++) {
$file = get_file($bo_table, $cl[$h]['wr_id']); $file = get_file($bo_table, $cl[$h]['wr_id']);
$file_link = G5_DATA_URL . '/file/' . $bo_table . '/' . $file[0]['file']; $file_link = G5_DATA_URL . '/file/' . $bo_table . '/' . $file[0]['file'];
?> ?>
<li><a href="#body_<?=$h+1?>" class="clo txt-default" id="clo_<?=$h+1?>"><?=$file[0]['content']?></a></li> <li><a href="#body_<?= $h + 1 ?>" class="clo txt-default"
id="clo_<?= $h + 1 ?>"><?= $file[0]['content'] ?></a></li>
<?} ?> <?php } ?>
</ul> </ul>
</div> </div>
</div> </div>
@ -72,26 +83,28 @@ for($i=0;$clo=sql_fetch_array($cl_no);$i++){
<div class="contents"> <div class="contents">
<div class="content-wrap"> <div class="content-wrap">
<!-- 본문 내용 시작 { --> <!-- 본문 내용 시작 { -->
<div id="bo_v_con"><? echo get_view_thumbnail($view['content']); ?></div> <div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
<?//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?> <?php //echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<!-- } 본문 내용 --> <!-- } 본문 내용 -->
<? <?php
// 코멘트 입출력 // 코멘트 입출력
include_once(G5_BBS_PATH.'/view_comment.php'); include_once G5_BBS_PATH . '/view_comment.php';
?> ?>
</div> </div>
<!-- 링크 버튼 시작 { --> <!-- 링크 버튼 시작 { -->
<div id="bo_v_bot"> <div id="bo_v_bot">
<? ob_start(); ?> <?php ob_start(); ?>
<div class="bo_v_com"> <div class="bo_v_com">
<a href="<? echo $list_href ?>" class="ui-btn left">목록</a> <a href="<?php echo $list_href ?>" class="ui-btn left">목록</a>
<? if ($update_href) { ?><a href="<? echo $update_href ?>" class="ui-btn">수정</a><? } ?> <?php if ($update_href) { ?><a href="<?php echo $update_href ?>" class="ui-btn">수정</a><?php } ?>
<? if ($delete_href) { ?><a href="<? echo $delete_href ?>" class="ui-btn admin" onclick="del(this.href); return false;">삭제</a><? } ?> <?php if ($delete_href) { ?><a href="<?php echo $delete_href ?>" class="ui-btn admin"
<? if ($view['wr_reply']=='' && $view['mb_id']==$member['mb_id']) { ?><a href="<? echo $reply_href ?>" class="ui-btn"><?=$view['wr_subject']?> AU 등록</a><? } ?> onclick="del(this.href); return false;">삭제</a><?php } ?>
<? if ($write_href) { ?><a href="<? echo $write_href ?>" class="ui-btn point">캐릭터 등록</a><? } ?> <?php if ($view['wr_reply'] == '' && $view['mb_id'] == $member['mb_id']) { ?><a href="<?php echo $reply_href ?>"
class="ui-btn"><?= $view['wr_subject'] ?> AU 등록</a><?php } ?>
<?php if ($write_href) { ?><a href="<?php echo $write_href ?>" class="ui-btn point">캐릭터 등록</a><?php } ?>
</div> </div>
<? <?php
$link_buttons = ob_get_contents(); $link_buttons = ob_get_contents();
ob_end_flush(); ob_end_flush();
?> ?>
@ -101,8 +114,7 @@ for($i=0;$clo=sql_fetch_array($cl_no);$i++){
</div> </div>
<script> <script>
function board_move(href) function board_move(href) {
{
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1"); window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
} }
$("a.view_image").click(function () { $("a.view_image").click(function () {

View file

@ -1,5 +1,6 @@
<? <?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!defined('_GNUBOARD_'))
exit;
$cmt_link = sql_fetch("select count(wr_id) as cnt from {$write_table} where wr_is_comment=1 and wr_parent='{$wr_id}' and wr_content!='옷장'"); $cmt_link = sql_fetch("select count(wr_id) as cnt from {$write_table} where wr_is_comment=1 and wr_parent='{$wr_id}' and wr_content!='옷장'");
$clo = sql_fetch("select count(wr_id) as cnt from {$write_table} where wr_is_comment=1 and wr_parent='{$wr_id}' and wr_content='옷장'"); $clo = sql_fetch("select count(wr_id) as cnt from {$write_table} where wr_is_comment=1 and wr_parent='{$wr_id}' and wr_content='옷장'");
@ -7,19 +8,20 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
<div class="board-comment-view"> <div class="board-comment-view">
<script> <script>
// 글자수 제한 // 글자수 제한
var char_min = parseInt(<? echo $comment_min ?>); // 최소 var char_min = parseInt(<?php echo $comment_min ?>); // 최소
var char_max = parseInt(<? echo $comment_max ?>); // 최대 var char_max = parseInt(<?php echo $comment_max ?>); // 최대
</script> </script>
<? <?php
if ($member['mb_level'] >= $board['bo_comment_level']) { if ($member['mb_level'] >= $board['bo_comment_level']) {
?> ?>
<div class="board-comment-list"> <div class="board-comment-list">
<?if($cmt_link['cnt']>0){?> <?php if ($cmt_link['cnt'] > 0) { ?>
<strong>로그</strong><?}?> <strong>로그</strong><?php } ?>
<? <?php
$cmt_amt = count($list); $cmt_amt = count($list);
for ($i = 0; $i < $cmt_amt; $i++) { for ($i = 0; $i < $cmt_amt; $i++) {
if($list[$i]['wr_content']=='옷장') continue; if ($list[$i]['wr_content'] == '옷장')
continue;
$comment_id = $list[$i]['wr_id']; $comment_id = $list[$i]['wr_id'];
$cmt_depth = ""; // 댓글단계 $cmt_depth = ""; // 댓글단계
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 10; $cmt_depth = strlen($list[$i]['wr_comment_reply']) * 10;
@ -28,10 +30,10 @@ if($member['mb_level']>=$board['bo_comment_level']){
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결 $cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
?> ?>
<div class="item" id="c_<? echo $comment_id ?>"> <div class="item" id="c_<?php echo $comment_id ?>">
<div class="co-content"> <div class="co-content">
<div class="co-inner"> <div class="co-inner">
<? $co_links=explode(PHP_EOL,$list[$i]['wr_content']); <?php $co_links = explode(PHP_EOL, $list[$i]['wr_content']);
if (count($co_links) > 0) { if (count($co_links) > 0) {
$co_list = array(); $co_list = array();
for ($k = 0; $k < count($co_links); $k++) { for ($k = 0; $k < count($co_links); $k++) {
@ -42,9 +44,8 @@ if($member['mb_level']>=$board['bo_comment_level']){
} }
?> ?>
</div> </div>
<div class="co-info"> <div class="co-info">
<? if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) { <?php if ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
$query_string = clean_query_string($_SERVER['QUERY_STRING']); $query_string = clean_query_string($_SERVER['QUERY_STRING']);
if ($w == 'cu') { if ($w == 'cu') {
@ -57,51 +58,46 @@ if($member['mb_level']>=$board['bo_comment_level']){
$c_edit_href = './board.php?' . $query_string . '&amp;c_id=' . $comment_id . '&amp;w=cu#bo_vc_w'; $c_edit_href = './board.php?' . $query_string . '&amp;c_id=' . $comment_id . '&amp;w=cu#bo_vc_w';
?> ?>
<? if ($list[$i]['is_edit']) { ?><span><a href="javascript:comment_box('<? echo $comment_id ?>', 'cu','link');">m</a></span><? } ?> <?php if ($list[$i]['is_edit']) { ?><span><a
<? if ($list[$i]['is_del']) { ?><span><a href="<? echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">d</a></span><? } ?> href="javascript:comment_box('<?php echo $comment_id ?>', 'cu','link');">m</a></span><?php } ?>
<? } ?> <?php if ($list[$i]['is_del']) { ?><span><a href="<?php echo $list[$i]['del_link']; ?>"
onclick="return comment_delete();">d</a></span><?php } ?>
<?php } ?>
</div> </div>
</div> </div>
<span id="edit_<?php echo $comment_id ?>"></span><!-- 수정 -->
<span id="edit_<? echo $comment_id ?>"></span><!-- 수정 -->
</div> </div>
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'], "secret") ?>"
<input type="hidden" value="<? echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<? echo $comment_id ?>"> id="secret_comment_<?php echo $comment_id ?>">
<textarea id="save_comment_<? echo $comment_id ?>" style="display:none"><? echo get_text($list[$i]['content1'], 0) ?></textarea> <textarea id="save_comment_<?php echo $comment_id ?>"
style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
<input type="hidden" id="save_cl_<?= $comment_id ?>" name="bf_content"> <input type="hidden" id="save_cl_<?= $comment_id ?>" name="bf_content">
<input type="hidden" id="save_order_<?= $comment_id ?>" name="wr_10"> <input type="hidden" id="save_order_<?= $comment_id ?>" name="wr_10">
<?php } ?>
<? } ?>
</div> </div>
<?php }
<? }
if ($view['mb_id'] == $member['mb_id']) { if ($view['mb_id'] == $member['mb_id']) {
if ($w == '') if ($w == '')
$w = 'c'; $w = 'c';
?> ?>
<div class="board-clothes-list board-comment-list"> <div class="board-clothes-list board-comment-list">
<?if($clo['cnt']>0){?> <?php if ($clo['cnt'] > 0) { ?>
<strong>옷장</strong> <strong>옷장</strong>
<?}?> <?php } ?>
<? <?php
$clothes = sql_query("select * from {$write_table} where wr_content='옷장' and wr_parent='{$wr_id}' and wr_is_comment=1 order by wr_10 asc"); $clothes = sql_query("select * from {$write_table} where wr_content='옷장' and wr_parent='{$wr_id}' and wr_is_comment=1 order by wr_10 asc");
for ($k = 0; $cl = sql_fetch_array($clothes); $k++) { for ($k = 0; $cl = sql_fetch_array($clothes); $k++) {
$comment_id = $cl['wr_id']; $comment_id = $cl['wr_id'];
?> ?>
<div class="item" id="cl_<? echo $comment_id ?>"> <div class="item" id="cl_<?php echo $comment_id ?>">
<div class="co-content"> <div class="co-content">
<div class="co-inner"> <div class="co-inner">
<? $files=get_file($bo_table,$comment_id); <?php $files = get_file($bo_table, $comment_id);
$filelink = G5_DATA_URL . '/file/' . $bo_table . '/' . $files[0]['file']; ?> $filelink = G5_DATA_URL . '/file/' . $bo_table . '/' . $files[0]['file']; ?>
<a href="<?= $filelink ?>" target="_blank"><?= $files[0]['content'] ?></a> <a href="<?= $filelink ?>" target="_blank"><?= $files[0]['content'] ?></a>
</div> </div>
<div class="co-info"> <div class="co-info">
<? if($member['mb_id']==$cl['mb_id']) { <?php if ($member['mb_id'] == $cl['mb_id']) {
$query_string = clean_query_string($_SERVER['QUERY_STRING']); $query_string = clean_query_string($_SERVER['QUERY_STRING']);
if ($w == 'cu') { if ($w == 'cu') {
@ -113,66 +109,60 @@ if ($view['mb_id']==$member['mb_id']) {
} }
$token = ''; $token = '';
if ($member['mb_id']) if ($member['mb_id']) {
{ if ($cl['mb_id'] === $member['mb_id'] || $is_admin) {
if ($cl['mb_id'] === $member['mb_id'] || $is_admin)
{
set_session('ss_delete_comment_' . $cl['wr_id'] . '_token', $token = uniqid(time())); set_session('ss_delete_comment_' . $cl['wr_id'] . '_token', $token = uniqid(time()));
$cl['del_link'] = './delete_comment.php?bo_table=' . $bo_table . '&amp;comment_id=' . $cl['wr_id'] . '&amp;token=' . $token . '&amp;page=' . $page . $qstr; $cl['del_link'] = './delete_comment.php?bo_table=' . $bo_table . '&amp;comment_id=' . $cl['wr_id'] . '&amp;token=' . $token . '&amp;page=' . $page . $qstr;
} }
} } else {
else
{
if (!$cl['mb_id']) { if (!$cl['mb_id']) {
$cl['del_link'] = './password.php?w=x&amp;bo_table=' . $bo_table . '&amp;comment_id=' . $cl['wr_id'] . '&amp;page=' . $page . $qstr; $cl['del_link'] = './password.php?w=x&amp;bo_table=' . $bo_table . '&amp;comment_id=' . $cl['wr_id'] . '&amp;page=' . $page . $qstr;
} }
} }
$c_edit_href = './board.php?' . $query_string . '&amp;c_id=' . $comment_id . '&amp;w=cu#bo_cl_w'; $c_edit_href = './board.php?' . $query_string . '&amp;c_id=' . $comment_id . '&amp;w=cu#bo_cl_w';
?> ?>
<span><a href="javascript:comment_box('<? echo $comment_id ?>', 'cu', 'clo');">m</a></span> <span><a href="javascript:comment_box('<?php echo $comment_id ?>', 'cu', 'clo');">m</a></span>
<span><a href="<? echo $cl['del_link']; ?>" onclick="return comment_delete();">d</a></span> <span><a href="<?php echo $cl['del_link']; ?>" onclick="return comment_delete();">d</a></span>
<? } ?> <?php } ?>
</div> </div>
</div> </div>
<span id="edit_cl_<?php echo $comment_id ?>"></span><!-- 수정 -->
<span id="edit_cl_<? echo $comment_id ?>"></span><!-- 수정 -->
</div> </div>
<input type="hidden" value="<?php echo strstr($cl['wr_option'], "secret") ?>"
<input type="hidden" value="<? echo strstr($cl['wr_option'],"secret") ?>" id="secret_comment_<? echo $comment_id ?>"> id="secret_comment_<?php echo $comment_id ?>">
<textarea id="save_comment_<? echo $comment_id ?>" style="display:none">옷장</textarea> <textarea id="save_comment_<?php echo $comment_id ?>" style="display:none">옷장</textarea>
<input type="hidden" id="save_cl_<?= $comment_id ?>" name="bf_content" value="<?= $files[0]['content'] ?>"> <input type="hidden" id="save_cl_<?= $comment_id ?>" name="bf_content" value="<?= $files[0]['content'] ?>">
<input type="hidden" id="save_order_<?= $comment_id ?>" name="wr_10" value="<?= $cl['wr_10'] ?>"> <input type="hidden" id="save_order_<?= $comment_id ?>" name="wr_10" value="<?= $cl['wr_10'] ?>">
<? } ?> <?php } ?>
</div> </div>
<!-- 댓글 쓰기 시작 { --> <!-- 댓글 쓰기 시작 { -->
<?if($cmt_link['cnt']==0) {?><p class="txt-left add"><a href="javascript:comment_box('', 'c','link');">▶ 로그 링크 추가</a></p><?}?> <?php if ($cmt_link['cnt'] == 0) { ?>
<p class="txt-left add"><a href="javascript:comment_box('', 'c','link');"> 로그 링크 추가</a></p><?php } ?>
<p class="add txt-right"><a href="javascript:comment_box('', 'c','clo');"> 의상 추가</a></p> <p class="add txt-right"><a href="javascript:comment_box('', 'c','clo');"> 의상 추가</a></p>
<div id="bo_vc_w" class="board-comment-write" style="display:none;"> <div id="bo_vc_w" class="board-comment-write" style="display:none;">
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off"> <form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);"
<input type="hidden" name="w" value="<? echo $w ?>" id="w"> method="post" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="bo_table" value="<? echo $bo_table ?>"> <input type="hidden" name="w" value="<?php echo $w ?>" id="w">
<input type="hidden" name="wr_id" value="<? echo $wr_id ?>"> <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="comment_id" value="<? echo $c_id ?>" id="comment_id"> <input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
<input type="hidden" name="sca" value="<? echo $sca ?>"> <input type="hidden" name="comment_id" value="<?php echo $c_id ?>" id="comment_id">
<input type="hidden" name="sfl" value="<? echo $sfl ?>"> <input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<? echo $stx ?>"> <input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="spt" value="<? echo $spt ?>"> <input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<? echo $page ?>"> <input type="hidden" name="spt" value="<?php echo $spt ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<div class="board-comment-form"> <div class="board-comment-form">
<input type="text" name="bf_content" id="bf_content" placeholder="의상 이름" style="width:80%"><input type="text"
<input type="text" name="bf_content" id="bf_content" placeholder="의상 이름" style="width:80%"><input type="text" name="wr_10" id="wr_10" placeholder="순서" style="width:20%;"><input type="file" name="bf_file" id="bf_file" class="frm_file frm_input full upload-data on"> name="wr_10" id="wr_10" placeholder="순서" style="width:20%;"><input type="file" name="bf_file" id="bf_file"
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><? } ?> class="frm_file frm_input full upload-data on">
<?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" placeholder="제목|링크로 로그를 링크할 수 있습니다. 여러개 입력시 엔터로 구분해주세요. 예시: <textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" placeholder="제목|링크로 로그를 링크할 수 있습니다. 여러개 입력시 엔터로 구분해주세요. 예시:
링크1|http://url-1 링크1|http://url-1
링크2|http://url-2 링크2|http://url-2
링크3|http://url-3 링크3|http://url-3
..." ..." <?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');" <?php } ?>><?php echo $c_wr_content; ?></textarea>
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<? } ?>><? echo $c_wr_content; ?></textarea> <?php if ($comment_min || $comment_max) { ?>
<? if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><? } ?> <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()
@ -183,27 +173,22 @@ if ($view['mb_id']==$member['mb_id']) {
} }
}); });
</script> </script>
<p style="display:none;"><input type="checkbox" name="secret" value="1" id="secret"> <label
<p style="display:none;"><input type="checkbox" name="secret" value="1" id="secret"> <label for="secret">비밀글</label></p> for="secret">비밀글</label></p>
<div class="btn_confirm"> <div class="btn_confirm">
<button type="submit" id="btn_submit" class="ui-btn">등록</button> <button type="submit" id="btn_submit" class="ui-btn">등록</button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<? } ?> <?php } ?>
</div> </div>
<?if($member['mb_level']>=$board['bo_comment_level']){?> <?php if ($member['mb_level'] >= $board['bo_comment_level']) { ?>
<script> <script>
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 fviewcomment_submit(f) {
function fviewcomment_submit(f)
{
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자 var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
var subject = ""; var subject = "";
@ -233,42 +218,34 @@ 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;
@ -283,12 +260,10 @@ function fviewcomment_submit(f)
return true; return true;
} }
function comment_box(comment_id, work, type) function comment_box(comment_id, work, type) {
{
var el_id; var el_id;
// 댓글 아이디가 넘어오면 답변, 수정 // 댓글 아이디가 넘어오면 답변, 수정
if (comment_id) if (comment_id) {
{
if (work == 'c') if (work == 'c')
el_id = 'reply_' + comment_id; el_id = 'reply_' + comment_id;
else { else {
@ -301,10 +276,8 @@ function comment_box(comment_id, work, type)
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';
document.getElementById(save_before).innerHTML = ''; document.getElementById(save_before).innerHTML = '';
} }
@ -313,8 +286,7 @@ function comment_box(comment_id, work, type)
document.getElementById(el_id).innerHTML = save_html; document.getElementById(el_id).innerHTML = save_html;
// 댓글 수정 // 댓글 수정
if (work == 'cu') if (work == 'cu') {
{
$('#btn_submit').text('수정'); $('#btn_submit').text('수정');
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 (type == 'clo') { if (type == 'clo') {
@ -342,8 +314,7 @@ function comment_box(comment_id, work, type)
$('#' + el_id + ' #wr_content').text('옷장'); $('#' + el_id + ' #wr_content').text('옷장');
} }
} }
if (type=='link') if (type == 'link') {
{
if (work == 'c') { if (work == 'c') {
$('#' + el_id + ' #wr_content').text(''); $('#' + el_id + ' #wr_content').text('');
} }
@ -352,22 +323,20 @@ function comment_box(comment_id, work, type)
} }
} }
function comment_delete() function comment_delete() {
{
return confirm("이 댓글을 삭제하시겠습니까?"); return confirm("이 댓글을 삭제하시겠습니까?");
} }
// 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님) // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
<?}?> <?php } ?>
<? if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?> <?php if ($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
// sns 등록 // sns 등록
$(function () { $(function () {
$("#bo_vc_send_sns").load( $("#bo_vc_send_sns").load(
"<? echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<? echo $bo_table; ?>", "<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>",
function () { function () {
save_html = document.getElementById('bo_vc_w').innerHTML; save_html = document.getElementById('bo_vc_w').innerHTML;
} }
); );
}); });
<? } ?> <?php } ?>
</script> </script>

View file

@ -1,7 +1,7 @@
<?php <?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!defined('_GNUBOARD_'))
exit;
// 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);
$c_name = $board['bo_1'] ? $board['bo_1'] : '오리지널'; $c_name = $board['bo_1'] ? $board['bo_1'] : '오리지널';
@ -10,17 +10,17 @@ if($w=='' || $w=='r'){
$write['wr_width'] = 0; $write['wr_width'] = 0;
$write['wr_height'] = 0; $write['wr_height'] = 0;
$wr_type = ''; $wr_type = '';
} } else
else $wr_type=$write['wr_type']; $wr_type = $write['wr_type'];
$category_option = ""; $category_option = "";
if ($is_category && $board['bo_category_list']) { if ($is_category && $board['bo_category_list']) {
$categories = explode("|", $board['bo_category_list']); // 구분자가 | 로 되어 있음 $categories = explode("|", $board['bo_category_list']); // 구분자가 | 로 되어 있음
for ($i = 0; $i < count($categories); $i++) { for ($i = 0; $i < count($categories); $i++) {
$category = trim($categories[$i]); $category = trim($categories[$i]);
if (!$category) continue; if (!$category)
continue;
$category_option .= "<option value=\"$categories[$i]\""; $category_option .= "<option value=\"$categories[$i]\"";
if ($category == $ca_name) { if ($category == $ca_name) {
@ -31,14 +31,12 @@ if($is_category && $board['bo_category_list']){
} }
$parent_type = $board['bo_1'] ? $board['bo_1'] : "오리지널"; $parent_type = $board['bo_1'] ? $board['bo_1'] : "오리지널";
?> ?>
<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 ?>">
@ -85,14 +83,14 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
?> ?>
<div class="board-write theme-box"> <div class="board-write theme-box">
<?if($option){?> <?php if ($option) { ?>
<dl> <dl>
<dt>옵션</dt> <dt>옵션</dt>
<dd><?php echo $option ?></dd> <dd><?php echo $option ?></dd>
</dl> </dl>
<?}?> <?php } ?>
<? if($is_category){?> <?php if ($is_category) { ?>
<dl> <dl>
<dt style="line-height:150%;">카테고리</dt> <dt style="line-height:150%;">카테고리</dt>
<dd><select name="ca_name" id="ca_name" required class="required"> <dd><select name="ca_name" id="ca_name" required class="required">
@ -101,44 +99,53 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
</select> </select>
</dd> </dd>
</dl> </dl>
<?}?> <?php } ?>
<dl> <dl>
<dt>이미지</dt> <dt>이미지</dt>
<dd> <dd>
<div class="files"> <div class="files">
<div class="sub"><span class="sub_tit">전신</span> <div class="sub"><span class="sub_tit">전신</span>
<input type="file" name="bf_file[0]" title="전신 등록 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input full"> <input type="file" name="bf_file[0]" title="전신 등록 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능"
class="frm_file frm_input full">
<input type="hidden" name="wr_1" value="<?= $w == 'u' ? $write['wr_1'] : "" ?>"> <input type="hidden" name="wr_1" value="<?= $w == 'u' ? $write['wr_1'] : "" ?>">
<?if($w=='u' && $write['wr_1']){?> <?php if ($w == 'u' && $write['wr_1']) { ?>
<a href="<?= $write['wr_1'] ?>" class="ui-btn" target="_blank">전신 확인</a> <a href="<?= $write['wr_1'] ?>" class="ui-btn" target="_blank">전신 확인</a>
<input type="checkbox" id="bf_file_del0" name="bf_file_del[0]" value="wr_1"> <label for="bf_file_del0"> 등록된 전신 삭제</label><?}?> <input type="checkbox" id="bf_file_del0" name="bf_file_del[0]" value="wr_1"> <label for="bf_file_del0">
<label for="wr_8_1" class="label-right"><input type="radio" value="wr_1" name="wr_8" id="wr_8_1" class="wr_8" <?=($write['wr_8']=='wr_1'||($board['bo_upload_count']=='1'&& ($w!='u' || !$write['wr_8']))) ? "checked" : "";?>> 전신을 썸네일로 사용&nbsp;&nbsp;</label> 등록된 전신 삭제</label><?php } ?>
<div id="crop" <?if($write['wr_8']!='wr_1'&&!($board['bo_upload_count']=='1'&& ($w!='u' || !$write['wr_8']))){?>style="display:none;"<?}?>><span class="sub_tit">크롭 지점</span> <label for="wr_8_1" class="label-right"><input type="radio" value="wr_1" name="wr_8" id="wr_8_1"
X (왼쪽에서부터) <input type="text" name="wr_width" value="<?=$write['wr_width']?>" class="frm_input small"> px / class="wr_8" <?= ($write['wr_8'] == 'wr_1' || ($board['bo_upload_count'] == '1' && ($w != 'u' || !$write['wr_8']))) ? "checked" : ""; ?>> 전신을 썸네일로 사용&nbsp;&nbsp;</label>
Y (위에서부터) <input type="text" name="wr_height" value="<?=$write['wr_height']?>" class="frm_input small"> px</p> <div id="crop" <?php if ($write['wr_8'] != 'wr_1' && !($board['bo_upload_count'] == '1' && ($w != 'u' || !$write['wr_8']))) { ?>style="display:none;" <?php } ?>><span class="sub_tit">크롭 지점</span>
X (왼쪽에서부터) <input type="text" name="wr_width" value="<?= $write['wr_width'] ?>" class="frm_input small">
px /
Y (위에서부터) <input type="text" name="wr_height" value="<?= $write['wr_height'] ?>" class="frm_input small">
px</p>
<?= help("* 전신을 썸네일로 사용할 경우 크롭지점을 설정합니다. 왼쪽에서부터 몇픽셀을, 위에서부터 몇픽셀을 잘라낼 것인지 숫자만 적어주세요. X지점이 0일경우 가운데로 맞춰집니다.") ?> <?= help("* 전신을 썸네일로 사용할 경우 크롭지점을 설정합니다. 왼쪽에서부터 몇픽셀을, 위에서부터 몇픽셀을 잘라낼 것인지 숫자만 적어주세요. X지점이 0일경우 가운데로 맞춰집니다.") ?>
</div> </div>
</div> </div>
<?if($board['bo_upload_count']>1){?><div class="sub"><span class="sub_tit">두상</span> <?php if ($board['bo_upload_count'] > 1) { ?>
<input type="file" name="bf_file[1]" title="두상 등록 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input full"> <div class="sub"><span class="sub_tit">두상</span>
<input type="file" name="bf_file[1]" title="두상 등록 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능"
class="frm_file frm_input full">
<input type="hidden" name="wr_2" value="<?= $w == 'u' ? $write['wr_2'] : "" ?>"> <input type="hidden" name="wr_2" value="<?= $w == 'u' ? $write['wr_2'] : "" ?>">
<?if($w=='u' && $write['wr_2']){?> <?php if ($w == 'u' && $write['wr_2']) { ?>
<a href="<?= $write['wr_2'] ?>" class="ui-btn" target="_blank">두상 확인</a> <a href="<?= $write['wr_2'] ?>" class="ui-btn" target="_blank">두상 확인</a>
<input type="checkbox" id="bf_file_del1" name="bf_file_del[1]" value="wr_2"> <label for="bf_file_del1"> 등록된 두상 삭제</label><?}?> <input type="checkbox" id="bf_file_del1" name="bf_file_del[1]" value="wr_2"> <label for="bf_file_del1">
<label class="label-right" for="wr_8_2"><input type="radio" value="wr_2" name="wr_8" class="wr_8" id="wr_8_2" <?=($write['wr_8']=='wr_2'||($board['bo_upload_count']>1 && ($w!='u' || !$write['wr_8']))) ? "checked" : "";?>> 두상을 썸네일로 사용&nbsp;&nbsp;</label> 등록된 두상 삭제</label><?php } ?>
<label class="label-right" for="wr_8_2"><input type="radio" value="wr_2" name="wr_8" class="wr_8"
id="wr_8_2" <?= ($write['wr_8'] == 'wr_2' || ($board['bo_upload_count'] > 1 && ($w != 'u' || !$write['wr_8']))) ? "checked" : ""; ?>> 두상을 썸네일로 사용&nbsp;&nbsp;</label>
<?= help("* 본문에는 출력되지 않습니다. 썸네일 사이즈와 다를 경우 사이즈에 맞게 늘어나거나 줄어듭니다.") ?> <?= help("* 본문에는 출력되지 않습니다. 썸네일 사이즈와 다를 경우 사이즈에 맞게 늘어나거나 줄어듭니다.") ?>
</div> </div>
<?}?> <?php } ?>
<!-- <!--
<?if($board['bo_upload_count']>2){?><div class="sub"><span class="sub_tit">흉상/기타</span> <?php if ($board['bo_upload_count'] > 2) { ?><div class="sub"><span class="sub_tit">흉상/기타</span>
<input type="file" name="bf_file[2]" title="흉상 등록 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input full"> <input type="file" name="bf_file[2]" title="흉상 등록 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input full">
<input type="hidden" name="wr_3" value="<?= $w == 'u' ? $write['wr_3'] : "" ?>"> <input type="hidden" name="wr_3" value="<?= $w == 'u' ? $write['wr_3'] : "" ?>">
<?if($w=='u' && $write['wr_3']){?> <?php if ($w == 'u' && $write['wr_3']) { ?>
<a href="<?= $write['wr_3'] ?>" class="ui-btn" target="_blank">흉상 확인</a> <a href="<?= $write['wr_3'] ?>" class="ui-btn" target="_blank">흉상 확인</a>
<input type="checkbox" id="bf_file_del2" name="bf_file_del[2]" value="wr_3"> <label for="bf_file_del2"> 등록된 흉상 삭제</label><?}?> <input type="checkbox" id="bf_file_del2" name="bf_file_del[2]" value="wr_3"> <label for="bf_file_del2"> 등록된 흉상 삭제</label><?php } ?>
<label for="wr_8_3" class="label-right"><input type="radio" value="wr_3" name="wr_8" class="wr_8" id="wr_8_3" <?= ($write['wr_8'] == 'wr_3') ? "checked" : ""; ?>>흉상을 썸네일로 사용&nbsp;&nbsp;</label> <label for="wr_8_3" class="label-right"><input type="radio" value="wr_3" name="wr_8" class="wr_8" id="wr_8_3" <?= ($write['wr_8'] == 'wr_3') ? "checked" : ""; ?>>흉상을 썸네일로 사용&nbsp;&nbsp;</label>
</div> </div>
<?}?> <?php } ?>
--> -->
<?= help("* 현재 설정된 썸네일 사이즈: {$board['bo_gallery_width']} x {$board['bo_gallery_height']}\n* 슬라이드형 목록 스타일에서는 가로사이즈를 사용하지 않습니다.") ?> <?= help("* 현재 설정된 썸네일 사이즈: {$board['bo_gallery_width']} x {$board['bo_gallery_height']}\n* 슬라이드형 목록 스타일에서는 가로사이즈를 사용하지 않습니다.") ?>
</div> </div>
@ -146,36 +153,45 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
</dl> </dl>
<dl> <dl>
<dt>캐릭터명</dt> <dt>캐릭터명</dt>
<dd><div class="wr_subject" style="margin-top: 20px;"> <dd>
<input type="text" name="wr_subject" value="<?php echo $write['wr_subject'] ?>" class="frm_input full required" size="50" maxlength="255" required> <div class="wr_subject" style="margin-top: 20px;">
<input type="text" name="wr_subject" value="<?php echo $write['wr_subject'] ?>"
class="frm_input full required" size="50" maxlength="255" required>
<?= help("본문에는 출력되지 않습니다.") ?> <?= help("본문에는 출력되지 않습니다.") ?>
</div></dd> </div>
</dd>
</dl> </dl>
<? //오리지널캐릭터 아이디값 구함 <?php //오리지널캐릭터 아이디값 구함
if ($w == 'r' || $write['wr_reply']) { if ($w == 'r' || $write['wr_reply']) {
$uid = $write['wr_9']; $uid = $write['wr_9'];
} } else {
else {
$uid = $wr_id; $uid = $wr_id;
} }
?> ?>
<input type="hidden" name="wr_9" value="<?= $uid ?>"> <input type="hidden" name="wr_9" value="<?= $uid ?>">
<dl> <dl>
<dt>구분</dt> <dt>구분</dt>
<dd><div class="wr_type"> <dd>
<input type="text" name="wr_type" value="<?=$w=='u' ? $write['wr_type'] : "";?>" <?if($w=='r' || $write['wr_reply']) echo "required";?>> <?if($w!='r' && $write['wr_reply']==''){?> <div class="wr_type">
<input type="checkbox" value="1" name="wr_7" <?=($write['wr_7']&&$w!='r') ? "checked":""?>> 프로필 AU 목록에 '<?=$parent_type?>'로 표기<?}?> <input type="text" name="wr_type" value="<?= $w == 'u' ? $write['wr_type'] : ""; ?>" <?php if ($w == 'r' || $write['wr_reply'])
echo "required"; ?>> <?php if ($w != 'r' && $write['wr_reply'] == '') { ?>
<input type="checkbox" value="1" name="wr_7" <?= ($write['wr_7'] && $w != 'r') ? "checked" : "" ?>> 프로필 AU 목록에
'<?= $parent_type ?>' 표기<?php } ?>
<?= help("커뮤 명칭, AU 명칭 등 구분용으로 사용할 내용을 입력해주세요.\n목록에 노출되는 프로필(오리지널)일 경우 출력되는 항목이 있습니다.(배포글 참조)") ?> <?= help("커뮤 명칭, AU 명칭 등 구분용으로 사용할 내용을 입력해주세요.\n목록에 노출되는 프로필(오리지널)일 경우 출력되는 항목이 있습니다.(배포글 참조)") ?>
</div> </div>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>설정 내용</dt> <dt>설정 내용</dt>
<dd><div class="wr_content"> <dd>
<?if(!$board['bo_use_dhtml_editor']){echo help("* 게시판에서 dhtml 에디터 사용을 체크하시는것을 추천합니다.");}?> <div class="wr_content">
<?php if (!$board['bo_use_dhtml_editor']) {
echo help("* 게시판에서 dhtml 에디터 사용을 체크하시는것을 추천합니다.");
} ?>
<?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) { ?>
@ -187,7 +203,8 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
</dl> </dl>
<dl> <dl>
<dt>순서</dt> <dt>순서</dt>
<dd><div class="wr_10"> <dd>
<div class="wr_10">
<input type="text" name="wr_10" value="<?= $w == 'u' ? $write['wr_10'] : ""; ?>"> <input type="text" name="wr_10" value="<?= $w == 'u' ? $write['wr_10'] : ""; ?>">
<?= help("* 순서는 1이 가장 처음으로 캐릭터 목록상에서는 숫자가 클수록 최신(가장 왼쪽), AU 목록상에서는 숫자가 클수록 오리지널에서 순서가 멀어집니다. \n순서를 정하지 않을 경우 먼저 등록한 순서대로 정렬됩니다."); ?> <?= help("* 순서는 1이 가장 처음으로 캐릭터 목록상에서는 숫자가 클수록 최신(가장 왼쪽), AU 목록상에서는 숫자가 클수록 오리지널에서 순서가 멀어집니다. \n순서를 정하지 않을 경우 먼저 등록한 순서대로 정렬됩니다."); ?>
</div> </div>
@ -218,8 +235,7 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
<?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)
@ -231,8 +247,7 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
obj.value = ""; obj.value = "";
} }
function fwrite_submit(f) function fwrite_submit(f) {
{
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?> <?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
var subject = ""; var subject = "";

View file

@ -1,11 +1,16 @@
<?php <?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 /**
* @var string|int $bf_content
*/
if (!defined("_GNUBOARD_"))
exit;
$customer_sql = ""; $customer_sql = "";
$temp_wr_id = $comment_id; $temp_wr_id = $comment_id;
$wr_num = $wr['wr_num']; $wr_num = $wr['wr_num'];
if(!$wr_num) $wr_num = $comment['wr_num']; if (!$wr_num)
include_once($board_skin_path.'/upload_file.php'); $wr_num = $comment['wr_num'];
include_once $board_skin_path . '/upload_file.php';
if ($_FILES['bf_file']['name']) { if ($_FILES['bf_file']['name']) {
$files = upload_c_file('bf_file', $bo_table); $files = upload_c_file('bf_file', $bo_table);
$file = sql_fetch("select * from {$g5['board_file_table']} where bo_table='{$bo_table}' and wr_id='{$comment_id}' and bf_no='0'"); $file = sql_fetch("select * from {$g5['board_file_table']} where bo_table='{$bo_table}' and wr_id='{$comment_id}' and bf_no='0'");
@ -41,4 +46,3 @@ sql_query("update {$g5['board_file_table']}
bf_no = '0' bf_no = '0'
"); ");
} }
?>

View file

@ -1,37 +1,42 @@
<?php <?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if (!defined("_GNUBOARD_"))
exit;
$customer_sql = ""; $customer_sql = "";
$temp_wr_id = $wr_id; $temp_wr_id = $wr_id;
if($w=='' and !$wr_9) $customer_sql .=",wr_9='{$wr_id}'"; if ($w == '' and !$wr_9)
$customer_sql .= ",wr_9='{$wr_id}'";
if ($w == 'u' && $bf_file_del) { if ($w == 'u' && $bf_file_del) {
for ($i = 0; $i < $board['bo_upload_count']; $i++) { for ($i = 0; $i < $board['bo_upload_count']; $i++) {
if(!$bf_file_del[$i]) continue; if (!$bf_file_del[$i])
continue;
sql_query("update {$write_table} set {$bf_file_del[$i]}='' where wr_id='{$wr_id}'"); sql_query("update {$write_table} set {$bf_file_del[$i]}='' where wr_id='{$wr_id}'");
if($bf_file_del[$i]=='wr_1') $common_line="and bf_no='0'";
if($bf_file_del[$i]=='wr_2') $common_line="and bf_no='1'"; if ($bf_file_del[$i] == 'wr_1')
if($bf_file_del[$i]=='wr_3') $common_line="and bf_no='2'"; $common_line = "and bf_no='0'";
if ($bf_file_del[$i] == 'wr_2')
$common_line = "and bf_no='1'";
if ($bf_file_del[$i] == 'wr_3')
$common_line = "and bf_no='2'";
sql_query("delete from {$g5['board_file_table']} where wr_id='{$wr_id}' and bo_table='{$bo_table}' {$common_line}"); sql_query("delete from {$g5['board_file_table']} where wr_id='{$wr_id}' and bo_table='{$bo_table}' {$common_line}");
} }
} }
for ($i = 0; $i < $board['bo_upload_count']; $i++) { for ($i = 0; $i < $board['bo_upload_count']; $i++) {
if ($_FILES['bf_file']['name'][$i]) { if ($_FILES['bf_file']['name'][$i]) {
$uimg=sql_fetch("select bf_file from {$g5['board_file_table']} where bo_table='{$bo_table}' and wr_id='{$wr_id}' and bf_no='{$i}'"); $uimg = sql_fetch("SELECT bf_file FROM {$g5['board_file_table']} WHERE bo_table='{$bo_table}' AND wr_id='{$wr_id}' AND bf_no='{$i}'");
$ulink = G5_DATA_URL . '/file/' . $bo_table . '/' . $uimg['bf_file']; $ulink = G5_DATA_URL . '/file/' . $bo_table . '/' . $uimg['bf_file'];
$uid = $i + 1; $uid = $i + 1;
$customer_sql .= ", wr_{$uid}='{$ulink}'"; $customer_sql .= ", wr_{$uid}='{$ulink}'";
if ($i == '0') { if ($i == '0') {
sql_query("update {$g5['board_file_table']} set bf_content='기본전신' where wr_id='{$wr_id}' and bf_no='0'"); sql_query("UPDATE {$g5['board_file_table']} SET bf_content='기본전신' WHERE wr_id='{$wr_id}' AND bf_no='0'");
} }
} }
} }
sql_query(" update {$write_table} sql_query("UPDATE {$write_table}
set wr_id = '{$wr_id}' SET wr_id = '{$wr_id}'
{$customer_sql} {$customer_sql}
where wr_id = '{$wr_id}' "); WHERE wr_id = '{$wr_id}' ");
?>