update
This commit is contained in:
parent
99b93b3da9
commit
e9f641c35d
11 changed files with 1103 additions and 1063 deletions
|
|
@ -1,4 +1,2 @@
|
||||||
<?php
|
<?php
|
||||||
include_once('../../../common.php');
|
include_once '../../../common.php';
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
||||||
235
list.skin.php
235
list.skin.php
|
|
@ -1,132 +1,146 @@
|
||||||
<?
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?>
|
if (!defined('_GNUBOARD_'))
|
||||||
<?if($board['bo_4']==2) {
|
exit; ?>
|
||||||
add_stylesheet('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css">', 0); ?>
|
<?php if ($board['bo_4'] == 2) {
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/js/swiper.min.js"></script>
|
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>
|
||||||
<?
|
<?php } ?>
|
||||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
<?php
|
||||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||||
|
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))
|
||||||
$list_item=sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1 desc, wr_num");
|
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");
|
||||||
|
|
||||||
for($k=0;$row=sql_fetch_array($list_item);$k++){
|
for ($k = 0; $row = sql_fetch_array($list_item); $k++) {
|
||||||
$lists[$k]=get_list($row,$board,$board_skin_url);
|
$lists[$k] = get_list($row, $board, $board_skin_url);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<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 } ?>
|
||||||
if($board['bo_2']){
|
<ul class="swiper-wrapper">
|
||||||
$margins=explode(',',$board['bo_2']);
|
<?php
|
||||||
$margin=trim($margins[0]).'px';
|
if ($board['bo_2']) {
|
||||||
if($margins[1]) $margin.=" ".trim($margins[1]).'px';
|
$margins = explode(',', $board['bo_2']);
|
||||||
$slide_space=trim($margins[0]);
|
$margin = trim($margins[0]) . 'px';
|
||||||
|
if ($margins[1])
|
||||||
|
$margin .= " " . trim($margins[1]) . 'px';
|
||||||
|
$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) {
|
||||||
if($lists[$i]['wr_8']=='wr_1' || $lists[$i]['wr_8']==''){
|
if ($lists[$i]['wr_8'] == 'wr_1' || $lists[$i]['wr_8'] == '') {
|
||||||
if($lists[$i]['wr_width']=='0')
|
if ($lists[$i]['wr_width'] == '0')
|
||||||
$position="center top";
|
$position = "center top";
|
||||||
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{
|
else
|
||||||
$idx=$lists[$i]['wr_8'];
|
$thumb = "";
|
||||||
$thumb=$lists[$i][$idx];
|
} else {
|
||||||
$position="center";
|
$idx = $lists[$i]['wr_8'];
|
||||||
|
$thumb = $lists[$i][$idx];
|
||||||
|
$position = "center";
|
||||||
}
|
}
|
||||||
}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'] ?>
|
||||||
</strong>
|
</strong>
|
||||||
<span class="type">
|
<span class="type">
|
||||||
<?=$lists[$i]['wr_type']?>
|
<?= $lists[$i]['wr_type'] ?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<?}?>
|
<?php } ?>
|
||||||
</li><? }}?></ul>
|
</li><?php }
|
||||||
</div>
|
} ?>
|
||||||
<?if($board['bo_4']==2){?>
|
</ul>
|
||||||
<div class="swiper-button-next" ><a href="javascript:void(0);">></a></div>
|
|
||||||
<div class="swiper-button-prev" ><a href="javascript:void(0);"><</a></div>
|
|
||||||
<?}?>
|
|
||||||
<?}?>
|
|
||||||
<? if ($list_href || $is_checkbox || $write_href) { ?>
|
|
||||||
<div class="bo_fx txt-right" style="padding: 20px 0;">
|
|
||||||
<? if ($list_href || $write_href) { ?>
|
|
||||||
<? if ($list_href) { ?><a href="<? echo $list_href ?>" class="ui-btn">목록</a><? } ?>
|
|
||||||
<? if ($write_href) { ?>
|
|
||||||
<a href="<? echo $write_href ?>" class="ui-btn point">캐릭터 등록</a><? } ?>
|
|
||||||
<? } ?>
|
|
||||||
<? 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="<?=$admin_href?>" class="ui-btn admin">관리자</a><?}?>
|
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<?php if ($board['bo_4'] == 2) { ?>
|
||||||
|
<div class="swiper-button-next"><a href="javascript:void(0);">></a></div>
|
||||||
|
<div class="swiper-button-prev"><a href="javascript:void(0);"><</a></div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($list_href || $is_checkbox || $write_href) { ?>
|
||||||
|
<div class="bo_fx txt-right" style="padding: 20px 0;">
|
||||||
|
<?php if ($list_href || $write_href) { ?>
|
||||||
|
<?php if ($list_href) { ?><a href="<?php echo $list_href ?>" class="ui-btn">목록</a><?php } ?>
|
||||||
|
<?php if ($write_href) { ?>
|
||||||
|
<a href="<?php echo $write_href ?>" class="ui-btn point">캐릭터 등록</a><?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?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="<?= $admin_href ?>" class="ui-btn admin">관리자</a><?php } ?>
|
||||||
|
</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 ?>;
|
||||||
var loop = <?=$slide_loop?>;
|
var loop = <?= $slide_loop ?>;
|
||||||
var s_w;
|
var s_w;
|
||||||
var temp=<?=$bo_gallery_cols?>;
|
var temp = <?= $bo_gallery_cols ?>;
|
||||||
if(win<380) s_w=2;
|
if (win < 380) s_w = 2;
|
||||||
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,
|
||||||
|
|
@ -146,16 +160,13 @@ 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?>;
|
if (win < 380) s_w = 2;
|
||||||
if(win<380) s_w=2;
|
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
21
readme.md
Normal 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부터 사용 가능)
|
||||||
|
```
|
||||||
|
|
@ -1,57 +1,61 @@
|
||||||
<?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)
|
||||||
alert('관리자만 접근 가능합니다.');
|
alert('관리자만 접근 가능합니다.');
|
||||||
if($is_admin){
|
if ($is_admin) {
|
||||||
?>
|
?>
|
||||||
<form action="<?=$board_skin_url?>/set_order_update.php" name="orders" method="post" autocomplete="off">
|
<form action="<?= $board_skin_url ?>/set_order_update.php" name="orders" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
<input type="hidden" name="bo_table" value="<?= $bo_table ?>">
|
||||||
<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++) { ?>
|
||||||
<li class="theme-box" style="margin:1px;line-height:30px;padding:0;clear:both;overflow:hidden;">
|
<li class="theme-box" style="margin:1px;line-height:30px;padding:0;clear:both;overflow:hidden;">
|
||||||
<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'] ?>"
|
||||||
<select name="category[<?=$row['wr_id']?>]" style="float:right;">
|
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;">
|
||||||
<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>
|
||||||
<input type="hidden" name="idx[]" value="<?=$row2['wr_id']?>">
|
<span style="padding:0 5px;float:right;"><input type="text" value="<?= $row2['wr_10'] ?>"
|
||||||
<input type="hidden" name="parents[<?=$row2['wr_id']?>]" value="<?=$row['wr_parent']?>">
|
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="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 } ?>
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
<?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];
|
||||||
sql_query("update {$write_table}
|
sql_query("update {$write_table}
|
||||||
set wr_10 = '{$order[$k]}',
|
set wr_10 = '{$order[$k]}',
|
||||||
wr_9 = '{$parents[$k]}',
|
wr_9 = '{$parents[$k]}',
|
||||||
wr_type = '{$type[$k]}'
|
wr_type = '{$type[$k]}'
|
||||||
where wr_id='{$k}'
|
where wr_id='{$k}'
|
||||||
");
|
");
|
||||||
if($board['bo_use_category']&&$board['bo_category_list'] && $category[$k]!=''){
|
if ($board['bo_use_category'] && $board['bo_category_list'] && $category[$k] != '') {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,47 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
if (!defined("_GNUBOARD_"))
|
||||||
function upload_c_file($name,$table){
|
exit;
|
||||||
|
|
||||||
$files=array();
|
function upload_c_file($name, $table)
|
||||||
$tmp_file=$_FILES[$name]['tmp_name'];
|
{
|
||||||
$filesize=$_FILES[$name]['size'];
|
global $config, $bo_table;
|
||||||
$filename=$_FILES[$name]['name'];
|
|
||||||
$filename=get_safe_filename($filename);
|
$files = array();
|
||||||
|
$tmp_file = $_FILES[$name]['tmp_name'];
|
||||||
|
$filesize = $_FILES[$name]['size'];
|
||||||
|
$filename = $_FILES[$name]['name'];
|
||||||
|
$filename = get_safe_filename($filename);
|
||||||
|
|
||||||
$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 {
|
||||||
$files['img']=$timg;
|
$files['img'] = $timg;
|
||||||
$files['source']=$filename;
|
$files['source'] = $filename;
|
||||||
$files['size']=$filesize;
|
$files['size'] = $filesize;
|
||||||
|
|
||||||
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
|
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
|
||||||
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||||
|
|
||||||
$chars_array = array_merge(range(0,9), range('a','z'), range('A','Z'));
|
$chars_array = array_merge(range(0, 9), range('a', 'z'), range('A', 'Z'));
|
||||||
shuffle($chars_array);
|
shuffle($chars_array);
|
||||||
$shuffle = implode('', $chars_array);
|
$shuffle = implode('', $chars_array);
|
||||||
|
|
||||||
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
|
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
|
||||||
$file_name = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
|
$file_name = abs(ip2long($_SERVER['REMOTE_ADDR'])) . '_' . substr($shuffle, 0, 8) . '_' . replace_filename($filename);
|
||||||
|
|
||||||
$dest_file = G5_DATA_PATH.'/file/'.$table.'/'.$file_name;
|
$dest_file = G5_DATA_PATH . '/file/' . $table . '/' . $file_name;
|
||||||
|
|
||||||
@move_uploaded_file($tmp_file, $dest_file);
|
@move_uploaded_file($tmp_file, $dest_file);
|
||||||
@chmod($dest_file, G5_FILE_PERMISSION);
|
@chmod($dest_file, G5_FILE_PERMISSION);
|
||||||
|
|
||||||
$files['link']=G5_DATA_URL.'/file/'.$table.'/'.$file_name;
|
$files['link'] = G5_DATA_URL . '/file/' . $table . '/' . $file_name;
|
||||||
$files['name']=$file_name;
|
$files['name'] = $file_name;
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$files['source'] = addslashes($files['source']);
|
$files['source'] = addslashes($files['source']);
|
||||||
}
|
}
|
||||||
|
|
@ -43,4 +49,3 @@ function upload_c_file($name,$table){
|
||||||
return $files;
|
return $files;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
|
||||||
200
view.skin.php
200
view.skin.php
|
|
@ -1,151 +1,163 @@
|
||||||
<?
|
<?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)
|
||||||
$parent_type=$board['bo_1']?$board['bo_1']:'오리지널';
|
$width = "100%";
|
||||||
|
$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");
|
||||||
$or_link = './board.php?bo_table='.$bo_table.'&wr_id='.$view['wr_9'].$qstr; // @211117
|
$or_link = './board.php?bo_table=' . $bo_table . '&wr_id=' . $view['wr_9'] . $qstr; // @211117
|
||||||
$parent=sql_fetch("select wr_id, wr_type, wr_7 from {$write_table} where wr_id='{$view['wr_9']}' and wr_is_comment=0");
|
$parent = sql_fetch("select wr_id, wr_type, wr_7 from {$write_table} where wr_id='{$view['wr_9']}' and wr_is_comment=0");
|
||||||
$cl_no=sql_query("select * from {$write_table} where wr_is_comment=1 and wr_parent='{$wr_id}' and wr_content='옷장' order by wr_10*1 ");
|
$cl_no = sql_query("select * from {$write_table} where wr_is_comment=1 and wr_parent='{$wr_id}' and wr_content='옷장' order by wr_10*1 ");
|
||||||
$cl=array();
|
$cl = array();
|
||||||
$idx=0;
|
$idx = 0;
|
||||||
for($i=0;$clo=sql_fetch_array($cl_no);$i++){
|
for ($i = 0; $clo = sql_fetch_array($cl_no); $i++) {
|
||||||
$cl[$idx]=$clo;
|
$cl[$idx] = $clo;
|
||||||
$idx++;
|
$idx++;
|
||||||
}?>
|
} ?>
|
||||||
<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'];
|
||||||
?>
|
?>
|
||||||
<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>
|
||||||
$link = './board.php?bo_table='.$bo_table.'&wr_id='.$re['wr_id'].$qstr;?>
|
</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 for ($k = 0; $re = sql_fetch_array($relate); $k++) {
|
||||||
<?}?>
|
$link = './board.php?bo_table=' . $bo_table . '&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>
|
||||||
|
<?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 } ?>
|
||||||
for($h=0;$h<count($cl);$h++){
|
<?php
|
||||||
$file=get_file($bo_table,$cl[$h]['wr_id']);
|
for ($h = 0; $h < count($cl); $h++) {
|
||||||
$file_link=G5_DATA_URL.'/file/'.$bo_table.'/'.$file[0]['file'];
|
$file = get_file($bo_table, $cl[$h]['wr_id']);
|
||||||
|
$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>
|
||||||
</div>
|
</div>
|
||||||
<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();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<!-- } 링크 버튼 끝 -->
|
<!-- } 링크 버튼 끝 -->
|
||||||
</div>
|
</div>
|
||||||
</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 () {
|
||||||
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#clo_link a").click(function(){
|
$("#clo_link a").click(function () {
|
||||||
var idx=$(this).attr("href");
|
var idx = $(this).attr("href");
|
||||||
$(".clo").addClass("txt-default");
|
$(".clo").addClass("txt-default");
|
||||||
$(this).removeClass("txt-default");
|
$(this).removeClass("txt-default");
|
||||||
$(".body-img").fadeOut(300);
|
$(".body-img").fadeOut(300);
|
||||||
$(idx).delay(330).fadeIn(300);
|
$(idx).delay(330).fadeIn(300);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 레이아웃 셋팅 - 반응형
|
// 레이아웃 셋팅 - 반응형
|
||||||
viewer_setting();
|
viewer_setting();
|
||||||
|
|
||||||
// 화면 사이즈가 변경 될 시, 레이아웃 셋팅 실행
|
// 화면 사이즈가 변경 될 시, 레이아웃 셋팅 실행
|
||||||
|
|
||||||
$(window).resize(function() { viewer_setting(); });
|
$(window).resize(function () { viewer_setting(); });
|
||||||
|
|
||||||
function viewer_setting() {
|
function viewer_setting() {
|
||||||
var h=$("header").outerHeight();
|
var h = $("header").outerHeight();
|
||||||
var f=$("footer").outerHeight();
|
var f = $("footer").outerHeight();
|
||||||
var w=$(window).height();
|
var w = $(window).height();
|
||||||
var off=$(".board-viewer").offset().top;
|
var off = $(".board-viewer").offset().top;
|
||||||
if(h>=w) h=0;
|
if (h >= w) h = 0;
|
||||||
|
|
||||||
var content_height=w-f-off;
|
var content_height = w - f - off;
|
||||||
|
|
||||||
var allow_body=<?=$allow_body?>;
|
var allow_body = <?= $allow_body ?>;
|
||||||
var content_width =<?=$content_width?>;
|
var content_width = <?= $content_width ?>;
|
||||||
var viewer_width= $('.board-viewer').outerWidth();
|
var viewer_width = $('.board-viewer').outerWidth();
|
||||||
var body_width = Math.floor(viewer_width - content_width );
|
var body_width = Math.floor(viewer_width - content_width);
|
||||||
if(body_width<allow_body) {
|
if (body_width < allow_body) {
|
||||||
$('.board-viewer').addClass('clear');
|
$('.board-viewer').addClass('clear');
|
||||||
} else {
|
} else {
|
||||||
$('.board-viewer').removeClass('clear').css('height',content_height);
|
$('.board-viewer').removeClass('clear').css('height', content_height);
|
||||||
$('#body_img').css('width',body_width+'px');
|
$('#body_img').css('width', body_width + 'px');
|
||||||
$('.board-viewer .contents').css('width',content_width+'px');
|
$('.board-viewer .contents').css('width', content_width + 'px');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<!-- } 게시글 읽기 끝 -->
|
<!-- } 게시글 읽기 끝 -->
|
||||||
|
|
@ -1,25 +1,27 @@
|
||||||
<?
|
<?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='옷장'");
|
||||||
?>
|
?>
|
||||||
<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,26 +30,25 @@ 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++) {
|
||||||
$co_list[$k]=explode('|',$co_links[$k]);
|
$co_list[$k] = explode('|', $co_links[$k]);
|
||||||
$c_link='<a href="'.$co_list[$k][1].'" class="ui-btn" target="_blank">'.$co_list[$k][0].'</a>';
|
$c_link = '<a href="' . $co_list[$k][1] . '" class="ui-btn" target="_blank">' . $co_list[$k][0] . '</a>';
|
||||||
echo $c_link;
|
echo $c_link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</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') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||||
$cmt = sql_fetch($sql);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||||
|
|
@ -55,56 +56,51 @@ if($member['mb_level']>=$board['bo_comment_level']){
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$c_wr_content = $cmt['wr_content'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
$c_edit_href = './board.php?' . $query_string . '&c_id=' . $comment_id . '&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 ?>"
|
||||||
<input type="hidden" id="save_cl_<?=$comment_id?>" name="bf_content" >
|
style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||||
<input type="hidden" id="save_order_<?=$comment_id?>" name="wr_10">
|
<input type="hidden" id="save_cl_<?= $comment_id ?>" name="bf_content">
|
||||||
|
<input type="hidden" id="save_order_<?= $comment_id ?>" name="wr_10">
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
</div>
|
||||||
</div>
|
<?php }
|
||||||
|
if ($view['mb_id'] == $member['mb_id']) {
|
||||||
<? }
|
if ($w == '')
|
||||||
if ($view['mb_id']==$member['mb_id']) {
|
|
||||||
if($w == '')
|
|
||||||
$w = 'c';
|
$w = 'c';
|
||||||
?>
|
?>
|
||||||
|
<div class="board-clothes-list board-comment-list">
|
||||||
<div class="board-clothes-list board-comment-list">
|
<?php if ($clo['cnt'] > 0) { ?>
|
||||||
<?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') {
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||||
$cmt = sql_fetch($sql);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||||
|
|
@ -113,68 +109,62 @@ 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()));
|
||||||
{
|
$cl['del_link'] = './delete_comment.php?bo_table=' . $bo_table . '&comment_id=' . $cl['wr_id'] . '&token=' . $token . '&page=' . $page . $qstr;
|
||||||
set_session('ss_delete_comment_'.$cl['wr_id'].'_token', $token = uniqid(time()));
|
|
||||||
$cl['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&comment_id='.$cl['wr_id'].'&token='.$token.'&page='.$page.$qstr;
|
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!$cl['mb_id']) {
|
if (!$cl['mb_id']) {
|
||||||
$cl['del_link'] = './password.php?w=x&bo_table='.$bo_table.'&comment_id='.$cl['wr_id'].'&page='.$page.$qstr;
|
$cl['del_link'] = './password.php?w=x&bo_table=' . $bo_table . '&comment_id=' . $cl['wr_id'] . '&page=' . $page . $qstr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_cl_w';
|
$c_edit_href = './board.php?' . $query_string . '&c_id=' . $comment_id . '&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>
|
<!-- 댓글 쓰기 시작 { -->
|
||||||
<!-- 댓글 쓰기 시작 { -->
|
<?php if ($cmt_link['cnt'] == 0) { ?>
|
||||||
<?if($cmt_link['cnt']==0) {?><p class="txt-left add"><a href="javascript:comment_box('', 'c','link');">▶ 로그 링크 추가</a></p><?}?>
|
<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()
|
||||||
var mx = parseInt($(this).attr("maxlength"))
|
var mx = parseInt($(this).attr("maxlength"))
|
||||||
if (str.length > mx) {
|
if (str.length > mx) {
|
||||||
|
|
@ -183,33 +173,28 @@ 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>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<?php if ($member['mb_level'] >= $board['bo_comment_level']) { ?>
|
||||||
|
<script>
|
||||||
|
var save_before = '';
|
||||||
|
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||||
|
|
||||||
</div>
|
function fviewcomment_submit(f) {
|
||||||
<?if($member['mb_level']>=$board['bo_comment_level']){?>
|
|
||||||
<script>
|
|
||||||
var save_before = '';
|
|
||||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
|
||||||
|
|
||||||
|
|
||||||
function fviewcomment_submit(f)
|
|
||||||
{
|
|
||||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||||
|
|
||||||
var subject = "";
|
var subject = "";
|
||||||
var content = "";
|
var content = "";
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: g5_bbs_url+"/ajax.filter.php",
|
url: g5_bbs_url + "/ajax.filter.php",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
"subject": "",
|
"subject": "",
|
||||||
|
|
@ -218,14 +203,14 @@ function fviewcomment_submit(f)
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
cache: false,
|
cache: false,
|
||||||
success: function(data, textStatus) {
|
success: function (data, textStatus) {
|
||||||
subject = data.subject;
|
subject = data.subject;
|
||||||
content = data.content;
|
content = data.content;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (content) {
|
if (content) {
|
||||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
alert("내용에 금지단어('" + content + "')가 포함되어있습니다");
|
||||||
f.wr_content.focus();
|
f.wr_content.focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -281,18 +258,16 @@ function fviewcomment_submit(f)
|
||||||
document.getElementById("btn_submit").disabled = "disabled";
|
document.getElementById("btn_submit").disabled = "disabled";
|
||||||
|
|
||||||
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 {
|
||||||
if(type=='clo')
|
if (type == 'clo')
|
||||||
el_id = 'edit_cl_' + comment_id;
|
el_id = 'edit_cl_' + comment_id;
|
||||||
else
|
else
|
||||||
el_id = 'edit_' + comment_id;
|
el_id = 'edit_' + comment_id;
|
||||||
|
|
@ -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,18 +286,17 @@ 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') {
|
||||||
document.getElementById('wr_content').value = '옷장';
|
document.getElementById('wr_content').value = '옷장';
|
||||||
document.getElementById('bf_content').value = document.getElementById('save_cl_' + comment_id).value;
|
document.getElementById('bf_content').value = document.getElementById('save_cl_' + comment_id).value;
|
||||||
document.getElementById('wr_10').value = document.getElementById('save_order_'+comment_id).value;
|
document.getElementById('wr_10').value = document.getElementById('save_order_' + 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');
|
||||||
if (document.getElementById('secret_comment_'+comment_id).value)
|
if (document.getElementById('secret_comment_' + comment_id).value)
|
||||||
document.getElementById('secret').checked = true;
|
document.getElementById('secret').checked = true;
|
||||||
else
|
else
|
||||||
document.getElementById('secret').checked = false;
|
document.getElementById('secret').checked = false;
|
||||||
|
|
@ -335,39 +307,36 @@ function comment_box(comment_id, work, type)
|
||||||
|
|
||||||
save_before = el_id;
|
save_before = el_id;
|
||||||
}
|
}
|
||||||
if(type=='clo'){
|
if (type == 'clo') {
|
||||||
$('#'+el_id+' #wr_content').hide();
|
$('#' + el_id + ' #wr_content').hide();
|
||||||
$('#'+el_id+' #bf_content, #'+el_id+' #bf_file, #'+el_id+' #wr_10').show();
|
$('#' + el_id + ' #bf_content, #' + el_id + ' #bf_file, #' + el_id + ' #wr_10').show();
|
||||||
if(work=='c'){
|
if (work == 'c') {
|
||||||
$('#'+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('');
|
}
|
||||||
|
$('#' + el_id + ' #bf_content, #' + el_id + ' #bf_file, #' + el_id + ' #wr_10').hide();
|
||||||
|
$('#' + el_id + ' #wr_content').show();
|
||||||
}
|
}
|
||||||
$('#'+el_id+' #bf_content, #'+el_id+' #bf_file, #'+el_id+' #wr_10').hide();
|
|
||||||
$('#'+el_id+' #wr_content').show();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
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>
|
||||||
209
write.skin.php
209
write.skin.php
|
|
@ -1,26 +1,26 @@
|
||||||
<?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'] : '오리지널';
|
||||||
|
|
||||||
if($w=='' || $w=='r'){
|
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) {
|
||||||
|
|
@ -30,15 +30,13 @@ 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 ?>">
|
||||||
|
|
@ -64,20 +62,20 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
|
||||||
if ($is_dhtml_editor) {
|
if ($is_dhtml_editor) {
|
||||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||||
} else {
|
} else {
|
||||||
$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';
|
$option .= "\n" . '<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="' . $html_value . '" ' . $html_checked . '>' . "\n" . '<label for="html">html</label>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_secret) {
|
if ($is_secret) {
|
||||||
if ($is_admin || $is_secret==1) {
|
if ($is_admin || $is_secret == 1) {
|
||||||
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
|
$option .= "\n" . '<input type="checkbox" id="secret" name="secret" value="secret" ' . $secret_checked . '>' . "\n" . '<label for="secret">비밀글</label>';
|
||||||
} else {
|
} else {
|
||||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_mail) {
|
if ($is_mail) {
|
||||||
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
|
$option .= "\n" . '<input type="checkbox" id="mail" name="mail" value="mail" ' . $recv_email_checked . '>' . "\n" . '<label for="mail">답변메일받기</label>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,100 +83,118 @@ $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">
|
||||||
<option value="">선택하세요</option>
|
<option value="">선택하세요</option>
|
||||||
<?php echo $category_option ?>
|
<?php echo $category_option ?>
|
||||||
</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 ?> 이하만 업로드 가능"
|
||||||
<input type="hidden" name="wr_1" value="<?=$w=='u' ? $write['wr_1']: ""?>">
|
class="frm_file frm_input full">
|
||||||
<?if($w=='u' && $write['wr_1']){?>
|
<input type="hidden" name="wr_1" value="<?= $w == 'u' ? $write['wr_1'] : "" ?>">
|
||||||
<a href="<?=$write['wr_1']?>" class="ui-btn" target="_blank">전신 확인</a>
|
<?php if ($w == 'u' && $write['wr_1']) { ?>
|
||||||
<input type="checkbox" id="bf_file_del0" name="bf_file_del[0]" value="wr_1"> <label for="bf_file_del0"> 등록된 전신 삭제</label><?}?>
|
<a href="<?= $write['wr_1'] ?>" class="ui-btn" target="_blank">전신 확인</a>
|
||||||
<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" : "";?>> 전신을 썸네일로 사용 </label>
|
<input type="checkbox" id="bf_file_del0" name="bf_file_del[0]" value="wr_1"> <label for="bf_file_del0">
|
||||||
<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><?php } ?>
|
||||||
X (왼쪽에서부터) <input type="text" name="wr_width" value="<?=$write['wr_width']?>" class="frm_input small"> px /
|
<label for="wr_8_1" class="label-right"><input type="radio" value="wr_1" name="wr_8" id="wr_8_1"
|
||||||
Y (위에서부터) <input type="text" name="wr_height" value="<?=$write['wr_height']?>" class="frm_input small"> px</p>
|
class="wr_8" <?= ($write['wr_8'] == 'wr_1' || ($board['bo_upload_count'] == '1' && ($w != 'u' || !$write['wr_8']))) ? "checked" : ""; ?>> 전신을 썸네일로 사용 </label>
|
||||||
<?=help("* 전신을 썸네일로 사용할 경우 크롭지점을 설정합니다. 왼쪽에서부터 몇픽셀을, 위에서부터 몇픽셀을 잘라낼 것인지 숫자만 적어주세요. X지점이 0일경우 가운데로 맞춰집니다.")?>
|
<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일경우 가운데로 맞춰집니다.") ?>
|
||||||
</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="hidden" name="wr_2" value="<?=$w=='u' ? $write['wr_2']: ""?>">
|
<input type="file" name="bf_file[1]" title="두상 등록 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능"
|
||||||
<?if($w=='u' && $write['wr_2']){?>
|
class="frm_file frm_input full">
|
||||||
<a href="<?=$write['wr_2']?>" class="ui-btn" target="_blank">두상 확인</a>
|
<input type="hidden" name="wr_2" value="<?= $w == 'u' ? $write['wr_2'] : "" ?>">
|
||||||
<input type="checkbox" id="bf_file_del1" name="bf_file_del[1]" value="wr_2"> <label for="bf_file_del1"> 등록된 두상 삭제</label><?}?>
|
<?php if ($w == 'u' && $write['wr_2']) { ?>
|
||||||
<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" : "";?>> 두상을 썸네일로 사용 </label>
|
<a href="<?= $write['wr_2'] ?>" class="ui-btn" target="_blank">두상 확인</a>
|
||||||
<?=help("* 본문에는 출력되지 않습니다. 썸네일 사이즈와 다를 경우 사이즈에 맞게 늘어나거나 줄어듭니다.")?>
|
<input type="checkbox" id="bf_file_del1" name="bf_file_del[1]" value="wr_2"> <label for="bf_file_del1">
|
||||||
|
등록된 두상 삭제</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" : ""; ?>> 두상을 썸네일로 사용 </label>
|
||||||
|
<?= 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" : "";?>>흉상을 썸네일로 사용 </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" : ""; ?>>흉상을 썸네일로 사용 </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>
|
||||||
</dd>
|
</dd>
|
||||||
</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;">
|
||||||
<?=help("본문에는 출력되지 않습니다.")?>
|
<input type="text" name="wr_subject" value="<?php echo $write['wr_subject'] ?>"
|
||||||
</div></dd>
|
class="frm_input full required" size="50" maxlength="255" required>
|
||||||
|
<?= help("본문에는 출력되지 않습니다.") ?>
|
||||||
|
</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'])
|
||||||
<?=help("커뮤 명칭, AU 명칭 등 구분용으로 사용할 내용을 입력해주세요.\n목록에 노출되는 프로필(오리지널)일 경우 출력되는 항목이 있습니다.(배포글 참조)")?>
|
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목록에 노출되는 프로필(오리지널)일 경우 출력되는 항목이 있습니다.(배포글 참조)") ?>
|
||||||
</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($write_min || $write_max) { ?>
|
<?php if (!$board['bo_use_dhtml_editor']) {
|
||||||
|
echo help("* 게시판에서 dhtml 에디터 사용을 체크하시는것을 추천합니다.");
|
||||||
|
} ?>
|
||||||
|
<?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 } ?>
|
||||||
|
|
@ -187,9 +203,10 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>순서</dt>
|
<dt>순서</dt>
|
||||||
<dd><div class="wr_10">
|
<dd>
|
||||||
<input type="text" name="wr_10" value="<?=$w=='u' ? $write['wr_10']:"";?>" >
|
<div class="wr_10">
|
||||||
<?=help("* 순서는 1이 가장 처음으로 캐릭터 목록상에서는 숫자가 클수록 최신(가장 왼쪽), AU 목록상에서는 숫자가 클수록 오리지널에서 순서가 멀어집니다. \n순서를 정하지 않을 경우 먼저 등록한 순서대로 정렬됩니다.");?>
|
<input type="text" name="wr_10" value="<?= $w == 'u' ? $write['wr_10'] : ""; ?>">
|
||||||
|
<?= help("* 순서는 1이 가장 처음으로 캐릭터 목록상에서는 숫자가 클수록 최신(가장 왼쪽), AU 목록상에서는 숫자가 클수록 오리지널에서 순서가 멀어집니다. \n순서를 정하지 않을 경우 먼저 등록한 순서대로 정렬됩니다."); ?>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
@ -203,23 +220,22 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<?php if($write_min || $write_max) { ?>
|
<?php if ($write_min || $write_max) { ?>
|
||||||
// 글자수 제한
|
// 글자수 제한
|
||||||
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
||||||
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
||||||
check_byte("wr_content", "char_count");
|
check_byte("wr_content", "char_count");
|
||||||
|
|
||||||
|
|
||||||
$(function() {
|
$(function () {
|
||||||
$("#wr_content").on("keyup", function() {
|
$("#wr_content").on("keyup", function () {
|
||||||
check_byte("wr_content", "char_count");
|
check_byte("wr_content", "char_count");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
<?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,14 +247,13 @@ $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 = "";
|
||||||
var content = "";
|
var content = "";
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: g5_bbs_url+"/ajax.filter.php",
|
url: g5_bbs_url + "/ajax.filter.php",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
"subject": f.wr_subject.value,
|
"subject": f.wr_subject.value,
|
||||||
|
|
@ -247,21 +262,21 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
cache: false,
|
cache: false,
|
||||||
success: function(data, textStatus) {
|
success: function (data, textStatus) {
|
||||||
subject = data.subject;
|
subject = data.subject;
|
||||||
content = data.content;
|
content = data.content;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (subject) {
|
if (subject) {
|
||||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
alert("제목에 금지단어('" + subject + "')가 포함되어있습니다");
|
||||||
f.wr_subject.focus();
|
f.wr_subject.focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (content) {
|
if (content) {
|
||||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
alert("내용에 금지단어('" + content + "')가 포함되어있습니다");
|
||||||
if (typeof(ed_wr_content) != "undefined")
|
if (typeof (ed_wr_content) != "undefined")
|
||||||
ed_wr_content.returnFalse();
|
ed_wr_content.returnFalse();
|
||||||
else
|
else
|
||||||
f.wr_content.focus();
|
f.wr_content.focus();
|
||||||
|
|
@ -272,11 +287,11 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
|
||||||
if (char_min > 0 || char_max > 0) {
|
if (char_min > 0 || char_max > 0) {
|
||||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -285,11 +300,11 @@ $parent_type=$board['bo_1']? $board['bo_1'] : "오리지널";
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$(".wr_8").on("change",function(){
|
$(".wr_8").on("change", function () {
|
||||||
if($(this).val()=='wr_1'){
|
if ($(this).val() == 'wr_1') {
|
||||||
$("#crop").css("display","block");
|
$("#crop").css("display", "block");
|
||||||
}else {
|
} else {
|
||||||
$("#crop").css("display","none");
|
$("#crop").css("display", "none");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,33 @@
|
||||||
<?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'];
|
||||||
if($_FILES['bf_file']['name']){
|
include_once $board_skin_path . '/upload_file.php';
|
||||||
$files=upload_c_file('bf_file',$bo_table);
|
if ($_FILES['bf_file']['name']) {
|
||||||
$file=sql_fetch("select * from {$g5['board_file_table']} where bo_table='{$bo_table}' and wr_id='{$comment_id}' and bf_no='0'");
|
$files = upload_c_file('bf_file', $bo_table);
|
||||||
$sql_common="bf_source='{$files['source']}',
|
$file = sql_fetch("select * from {$g5['board_file_table']} where bo_table='{$bo_table}' and wr_id='{$comment_id}' and bf_no='0'");
|
||||||
|
$sql_common = "bf_source='{$files['source']}',
|
||||||
bf_file='{$files['name']}',
|
bf_file='{$files['name']}',
|
||||||
bf_filesize='{$files['size']}',
|
bf_filesize='{$files['size']}',
|
||||||
bf_width = '{$files['img'][0]}',
|
bf_width = '{$files['img'][0]}',
|
||||||
bf_height = '{$files['img'][1]}',
|
bf_height = '{$files['img'][1]}',
|
||||||
bf_type = '{$files['img'][2]}',
|
bf_type = '{$files['img'][2]}',
|
||||||
bf_content = '{$bf_content}',
|
bf_content = '{$bf_content}',
|
||||||
bf_datetime = '".G5_TIME_YMDHIS."' ";
|
bf_datetime = '" . G5_TIME_YMDHIS . "' ";
|
||||||
if($file['wr_id']){
|
if ($file['wr_id']) {
|
||||||
sql_query("update {$g5['board_file_table']}
|
sql_query("update {$g5['board_file_table']}
|
||||||
set {$sql_common}
|
set {$sql_common}
|
||||||
where bo_table = '{$bo_table}' and wr_id='{$comment_id}' and bf_no = '0'
|
where bo_table = '{$bo_table}' and wr_id='{$comment_id}' and bf_no = '0'
|
||||||
");
|
");
|
||||||
}else{
|
} else {
|
||||||
sql_query("insert into {$g5['board_file_table']}
|
sql_query("insert into {$g5['board_file_table']}
|
||||||
set {$sql_common},
|
set {$sql_common},
|
||||||
wr_id = '{$comment_id}' ,
|
wr_id = '{$comment_id}' ,
|
||||||
|
|
@ -31,14 +36,13 @@ include_once($board_skin_path.'/upload_file.php');
|
||||||
");
|
");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($w=='cu' && $bf_content){
|
if ($w == 'cu' && $bf_content) {
|
||||||
sql_query("update {$g5['board_file_table']}
|
sql_query("update {$g5['board_file_table']}
|
||||||
set bf_content = '{$bf_content}'
|
set bf_content = '{$bf_content}'
|
||||||
where wr_id ='{$comment_id}' and
|
where wr_id ='{$comment_id}' and
|
||||||
bo_table = '{$bo_table}' and
|
bo_table = '{$bo_table}' and
|
||||||
bf_no = '0'
|
bf_no = '0'
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
|
||||||
|
|
@ -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}' ");
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue