tabsize
This commit is contained in:
parent
f41e566400
commit
75ea133f82
9 changed files with 747 additions and 723 deletions
|
|
@ -1,4 +1,2 @@
|
||||||
<?php
|
<?php
|
||||||
include_once('../../../common.php');
|
include_once('../../../common.php');
|
||||||
|
|
||||||
?>
|
|
||||||
185
list.skin.php
185
list.skin.php
|
|
@ -1,94 +1,105 @@
|
||||||
<?
|
<?
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_'))
|
||||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
exit; // 개별 페이지 접근 불가
|
||||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||||
if($board['bo_table_width']==0) $width="100%";
|
include_once(G5_LIB_PATH . '/thumbnail.lib.php');
|
||||||
|
if ($board['bo_table_width'] == 0)
|
||||||
|
$width = "100%";
|
||||||
|
|
||||||
$cate=array();
|
$cate = array();
|
||||||
$lists=array();
|
$lists = array();
|
||||||
?>
|
?>
|
||||||
<div class="board-skin-basic theme-box" style="max-width:<?=$width?>;">
|
<div class="board-skin-basic theme-box" style="max-width:<?= $width ?>;">
|
||||||
<? if($board['bo_content_head']) { ?>
|
<? if ($board['bo_content_head']) { ?>
|
||||||
<div class="content_head">
|
<div class="content_head">
|
||||||
<?=stripslashes($board['bo_content_head']);?>
|
<?= stripslashes($board['bo_content_head']); ?>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<?
|
<?
|
||||||
if($is_category) {
|
if ($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, wr_id");
|
continue;
|
||||||
|
$list_item = sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1, wr_id");
|
||||||
for($k=0;$row=sql_fetch_array($list_item);$k++){
|
|
||||||
$lists[$k]=get_list($row,$board,$board_skin_url);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div class="bo_list">
|
|
||||||
<?if($is_category){?><h2><?=$cate[$h]?></h2><?}?>
|
|
||||||
<ul class="list_box"><?
|
|
||||||
if(count($lists)>0){
|
|
||||||
for ($i=0; $i<count($lists); $i++) {
|
|
||||||
// 수정, 삭제 링크
|
|
||||||
$update_href = $delete_href = "";
|
|
||||||
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
|
|
||||||
if (($member['mb_id'] && ($member['mb_id'] == $lists[$i]['mb_id'])) || $is_admin) {
|
|
||||||
$update_href = "./write.php?w=u&bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . $qstr;
|
|
||||||
$delete_href = "javascript:del('./delete.php?bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page".urldecode($qstr)."');";
|
|
||||||
if ($is_admin)
|
|
||||||
{
|
|
||||||
$delete_href = "javascript:del('./delete.php?bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&token=$token&page=$page".urldecode($qstr)."');";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!$lists[$i]['mb_id']) { // 회원이 쓴 글이 아니라면
|
|
||||||
$update_href = "./password.php?w=u&bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . $qstr;
|
|
||||||
$delete_href = "./password.php?w=d&bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . $qstr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($is_category) {
|
for ($k = 0; $row = sql_fetch_array($list_item); $k++) {
|
||||||
if(($lists[$i]['ca_name']!=$cate[$h]) || ($sca && $lists[$i]['ca_name']!=$sca)) continue;
|
$lists[$k] = get_list($row, $board, $board_skin_url);
|
||||||
}
|
}
|
||||||
?><li class="bo-list">
|
?>
|
||||||
<a href="<?=$lists[$i]['wr_link2'] ? $lists[$i]['wr_link2'] : "javascript:void(0);"?>" target="_blank" class="link-banner <?if(strstr($lists[$i]['wr_option'],'secret')) echo "secret";?>" <?if(!$lists[$i]['wr_link2']){?>style="cursor:default;" onclick="return false;"<?}?>>
|
<div class="bo_list">
|
||||||
<?if($lists[$i]['wr_link1']){?><img src="<?=$lists[$i]['wr_link1']?>" alt="<?=$lists[$i]['wr_1']?>"><?}else{?><strong><?=$lists[$i]['wr_1']?></strong><?}?>
|
<? if ($is_category) { ?>
|
||||||
</a>
|
<h2><?= $cate[$h] ?></h2><? } ?>
|
||||||
<p class="link-desc">
|
<ul class="list_box">
|
||||||
<?if($lists[$i]['wr_1']&&$lists[$i]['wr_link1']){?>
|
<?
|
||||||
<a href="<?=$lists[$i]['wr_link2'] ? $lists[$i]['wr_link2'] : "javascript:void(0);"?>" target="_blank" <?if(!$lists[$i]['wr_link2']){?>style="cursor:default;" onclick="return false;"<?}?> class="name">
|
if (count($lists) > 0) {
|
||||||
<strong>
|
for ($i = 0; $i < count($lists); $i++) {
|
||||||
<?=$lists[$i]['wr_1']?>
|
// 수정, 삭제 링크
|
||||||
</strong>
|
$update_href = $delete_href = "";
|
||||||
</a>
|
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
|
||||||
<?}?>
|
if (($member['mb_id'] && ($member['mb_id'] == $lists[$i]['mb_id'])) || $is_admin) {
|
||||||
<?if($update_href || $delete_href){?>
|
$update_href = "./write.php?w=u&bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . $qstr;
|
||||||
<span class="options">
|
$delete_href = "javascript:del('./delete.php?bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . urldecode($qstr) . "');";
|
||||||
<?if($update_href){?><a href="<?=$update_href?>">*</a><?}?>
|
if ($is_admin) {
|
||||||
<?if($delete_href){?><a href="<?=$delete_href?>">-</a><?}?>
|
$delete_href = "javascript:del('./delete.php?bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&token=$token&page=$page" . urldecode($qstr) . "');";
|
||||||
</span>
|
}
|
||||||
<?}?>
|
} else if (!$lists[$i]['mb_id']) { // 회원이 쓴 글이 아니라면
|
||||||
</p>
|
$update_href = "./password.php?w=u&bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . $qstr;
|
||||||
</li><? }}?></ul>
|
$delete_href = "./password.php?w=d&bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . $qstr;
|
||||||
</div>
|
}
|
||||||
<?}?>
|
|
||||||
|
|
||||||
<? if($board['bo_content_tail']) { ?>
|
if ($is_category) {
|
||||||
<div class="content_head">
|
if (($lists[$i]['ca_name'] != $cate[$h]) || ($sca && $lists[$i]['ca_name'] != $sca))
|
||||||
<?=stripslashes($board['bo_content_tail']);?>
|
continue;
|
||||||
</div>
|
}
|
||||||
<? } ?>
|
?>
|
||||||
<? if ($list_href || $is_checkbox || $write_href) { ?>
|
<li class="bo-list">
|
||||||
<div class="bo_fx txt-right" style="padding: 20px 0;">
|
<a href="<?= $lists[$i]['wr_link2'] ? $lists[$i]['wr_link2'] : "javascript:void(0);" ?>" target="_blank"
|
||||||
<? if ($list_href || $write_href) { ?>
|
class="link-banner <? if (strstr($lists[$i]['wr_option'], 'secret'))
|
||||||
<? if ($list_href) { ?><a href="<? echo $list_href ?>" class="ui-btn">목록</a><? } ?>
|
echo "secret"; ?>"
|
||||||
<? if ($write_href) { ?>
|
<? if (!$lists[$i]['wr_link2']) { ?>style="cursor:default;" onclick="return false;" <? } ?>>
|
||||||
<a href="<? echo $write_href ?>" class="ui-btn point">링크 추가</a><? } ?>
|
<? if ($lists[$i]['wr_link1']) { ?><img src="<?= $lists[$i]['wr_link1'] ?>"
|
||||||
<? } ?>
|
alt="<?= $lists[$i]['wr_1'] ?>"><? } else { ?><strong><?= $lists[$i]['wr_1'] ?></strong><? } ?>
|
||||||
<? if($admin_href){?>
|
</a>
|
||||||
<a href="<?=$board_skin_url?>/set_order.php?bo_table=<?=$bo_table?>&write_table=<?=$write_table?>" class="ui-btn">링크 관리</a>
|
<p class="link-desc">
|
||||||
<a href="<?=$admin_href?>" class="ui-btn admin">관리자</a><?}?>
|
<? if ($lists[$i]['wr_1'] && $lists[$i]['wr_link1']) { ?>
|
||||||
</div>
|
<a href="<?= $lists[$i]['wr_link2'] ? $lists[$i]['wr_link2'] : "javascript:void(0);" ?>" target="_blank"
|
||||||
<? } ?>
|
<? if (!$lists[$i]['wr_link2']) { ?>style="cursor:default;" onclick="return false;" <? } ?> class="name">
|
||||||
</div>
|
<strong>
|
||||||
|
<?= $lists[$i]['wr_1'] ?>
|
||||||
|
</strong>
|
||||||
|
</a>
|
||||||
|
<? } ?>
|
||||||
|
<? if ($update_href || $delete_href) { ?>
|
||||||
|
<span class="options">
|
||||||
|
<? if ($update_href) { ?><a href="<?= $update_href ?>">*</a><? } ?>
|
||||||
|
<? if ($delete_href) { ?><a href="<?= $delete_href ?>">-</a><? } ?>
|
||||||
|
</span>
|
||||||
|
<? } ?>
|
||||||
|
</p>
|
||||||
|
</li><? }
|
||||||
|
} ?></ul>
|
||||||
|
</div>
|
||||||
|
<? } ?>
|
||||||
|
|
||||||
|
<? if ($board['bo_content_tail']) { ?>
|
||||||
|
<div class="content_head">
|
||||||
|
<?= stripslashes($board['bo_content_tail']); ?>
|
||||||
|
</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>
|
||||||
|
|
||||||
<!-- } 게시판 목록 끝 -->
|
<!-- } 게시판 목록 끝 -->
|
||||||
|
|
|
||||||
119
set_order.php
119
set_order.php
|
|
@ -1,57 +1,64 @@
|
||||||
<?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($board['bo_write_level']<=$member['mb_level']){
|
if ($board['bo_write_level'] <= $member['mb_level']) {
|
||||||
?>
|
?>
|
||||||
<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:1000px;margin:10px auto;">
|
<div style="max-width:1000px;margin:10px auto;">
|
||||||
<table class="theme-form">
|
<table class="theme-form">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<?if($board['bo_use_category']&&$board['bo_category_list']){?><col style="width:100px;"><?}?>
|
<? if ($board['bo_use_category'] && $board['bo_category_list']) { ?>
|
||||||
<col style="width:150px;">
|
<col style="width:100px;"><? } ?>
|
||||||
<col>
|
<col style="width:150px;">
|
||||||
<col>
|
<col>
|
||||||
<col style="width:80px;">
|
<col>
|
||||||
</colgroup>
|
<col style="width:80px;">
|
||||||
<tbody>
|
</colgroup>
|
||||||
<tr>
|
<tbody>
|
||||||
<?if($board['bo_use_category']&&$board['bo_category_list']){?><th>카테고리</th><?}?>
|
<tr>
|
||||||
<th>제목</th>
|
<? if ($board['bo_use_category'] && $board['bo_category_list']) { ?>
|
||||||
<th>배너</th>
|
<th>카테고리</th><? } ?>
|
||||||
<th>링크</th>
|
<th>제목</th>
|
||||||
<th>순서</th>
|
<th>배너</th>
|
||||||
</tr>
|
<th>링크</th>
|
||||||
<?
|
<th>순서</th>
|
||||||
$order=sql_query("select * from {$write_table} order by wr_10*1, wr_id");
|
</tr>
|
||||||
for ($i=0;$row=sql_fetch_array($order);$i++){ ?>
|
<?
|
||||||
<tr>
|
$order = sql_query("select * from {$write_table} order by wr_10*1, wr_id");
|
||||||
<?if($board['bo_use_category']&&$board['bo_category_list']){?>
|
for ($i = 0; $row = sql_fetch_array($order); $i++) { ?>
|
||||||
<td><select name="category[<?=$row['wr_id']?>]">
|
<tr>
|
||||||
<option value="">카테고리</option>
|
<? if ($board['bo_use_category'] && $board['bo_category_list']) { ?>
|
||||||
<?$cate=explode('|',$board['bo_category_list']);
|
<td><select name="category[<?= $row['wr_id'] ?>]">
|
||||||
for($h=0;$h<count($cate);$h++){?>
|
<option value="">카테고리</option>
|
||||||
<option value="<?=$cate[$h]?>" <?=$row['ca_name']==$cate[$h] ? "selected": "";?>><?=$cate[$h]?></option>
|
<? $cate = explode('|', $board['bo_category_list']);
|
||||||
<?}?>
|
for ($h = 0; $h < count($cate); $h++) { ?>
|
||||||
</select><?}?>
|
<option value="<?= $cate[$h] ?>" <?= $row['ca_name'] == $cate[$h] ? "selected" : ""; ?>><?= $cate[$h] ?>
|
||||||
</td>
|
</option>
|
||||||
<td><input type="text" name="subject[<?=$row['wr_id']?>]" value="<?=$row['wr_1']?>" style="width:100%;"></td>
|
<? } ?>
|
||||||
<td><input type="text" name="banner[<?=$row['wr_id']?>]" value="<?=$row['wr_link1']?>" style="width:100%;"></td>
|
</select><? } ?>
|
||||||
<td><input type="text" name="link[<?=$row['wr_id']?>]" value="<?=$row['wr_link2']?>" style="width:100%;"></td>
|
</td>
|
||||||
<td><input type="text" name="order[<?=$row['wr_id']?>]" value="<?=$row['wr_10']?>" size="4">
|
<td><input type="text" name="subject[<?= $row['wr_id'] ?>]" value="<?= $row['wr_1'] ?>" style="width:100%;">
|
||||||
<input type="hidden" name="idx[]" value="<?=$row['wr_id']?>">
|
</td>
|
||||||
</td>
|
<td><input type="text" name="banner[<?= $row['wr_id'] ?>]" value="<?= $row['wr_link1'] ?>"
|
||||||
</tr>
|
style="width:100%;">
|
||||||
<? } ?>
|
</td>
|
||||||
</tbody>
|
<td><input type="text" name="link[<?= $row['wr_id'] ?>]" value="<?= $row['wr_link2'] ?>" style="width:100%;">
|
||||||
</table>
|
</td>
|
||||||
<br>
|
<td><input type="text" name="order[<?= $row['wr_id'] ?>]" value="<?= $row['wr_10'] ?>" size="4">
|
||||||
<div style="float:right;">
|
<input type="hidden" name="idx[]" value="<?= $row['wr_id'] ?>">
|
||||||
<button type="submit" class="ui-btn point">확인</button>
|
</td>
|
||||||
<a href="<?=G5_BBS_URL?>/board.php?bo_table=<?=$bo_table?>" class="ui-btn">목록으로</a>
|
</tr>
|
||||||
</div>
|
<? } ?>
|
||||||
</div>
|
</tbody>
|
||||||
</form>
|
</table>
|
||||||
<?}?>
|
<br>
|
||||||
|
<div style="float:right;">
|
||||||
|
<button type="submit" class="ui-btn point">확인</button>
|
||||||
|
<a href="<?= G5_BBS_URL ?>/board.php?bo_table=<?= $bo_table ?>" class="ui-btn">목록으로</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<? } ?>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +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_1 = '{$subject[$k]}',
|
wr_1 = '{$subject[$k]}',
|
||||||
wr_link1='{$banner[$k]}',
|
wr_link1='{$banner[$k]}',
|
||||||
wr_link2='{$link[$k]}'
|
wr_link2='{$link[$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_id='{$k}'");
|
sql_query("update {$write_table} set ca_name='{$category[$k]}' where wr_id='{$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,31 +1,34 @@
|
||||||
<?
|
<?
|
||||||
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%"; ?>
|
||||||
<!-- 링크 버튼 시작 { -->
|
<!-- 링크 버튼 시작 { -->
|
||||||
<div id="bo_v_bot">
|
<div id="bo_v_bot">
|
||||||
<? ob_start(); ?>
|
<? ob_start(); ?>
|
||||||
<div class="bo_v_com">
|
<div class="bo_v_com">
|
||||||
<a href="<? echo $list_href ?>" class="ui-btn left">목록</a>
|
<a href="<? echo $list_href ?>" class="ui-btn left">목록</a>
|
||||||
<? if ($update_href) { ?><a href="<? echo $update_href ?>" class="ui-btn">수정</a><? } ?>
|
<? if ($update_href) { ?><a href="<? echo $update_href ?>" class="ui-btn">수정</a><? } ?>
|
||||||
<? if ($delete_href) { ?><a href="<? echo $delete_href ?>" class="ui-btn admin" onclick="del(this.href); return false;">삭제</a><? } ?>
|
<? if ($delete_href) { ?><a href="<? echo $delete_href ?>" class="ui-btn admin"
|
||||||
<? if ($write_href) { ?><a href="<? echo $write_href ?>" class="ui-btn point">링크 추가</a><? } ?>
|
onclick="del(this.href); return false;">삭제</a><? } ?>
|
||||||
</div>
|
<? if ($write_href) { ?><a href="<? echo $write_href ?>" class="ui-btn point">링크 추가</a><? } ?>
|
||||||
<?
|
</div>
|
||||||
$link_buttons = ob_get_contents();
|
<?
|
||||||
ob_end_flush();
|
$link_buttons = ob_get_contents();
|
||||||
?>
|
ob_end_flush();
|
||||||
</div>
|
?>
|
||||||
<!-- } 링크 버튼 끝 -->
|
|
||||||
<div class="board-viewer">
|
|
||||||
<div class="contents">
|
|
||||||
<!-- 본문 내용 시작 { -->
|
|
||||||
<div id="bo_v_con"><? echo get_view_thumbnail($view['content']); ?></div>
|
|
||||||
<?//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
|
|
||||||
<!-- } 본문 내용 끝 -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- } 링크 버튼 끝 -->
|
||||||
<!-- } 게시글 읽기 끝 -->
|
<div class="board-viewer">
|
||||||
|
<div class="contents">
|
||||||
|
<!-- 본문 내용 시작 { -->
|
||||||
|
<div id="bo_v_con"><? echo get_view_thumbnail($view['content']); ?></div>
|
||||||
|
<?//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
|
||||||
|
<!-- } 본문 내용 끝 -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- } 게시글 읽기 끝 -->
|
||||||
|
|
|
||||||
|
|
@ -1,373 +1,365 @@
|
||||||
<?
|
<?
|
||||||
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!='옷장'");
|
|
||||||
$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">
|
|
||||||
<script>
|
|
||||||
// 글자수 제한
|
|
||||||
var char_min = parseInt(<? echo $comment_min ?>); // 최소
|
|
||||||
var char_max = parseInt(<? echo $comment_max ?>); // 최대
|
|
||||||
</script>
|
|
||||||
<?
|
|
||||||
if($member['mb_level']>=$board['bo_comment_level']){
|
|
||||||
?>
|
|
||||||
<div class="board-comment-list">
|
|
||||||
<?if($cmt_link['cnt']>0){?>
|
|
||||||
<strong>로그</strong><?}?>
|
|
||||||
<?
|
|
||||||
$cmt_amt = count($list);
|
|
||||||
for ($i=0; $i<$cmt_amt; $i++) {
|
|
||||||
if($list[$i]['wr_content']=='옷장') continue;
|
|
||||||
$comment_id = $list[$i]['wr_id'];
|
|
||||||
$cmt_depth = ""; // 댓글단계
|
|
||||||
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 10;
|
|
||||||
$comment = $list[$i]['content'];
|
|
||||||
$comment2 = $list[$i]['content1'];
|
|
||||||
|
|
||||||
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
$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='옷장'");
|
||||||
<div class="item" id="c_<? echo $comment_id ?>">
|
|
||||||
<div class="co-content">
|
|
||||||
<div class="co-inner">
|
|
||||||
<? $co_links=explode(PHP_EOL,$list[$i]['wr_content']);
|
|
||||||
if(count($co_links)>0){
|
|
||||||
$co_list=array();
|
|
||||||
for($k=0;$k<count($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>';
|
|
||||||
echo $c_link;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="co-info">
|
|
||||||
<? if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
|
||||||
$query_string = clean_query_string($_SERVER['QUERY_STRING']);
|
|
||||||
|
|
||||||
if($w == 'cu') {
|
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
|
||||||
$cmt = sql_fetch($sql);
|
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
|
||||||
$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';
|
|
||||||
?>
|
|
||||||
<? if ($list[$i]['is_edit']) { ?><span><a href="javascript:comment_box('<? echo $comment_id ?>', 'cu','link');">m</a></span><? } ?>
|
|
||||||
<? if ($list[$i]['is_del']) { ?><span><a href="<? echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">d</a></span><? } ?>
|
|
||||||
<? } ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span id="edit_<? echo $comment_id ?>"></span><!-- 수정 -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" value="<? echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<? echo $comment_id ?>">
|
|
||||||
<textarea id="save_comment_<? echo $comment_id ?>" style="display:none"><? echo get_text($list[$i]['content1'], 0) ?></textarea>
|
|
||||||
<input type="hidden" id="save_cl_<?=$comment_id?>" name="bf_content" >
|
|
||||||
<input type="hidden" id="save_order_<?=$comment_id?>" name="wr_10">
|
|
||||||
|
|
||||||
<? } ?>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<? }
|
|
||||||
if ($view['mb_id']==$member['mb_id']) {
|
|
||||||
if($w == '')
|
|
||||||
$w = 'c';
|
|
||||||
?>
|
?>
|
||||||
|
<div class="board-comment-view">
|
||||||
|
<script>
|
||||||
|
// 글자수 제한
|
||||||
|
var char_min = parseInt(<? echo $comment_min ?>); // 최소
|
||||||
|
var char_max = parseInt(<? echo $comment_max ?>); // 최대
|
||||||
|
</script>
|
||||||
|
<?
|
||||||
|
if ($member['mb_level'] >= $board['bo_comment_level']) {
|
||||||
|
?>
|
||||||
|
<div class="board-comment-list">
|
||||||
|
<? if ($cmt_link['cnt'] > 0) { ?>
|
||||||
|
<strong>로그</strong><? } ?>
|
||||||
|
<?
|
||||||
|
$cmt_amt = count($list);
|
||||||
|
for ($i = 0; $i < $cmt_amt; $i++) {
|
||||||
|
if ($list[$i]['wr_content'] == '옷장')
|
||||||
|
continue;
|
||||||
|
$comment_id = $list[$i]['wr_id'];
|
||||||
|
$cmt_depth = ""; // 댓글단계
|
||||||
|
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 10;
|
||||||
|
$comment = $list[$i]['content'];
|
||||||
|
$comment2 = $list[$i]['content1'];
|
||||||
|
|
||||||
<div class="board-clothes-list board-comment-list">
|
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
||||||
<?if($clo['cnt']>0){?>
|
?>
|
||||||
<strong>옷장</strong>
|
<div class="item" id="c_<? echo $comment_id ?>">
|
||||||
<?}?>
|
<div class="co-content">
|
||||||
<?
|
<div class="co-inner">
|
||||||
$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");
|
<? $co_links = explode(PHP_EOL, $list[$i]['wr_content']);
|
||||||
for ($k=0;$cl=sql_fetch_array($clothes); $k++) {
|
if (count($co_links) > 0) {
|
||||||
$comment_id = $cl['wr_id'];
|
$co_list = array();
|
||||||
?>
|
for ($k = 0; $k < count($co_links); $k++) {
|
||||||
<div class="item" id="cl_<? echo $comment_id ?>">
|
$co_list[$k] = explode('|', $co_links[$k]);
|
||||||
<div class="co-content">
|
$c_link = '<a href="' . $co_list[$k][1] . '" class="ui-btn" target="_blank">' . $co_list[$k][0] . '</a>';
|
||||||
<div class="co-inner">
|
echo $c_link;
|
||||||
<? $files=get_file($bo_table,$comment_id);
|
}
|
||||||
$filelink=G5_DATA_URL.'/file/'.$bo_table.'/'.$files[0]['file']; ?>
|
}
|
||||||
<a href="<?=$filelink?>" target="_blank"><?=$files[0]['content']?></a>
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="co-info">
|
||||||
|
<? if ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||||
|
$query_string = clean_query_string($_SERVER['QUERY_STRING']);
|
||||||
|
|
||||||
<div class="co-info">
|
if ($w == 'cu') {
|
||||||
<? if($member['mb_id']==$cl['mb_id']) {
|
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||||
$query_string = clean_query_string($_SERVER['QUERY_STRING']);
|
$cmt = sql_fetch($sql);
|
||||||
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||||
|
$cmt['wr_content'] = '';
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
|
|
||||||
if($w == 'cu') {
|
$c_edit_href = './board.php?' . $query_string . '&c_id=' . $comment_id . '&w=cu#bo_vc_w';
|
||||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
?>
|
||||||
$cmt = sql_fetch($sql);
|
<? if ($list[$i]['is_edit']) { ?><span><a
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
href="javascript:comment_box('<? echo $comment_id ?>', 'cu','link');">m</a></span><? } ?>
|
||||||
$cmt['wr_content'] = '';
|
<? if ($list[$i]['is_del']) { ?><span><a href="<? echo $list[$i]['del_link']; ?>"
|
||||||
$c_wr_content = $cmt['wr_content'];
|
onclick="return comment_delete();">d</a></span><? } ?>
|
||||||
}
|
<? } ?>
|
||||||
$token = '';
|
</div>
|
||||||
|
|
||||||
if ($member['mb_id'])
|
</div>
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!$cl['mb_id']) {
|
|
||||||
$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';
|
|
||||||
|
|
||||||
?>
|
<span id="edit_<? echo $comment_id ?>"></span><!-- 수정 -->
|
||||||
<span><a href="javascript:comment_box('<? echo $comment_id ?>', 'cu', 'clo');">m</a></span>
|
</div>
|
||||||
<span><a href="<? echo $cl['del_link']; ?>" onclick="return comment_delete();">d</a></span>
|
|
||||||
<? } ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span id="edit_cl_<? echo $comment_id ?>"></span><!-- 수정 -->
|
<input type="hidden" value="<? echo strstr($list[$i]['wr_option'], "secret") ?>"
|
||||||
</div>
|
id="secret_comment_<? echo $comment_id ?>">
|
||||||
|
<textarea id="save_comment_<? echo $comment_id ?>"
|
||||||
<input type="hidden" value="<? echo strstr($cl['wr_option'],"secret") ?>" id="secret_comment_<? echo $comment_id ?>">
|
style="display:none"><? echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||||
<textarea id="save_comment_<? echo $comment_id ?>" style="display:none">옷장</textarea>
|
<input type="hidden" id="save_cl_<?= $comment_id ?>" name="bf_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">
|
||||||
<input type="hidden" id="save_order_<?=$comment_id?>" name="wr_10" value="<?=$cl['wr_10']?>">
|
|
||||||
<? } ?>
|
|
||||||
|
|
||||||
</div>
|
<? } ?>
|
||||||
<!-- 댓글 쓰기 시작 { -->
|
|
||||||
<?if($cmt_link['cnt']==0) {?><p class="txt-left add"><a href="javascript:comment_box('', 'c','link');">▶ 로그 링크 추가</a></p><?}?>
|
</div>
|
||||||
<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;">
|
<? }
|
||||||
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
if ($view['mb_id'] == $member['mb_id']) {
|
||||||
<input type="hidden" name="w" value="<? echo $w ?>" id="w">
|
if ($w == '')
|
||||||
<input type="hidden" name="bo_table" value="<? echo $bo_table ?>">
|
$w = 'c';
|
||||||
<input type="hidden" name="wr_id" value="<? echo $wr_id ?>">
|
?>
|
||||||
<input type="hidden" name="comment_id" value="<? echo $c_id ?>" id="comment_id">
|
|
||||||
<input type="hidden" name="sca" value="<? echo $sca ?>">
|
<div class="board-clothes-list board-comment-list">
|
||||||
<input type="hidden" name="sfl" value="<? echo $sfl ?>">
|
<? if ($clo['cnt'] > 0) { ?>
|
||||||
<input type="hidden" name="stx" value="<? echo $stx ?>">
|
<strong>옷장</strong>
|
||||||
<input type="hidden" name="spt" value="<? echo $spt ?>">
|
<? } ?>
|
||||||
<input type="hidden" name="page" value="<? echo $page ?>">
|
<?
|
||||||
|
$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");
|
||||||
<div class="board-comment-form">
|
for ($k = 0; $cl = sql_fetch_array($clothes); $k++) {
|
||||||
|
$comment_id = $cl['wr_id'];
|
||||||
<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">
|
?>
|
||||||
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><? } ?>
|
<div class="item" id="cl_<? echo $comment_id ?>">
|
||||||
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" placeholder="제목|링크로 로그를 링크할 수 있습니다. 여러개 입력시 엔터로 구분해주세요. 예시:
|
<div class="co-content">
|
||||||
|
<div class="co-inner">
|
||||||
|
<? $files = get_file($bo_table, $comment_id);
|
||||||
|
$filelink = G5_DATA_URL . '/file/' . $bo_table . '/' . $files[0]['file']; ?>
|
||||||
|
<a href="<?= $filelink ?>" target="_blank"><?= $files[0]['content'] ?></a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="co-info">
|
||||||
|
<? if ($member['mb_id'] == $cl['mb_id']) {
|
||||||
|
$query_string = clean_query_string($_SERVER['QUERY_STRING']);
|
||||||
|
|
||||||
|
if ($w == 'cu') {
|
||||||
|
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||||
|
$cmt = sql_fetch($sql);
|
||||||
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||||
|
$cmt['wr_content'] = '';
|
||||||
|
$c_wr_content = $cmt['wr_content'];
|
||||||
|
}
|
||||||
|
$token = '';
|
||||||
|
|
||||||
|
if ($member['mb_id']) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!$cl['mb_id']) {
|
||||||
|
$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';
|
||||||
|
|
||||||
|
?>
|
||||||
|
<span><a href="javascript:comment_box('<? echo $comment_id ?>', 'cu', 'clo');">m</a></span>
|
||||||
|
<span><a href="<? echo $cl['del_link']; ?>" onclick="return comment_delete();">d</a></span>
|
||||||
|
<? } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span id="edit_cl_<? echo $comment_id ?>"></span><!-- 수정 -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" value="<? echo strstr($cl['wr_option'], "secret") ?>"
|
||||||
|
id="secret_comment_<? echo $comment_id ?>">
|
||||||
|
<textarea id="save_comment_<? 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_order_<?= $comment_id ?>" name="wr_10" value="<?= $cl['wr_10'] ?>">
|
||||||
|
<? } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- 댓글 쓰기 시작 { -->
|
||||||
|
<? if ($cmt_link['cnt'] == 0) { ?>
|
||||||
|
<p class="txt-left add"><a href="javascript:comment_box('', 'c','link');">▶ 로그 링크 추가</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;">
|
||||||
|
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);"
|
||||||
|
method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
|
<input type="hidden" name="w" value="<? echo $w ?>" id="w">
|
||||||
|
<input type="hidden" name="bo_table" value="<? echo $bo_table ?>">
|
||||||
|
<input type="hidden" name="wr_id" value="<? echo $wr_id ?>">
|
||||||
|
<input type="hidden" name="comment_id" value="<? echo $c_id ?>" id="comment_id">
|
||||||
|
<input type="hidden" name="sca" value="<? echo $sca ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<? echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<? echo $stx ?>">
|
||||||
|
<input type="hidden" name="spt" value="<? echo $spt ?>">
|
||||||
|
<input type="hidden" name="page" value="<? echo $page ?>">
|
||||||
|
|
||||||
|
<div class="board-comment-form">
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><? } ?>
|
||||||
|
<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
|
||||||
..."
|
..." <? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');" <? } ?>><? echo $c_wr_content; ?></textarea>
|
||||||
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<? } ?>><? echo $c_wr_content; ?></textarea>
|
<? 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><? } ?>
|
||||||
<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) {
|
||||||
$(this).val(str.substr(0, mx));
|
$(this).val(str.substr(0, mx));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<p style="display:none;"><input type="checkbox" name="secret" value="1" id="secret"> <label for="secret">비밀글</label></p>
|
<p style="display:none;"><input type="checkbox" name="secret" value="1" id="secret"> <label
|
||||||
|
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>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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)
|
|
||||||
{
|
|
||||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
|
||||||
|
|
||||||
var subject = "";
|
function fviewcomment_submit(f) {
|
||||||
var content = "";
|
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||||
$.ajax({
|
|
||||||
url: g5_bbs_url+"/ajax.filter.php",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"subject": "",
|
|
||||||
"content": f.wr_content.value
|
|
||||||
},
|
|
||||||
dataType: "json",
|
|
||||||
async: false,
|
|
||||||
cache: false,
|
|
||||||
success: function(data, textStatus) {
|
|
||||||
subject = data.subject;
|
|
||||||
content = data.content;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (content) {
|
var subject = "";
|
||||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
var content = "";
|
||||||
f.wr_content.focus();
|
$.ajax({
|
||||||
return false;
|
url: g5_bbs_url + "/ajax.filter.php",
|
||||||
}
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
"subject": "",
|
||||||
|
"content": f.wr_content.value
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
async: false,
|
||||||
|
cache: false,
|
||||||
|
success: function (data, textStatus) {
|
||||||
|
subject = data.subject;
|
||||||
|
content = data.content;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 양쪽 공백 없애기
|
if (content) {
|
||||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
alert("내용에 금지단어('" + content + "')가 포함되어있습니다");
|
||||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
f.wr_content.focus();
|
||||||
if (char_min > 0 || char_max > 0)
|
return false;
|
||||||
{
|
}
|
||||||
check_byte('wr_content', 'char_count');
|
|
||||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
|
||||||
if (char_min > 0 && char_min > cnt)
|
|
||||||
{
|
|
||||||
alert("댓글은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
|
||||||
return false;
|
|
||||||
} else if (char_max > 0 && char_max < cnt)
|
|
||||||
{
|
|
||||||
alert("댓글은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!document.getElementById('wr_content').value)
|
|
||||||
{
|
|
||||||
alert("댓글을 입력하여 주십시오.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof(f.wr_name) != 'undefined')
|
// 양쪽 공백 없애기
|
||||||
{
|
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||||
if (f.wr_name.value == '')
|
if (char_min > 0 || char_max > 0) {
|
||||||
{
|
check_byte('wr_content', 'char_count');
|
||||||
alert('이름이 입력되지 않았습니다.');
|
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||||
f.wr_name.focus();
|
if (char_min > 0 && char_min > cnt) {
|
||||||
return false;
|
alert("댓글은 " + char_min + "글자 이상 쓰셔야 합니다.");
|
||||||
}
|
return false;
|
||||||
}
|
} else if (char_max > 0 && char_max < cnt) {
|
||||||
|
alert("댓글은 " + char_max + "글자 이하로 쓰셔야 합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!document.getElementById('wr_content').value) {
|
||||||
|
alert("댓글을 입력하여 주십시오.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof(f.wr_password) != 'undefined')
|
if (typeof (f.wr_name) != 'undefined') {
|
||||||
{
|
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
if (f.wr_name.value == '') {
|
||||||
if (f.wr_password.value == '')
|
alert('이름이 입력되지 않았습니다.');
|
||||||
{
|
f.wr_name.focus();
|
||||||
alert('비밀번호가 입력되지 않았습니다.');
|
return false;
|
||||||
f.wr_password.focus();
|
}
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
set_comment_token(f);
|
if (typeof (f.wr_password) != 'undefined') {
|
||||||
|
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||||
|
if (f.wr_password.value == '') {
|
||||||
|
alert('비밀번호가 입력되지 않았습니다.');
|
||||||
|
f.wr_password.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById("btn_submit").disabled = "disabled";
|
|
||||||
|
|
||||||
return true;
|
set_comment_token(f);
|
||||||
}
|
|
||||||
|
|
||||||
function comment_box(comment_id, work, type)
|
document.getElementById("btn_submit").disabled = "disabled";
|
||||||
{
|
|
||||||
var el_id;
|
|
||||||
// 댓글 아이디가 넘어오면 답변, 수정
|
|
||||||
if (comment_id)
|
|
||||||
{
|
|
||||||
if (work == 'c')
|
|
||||||
el_id = 'reply_' + comment_id;
|
|
||||||
else{
|
|
||||||
if(type=='clo')
|
|
||||||
el_id = 'edit_cl_' + comment_id;
|
|
||||||
else
|
|
||||||
el_id = 'edit_' + comment_id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
el_id = 'bo_vc_w';
|
|
||||||
|
|
||||||
if (save_before != el_id)
|
return true;
|
||||||
{
|
}
|
||||||
if (save_before)
|
|
||||||
{
|
|
||||||
document.getElementById(save_before).style.display = 'none';
|
|
||||||
document.getElementById(save_before).innerHTML = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById(el_id).style.display = '';
|
function comment_box(comment_id, work, type) {
|
||||||
document.getElementById(el_id).innerHTML = save_html;
|
var el_id;
|
||||||
|
// 댓글 아이디가 넘어오면 답변, 수정
|
||||||
// 댓글 수정
|
if (comment_id) {
|
||||||
if (work == 'cu')
|
if (work == 'c')
|
||||||
{
|
el_id = 'reply_' + comment_id;
|
||||||
$('#btn_submit').text('수정');
|
else {
|
||||||
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
if (type == 'clo')
|
||||||
if(type=='clo'){
|
el_id = 'edit_cl_' + comment_id;
|
||||||
document.getElementById('wr_content').value = '옷장';
|
else
|
||||||
document.getElementById('bf_content').value = document.getElementById('save_cl_' + comment_id).value;
|
el_id = 'edit_' + comment_id;
|
||||||
document.getElementById('wr_10').value = document.getElementById('save_order_'+comment_id).value;
|
}
|
||||||
}
|
}
|
||||||
if (typeof char_count != 'undefined')
|
else
|
||||||
check_byte('wr_content', 'char_count');
|
el_id = 'bo_vc_w';
|
||||||
if (document.getElementById('secret_comment_'+comment_id).value)
|
|
||||||
document.getElementById('secret').checked = true;
|
|
||||||
else
|
|
||||||
document.getElementById('secret').checked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById('comment_id').value = comment_id;
|
if (save_before != el_id) {
|
||||||
document.getElementById('w').value = work;
|
if (save_before) {
|
||||||
|
document.getElementById(save_before).style.display = 'none';
|
||||||
|
document.getElementById(save_before).innerHTML = '';
|
||||||
|
}
|
||||||
|
|
||||||
save_before = el_id;
|
document.getElementById(el_id).style.display = '';
|
||||||
}
|
document.getElementById(el_id).innerHTML = save_html;
|
||||||
if(type=='clo'){
|
|
||||||
$('#'+el_id+' #wr_content').hide();
|
|
||||||
$('#'+el_id+' #bf_content, #'+el_id+' #bf_file, #'+el_id+' #wr_10').show();
|
|
||||||
if(work=='c'){
|
|
||||||
$('#'+el_id+' #wr_content').text('옷장');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (type=='link')
|
|
||||||
{
|
|
||||||
if(work=='c'){
|
|
||||||
$('#'+el_id+' #wr_content').text('');
|
|
||||||
}
|
|
||||||
$('#'+el_id+' #bf_content, #'+el_id+' #bf_file, #'+el_id+' #wr_10').hide();
|
|
||||||
$('#'+el_id+' #wr_content').show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function comment_delete()
|
// 댓글 수정
|
||||||
{
|
if (work == 'cu') {
|
||||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
$('#btn_submit').text('수정');
|
||||||
}
|
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
||||||
|
if (type == 'clo') {
|
||||||
|
document.getElementById('wr_content').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;
|
||||||
|
}
|
||||||
|
if (typeof char_count != 'undefined')
|
||||||
|
check_byte('wr_content', 'char_count');
|
||||||
|
if (document.getElementById('secret_comment_' + comment_id).value)
|
||||||
|
document.getElementById('secret').checked = true;
|
||||||
|
else
|
||||||
|
document.getElementById('secret').checked = false;
|
||||||
|
}
|
||||||
|
|
||||||
// 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
document.getElementById('comment_id').value = comment_id;
|
||||||
|
document.getElementById('w').value = work;
|
||||||
|
|
||||||
<? if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
save_before = el_id;
|
||||||
// sns 등록
|
}
|
||||||
$(function() {
|
if (type == 'clo') {
|
||||||
$("#bo_vc_send_sns").load(
|
$('#' + el_id + ' #wr_content').hide();
|
||||||
"<? echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<? echo $bo_table; ?>",
|
$('#' + el_id + ' #bf_content, #' + el_id + ' #bf_file, #' + el_id + ' #wr_10').show();
|
||||||
function() {
|
if (work == 'c') {
|
||||||
save_html = document.getElementById('bo_vc_w').innerHTML;
|
$('#' + el_id + ' #wr_content').text('옷장');
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
});
|
if (type == 'link') {
|
||||||
<? } ?>
|
if (work == 'c') {
|
||||||
</script>
|
$('#' + el_id + ' #wr_content').text('');
|
||||||
|
}
|
||||||
|
$('#' + el_id + ' #bf_content, #' + el_id + ' #bf_file, #' + el_id + ' #wr_10').hide();
|
||||||
|
$('#' + el_id + ' #wr_content').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function comment_delete() {
|
||||||
|
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||||
|
|
||||||
|
<? if ($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||||
|
// sns 등록
|
||||||
|
$(function () {
|
||||||
|
$("#bo_vc_send_sns").load(
|
||||||
|
"<? echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<? echo $bo_table; ?>",
|
||||||
|
function () {
|
||||||
|
save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
<? } ?>
|
||||||
|
</script>
|
||||||
|
|
|
||||||
380
write.skin.php
380
write.skin.php
|
|
@ -1,24 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_'))
|
||||||
|
exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||||
|
|
||||||
$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) {
|
||||||
$category_option .= ' selected="selected"';
|
$category_option .= ' selected="selected"';
|
||||||
}
|
}
|
||||||
$category_option .= ">$categories[$i]</option>\n";
|
$category_option .= ">$categories[$i]</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
@ -26,191 +28,199 @@ if($is_category && $board['bo_category_list']){
|
||||||
|
|
||||||
<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);"
|
||||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="wr_subject" value="링크">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="wr_content" value="링크">
|
<input type="hidden" name="wr_subject" value="링크">
|
||||||
<?php
|
<input type="hidden" name="wr_content" value="링크">
|
||||||
$option = '';
|
<?php
|
||||||
$option_hidden = '';
|
$option = '';
|
||||||
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
$option_hidden = '';
|
||||||
$option = '';
|
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
||||||
if ($is_notice) {
|
$option = '';
|
||||||
//$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';
|
if ($is_notice) {
|
||||||
}
|
//$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_html) {
|
if ($is_html) {
|
||||||
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>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $option_hidden;
|
echo $option_hidden;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="board-write theme-box">
|
<div class="board-write theme-box">
|
||||||
<? if($is_category){?>
|
<? 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>
|
||||||
<?}?>
|
<? } ?>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>제목</dt>
|
<dt>제목</dt>
|
||||||
<dd><div class="subject" style="margin-top: 20px;">
|
<dd>
|
||||||
<input type="text" name="wr_1" value="<?=$write['wr_1']?>" class="frm_input full" maxlength="255">
|
<div class="subject" style="margin-top: 20px;">
|
||||||
</div></dd>
|
<input type="text" name="wr_1" value="<?= $write['wr_1'] ?>" class="frm_input full" maxlength="255">
|
||||||
</dl>
|
</div>
|
||||||
<dl>
|
</dd>
|
||||||
<dt>배너</dt>
|
</dl>
|
||||||
<dd><div class="wr_link1" style="margin-top: 20px;">
|
<dl>
|
||||||
<input type="text" name="wr_link1" value="<?php echo $write['wr_link1'] ?>" class="frm_input full" maxlength="255">
|
<dt>배너</dt>
|
||||||
<?=help("img 태그를 제외한 순수 이미지 링크만 입력(ex. http://link.com/banner.png) 없을시 제목이 출력됩니다.");?>
|
<dd>
|
||||||
</div></dd>
|
<div class="wr_link1" style="margin-top: 20px;">
|
||||||
</dl>
|
<input type="text" name="wr_link1" value="<?php echo $write['wr_link1'] ?>" class="frm_input full"
|
||||||
<dl>
|
maxlength="255">
|
||||||
<dt>링크</dt>
|
<?= help("img 태그를 제외한 순수 이미지 링크만 입력(ex. http://link.com/banner.png) 없을시 제목이 출력됩니다."); ?>
|
||||||
<dd><div class="wr_link2" style="margin-top: 20px;">
|
</div>
|
||||||
<input type="text" name="wr_link2" value="<?php echo $write['wr_link2'] ?>" class="frm_input full" maxlength="255">
|
</dd>
|
||||||
</div></dd>
|
</dl>
|
||||||
</dl>
|
<dl>
|
||||||
<dl>
|
<dt>링크</dt>
|
||||||
<dt>순서</dt>
|
<dd>
|
||||||
<dd><div class="wr_10">
|
<div class="wr_link2" style="margin-top: 20px;">
|
||||||
<input type="text" name="wr_10" value="<?=$w=='u' ? $write['wr_10']:"";?>" >
|
<input type="text" name="wr_link2" value="<?php echo $write['wr_link2'] ?>" class="frm_input full"
|
||||||
<?=help("* 순서는 1이 가장 처음으로 순서를 정하지 않을 경우 먼저 등록한 순서대로 정렬됩니다.");?>
|
maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
<dl>
|
||||||
|
<dt>순서</dt>
|
||||||
|
<dd>
|
||||||
|
<div class="wr_10">
|
||||||
|
<input type="text" name="wr_10" value="<?= $w == 'u' ? $write['wr_10'] : ""; ?>">
|
||||||
|
<?= help("* 순서는 1이 가장 처음으로 순서를 정하지 않을 경우 먼저 등록한 순서대로 정렬됩니다."); ?>
|
||||||
|
</div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr class="padding" />
|
<hr class="padding" />
|
||||||
<div class="btn_confirm txt-center">
|
<div class="btn_confirm txt-center">
|
||||||
<input type="submit" value="작성완료" id="btn_submit" accesskey="s" class="btn_submit ui-btn point">
|
<input type="submit" value="작성완료" id="btn_submit" accesskey="s" class="btn_submit ui-btn point">
|
||||||
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel ui-btn">취소</a>
|
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel ui-btn">취소</a>
|
||||||
</div>
|
</div>
|
||||||
</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)
|
|
||||||
{
|
|
||||||
if (obj.checked) {
|
|
||||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
|
||||||
if (result)
|
|
||||||
obj.value = "html2";
|
|
||||||
else
|
|
||||||
obj.value = "html1";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
obj.value = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
function fwrite_submit(f)
|
function html_auto_br(obj) {
|
||||||
{
|
if (obj.checked) {
|
||||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||||
|
if (result)
|
||||||
var subject = "";
|
obj.value = "html2";
|
||||||
var content = "";
|
else
|
||||||
$.ajax({
|
obj.value = "html1";
|
||||||
url: g5_bbs_url+"/ajax.filter.php",
|
}
|
||||||
type: "POST",
|
else
|
||||||
data: {
|
obj.value = "";
|
||||||
"subject": f.wr_subject.value,
|
}
|
||||||
"content": f.wr_content.value
|
|
||||||
},
|
|
||||||
dataType: "json",
|
|
||||||
async: false,
|
|
||||||
cache: false,
|
|
||||||
success: function(data, textStatus) {
|
|
||||||
subject = data.subject;
|
|
||||||
content = data.content;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (subject) {
|
function fwrite_submit(f) {
|
||||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||||
f.wr_subject.focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (content) {
|
var subject = "";
|
||||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
var content = "";
|
||||||
if (typeof(ed_wr_content) != "undefined")
|
$.ajax({
|
||||||
ed_wr_content.returnFalse();
|
url: g5_bbs_url + "/ajax.filter.php",
|
||||||
else
|
type: "POST",
|
||||||
f.wr_content.focus();
|
data: {
|
||||||
return false;
|
"subject": f.wr_subject.value,
|
||||||
}
|
"content": f.wr_content.value
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
async: false,
|
||||||
|
cache: false,
|
||||||
|
success: function (data, textStatus) {
|
||||||
|
subject = data.subject;
|
||||||
|
content = data.content;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (document.getElementById("char_count")) {
|
if (subject) {
|
||||||
if (char_min > 0 || char_max > 0) {
|
alert("제목에 금지단어('" + subject + "')가 포함되어있습니다");
|
||||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
f.wr_subject.focus();
|
||||||
if (char_min > 0 && char_min > cnt) {
|
return false;
|
||||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (char_max > 0 && char_max < cnt) {
|
|
||||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
document.getElementById("btn_submit").disabled = "disabled";
|
|
||||||
|
|
||||||
return true;
|
if (content) {
|
||||||
}
|
alert("내용에 금지단어('" + content + "')가 포함되어있습니다");
|
||||||
$(".wr_8").on("change",function(){
|
if (typeof (ed_wr_content) != "undefined")
|
||||||
if($(this).val()=='wr_1'){
|
ed_wr_content.returnFalse();
|
||||||
$("#crop").css("display","block");
|
else
|
||||||
}else {
|
f.wr_content.focus();
|
||||||
$("#crop").css("display","none");
|
return false;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
</script>
|
if (document.getElementById("char_count")) {
|
||||||
|
if (char_min > 0 || char_max > 0) {
|
||||||
|
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||||
|
if (char_min > 0 && char_min > cnt) {
|
||||||
|
alert("내용은 " + char_min + "글자 이상 쓰셔야 합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (char_max > 0 && char_max < cnt) {
|
||||||
|
alert("내용은 " + char_max + "글자 이하로 쓰셔야 합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.getElementById("btn_submit").disabled = "disabled";
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$(".wr_8").on("change", function () {
|
||||||
|
if ($(this).val() == 'wr_1') {
|
||||||
|
$("#crop").css("display", "block");
|
||||||
|
} else {
|
||||||
|
$("#crop").css("display", "none");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</section>
|
</section>
|
||||||
<!-- } 게시물 작성/수정 끝 -->
|
<!-- } 게시물 작성/수정 끝 -->
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,48 @@
|
||||||
<?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}' ,
|
||||||
bo_table = '{$bo_table}' ,
|
bo_table = '{$bo_table}' ,
|
||||||
bf_no = '0'
|
bf_no = '0'
|
||||||
");
|
");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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,4 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
if (!defined("_GNUBOARD_"))
|
||||||
|
exit; // 개별 페이지 접근 불가
|
||||||
goto_url("./board.php?bo_table=$bo_table");
|
goto_url("./board.php?bo_table=$bo_table");
|
||||||
?>
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue