사용자: neo -> basic
4
head.php
@ -80,8 +80,8 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
|
||||
|
||||
<div id="wrapper">
|
||||
<div id="lnb">
|
||||
<?=outlogin('neo'); // 외부 로그인 ?>
|
||||
<?=poll('neo'); // 설문조사 ?>
|
||||
<?=outlogin('basic'); // 외부 로그인 ?>
|
||||
<?=poll('basic'); // 설문조사 ?>
|
||||
</div>
|
||||
<div id="container">
|
||||
<? if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) {?><h1 id="wrapper_title"><?=$g4['title']?></h1><?}?>
|
||||
|
||||
@ -22,7 +22,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
// 사용방법
|
||||
// latest(스킨, 게시판아이디, 출력라인, 글자수);
|
||||
echo latest("neo", $row['bo_table'], 5, 25);
|
||||
echo latest("basic", $row['bo_table'], 5, 25);
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!function_exists('convert_charset'))
|
||||
{
|
||||
/*
|
||||
-----------------------------------------------------------
|
||||
Charset 을 변환하는 함수
|
||||
-----------------------------------------------------------
|
||||
iconv 함수가 있으면 iconv 로 변환하고
|
||||
없으면 mb_convert_encoding 함수를 사용한다.
|
||||
둘다 없으면 사용할 수 없다.
|
||||
*/
|
||||
function convert_charset($from_charset, $to_charset, $str)
|
||||
{
|
||||
|
||||
if( function_exists('iconv') )
|
||||
return iconv($from_charset, $to_charset, $str);
|
||||
elseif( function_exists('mb_convert_encoding') )
|
||||
return mb_convert_encoding($str, $to_charset, $from_charset);
|
||||
else
|
||||
die("Not found 'iconv' or 'mbstring' library in server.");
|
||||
}
|
||||
}
|
||||
|
||||
header("Content-Type: text/html; charset={$g4['charset']}");
|
||||
|
||||
$subject = strtolower($_POST['subject']);
|
||||
$content = strtolower(strip_tags($_POST['content']));
|
||||
|
||||
//euc-kr 일 경우 $config['cf_filter'] 를 utf-8로 변환한다.
|
||||
if (strtolower($g4['charset']) == 'euc-kr')
|
||||
{
|
||||
//$subject = convert_charset('utf-8', 'cp949', $subject);
|
||||
//$content = convert_charset('utf-8', 'cp949', $content);
|
||||
$config['cf_filter'] = convert_charset('cp949', 'utf-8', $config['cf_filter']);
|
||||
}
|
||||
|
||||
//$filter = explode(",", strtolower(trim($config['cf_filter'])));
|
||||
// strtolower 에 의한 한글 변형으로 아래 코드로 대체 (곱슬최씨님이 알려 주셨습니다.)
|
||||
$filter = explode(",", trim($config['cf_filter']));
|
||||
for ($i=0; $i<count($filter); $i++)
|
||||
{
|
||||
$str = $filter[$i];
|
||||
|
||||
// 제목 필터링 (찾으면 중지)
|
||||
$subj = "";
|
||||
$pos = strpos($subject, $str);
|
||||
if ($pos !== false)
|
||||
{
|
||||
if (strtolower($g4['charset']) == 'euc-kr')
|
||||
$subj = convert_charset('utf-8', 'cp949', $str);//cp949 로 변환해서 반환
|
||||
else
|
||||
$subj = $str;
|
||||
break;
|
||||
}
|
||||
|
||||
// 내용 필터링 (찾으면 중지)
|
||||
$cont = "";
|
||||
$pos = strpos($content, $str);
|
||||
if ($pos !== false)
|
||||
{
|
||||
if (strtolower($g4['charset']) == 'euc-kr')
|
||||
$cont = convert_charset('utf-8', 'cp949', $str);//cp949 로 변환해서 반환
|
||||
else
|
||||
$cont = $str;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
die("{\"subject\":\"$subj\",\"content\":\"$cont\"}");
|
||||
?>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 223 B |
|
Before Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 303 B |
|
Before Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 285 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 630 B |
|
Before Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 353 B |
|
Before Width: | Height: | Size: 307 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 529 B |
|
Before Width: | Height: | Size: 483 B |
|
Before Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 488 B |
|
Before Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 158 B |
|
Before Width: | Height: | Size: 590 B |
|
Before Width: | Height: | Size: 124 B |
|
Before Width: | Height: | Size: 161 B |
|
Before Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 565 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 158 B |
|
Before Width: | Height: | Size: 590 B |
|
Before Width: | Height: | Size: 51 B |
|
Before Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 73 B |
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 154 B |
|
Before Width: | Height: | Size: 242 B |
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 102 B |
|
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
|
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 62 B After Width: | Height: | Size: 62 B |
|
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 110 B |
|
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 71 B |
|
Before Width: | Height: | Size: 240 B |
|
Before Width: | Height: | Size: 104 B |
|
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 80 B |
|
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 80 B |
|
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 113 B |
|
Before Width: | Height: | Size: 229 B |
|
Before Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 252 B |
|
Before Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 230 B |
|
Before Width: | Height: | Size: 307 B |
|
Before Width: | Height: | Size: 315 B |
|
Before Width: | Height: | Size: 176 B |
|
Before Width: | Height: | Size: 102 B |
|
Before Width: | Height: | Size: 49 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 50 B |
@ -4,235 +4,167 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
|
||||
$colspan = 5;
|
||||
|
||||
//if ($is_category) $colspan++;
|
||||
if ($is_checkbox) $colspan++;
|
||||
if ($is_good) $colspan++;
|
||||
if ($is_nogood) $colspan++;
|
||||
|
||||
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
|
||||
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
|
||||
?>
|
||||
|
||||
<style>
|
||||
.board_top { clear:both; }
|
||||
<? if (!$wr_id) {?><h1 id="bo_list_title"><?=$g4['title']?></h1><?}?>
|
||||
|
||||
.board_list { clear:both; width:100%; table-layout:fixed; margin:5px 0 0 0; }
|
||||
.board_list th { font-weight:bold; font-size:12px; }
|
||||
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
|
||||
.board_list th { white-space:nowrap; height:34px; overflow:hidden; text-align:center; }
|
||||
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }
|
||||
<p id="bo_list_total">
|
||||
<span>Total <?=number_format($total_count)?>건</span>
|
||||
<?=$page?> 페이지
|
||||
</p>
|
||||
|
||||
.board_list tr.bg0 { background-color:#fafafa; }
|
||||
.board_list tr.bg1 { background-color:#ffffff; }
|
||||
<? if ($is_category) { ?>
|
||||
<form id="fcategory" name="fcategory" method="get">
|
||||
<nav id="bo_cate">
|
||||
<h2><?=$board['bo_subject']?> 카테고리</h2>
|
||||
<ul id="bo_cate_ul">
|
||||
<?=$category_option?>
|
||||
</ul>
|
||||
</nav>
|
||||
</form>
|
||||
<? } ?>
|
||||
|
||||
.board_list td { padding:.5em; }
|
||||
.board_list td { border-bottom:1px solid #ddd; }
|
||||
.board_list td.num { color:#999999; text-align:center; }
|
||||
.board_list td.checkbox { text-align:center; }
|
||||
.board_list td.subject { overflow:hidden; }
|
||||
.board_list td.name { padding:0 0 0 10px; }
|
||||
.board_list td.datetime { font:normal 11px tahoma; color:#BABABA; text-align:center; }
|
||||
.board_list td.hit { font:normal 11px tahoma; color:#BABABA; text-align:center; }
|
||||
.board_list td.good { font:normal 11px tahoma; color:#BABABA; text-align:center; }
|
||||
.board_list td.nogood { font:normal 11px tahoma; color:#BABABA; text-align:center; }
|
||||
<div class="bo_fx">
|
||||
<fieldset id="bo_sch">
|
||||
<legend>게시물 검색</legend>
|
||||
|
||||
.board_list .notice { font-weight:normal; }
|
||||
.board_list .current { font:bold 11px tahoma; color:#E15916; }
|
||||
.board_list .comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="sca" value="<?=$sca?>">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<select name="sfl" title="검색대상">
|
||||
<option value="wr_subject" <?=get_selected($sfl, 'wr_subject', true);?>>제목</option>
|
||||
<option value="wr_content" <?=get_selected($sfl, 'wr_content');?>>내용</option>
|
||||
<option value="wr_subject||wr_content" <?=get_selected($sfl, 'wr_subject||wr_content');?>>제목+내용</option>
|
||||
<option value="mb_id,1" <?=get_selected($sfl, 'mb_id,1');?>>회원아이디</option>
|
||||
<option value="mb_id,0" <?=get_selected($sfl, 'mb_id,0');?>>회원아이디(코)</option>
|
||||
<option value="wr_name,1" <?=get_selected($sfl, 'wr_name,1');?>>글쓴이</option>
|
||||
<option value="wr_name,0" <?=get_selected($sfl, 'wr_name,0');?>>글쓴이(코)</option>
|
||||
</select>
|
||||
<input name="stx" class="fs_input required" maxlength="15" size="15" required value="<?=stripslashes($stx)?>" title="검색어(필수)">
|
||||
<input type="submit" class="fs_submit" value="검색">
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
.board_button { clear:both; margin:10px 0 0 0; }
|
||||
|
||||
.board_page { clear:both; text-align:center; margin:3px 0 0 0; }
|
||||
.board_page a:link { color:#777; }
|
||||
|
||||
.board_search { text-align:center; margin:10px 0 0 0; }
|
||||
.board_search .stx { height:21px; border:1px solid #9A9A9A; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8; }
|
||||
</style>
|
||||
<? if ($rss_href || $write_href) {?>
|
||||
<ul class="btn_bo_user">
|
||||
<? if ($rss_href) { ?><li><a href="<?=$rss_href?>" class="btn02">RSS</a></li><? } ?>
|
||||
<? if ($admin_href) { ?><li><a href="<?=$admin_href?>" class="btn03">관리자</a></li><? } ?>
|
||||
<? if ($write_href) { ?><li><a href="<?=$write_href?>" class="btn01">글쓰기</a></li><? } ?>
|
||||
</ul>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<!-- 게시판 목록 시작 -->
|
||||
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
|
||||
<div id="bo_list">
|
||||
<form id="fboardlist" name="fboardlist" method="post" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="spt" value="<?=$spt?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="sw" value="">
|
||||
|
||||
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
|
||||
<div class="board_top">
|
||||
<div style="float:left;">
|
||||
<form name="fcategory" method="get" style="margin:0px;">
|
||||
<? if ($is_category) { ?>
|
||||
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4['charset'])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
|
||||
<option value=''>전체</option>
|
||||
<?=$category_option?>
|
||||
</select>
|
||||
<? } ?>
|
||||
</form>
|
||||
</div>
|
||||
<div style="float:right;">
|
||||
<img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
|
||||
<span style="color:#888888; font-weight:bold;">Total <?=number_format($total_count)?></span>
|
||||
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
|
||||
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a><?}?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 제목 -->
|
||||
<form name="fboardlist" method="post">
|
||||
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
|
||||
<input type='hidden' name='sfl' value='<?=$sfl?>'>
|
||||
<input type='hidden' name='stx' value='<?=$stx?>'>
|
||||
<input type='hidden' name='spt' value='<?=$spt?>'>
|
||||
<input type='hidden' name='page' value='<?=$page?>'>
|
||||
<input type='hidden' name='sw' value=''>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" class="board_list">
|
||||
<col width="50" />
|
||||
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
|
||||
<col />
|
||||
<col width="110" />
|
||||
<col width="40" />
|
||||
<col width="50" />
|
||||
<? if ($is_good) { ?><col width="40" /><? } ?>
|
||||
<? if ($is_nogood) { ?><col width="40" /><? } ?>
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<? if ($is_checkbox) { ?><th><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type="checkbox"></th><?}?>
|
||||
<th>제 목</th>
|
||||
<th>글쓴이</th>
|
||||
<th><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
|
||||
<th><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
|
||||
<? if ($is_good) { ?><th><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
|
||||
<? if ($is_nogood) { ?><th><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
|
||||
<th scope="col">번호</th>
|
||||
<? if ($is_checkbox) { ?><th scope="col"><input type="checkbox" onclick="if (this.checked) all_checked(true); else all_checked(false);" title="현재 페이지 게시물 전체선택"></th><?}?>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">글쓴이</th>
|
||||
<th scope="col"><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
|
||||
<th scope="col"><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
|
||||
<? if ($is_good) { ?><th scope="col"><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
|
||||
<? if ($is_nogood) { ?><th scope="col"><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$bg = $i%2 ? 0 : 1;
|
||||
?>
|
||||
|
||||
<tr class="bg<?=$bg?>">
|
||||
<td class="num">
|
||||
<?
|
||||
if ($list[$i]['is_notice']) // 공지사항
|
||||
echo "<b>공지</b>";
|
||||
else if ($wr_id == $list[$i]['wr_id']) // 현재위치
|
||||
echo "<span class='current'>{$list[$i]['num']}</span>";
|
||||
else
|
||||
echo $list[$i]['num'];
|
||||
?>
|
||||
<tr class="<? if ($list[$i]['is_notice']) echo "bo_notice";?><? if ($board[1]) echo "bo_sideview";?>">
|
||||
<td class="td_num">
|
||||
<?
|
||||
if ($list[$i]['is_notice']) // 공지사항
|
||||
echo '<strong>공지</strong>';
|
||||
else if ($wr_id == $list[$i]['wr_id'])
|
||||
echo "<span class=\"bo_current\">열람중</span>";
|
||||
else
|
||||
echo $list[$i]['num'];
|
||||
?>
|
||||
</td>
|
||||
<? if ($is_checkbox) { ?><td class="checkbox"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i]['wr_id']?>"></td><? } ?>
|
||||
<td class="subject">
|
||||
<? if ($is_checkbox) { ?><td class="td_chk"><input type="checkbox" name="chk_wr_id[]" value="<?=$list[$i]['wr_id']?>" title="이 게시물 선택"></td><? } ?>
|
||||
<td class="td_subject">
|
||||
<?
|
||||
echo $nobr_begin;
|
||||
echo $list[$i]['reply'];
|
||||
echo $list[$i]['icon_reply'];
|
||||
if ($is_category && $list[$i]['ca_name']) {
|
||||
echo "<span class=small><font color=gray>[<a href='{$list[$i]['ca_name_href']}'>{$list[$i]['ca_name']}</a>]</font></span> ";
|
||||
}
|
||||
?>
|
||||
<a href="<?=$list[$i]['ca_name_href']?>" class="bo_cate_link"><?=$list[$i]['ca_name']?></a>
|
||||
<? } ?>
|
||||
|
||||
if ($list[$i]['is_notice'])
|
||||
echo "<a href='{$list[$i]['href']}'><span class='notice'>{$list[$i]['subject']}</span></a>";
|
||||
else
|
||||
echo "<a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a>";
|
||||
<a href="<?=$list[$i]['href']?>">
|
||||
<?=$list[$i]['subject']?>
|
||||
<? if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><?=$list[$i]['comment_cnt'];?><span class="sound_only">개</span><? } ?>
|
||||
</a>
|
||||
|
||||
if ($list[$i]['comment_cnt'])
|
||||
echo " <a href=\"{$list[$i]['comment_href']}\"><span class='comment'>{$list[$i]['comment_cnt']}</span></a>";
|
||||
<?
|
||||
// if ($list[$i]['link']['count']) { echo '['.$list[$i]['link']['count']}.']'; }
|
||||
// if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
|
||||
|
||||
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
|
||||
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
|
||||
|
||||
echo " " . $list[$i]['icon_new'];
|
||||
echo " " . $list[$i]['icon_file'];
|
||||
echo " " . $list[$i]['icon_link'];
|
||||
echo " " . $list[$i]['icon_hot'];
|
||||
echo " " . $list[$i]['icon_secret'];
|
||||
echo $nobr_end;
|
||||
if (isset($list[$i]['icon_new'])) echo $list[$i]['icon_new'];
|
||||
if (isset($list[$i]['icon_hot'])) echo $list[$i]['icon_hot'];
|
||||
if (isset($list[$i]['icon_file'])) echo $list[$i]['icon_file'];
|
||||
if (isset($list[$i]['icon_link'])) echo $list[$i]['icon_link'];
|
||||
if (isset($list[$i]['icon_secret'])) echo $list[$i]['icon_secret'];
|
||||
?>
|
||||
</td>
|
||||
<td class="name"><?=$list[$i]['name']?></td>
|
||||
<td class="datetime"><?=$list[$i]['datetime2']?></td>
|
||||
<td class="hit"><?=$list[$i]['wr_hit']?></td>
|
||||
<? if ($is_good) { ?><td class="good"><?=$list[$i]['wr_good']?></td><? } ?>
|
||||
<? if ($is_nogood) { ?><td class="nogood"><?=$list[$i]['wr_nogood']?></td><? } ?>
|
||||
<td class="td_name"><?=$list[$i]['name']?></td>
|
||||
<td class="td_date"><?=$list[$i]['datetime2']?></td>
|
||||
<td class="td_num"><?=$list[$i]['wr_hit']?></td>
|
||||
<? if ($is_good) { ?><td class="td_num"><?=$list[$i]['wr_good']?></td><? } ?>
|
||||
<? if ($is_nogood) { ?><td class="td_num"><?=$list[$i]['wr_nogood']?></td><? } ?>
|
||||
</tr>
|
||||
<? } // end for ?>
|
||||
|
||||
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
|
||||
|
||||
<?}?>
|
||||
<? if (count($list) == 0) { echo '<tr><td colspan="'.$colspan.'" class="empty_table">게시물이 없습니다.</td></tr>'; } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<? if ($list_href || $is_checkbox || $write_href) {?>
|
||||
<div class="bo_fx">
|
||||
<ul class="btn_bo_adm">
|
||||
<? if ($list_href) { ?>
|
||||
<li><a href="<?=$list_href?>" class="btn02"> 목록</a></li>
|
||||
<? } ?>
|
||||
<? if ($is_checkbox) { ?>
|
||||
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택삭제"></li>
|
||||
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택복사"></li>
|
||||
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택이동"></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
|
||||
<ul class="btn_bo_user">
|
||||
<li><? if ($write_href) { ?><a href="<?=$write_href?>" class="btn01">글쓰기</a><? } ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<? } ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="board_button">
|
||||
<div style="float:left;">
|
||||
<? if ($list_href) { ?>
|
||||
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" align="absmiddle" border='0'></a>
|
||||
<? } ?>
|
||||
<? if ($is_checkbox) { ?>
|
||||
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" align="absmiddle" border='0'></a>
|
||||
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" align="absmiddle" border='0'></a>
|
||||
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" align="absmiddle" border='0'></a>
|
||||
<? } ?>
|
||||
</div>
|
||||
<? if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||
</noscript>
|
||||
<? } ?>
|
||||
|
||||
<div style="float:right;">
|
||||
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border='0'></a><? } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 페이지 -->
|
||||
<div class="board_page">
|
||||
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/page_search_prev.gif' border='0' align=absmiddle title='이전검색'></a>"; } ?>
|
||||
<?
|
||||
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
|
||||
//echo $write_pages;
|
||||
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
|
||||
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
|
||||
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
|
||||
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
|
||||
//$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "$1", $write_pages);
|
||||
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#4D6185; font-size:12px; text-decoration:underline;\">$1</span></b>", $write_pages);
|
||||
?>
|
||||
<?=$write_pages?>
|
||||
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/page_search_next.gif' border='0' align=absmiddle title='다음검색'></a>"; } ?>
|
||||
</div>
|
||||
|
||||
<!-- 검색 -->
|
||||
<div class="board_search">
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="sca" value="<?=$sca?>">
|
||||
<select name="sfl">
|
||||
<option value="wr_subject">제목</option>
|
||||
<option value="wr_content">내용</option>
|
||||
<option value="wr_subject||wr_content">제목+내용</option>
|
||||
<option value="mb_id,1">회원아이디</option>
|
||||
<option value="mb_id,0">회원아이디(코)</option>
|
||||
<option value="wr_name,1">글쓴이</option>
|
||||
<option value="wr_name,0">글쓴이(코)</option>
|
||||
</select>
|
||||
<input name="stx" class="stx" maxlength="15" itemname="검색어" required value='<?=stripslashes($stx)?>'>
|
||||
<input type="image" src="<?=$board_skin_path?>/img/btn_search.gif" border='0' align="absmiddle">
|
||||
<input type="radio" name="sop" value="and">and
|
||||
<input type="radio" name="sop" value="or">or
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
<script type="text/javascript">
|
||||
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
|
||||
if ('<?=$stx?>') {
|
||||
document.fsearch.sfl.value = '<?=$sfl?>';
|
||||
|
||||
if ('<?=$sop?>' == 'and')
|
||||
document.fsearch.sop[0].checked = true;
|
||||
|
||||
if ('<?=$sop?>' == 'or')
|
||||
document.fsearch.sop[1].checked = true;
|
||||
} else {
|
||||
document.fsearch.sop[0].checked = true;
|
||||
}
|
||||
</script>
|
||||
<!-- 페이지 -->
|
||||
<? echo $write_pages; ?>
|
||||
|
||||
<? if ($is_checkbox) { ?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
function all_checked(sw) {
|
||||
var f = document.fboardlist;
|
||||
|
||||
@ -242,8 +174,7 @@ function all_checked(sw) {
|
||||
}
|
||||
}
|
||||
|
||||
function check_confirm(str) {
|
||||
var f = document.fboardlist;
|
||||
function fboardlist_submit(f) {
|
||||
var chk_count = 0;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
@ -252,39 +183,37 @@ function check_confirm(str) {
|
||||
}
|
||||
|
||||
if (!chk_count) {
|
||||
alert(str + "할 게시물을 하나 이상 선택하세요.");
|
||||
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택복사") {
|
||||
select_copy("copy");
|
||||
return;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택이동") {
|
||||
select_copy("move");
|
||||
return;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 선택한 게시물 삭제
|
||||
function select_delete() {
|
||||
var f = document.fboardlist;
|
||||
|
||||
str = "삭제";
|
||||
if (!check_confirm(str))
|
||||
return;
|
||||
|
||||
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
|
||||
return;
|
||||
|
||||
f.action = "./delete_all.php";
|
||||
f.submit();
|
||||
}
|
||||
|
||||
// 선택한 게시물 복사 및 이동
|
||||
function select_copy(sw) {
|
||||
var f = document.fboardlist;
|
||||
|
||||
if (sw == "copy")
|
||||
if (sw == 'copy')
|
||||
str = "복사";
|
||||
else
|
||||
str = "이동";
|
||||
|
||||
if (!check_confirm(str))
|
||||
return;
|
||||
|
||||
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
|
||||
f.sw.value = sw;
|
||||
|
||||
@ -1,175 +1,198 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
<div style="height:12px; line-height:1px; font-size:1px;"> </div>
|
||||
|
||||
<!-- 게시글 보기 시작 -->
|
||||
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
|
||||
<p id="bo_v_title"><?=$board['bo_subject']?></p>
|
||||
|
||||
<div id="bo_v">
|
||||
|
||||
<div style="clear:both; height:30px;">
|
||||
<div style="float:left; margin-top:6px;">
|
||||
<img src="<?=$board_skin_path?>/img/icon_date.gif" align=absmiddle border='0'>
|
||||
<span style="color:#888888;">작성일 : <?=date("y-m-d H:i", strtotime($view['wr_datetime']))?></span>
|
||||
</div>
|
||||
<h1 id="bo_v_h1">
|
||||
<? if ($category_name) { // 분류가 지정되었다면 ?><span><?=($category_name ? "{$view['ca_name']} " : "");?></span><? } // 분류 출력 끝 ?>
|
||||
<?=cut_str(get_text($view['wr_subject']), 70) // 글제목 출력?>
|
||||
</h1>
|
||||
|
||||
<section id="bo_v_info">
|
||||
<h2>게시물 정보</h2>
|
||||
작성자 <strong><?=$view['name']?><? if ($is_ip_view) { echo " ($ip)"; } ?></strong>
|
||||
<span class="sound_only">작성일</span><strong><?=date("y-m-d H:i", strtotime($view['wr_datetime']))?></strong>
|
||||
조회<strong><?=number_format($view['wr_hit'])?>회</strong>
|
||||
댓글<strong><?=number_format($view['wr_comment'])?>건</strong>
|
||||
</section>
|
||||
|
||||
<!-- 링크 버튼 -->
|
||||
<div style="float:right;">
|
||||
<?
|
||||
ob_start();
|
||||
if ($view['file']['count']) {
|
||||
$cnt = 0;
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
|
||||
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_list_search.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
|
||||
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_modify.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
<? if($cnt) { ?>
|
||||
<section id="bo_v_file">
|
||||
<h2>첨부파일</h2>
|
||||
<ul>
|
||||
<?
|
||||
// 가변 파일
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<? echo $view['file'][$i]['href']; ?>" onclick="javascript:file_download('<? echo $view['file'][$i]['href'].'&confirm=yes'; ?>', '<?=$view['file'][$i]['source']?>'); return false;">
|
||||
<img src="<?=$board_skin_url?>/img/icon_file.gif" alt="첨부파일">
|
||||
<strong><?=$view['file'][$i]['source']?></strong>
|
||||
<span> (<?=$view['file'][$i]['size']?>)</span>
|
||||
</a>
|
||||
<span class="bo_v_file_cnt"><?=$view['file'][$i]['download']?>회 다운로드</span>
|
||||
<span>DATE : <?=$view['file'][$i]['datetime']?></span>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
$link_buttons = ob_get_contents();
|
||||
ob_end_flush();
|
||||
if (implode('', $view['link'])) {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<section id="bo_v_link">
|
||||
<h2>관련링크</h2>
|
||||
<ul>
|
||||
<?
|
||||
// 링크
|
||||
$cnt = 0;
|
||||
for ($i=1; $i<=count($view['link']); $i++) {
|
||||
if ($view['link'][$i]) {
|
||||
$cnt++;
|
||||
$link = cut_str($view['link'][$i], 70);
|
||||
?>
|
||||
<li>
|
||||
<a href="<?=$view['link_href'][$i]?>" target="_blank">
|
||||
<img src="<?=$board_skin_url?>/img/icon_link.gif" alt="관련링크">
|
||||
<strong><?=$link?></strong>
|
||||
</a>
|
||||
<span class="bo_v_link_cnt"><?=$view['link_hit'][$i]?>회 연결</span>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<? } ?>
|
||||
|
||||
<div style="border:1px solid #ddd; clear:both; height:34px; background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;">
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=100%>
|
||||
<tr>
|
||||
<td style="padding:8px 0 0 10px;">
|
||||
<div style="color:#505050; font-size:13px; font-weight:bold; word-break:break-all;">
|
||||
<? if ($is_category) { echo ($category_name ? "[{$view['ca_name']}] " : ""); } ?>
|
||||
<?=cut_hangul_last(get_text($view['wr_subject']))?>
|
||||
</div>
|
||||
</td>
|
||||
<td align="right" style="padding:6px 6px 0 0;" width=120>
|
||||
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('$scrap_href');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="height:3px; background:url(<?=$board_skin_path?>/img/title_shadow.gif) repeat-x; line-height:1px; font-size:1px;"></div>
|
||||
<nav id="bo_v_top">
|
||||
<h2>게시물 상단 버튼</h2>
|
||||
<?
|
||||
ob_start();
|
||||
?>
|
||||
<? if ($prev_href || $next_href) { ?>
|
||||
<ul class="bo_v_nb">
|
||||
<? if ($prev_href) { ?><li><a href="<?=$prev_href?>" class="btn02">이전글</a></li><? } ?>
|
||||
<? if ($next_href) { ?><li><a href="<?=$next_href?>" class="btn02">다음글</a></li><? } ?>
|
||||
</ul>
|
||||
<? } ?>
|
||||
|
||||
<ul class="bo_v_com">
|
||||
<? if ($update_href) { ?><li><a href="<?=$update_href?>" class="btn02">수정</a></li><? } ?>
|
||||
<? if ($delete_href) { ?><li><a href="<?=$delete_href?>" onclick="del(this.href); return false;" class="btn02">삭제</a></li><? } ?>
|
||||
<? if ($copy_href) { ?><li><a href="<?=$copy_href?>" onclick="board_move(this.href); return false;" class="btn03">복사</a></li><? } ?>
|
||||
<? if ($move_href) { ?><li><a href="<?=$move_href?>" onclick="board_move(this.href); return false;" class="btn03">이동</a></li><? } ?>
|
||||
<? if ($search_href) { ?><li><a href="<?=$search_href?>" class="btn02">검색</a></li><? } ?>
|
||||
<li><a href="<?=$list_href?>" class="btn02">목록</a></li>
|
||||
<? if ($reply_href) { ?><li><a href="<?=$reply_href?>" class="btn02">답변</a></li><? } ?>
|
||||
<? if ($write_href) { ?><li><a href="<?=$write_href?>" class="btn01">글쓰기</a></li><? } ?>
|
||||
</ul>
|
||||
<?
|
||||
$link_buttons = ob_get_contents();
|
||||
ob_end_flush();
|
||||
?>
|
||||
</nav>
|
||||
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=<?=$width?>>
|
||||
<tr>
|
||||
<td height=30 background="<?=$board_skin_path?>/img/view_dot.gif" style="color:#888;">
|
||||
<div style="float:left;">
|
||||
글쓴이 :
|
||||
<?=$view[name]?><? if ($is_ip_view) { echo " ($ip)"; } ?>
|
||||
</div>
|
||||
<div style="float:right;">
|
||||
<img src="<?=$board_skin_path?>/img/icon_view.gif" border='0' align=absmiddle> 조회 : <?=number_format($view['wr_hit'])?>
|
||||
<? if ($is_good) { ?> <img src="<?=$board_skin_path?>/img/icon_good.gif" border='0' align=absmiddle> 추천 : <?=number_format($view['wr_good'])?><? } ?>
|
||||
<? if ($is_nogood) { ?> <img src="<?=$board_skin_path?>/img/icon_nogood.gif" border='0' align=absmiddle> 비추천 : <?=number_format($view['wr_nogood'])?><? } ?>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<article id="bo_v_atc">
|
||||
<header>
|
||||
<h1>본문</h1>
|
||||
</header>
|
||||
|
||||
<?
|
||||
// 가변 파일
|
||||
$cnt = 0;
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
if ($view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
$cnt++;
|
||||
echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
|
||||
echo " <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle border='0'>";
|
||||
echo "<a href=\"javascript:file_download('{$view['file'][$i]['href']}', '".urlencode($view['file'][$i]['source'])."');\" title='{$view['file'][$i]['content']}'>";
|
||||
echo " <span style=\"color:#888;\">{$view['file'][$i]['source']} ({$view['file'][$i]['size']})</span>";
|
||||
echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view['file'][$i]['download']}]</span>";
|
||||
echo " <span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view['file'][$i]['datetime']}</span>";
|
||||
echo "</a></td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
// 링크
|
||||
$cnt = 0;
|
||||
for ($i=1; $i<=$g4['link_count']; $i++) {
|
||||
if ($view['link'][$i]) {
|
||||
$cnt++;
|
||||
$link = cut_str($view['link'][$i], 70);
|
||||
echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
|
||||
echo " <img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle border='0'>";
|
||||
echo "<a href='{$view['link_href'][$i]}' target=_blank>";
|
||||
echo " <span style=\"color:#888;\">{$link}</span>";
|
||||
echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view['link_hit'][$i]}]</span>";
|
||||
echo "</a></td></tr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td height="150" style="word-break:break-all; padding:10px;">
|
||||
<?
|
||||
// 파일 출력
|
||||
for ($i=0; $i<=count($view['file']); $i++) {
|
||||
if ($view['file'][$i]['view'])
|
||||
echo $view['file'][$i]['view'] . "<p>";
|
||||
if ($view['file'][$i]['view']) {
|
||||
if ($i == 0) echo "<div id=\"bo_v_img\">";
|
||||
echo $view['file'][$i]['view'];
|
||||
if ($i == 0) echo "</div>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- 내용 출력 -->
|
||||
<span id="writeContents"><?=$view['content'];?></span>
|
||||
|
||||
<div id="bo_v_con"><?=$view['content'];?></div>
|
||||
<?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
|
||||
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
|
||||
|
||||
<? if ($nogood_href) {?>
|
||||
<div style="width:72px; height:55px; background:url(<?=$board_skin_path?>/img/good_bg.gif) no-repeat; text-align:center; float:right;">
|
||||
<div style="color:#888; margin:7px 0 5px 0;">비추천 : <?=number_format($view['wr_nogood'])?></div>
|
||||
<div><a href="<?=$nogood_href?>" target="hiddenframe"><img src="<?=$board_skin_path?>/img/icon_nogood.gif" border='0' align="absmiddle"></a></div>
|
||||
<? if ($is_signature) { ?><p><?=$signature?></p><? } ?>
|
||||
|
||||
<? if ($scrap_href || $good_href || $nogood_href) { ?>
|
||||
<div id="bo_v_act">
|
||||
<? if ($scrap_href) { ?><a href="<? echo $scrap_href; ?>" target="_blank" onclick="win_scrap(this.href); return false;" class="btn02">스크랩</a><? } ?>
|
||||
<? if ($good_href) {?><a href="<?=$good_href?>" class="btn02" target="hiddenframe">추천 <strong><?=number_format($view['wr_good'])?></strong></a><? } ?>
|
||||
<? if ($nogood_href) {?><a href="<?=$nogood_href?>" class="btn02" target="hiddenframe">비추천 <strong><?=number_format($view['wr_nogood'])?></strong></a><? } ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
</article>
|
||||
|
||||
<? if ($good_href) {?>
|
||||
<div style="width:72px; height:55px; background:url(<?=$board_skin_path?>/img/good_bg.gif) no-repeat; text-align:center; float:right;">
|
||||
<div style="color:#888; margin:7px 0 5px 0;"><span style='color:crimson;'>추천 : <?=number_format($view['wr_good'])?></span></div>
|
||||
<div><a href="<?=$good_href?>" target="hiddenframe"><img src="<?=$board_skin_path?>/img/icon_good.gif" border='0' align="absmiddle"></a></div>
|
||||
</div>
|
||||
<? } ?>
|
||||
<?
|
||||
// 코멘트 입출력
|
||||
include_once('./view_comment.php');
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<? if ($is_signature) { echo "<tr><td align='center' style='border-bottom:1px solid #E7E7E7; padding:5px 0;'>$signature</td></tr>"; } // 서명 출력 ?>
|
||||
</table>
|
||||
<br>
|
||||
<nav id="bo_v_bot">
|
||||
<h2>게시물 하단 버튼</h2>
|
||||
|
||||
<?
|
||||
// 코멘트 입출력
|
||||
include_once('./view_comment.php');
|
||||
?>
|
||||
<!-- 링크 버튼 -->
|
||||
<?=$link_buttons?>
|
||||
</nav>
|
||||
|
||||
<div style="height:1px; line-height:1px; font-size:1px; background-color:#ddd; clear:both;"> </div>
|
||||
|
||||
<div style="clear:both; height:43px;">
|
||||
<div style="float:left; margin-top:10px;">
|
||||
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
|
||||
</div>
|
||||
|
||||
<!-- 링크 버튼 -->
|
||||
<div style="float:right; margin-top:10px;">
|
||||
<?=$link_buttons?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height:2px; line-height:1px; font-size:1px; background-color:#dedede; clear:both;"> </div>
|
||||
|
||||
</td></tr></table><br>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
function file_download(link, file) {
|
||||
<? if ($board['bo_download_point'] < 0) { ?>if (confirm("'"+decodeURIComponent(file)+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board['bo_download_point'])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
|
||||
<? if ($board['bo_download_point'] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board['bo_download_point'])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
|
||||
document.location.href=link;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="<?=$g4['path']?>/js/board.js"></script>
|
||||
<script type="text/javascript">
|
||||
window.onload=function() {
|
||||
resizeBoardImage(<?=(int)$board['bo_image_width']?>);
|
||||
drawFont();
|
||||
function board_move(href)
|
||||
{
|
||||
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="<?=G4_JS_URL?>/board.js"></script>
|
||||
<!-- 게시글 보기 끝 -->
|
||||
|
||||
<script>
|
||||
// 이미지 등비율 리사이징
|
||||
$(window).load(function() {
|
||||
view_image_resize();
|
||||
});
|
||||
|
||||
function view_image_resize()
|
||||
{
|
||||
var $img = $('#bo_v_atc img');
|
||||
var img_wrap = $('#bo_v_atc').width();
|
||||
|
||||
$img.each(function() {
|
||||
var img_width = $(this).width();
|
||||
$(this).data("width", img_width); // 원래 이미지 사이즈
|
||||
if (img_width > img_wrap) {
|
||||
$(this).addClass('img_fix');
|
||||
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
|
||||
$(this).removeClass('img_fix');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@ -2,312 +2,272 @@
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?=$comment_min?>); // 최소
|
||||
var char_max = parseInt(<?=$comment_max?>); // 최대
|
||||
</script>
|
||||
|
||||
<!-- 코멘트 리스트 -->
|
||||
<div id="commentContents">
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$comment_id = $list[$i]['wr_id'];
|
||||
?>
|
||||
<a name="c_<?=$comment_id?>"></a>
|
||||
<table width=100% cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><? for ($k=0; $k<strlen($list[$i]['wr_comment_reply']); $k++) echo " "; ?></td>
|
||||
<td width='100%'>
|
||||
<!-- 댓글 리스트 -->
|
||||
<section id="bo_vc">
|
||||
<h2>댓글</h2>
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$comment_id = $list[$i]['wr_id'];
|
||||
$cmt_depth = ""; // 댓글단계
|
||||
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 20;
|
||||
$str = $list[$i]['content'];
|
||||
if (strstr($list[$i]['wr_option'], "secret"))
|
||||
$str = $str;
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
// FLASH XSS 공격에 의해 주석 처리 - 110406
|
||||
//$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
|
||||
$str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
|
||||
?>
|
||||
<article id="c_<?=$comment_id?>" <?if ($cmt_depth) {?>style="margin-left:<?=$cmt_depth?>px;border-top-color:#e0e0e0"<?}?>>
|
||||
<header>
|
||||
<h1><?=$list[$i]['wr_name']?>님의 댓글</h1>
|
||||
<?=$list[$i]['name']?>
|
||||
<? if ($cmt_depth) {?><img src="<?=$board_skin_url?>/img/icon_reply.gif" class="icon_reply" alt="댓글의 댓글"><? } ?>
|
||||
<? if ($is_ip_view) { ?>
|
||||
아이피
|
||||
<span class="bo_vc_hdinfo"><?=$list[$i]['ip'];?></span>
|
||||
<? } ?>
|
||||
작성일
|
||||
<span class="bo_vc_hdinfo"><time datetime="<?=date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime']))?>"><?=$list[$i]['datetime']?></time></span>
|
||||
</header>
|
||||
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=100%>
|
||||
<tr>
|
||||
<td height=1 colspan=3 bgcolor="#dddddd"><td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=1 colspan=3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<div style="height:28px; background:url(<?=$board_skin_path?>/img/co_title_bg.gif); clear:both; line-height:28px;">
|
||||
<div style="float:left; margin:2px 0 0 2px;">
|
||||
<strong><?=$list[$i]['name']?></strong>
|
||||
<span style="color:#888888; font-size:11px;"><?=$list[$i]['datetime']?></span>
|
||||
</div>
|
||||
<div style="float:right; margin-top:5px;">
|
||||
<? if ($is_ip_view) { echo " <span style=\"color:#B2B2B2; font-size:11px;\">{$list[$i]['ip']}</span>"; } ?>
|
||||
<? if ($list[$i]['is_reply']) { echo "<a href=\"javascript:comment_box('{$comment_id}', 'c');\"><img src='$board_skin_path/img/co_btn_reply.gif' border=0 align=absmiddle alt='답변'></a> "; } ?>
|
||||
<? if ($list[$i]['is_edit']) { echo "<a href=\"javascript:comment_box('{$comment_id}', 'cu');\"><img src='$board_skin_path/img/co_btn_modify.gif' border=0 align=absmiddle alt='수정'></a> "; } ?>
|
||||
<? if ($list[$i]['is_del']) { echo "<a href=\"javascript:comment_delete('{$list[$i]['del_link']}');\"><img src='$board_skin_path/img/co_btn_delete.gif' border=0 align=absmiddle alt='삭제'></a> "; } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 댓글 출력 -->
|
||||
<p>
|
||||
<? if (strstr($list[$i]['wr_option'], "secret")) echo "<img src=\"\" alt=\"비밀글\"><br>";?>
|
||||
<?=$str?>
|
||||
</p>
|
||||
|
||||
<!-- 코멘트 출력 -->
|
||||
<div style='line-height:20px; padding:7px; word-break:break-all; overflow:hidden; clear:both; '>
|
||||
<?
|
||||
if (strstr($list[$i]['wr_option'], "secret")) echo "<span style='color:#ff6600;'>*</span> ";
|
||||
$str = $list[$i]['content'];
|
||||
if (strstr($list[$i]['wr_option'], "secret"))
|
||||
$str = "<span class='small' style='color:#ff6600;'>$str</span>";
|
||||
<span id="edit_<?=$comment_id?>"></span><!-- 수정 -->
|
||||
<span id="reply_<?=$comment_id?>"></span><!-- 답변 -->
|
||||
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
// FLASH XSS 공격에 의해 주석 처리 - 110406
|
||||
//$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
|
||||
$str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);' border='0'>", $str);
|
||||
echo $str;
|
||||
?>
|
||||
</div>
|
||||
<span id='edit_<?=$comment_id?>' style='display:none;'></span><!-- 수정 -->
|
||||
<span id='reply_<?=$comment_id?>' style='display:none;'></span><!-- 답변 -->
|
||||
</div>
|
||||
<input type=hidden id='secret_comment_<?=$comment_id?>' value="<?=strstr($list[$i]['wr_option'],"secret")?>">
|
||||
<textarea id='save_comment_<?=$comment_id?>' style='display:none;'><?=get_text($list[$i]['content1'], 0)?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=5 colspan=3></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" id="secret_comment_<?=$comment_id?>" value="<?=strstr($list[$i]['wr_option'],"secret")?>">
|
||||
<textarea id="save_comment_<?=$comment_id?>" style="display:none"><?=get_text($list[$i]['content1'], 0)?></textarea>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<? } ?>
|
||||
</div>
|
||||
<!-- 코멘트 리스트 -->
|
||||
<? if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
$query_string = str_replace("&", "&", $_SERVER['QUERY_STRING']);
|
||||
|
||||
<? if ($is_comment_write) { ?>
|
||||
<!-- 코멘트 입력 -->
|
||||
<div id=comment_write style="display:none;">
|
||||
<table width=100% border=0 cellpadding=1 cellspacing=0 bgcolor="#dddddd"><tr><td>
|
||||
<form name="fviewcomment" method="post" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" autocomplete="off" style="margin:0px;">
|
||||
<input type=hidden name=w id=w value='c'>
|
||||
<input type=hidden name=bo_table value='<?=$bo_table?>'>
|
||||
<input type=hidden name=wr_id value='<?=$wr_id?>'>
|
||||
<input type=hidden name=comment_id id='comment_id' value=''>
|
||||
<input type=hidden name=sca value='<?=$sca?>' >
|
||||
<input type=hidden name=sfl value='<?=$sfl?>' >
|
||||
<input type=hidden name=stx value='<?=$stx?>'>
|
||||
<input type=hidden name=spt value='<?=$spt?>'>
|
||||
<input type=hidden name=page value='<?=$page?>'>
|
||||
<input type=hidden name=is_good value=''>
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
<table width=100% cellpadding=3 height=156 cellspacing=0 bgcolor="#ffffff" style="border:1px solid #fff; background:url(<?=$board_skin_path?>/img/co_bg.gif) x-repeat;">
|
||||
<tr>
|
||||
<td colspan="2" style="padding:5px 0 0 5px;">
|
||||
<span style="cursor: pointer;" onclick="textarea_decrease('wr_content', 8);"><img src="<?=$board_skin_path?>/img/co_btn_up.gif" border='0'></span>
|
||||
<span style="cursor: pointer;" onclick="textarea_original('wr_content', 8);"><img src="<?=$board_skin_path?>/img/co_btn_init.gif" border='0'></span>
|
||||
<span style="cursor: pointer;" onclick="textarea_increase('wr_content', 8);"><img src="<?=$board_skin_path?>/img/co_btn_down.gif" border='0'></span>
|
||||
<? if ($is_guest) { ?>
|
||||
이름 <INPUT type=text maxLength=20 size=10 name="wr_name" itemname="이름" required class=ed>
|
||||
패스워드 <INPUT type=password maxLength=20 size=10 name="wr_password" itemname="패스워드" required class=ed>
|
||||
<? if ($is_guest) { ?>
|
||||
<img id='kcaptcha_image' />
|
||||
<input title="왼쪽의 글자를 입력하세요." type="input" name="wr_key" size="10" itemname="자동등록방지" required class=ed>
|
||||
<?}?>
|
||||
$c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
?>
|
||||
<footer>
|
||||
<ul class="bo_vc_act">
|
||||
<? if ($list[$i]['is_reply']) { ?><li><a href="<? echo $c_reply_href; ?>" onclick="comment_box('<?=$comment_id?>', 'c'); return false;">답변</a></li><? } ?>
|
||||
<? if ($list[$i]['is_edit']) { ?><li><a href="<? echo $c_edit_href; ?>" onclick="comment_box('<?=$comment_id?>', 'cu'); return false;">수정</a></li><? } ?>
|
||||
<? if ($list[$i]['is_del']) { ?><li><a href="<? echo $list[$i]['del_link']; ?>" onclick="commen_delete('<?=$list[$i]['del_link']?>'); return false;">삭제</a></li><? } ?>
|
||||
</ul>
|
||||
</footer>
|
||||
<? } ?>
|
||||
<input type=checkbox id="wr_secret" name="wr_secret" value="secret">비밀글
|
||||
<? if ($comment_min || $comment_max) { ?><span id=char_count></span>글자<?}?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=95%>
|
||||
<textarea id="wr_content" name="wr_content" rows=8 itemname="내용" required
|
||||
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?> style='width:100%; word-break:break-all;' class=tx></textarea>
|
||||
<? if ($comment_min || $comment_max) { ?><script type="text/javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
|
||||
</td>
|
||||
<td width=85 align=center>
|
||||
<div><input type="image" src="<?=$board_skin_path?>/img/co_btn_write.gif" border=0 accesskey='s'></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
</article>
|
||||
<?}?>
|
||||
<? if ($i == 0) { //댓글이 없다면 ?><p id="bo_vc_empty">등록된 댓글이 없습니다.</p><? } ?>
|
||||
|
||||
<script type="text/javascript" src="<?=$g4['path']?>/js/jquery.kcaptcha.js"></script>
|
||||
<script type="text/javascript">
|
||||
var save_before = '';
|
||||
var save_html = document.getElementById('comment_write').innerHTML;
|
||||
<? if ($is_comment_write) {
|
||||
if($w == '')
|
||||
$w = 'c';
|
||||
?>
|
||||
<aside id="bo_vc_w">
|
||||
<h2>댓글쓰기</h2>
|
||||
<form name="fviewcomment" method="post" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" autocomplete="off">
|
||||
<input type="hidden" id="w" name="w" value="<?=$w?>">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
|
||||
<input type="hidden" id="comment_id" name="comment_id" value="<?=$c_id?>">
|
||||
<input type="hidden" name="sca" value="<?=$sca?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="spt" value="<?=$spt?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="is_good" value="">
|
||||
|
||||
<fieldset id="bo_vc_winfo">
|
||||
<legend class="sound_only">작성자</legend>
|
||||
<? if ($is_guest) { ?>
|
||||
<label for="wr_name">이름<strong class="sound_only">필수</strong></label> <input type="text" id="wr_name" name="wr_name" class="fs_input required" maxLength="20" size="5" required>
|
||||
<label for="wr_password">패스워드<strong class="sound_only">필수</strong></label> <input type="password" id="wr_password" name="wr_password" class="fs_input required" maxLength="20" size="10" required>
|
||||
<? } ?>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="secret">
|
||||
<label for="wr_secret">비밀글</label>
|
||||
</fieldset>
|
||||
<? echo $captcha_html; ?>
|
||||
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?}?>
|
||||
<div id="bo_vc_warea">
|
||||
<textarea id="wr_content" name="wr_content" required
|
||||
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?> title="댓글내용입력(필수)"><? echo $c_wr_content; ?></textarea>
|
||||
<? if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?}?>
|
||||
<input type="submit" class="bo_vc_submit" value="댓글입력">
|
||||
</div>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
<script>
|
||||
var save_before = '';
|
||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
|
||||
function good_and_write()
|
||||
{
|
||||
var f = document.fviewcomment;
|
||||
if (fviewcomment_submit(f)) {
|
||||
f.is_good.value = 1;
|
||||
f.submit();
|
||||
} else {
|
||||
f.is_good.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
function good_and_write()
|
||||
{
|
||||
var f = document.fviewcomment;
|
||||
if (fviewcomment_submit(f)) {
|
||||
f.is_good.value = 1;
|
||||
f.submit();
|
||||
} else {
|
||||
f.is_good.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
f.is_good.value = 0;
|
||||
|
||||
/*
|
||||
var s;
|
||||
if (s = word_filter_check(document.getElementById('wr_content').value))
|
||||
{
|
||||
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
|
||||
document.getElementById('wr_content').focus();
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: "<?=$board_skin_path?>/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": "",
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 양쪽 공백 없애기
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||
if (char_min > 0 || char_max > 0)
|
||||
{
|
||||
check_byte('wr_content', 'char_count');
|
||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||
if (char_min > 0 && char_min > cnt)
|
||||
/*
|
||||
var s;
|
||||
if (s = word_filter_check(document.getElementById('wr_content').value))
|
||||
{
|
||||
alert("코멘트는 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
} else if (char_max > 0 && char_max < cnt)
|
||||
{
|
||||
alert("코멘트는 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
|
||||
document.getElementById('wr_content').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!document.getElementById('wr_content').value)
|
||||
{
|
||||
alert("코멘트를 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('패스워드가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!check_kcaptcha(f.wr_key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
jQuery.fn.extend({
|
||||
kcaptcha_load: function() {
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: g4_path+'/'+g4_bbs+'/kcaptcha_session.php',
|
||||
cache: false,
|
||||
url: g4_bbs_url+"/filter.ajax.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": "",
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(text) {
|
||||
$('#kcaptcha_image')
|
||||
.attr('src', g4_path+'/'+g4_bbs+'/kcaptcha_image.php?t=' + (new Date).getTime())
|
||||
.css('cursor', '')
|
||||
.attr('title', '');
|
||||
md5_norobot_key = text;
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
function comment_box(comment_id, work)
|
||||
{
|
||||
var el_id;
|
||||
// 코멘트 아이디가 넘어오면 답변, 수정
|
||||
if (comment_id)
|
||||
{
|
||||
if (work == 'c')
|
||||
el_id = 'reply_' + comment_id;
|
||||
else
|
||||
el_id = 'edit_' + comment_id;
|
||||
}
|
||||
else
|
||||
el_id = 'comment_write';
|
||||
|
||||
if (save_before != el_id)
|
||||
{
|
||||
if (save_before)
|
||||
{
|
||||
document.getElementById(save_before).style.display = 'none';
|
||||
document.getElementById(save_before).innerHTML = '';
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById(el_id).style.display = '';
|
||||
document.getElementById(el_id).innerHTML = save_html;
|
||||
// 코멘트 수정
|
||||
if (work == 'cu')
|
||||
// 양쪽 공백 없애기
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||
if (char_min > 0 || char_max > 0)
|
||||
{
|
||||
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
||||
if (typeof char_count != 'undefined')
|
||||
check_byte('wr_content', 'char_count');
|
||||
if (document.getElementById('secret_comment_'+comment_id).value)
|
||||
document.getElementById('wr_secret').checked = true;
|
||||
check_byte('wr_content', 'char_count');
|
||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||
if (char_min > 0 && char_min > cnt)
|
||||
{
|
||||
alert("댓글는 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
} else if (char_max > 0 && char_max < cnt)
|
||||
{
|
||||
alert("댓글는 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!document.getElementById('wr_content').value)
|
||||
{
|
||||
alert("댓글를 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('패스워드가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
<? if($is_guest) echo chk_captcha_js(); ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function comment_box(comment_id, work)
|
||||
{
|
||||
var el_id;
|
||||
// 댓글 아이디가 넘어오면 답변, 수정
|
||||
if (comment_id)
|
||||
{
|
||||
if (work == 'c')
|
||||
el_id = 'reply_' + comment_id;
|
||||
else
|
||||
document.getElementById('wr_secret').checked = false;
|
||||
el_id = 'edit_' + comment_id;
|
||||
}
|
||||
else
|
||||
el_id = 'bo_vc_w';
|
||||
|
||||
if (save_before != el_id)
|
||||
{
|
||||
if (save_before)
|
||||
{
|
||||
document.getElementById(save_before).style.display = 'none';
|
||||
document.getElementById(save_before).innerHTML = '';
|
||||
}
|
||||
|
||||
document.getElementById(el_id).style.display = '';
|
||||
document.getElementById(el_id).innerHTML = save_html;
|
||||
// 댓글 수정
|
||||
if (work == 'cu')
|
||||
{
|
||||
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
||||
if (typeof char_count != 'undefined')
|
||||
check_byte('wr_content', 'char_count');
|
||||
if (document.getElementById('secret_comment_'+comment_id).value)
|
||||
document.getElementById('wr_secret').checked = true;
|
||||
else
|
||||
document.getElementById('wr_secret').checked = false;
|
||||
}
|
||||
|
||||
document.getElementById('comment_id').value = comment_id;
|
||||
document.getElementById('w').value = work;
|
||||
|
||||
save_before = el_id;
|
||||
}
|
||||
|
||||
document.getElementById('comment_id').value = comment_id;
|
||||
document.getElementById('w').value = work;
|
||||
|
||||
save_before = el_id;
|
||||
if (typeof(wrestInitialized) != 'undefined')
|
||||
wrestInitialized();
|
||||
}
|
||||
|
||||
if (typeof(wrestInitialized) != 'undefined')
|
||||
wrestInitialized();
|
||||
function comment_delete(url)
|
||||
{
|
||||
if (confirm("이 댓글를 삭제하시겠습니까?")) location.href = url;
|
||||
}
|
||||
|
||||
//jQuery(this).kcaptcha_load();
|
||||
if (comment_id && work == 'c')
|
||||
$.kcaptcha_run();
|
||||
}
|
||||
|
||||
function comment_delete(url)
|
||||
{
|
||||
if (confirm("이 코멘트를 삭제하시겠습니까?")) location.href = url;
|
||||
}
|
||||
|
||||
comment_box('', 'c'); // 코멘트 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||
</script>
|
||||
<? } ?>
|
||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||
</script>
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
@ -1,264 +1,163 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($is_dhtml_editor) {
|
||||
include_once($g4['path'].'/lib/cheditor4.lib.php');
|
||||
echo "<script src='{$g4['cheditor4_path']}/cheditor.js'></script>";
|
||||
echo cheditor1('wr_content', '100%', '250');
|
||||
}
|
||||
?>
|
||||
|
||||
<div style="height:14px; line-height:1px; font-size:1px;"> </div>
|
||||
|
||||
<style type="text/css">
|
||||
.write_head { height:30px; text-align:center; color:#8492A0; }
|
||||
.field { border:1px solid #ccc; }
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?=$write_min?>); // 최소
|
||||
var char_max = parseInt(<?=$write_max?>); // 최대
|
||||
</script>
|
||||
|
||||
<form name="fwrite" method="post" onsubmit="return fwrite_submit(this);" enctype="multipart/form-data" style="margin:0px;">
|
||||
<input type=hidden name=null>
|
||||
<input type=hidden name=w value="<?=$w?>">
|
||||
<input type=hidden name=bo_table value="<?=$bo_table?>">
|
||||
<input type=hidden name=wr_id value="<?=$wr_id?>">
|
||||
<input type=hidden name=sca value="<?=$sca?>">
|
||||
<input type=hidden name=sfl value="<?=$sfl?>">
|
||||
<input type=hidden name=stx value="<?=$stx?>">
|
||||
<input type=hidden name=spt value="<?=$spt?>">
|
||||
<input type=hidden name=sst value="<?=$sst?>">
|
||||
<input type=hidden name=sod value="<?=$sod?>">
|
||||
<input type=hidden name=page value="<?=$page?>">
|
||||
|
||||
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
|
||||
|
||||
|
||||
<div style="border:1px solid #ddd; height:34px; background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;">
|
||||
<div style="font-weight:bold; font-size:14px; margin:7px 0 0 10px;">:: <?=$title_msg?> ::</div>
|
||||
</div>
|
||||
<div style="height:3px; background:url(<?=$board_skin_path?>/img/title_shadow.gif) repeat-x; line-height:1px; font-size:1px;"></div>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<colgroup width=90>
|
||||
<colgroup width=''>
|
||||
<tr><td colspan="2" style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; height:3px;"></td></tr>
|
||||
<? if ($is_name) { ?>
|
||||
<tr>
|
||||
<td class=write_head>이 름</td>
|
||||
<td><input class='ed' maxlength=20 size=15 name=wr_name itemname="이름" required value="<?=$name?>"></td></tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_password) { ?>
|
||||
<tr>
|
||||
<td class=write_head>패스워드</td>
|
||||
<td><input class='ed' type=password maxlength=20 size=15 name=wr_password itemname="패스워드" <?=$password_required?>></td></tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_email) { ?>
|
||||
<tr>
|
||||
<td class=write_head>이메일</td>
|
||||
<td><input class='ed' maxlength=100 size=50 name=wr_email email itemname="이메일" value="<?=$email?>"></td></tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_homepage) { ?>
|
||||
<tr>
|
||||
<td class=write_head>홈페이지</td>
|
||||
<td><input class='ed' size=50 name=wr_homepage itemname="홈페이지" value="<?=$homepage?>"></td></tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<? } ?>
|
||||
<h1 id="wrapper_title"><?=$g4['title']?></h1>
|
||||
|
||||
<form id="fwrite" name="fwrite" method="post" action="<?=$action_url?>" onsubmit="return fwrite_submit(this);" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?=$w?>">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
|
||||
<input type="hidden" name="sca" value="<?=$sca?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="spt" value="<?=$spt?>">
|
||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||
<input type="hidden" name="sod" value="<?=$sod?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<?
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
||||
$option = '';
|
||||
if ($is_notice) {
|
||||
$option .= '<input type=checkbox name=notice value="1" '.$notice_checked.'>공지 ';
|
||||
$option .= PHP_EOL.'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'.PHP_EOL.'<label for="notice">공지</label>';
|
||||
}
|
||||
|
||||
if ($is_html) {
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type=hidden value="html1" name="html">';
|
||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||
} else {
|
||||
$option .= '<input onclick="html_auto_br(this);" type=checkbox value="'.$html_value.'" name="html" '.$html_checked.'><span class=w_title>html</span> ';
|
||||
$option .= PHP_EOL.'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'.PHP_EOL.'<label for="html">html</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_secret) {
|
||||
if ($is_admin || $is_secret==1) {
|
||||
$option .= '<input type=checkbox value="secret" name="secret" '.$secret_checked.'><span class=w_title>비밀글</span> ';
|
||||
$option .= PHP_EOL.'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'.PHP_EOL.'<label for="secret">비밀글</label>';
|
||||
} else {
|
||||
$option_hidden .= '<input type=hidden value="secret" name="secret">';
|
||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_mail) {
|
||||
$option .= '<input type=checkbox value="mail" name="mail" '.$recv_email_checked.'>답변메일받기 ';
|
||||
$option .= PHP_EOL.'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'.PHP_EOL.'<label for="mail">답변메일받기</label>';
|
||||
}
|
||||
}
|
||||
|
||||
echo $option_hidden;
|
||||
if ($option) {
|
||||
?>
|
||||
|
||||
<table id="bo_w" class="frm_tbl">
|
||||
<tbody>
|
||||
<? if ($is_name) { ?>
|
||||
<tr>
|
||||
<td class=write_head>옵 션</td>
|
||||
<td><?=$option?></td></tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" id="wr_name" name="wr_name" class="frm_input required" size="10" maxlength="20" required value="<?=$name?>"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_password) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_password">패스워드<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="password" id="wr_password" name="wr_password" class="frm_input" maxlength="20" <?=$password_required?>></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_email) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_email">이메일</label></th>
|
||||
<td><input type="text" id="wr_email" name="wr_email" class="frm_input email" size="50" value="<?=$email?>" maxlength="100"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_homepage) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_homepage">홈페이지</label></th>
|
||||
<td><input type="text" id="wr_homepage" name="wr_homepage" class="frm_input" size="50" value="<?=$homepage?>"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($option) { ?>
|
||||
<tr>
|
||||
<th scope="row">옵션</th>
|
||||
<td><?=$option?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_category) { ?>
|
||||
<tr>
|
||||
<td class=write_head>분 류</td>
|
||||
<td><select name=ca_name required itemname="분류"><option value="">선택하세요<?=$category_option?></select></td></tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<th scope="row"><label for="ca_name">분류<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select id="ca_name" name="ca_name" class="required" required>
|
||||
<option value="">선택하세요</option>
|
||||
<?=$category_option?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<tr>
|
||||
<td class=write_head>제 목</td>
|
||||
<td><input class='ed' style="width:100%;" name=wr_subject id="wr_subject" itemname="제목" required value="<?=$subject?>"></td></tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" id="wr_subject" name="wr_subject" class="frm_input required" size="50" required value="<?=$subject?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='write_head' style='padding:5 0 5 10;' colspan='2'>
|
||||
<? if ($is_dhtml_editor) { ?>
|
||||
<?=cheditor2('wr_content', $content);?>
|
||||
<? } else { ?>
|
||||
<table width=100% cellpadding=0 cellspacing=0>
|
||||
<tr>
|
||||
<td width=50% align=left valign=bottom>
|
||||
<span style="cursor: pointer;" onclick="textarea_decrease('wr_content', 10);"><img src="<?=$board_skin_path?>/img/up.gif"></span>
|
||||
<span style="cursor: pointer;" onclick="textarea_original('wr_content', 10);"><img src="<?=$board_skin_path?>/img/start.gif"></span>
|
||||
<span style="cursor: pointer;" onclick="textarea_increase('wr_content', 10);"><img src="<?=$board_skin_path?>/img/down.gif"></span></td>
|
||||
<td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<textarea id="wr_content" name="wr_content" class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
|
||||
<? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>><?=$content?></textarea>
|
||||
<? if ($write_min || $write_max) { ?><script type="text/javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
|
||||
<th scope="row"><label for="wr_content">내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td class="wr_content"><?=editor_html("wr_content", $content, $is_dhtml_editor);?></td>
|
||||
</tr>
|
||||
|
||||
<? for ($i=1; $is_link && $i<=G4_LINK_COUNT; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_link<?=$i?>">링크 #<?=$i?></label></th>
|
||||
<td><input type="text" id="wr_link<?=$i?>" name="wr_link<?=$i?>" class="frm_input" size="50" value="<?if($w=="u"){echo$write['wr_link'.$i];}?>"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? for ($i=0; $is_file && $i<$file_count; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">파일 #<?=$i+1?></th>
|
||||
<td>
|
||||
<input type="file" name="bf_file[]" class="frm_file frm_input" title="파일첨부 <?=$i+1?> : 용량 <?=$upload_max_filesize?> 이하만 업로드 가능">
|
||||
<? if ($is_file_content) { ?>
|
||||
<input type="text" name="bf_content[]" class="frm_file frm_input" value="<? echo $file[$i]['bf_content']; ?>" size="50" title="파일 설명을 입력해주세요.">
|
||||
<?}?>
|
||||
<? if($w == 'u' && $file[$i]['file']) { ?>
|
||||
<input type="checkbox" id="bf_file_del<?=$i?>" name="bf_file_del[<? echo $i; ?>]" value="1"> <label for="bf_file_del<?=$i?>"><? echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
|
||||
<?}?>
|
||||
|
||||
<? if ($is_link) { ?>
|
||||
<? for ($i=1; $i<=$g4['link_count']; $i++) { ?>
|
||||
<? if ($is_guest) { //자동등록방지 ?>
|
||||
<tr>
|
||||
<td class=write_head>링크 #<?=$i?></td>
|
||||
<td><input type='text' class='ed' size=50 name='wr_link<?=$i?>' itemname='링크 #<?=$i?>' value='<?=$write["wr_link{$i}"]?>'></td>
|
||||
</tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_file) { ?>
|
||||
<tr>
|
||||
<td class=write_head>
|
||||
<table cellpadding=0 cellspacing=0>
|
||||
<tr>
|
||||
<td class=write_head style="padding-top:10px; line-height:20px;">
|
||||
파일첨부<br>
|
||||
<span onclick="add_file();" style="cursor:pointer;"><img src="<?=$board_skin_path?>/img/btn_file_add.gif"></span>
|
||||
<span onclick="del_file();" style="cursor:pointer;"><img src="<?=$board_skin_path?>/img/btn_file_minus.gif"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td>
|
||||
<?=$captcha_html?>
|
||||
</td>
|
||||
<td style='padding:5 0 5 0;'><table id="variableFiles" cellpadding=0 cellspacing=0></table><?// print_r2($file); ?>
|
||||
<script type="text/javascript">
|
||||
var flen = 0;
|
||||
function add_file(delete_code)
|
||||
{
|
||||
var upload_count = <?=(int)$board['bo_upload_count']?>;
|
||||
if (upload_count && flen >= upload_count)
|
||||
{
|
||||
alert("이 게시판은 "+upload_count+"개 까지만 파일 업로드가 가능합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
var objTbl;
|
||||
var objRow;
|
||||
var objCell;
|
||||
if (document.getElementById)
|
||||
objTbl = document.getElementById("variableFiles");
|
||||
else
|
||||
objTbl = document.all["variableFiles"];
|
||||
|
||||
objRow = objTbl.insertRow(objTbl.rows.length);
|
||||
objCell = objRow.insertCell(0);
|
||||
|
||||
objCell.innerHTML = "<input type='file' class='ed' name='bf_file[]' title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'>";
|
||||
if (delete_code)
|
||||
objCell.innerHTML += delete_code;
|
||||
else
|
||||
{
|
||||
<? if ($is_file_content) { ?>
|
||||
objCell.innerHTML += "<br><input type='text' class='ed' size=50 name='bf_content[]' title='업로드 이미지 파일에 해당 되는 내용을 입력하세요.'>";
|
||||
<? } ?>
|
||||
;
|
||||
}
|
||||
|
||||
flen++;
|
||||
}
|
||||
|
||||
<?=$file_script; //수정시에 필요한 스크립트?>
|
||||
|
||||
function del_file()
|
||||
{
|
||||
// file_length 이하로는 필드가 삭제되지 않아야 합니다.
|
||||
var file_length = <?=(int)$file_length?>;
|
||||
var objTbl = document.getElementById("variableFiles");
|
||||
if (objTbl.rows.length - 1 > file_length)
|
||||
{
|
||||
objTbl.deleteRow(objTbl.rows.length - 1);
|
||||
flen--;
|
||||
}
|
||||
}
|
||||
</script></td>
|
||||
</tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_guest) { ?>
|
||||
<tr>
|
||||
<td class=write_head><img id='kcaptcha_image' /></td>
|
||||
<td><input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required> 왼쪽의 글자를 입력하세요.</td>
|
||||
</tr>
|
||||
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
|
||||
<? } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%" align="center" valign="top" style="padding-top:30px;">
|
||||
<input type=image id="btn_submit" src="<?=$board_skin_path?>/img/btn_write.gif" border=0 accesskey='s'>
|
||||
<a href="./board.php?bo_table=<?=$bo_table?>"><img id="btn_list" src="<?=$board_skin_path?>/img/btn_list.gif" border=0></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td></tr></table>
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" id="btn_submit" class="btn_submit" value="글쓰기" accesskey="s">
|
||||
<a href="./board.php?bo_table=<?=$bo_table?>" class="btn_cancel">취소</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript" src="<?=$g4['path']?>/js/jquery.kcaptcha.js"></script>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
<?
|
||||
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
|
||||
if ($is_admin)
|
||||
{
|
||||
echo "
|
||||
if (typeof(document.fwrite.ca_name) != 'undefined')
|
||||
{
|
||||
document.fwrite.ca_name.options.length += 1;
|
||||
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].value = '공지';
|
||||
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].text = '공지';
|
||||
}";
|
||||
echo '
|
||||
if (ca_name_select = document.getElementById("ca_name")) {
|
||||
ca_name_select.options.length += 1;
|
||||
ca_name_select.options[ca_name_select.options.length-1].value = "공지";
|
||||
ca_name_select.options[ca_name_select.options.length-1].text = "공지";
|
||||
}';
|
||||
}
|
||||
?>
|
||||
|
||||
@ -272,8 +171,9 @@ with (document.fwrite)
|
||||
wr_content.focus();
|
||||
|
||||
if (typeof(ca_name) != "undefined")
|
||||
if (w.value == "u")
|
||||
ca_name.value = "<?=$write['ca_name']?>";
|
||||
if (w.value == "u") {
|
||||
ca_name.value = "<?=isset($write['ca_name'])?$write['ca_name']:'';?>";
|
||||
}
|
||||
}
|
||||
|
||||
function html_auto_br(obj)
|
||||
@ -291,49 +191,13 @@ function html_auto_br(obj)
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
/*
|
||||
var s = "";
|
||||
if (s = word_filter_check(f.wr_subject.value)) {
|
||||
alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (s = word_filter_check(f.wr_content.value)) {
|
||||
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
if (document.getElementById('char_count')) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (document.getElementById('tx_wr_content')) {
|
||||
if (!ed_wr_content.outputBodyText()) {
|
||||
alert('내용을 입력하십시오.');
|
||||
ed_wr_content.returnFalse();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
<?
|
||||
if ($is_dhtml_editor) echo cheditor3('wr_content');
|
||||
?>
|
||||
<? echo get_editor_js('wr_content'); ?>
|
||||
<? echo chk_editor_js('wr_content'); ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: "<?=$board_skin_path?>/ajax.filter.php",
|
||||
url: g4_bbs_url+"/filter.ajax.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.wr_subject.value,
|
||||
@ -363,23 +227,8 @@ function fwrite_submit(f)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!check_kcaptcha(f.wr_key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById('btn_submit').disabled = true;
|
||||
document.getElementById('btn_list').disabled = true;
|
||||
|
||||
<?
|
||||
if ($g4['https_url'])
|
||||
echo "f.action = '{$g4['https_url']}/{$g4['bbs']}/write_update.php';";
|
||||
else
|
||||
echo "f.action = './write_update.php';";
|
||||
?>
|
||||
<? if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="<?=$g4['path']?>/js/board.js"></script>
|
||||
<script type="text/javascript"> window.onload=function() { drawFont(); } </script>
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
<?
|
||||
$g4_path = '../../..'; // common.php 의 상대 경로
|
||||
include_once($g4_path.'/common.php');
|
||||
?>
|
||||
|
Before Width: | Height: | Size: 154 B |
|
Before Width: | Height: | Size: 102 B |
|
Before Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 71 B |
|
Before Width: | Height: | Size: 80 B |
|
Before Width: | Height: | Size: 80 B |
@ -1,226 +0,0 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
|
||||
$colspan = 5;
|
||||
|
||||
if ($is_checkbox) $colspan++;
|
||||
if ($is_good) $colspan++;
|
||||
if ($is_nogood) $colspan++;
|
||||
?>
|
||||
|
||||
<? if (!$wr_id) {?><h1 id="bo_list_title"><?=$g4['title']?></h1><?}?>
|
||||
|
||||
<p id="bo_list_total">
|
||||
<span>Total <?=number_format($total_count)?>건</span>
|
||||
<?=$page?> 페이지
|
||||
</p>
|
||||
|
||||
<? if ($is_category) { ?>
|
||||
<form id="fcategory" name="fcategory" method="get">
|
||||
<nav id="bo_cate">
|
||||
<h2><?=$board['bo_subject']?> 카테고리</h2>
|
||||
<ul id="bo_cate_ul">
|
||||
<?=$category_option?>
|
||||
</ul>
|
||||
</nav>
|
||||
</form>
|
||||
<? } ?>
|
||||
|
||||
<div class="bo_fx">
|
||||
<fieldset id="bo_sch">
|
||||
<legend>게시물 검색</legend>
|
||||
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="sca" value="<?=$sca?>">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<select name="sfl" title="검색대상">
|
||||
<option value="wr_subject" <?=get_selected($sfl, 'wr_subject', true);?>>제목</option>
|
||||
<option value="wr_content" <?=get_selected($sfl, 'wr_content');?>>내용</option>
|
||||
<option value="wr_subject||wr_content" <?=get_selected($sfl, 'wr_subject||wr_content');?>>제목+내용</option>
|
||||
<option value="mb_id,1" <?=get_selected($sfl, 'mb_id,1');?>>회원아이디</option>
|
||||
<option value="mb_id,0" <?=get_selected($sfl, 'mb_id,0');?>>회원아이디(코)</option>
|
||||
<option value="wr_name,1" <?=get_selected($sfl, 'wr_name,1');?>>글쓴이</option>
|
||||
<option value="wr_name,0" <?=get_selected($sfl, 'wr_name,0');?>>글쓴이(코)</option>
|
||||
</select>
|
||||
<input name="stx" class="fs_input required" maxlength="15" size="15" required value="<?=stripslashes($stx)?>" title="검색어(필수)">
|
||||
<input type="submit" class="fs_submit" value="검색">
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<? if ($rss_href || $write_href) {?>
|
||||
<ul class="btn_bo_user">
|
||||
<? if ($rss_href) { ?><li><a href="<?=$rss_href?>" class="btn02">RSS</a></li><? } ?>
|
||||
<? if ($admin_href) { ?><li><a href="<?=$admin_href?>" class="btn03">관리자</a></li><? } ?>
|
||||
<? if ($write_href) { ?><li><a href="<?=$write_href?>" class="btn01">글쓰기</a></li><? } ?>
|
||||
</ul>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<!-- 게시판 목록 시작 -->
|
||||
<div id="bo_list">
|
||||
<form id="fboardlist" name="fboardlist" method="post" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="spt" value="<?=$spt?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="sw" value="">
|
||||
|
||||
<table class="basic_tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">번호</th>
|
||||
<? if ($is_checkbox) { ?><th scope="col"><input type="checkbox" onclick="if (this.checked) all_checked(true); else all_checked(false);" title="현재 페이지 게시물 전체선택"></th><?}?>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">글쓴이</th>
|
||||
<th scope="col"><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
|
||||
<th scope="col"><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
|
||||
<? if ($is_good) { ?><th scope="col"><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
|
||||
<? if ($is_nogood) { ?><th scope="col"><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
?>
|
||||
<tr class="<? if ($list[$i]['is_notice']) echo "bo_notice";?><? if ($board[1]) echo "bo_sideview";?>">
|
||||
<td class="td_num">
|
||||
<?
|
||||
if ($list[$i]['is_notice']) // 공지사항
|
||||
echo '<strong>공지</strong>';
|
||||
else if ($wr_id == $list[$i]['wr_id'])
|
||||
echo "<span class=\"bo_current\">열람중</span>";
|
||||
else
|
||||
echo $list[$i]['num'];
|
||||
?>
|
||||
</td>
|
||||
<? if ($is_checkbox) { ?><td class="td_chk"><input type="checkbox" name="chk_wr_id[]" value="<?=$list[$i]['wr_id']?>" title="이 게시물 선택"></td><? } ?>
|
||||
<td class="td_subject">
|
||||
<?
|
||||
echo $list[$i]['reply'];
|
||||
echo $list[$i]['icon_reply'];
|
||||
if ($is_category && $list[$i]['ca_name']) {
|
||||
?>
|
||||
<a href="<?=$list[$i]['ca_name_href']?>" class="bo_cate_link"><?=$list[$i]['ca_name']?></a>
|
||||
<? } ?>
|
||||
|
||||
<a href="<?=$list[$i]['href']?>">
|
||||
<?=$list[$i]['subject']?>
|
||||
<? if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><?=$list[$i]['comment_cnt'];?><span class="sound_only">개</span><? } ?>
|
||||
</a>
|
||||
|
||||
<?
|
||||
// if ($list[$i]['link']['count']) { echo '['.$list[$i]['link']['count']}.']'; }
|
||||
// if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
|
||||
|
||||
if (isset($list[$i]['icon_new'])) echo $list[$i]['icon_new'];
|
||||
if (isset($list[$i]['icon_hot'])) echo $list[$i]['icon_hot'];
|
||||
if (isset($list[$i]['icon_file'])) echo $list[$i]['icon_file'];
|
||||
if (isset($list[$i]['icon_link'])) echo $list[$i]['icon_link'];
|
||||
if (isset($list[$i]['icon_secret'])) echo $list[$i]['icon_secret'];
|
||||
?>
|
||||
</td>
|
||||
<td class="td_name"><?=$list[$i]['name']?></td>
|
||||
<td class="td_date"><?=$list[$i]['datetime2']?></td>
|
||||
<td class="td_num"><?=$list[$i]['wr_hit']?></td>
|
||||
<? if ($is_good) { ?><td class="td_num"><?=$list[$i]['wr_good']?></td><? } ?>
|
||||
<? if ($is_nogood) { ?><td class="td_num"><?=$list[$i]['wr_nogood']?></td><? } ?>
|
||||
</tr>
|
||||
<?}?>
|
||||
<? if (count($list) == 0) { echo '<tr><td colspan="'.$colspan.'" class="empty_table">게시물이 없습니다.</td></tr>'; } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<? if ($list_href || $is_checkbox || $write_href) {?>
|
||||
<div class="bo_fx">
|
||||
<ul class="btn_bo_adm">
|
||||
<? if ($list_href) { ?>
|
||||
<li><a href="<?=$list_href?>" class="btn02"> 목록</a></li>
|
||||
<? } ?>
|
||||
<? if ($is_checkbox) { ?>
|
||||
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택삭제"></li>
|
||||
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택복사"></li>
|
||||
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택이동"></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
|
||||
<ul class="btn_bo_user">
|
||||
<li><? if ($write_href) { ?><a href="<?=$write_href?>" class="btn01">글쓰기</a><? } ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<? } ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<? if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||
</noscript>
|
||||
<? } ?>
|
||||
|
||||
<!-- 페이지 -->
|
||||
<? echo $write_pages; ?>
|
||||
|
||||
<? if ($is_checkbox) { ?>
|
||||
<script>
|
||||
function all_checked(sw) {
|
||||
var f = document.fboardlist;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_wr_id[]")
|
||||
f.elements[i].checked = sw;
|
||||
}
|
||||
}
|
||||
|
||||
function fboardlist_submit(f) {
|
||||
var chk_count = 0;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
|
||||
chk_count++;
|
||||
}
|
||||
|
||||
if (!chk_count) {
|
||||
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택복사") {
|
||||
select_copy("copy");
|
||||
return;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택이동") {
|
||||
select_copy("move");
|
||||
return;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 선택한 게시물 복사 및 이동
|
||||
function select_copy(sw) {
|
||||
var f = document.fboardlist;
|
||||
|
||||
if (sw == 'copy')
|
||||
str = "복사";
|
||||
else
|
||||
str = "이동";
|
||||
|
||||
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
|
||||
f.sw.value = sw;
|
||||
f.target = "move";
|
||||
f.action = "./move.php";
|
||||
f.submit();
|
||||
}
|
||||
</script>
|
||||
<? } ?>
|
||||
<!-- 게시판 목록 끝 -->
|
||||
@ -1,198 +0,0 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<p id="bo_v_title"><?=$board['bo_subject']?></p>
|
||||
|
||||
<div id="bo_v">
|
||||
|
||||
<h1 id="bo_v_h1">
|
||||
<? if ($category_name) { // 분류가 지정되었다면 ?><span><?=($category_name ? "{$view['ca_name']} " : "");?></span><? } // 분류 출력 끝 ?>
|
||||
<?=cut_str(get_text($view['wr_subject']), 70) // 글제목 출력?>
|
||||
</h1>
|
||||
|
||||
<section id="bo_v_info">
|
||||
<h2>게시물 정보</h2>
|
||||
작성자 <strong><?=$view['name']?><? if ($is_ip_view) { echo " ($ip)"; } ?></strong>
|
||||
<span class="sound_only">작성일</span><strong><?=date("y-m-d H:i", strtotime($view['wr_datetime']))?></strong>
|
||||
조회<strong><?=number_format($view['wr_hit'])?>회</strong>
|
||||
댓글<strong><?=number_format($view['wr_comment'])?>건</strong>
|
||||
</section>
|
||||
|
||||
<?
|
||||
if ($view['file']['count']) {
|
||||
$cnt = 0;
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<? if($cnt) { ?>
|
||||
<section id="bo_v_file">
|
||||
<h2>첨부파일</h2>
|
||||
<ul>
|
||||
<?
|
||||
// 가변 파일
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<? echo $view['file'][$i]['href']; ?>" onclick="javascript:file_download('<? echo $view['file'][$i]['href'].'&confirm=yes'; ?>', '<?=$view['file'][$i]['source']?>'); return false;">
|
||||
<img src="<?=$board_skin_url?>/img/icon_file.gif" alt="첨부파일">
|
||||
<strong><?=$view['file'][$i]['source']?></strong>
|
||||
<span> (<?=$view['file'][$i]['size']?>)</span>
|
||||
</a>
|
||||
<span class="bo_v_file_cnt"><?=$view['file'][$i]['download']?>회 다운로드</span>
|
||||
<span>DATE : <?=$view['file'][$i]['datetime']?></span>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
if (implode('', $view['link'])) {
|
||||
?>
|
||||
<section id="bo_v_link">
|
||||
<h2>관련링크</h2>
|
||||
<ul>
|
||||
<?
|
||||
// 링크
|
||||
$cnt = 0;
|
||||
for ($i=1; $i<=count($view['link']); $i++) {
|
||||
if ($view['link'][$i]) {
|
||||
$cnt++;
|
||||
$link = cut_str($view['link'][$i], 70);
|
||||
?>
|
||||
<li>
|
||||
<a href="<?=$view['link_href'][$i]?>" target="_blank">
|
||||
<img src="<?=$board_skin_url?>/img/icon_link.gif" alt="관련링크">
|
||||
<strong><?=$link?></strong>
|
||||
</a>
|
||||
<span class="bo_v_link_cnt"><?=$view['link_hit'][$i]?>회 연결</span>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<? } ?>
|
||||
|
||||
<nav id="bo_v_top">
|
||||
<h2>게시물 상단 버튼</h2>
|
||||
<?
|
||||
ob_start();
|
||||
?>
|
||||
<? if ($prev_href || $next_href) { ?>
|
||||
<ul class="bo_v_nb">
|
||||
<? if ($prev_href) { ?><li><a href="<?=$prev_href?>" class="btn02">이전글</a></li><? } ?>
|
||||
<? if ($next_href) { ?><li><a href="<?=$next_href?>" class="btn02">다음글</a></li><? } ?>
|
||||
</ul>
|
||||
<? } ?>
|
||||
|
||||
<ul class="bo_v_com">
|
||||
<? if ($update_href) { ?><li><a href="<?=$update_href?>" class="btn02">수정</a></li><? } ?>
|
||||
<? if ($delete_href) { ?><li><a href="<?=$delete_href?>" onclick="del(this.href); return false;" class="btn02">삭제</a></li><? } ?>
|
||||
<? if ($copy_href) { ?><li><a href="<?=$copy_href?>" onclick="board_move(this.href); return false;" class="btn03">복사</a></li><? } ?>
|
||||
<? if ($move_href) { ?><li><a href="<?=$move_href?>" onclick="board_move(this.href); return false;" class="btn03">이동</a></li><? } ?>
|
||||
<? if ($search_href) { ?><li><a href="<?=$search_href?>" class="btn02">검색</a></li><? } ?>
|
||||
<li><a href="<?=$list_href?>" class="btn02">목록</a></li>
|
||||
<? if ($reply_href) { ?><li><a href="<?=$reply_href?>" class="btn02">답변</a></li><? } ?>
|
||||
<? if ($write_href) { ?><li><a href="<?=$write_href?>" class="btn01">글쓰기</a></li><? } ?>
|
||||
</ul>
|
||||
<?
|
||||
$link_buttons = ob_get_contents();
|
||||
ob_end_flush();
|
||||
?>
|
||||
</nav>
|
||||
|
||||
<article id="bo_v_atc">
|
||||
<header>
|
||||
<h1>본문</h1>
|
||||
</header>
|
||||
|
||||
<?
|
||||
// 파일 출력
|
||||
for ($i=0; $i<=count($view['file']); $i++) {
|
||||
if ($view['file'][$i]['view']) {
|
||||
if ($i == 0) echo "<div id=\"bo_v_img\">";
|
||||
echo $view['file'][$i]['view'];
|
||||
if ($i == 0) echo "</div>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="bo_v_con"><?=$view['content'];?></div>
|
||||
<?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
|
||||
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
|
||||
|
||||
<? if ($is_signature) { ?><p><?=$signature?></p><? } ?>
|
||||
|
||||
<? if ($scrap_href || $good_href || $nogood_href) { ?>
|
||||
<div id="bo_v_act">
|
||||
<? if ($scrap_href) { ?><a href="<? echo $scrap_href; ?>" target="_blank" onclick="win_scrap(this.href); return false;" class="btn02">스크랩</a><? } ?>
|
||||
<? if ($good_href) {?><a href="<?=$good_href?>" class="btn02" target="hiddenframe">추천 <strong><?=number_format($view['wr_good'])?></strong></a><? } ?>
|
||||
<? if ($nogood_href) {?><a href="<?=$nogood_href?>" class="btn02" target="hiddenframe">비추천 <strong><?=number_format($view['wr_nogood'])?></strong></a><? } ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
</article>
|
||||
|
||||
<?
|
||||
// 코멘트 입출력
|
||||
include_once('./view_comment.php');
|
||||
?>
|
||||
|
||||
<nav id="bo_v_bot">
|
||||
<h2>게시물 하단 버튼</h2>
|
||||
|
||||
<!-- 링크 버튼 -->
|
||||
<?=$link_buttons?>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function file_download(link, file) {
|
||||
<? if ($board['bo_download_point'] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board['bo_download_point'])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
|
||||
document.location.href=link;
|
||||
}
|
||||
|
||||
function board_move(href)
|
||||
{
|
||||
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="<?=G4_JS_URL?>/board.js"></script>
|
||||
<!-- 게시글 보기 끝 -->
|
||||
|
||||
<script>
|
||||
// 이미지 등비율 리사이징
|
||||
$(window).load(function() {
|
||||
view_image_resize();
|
||||
});
|
||||
|
||||
function view_image_resize()
|
||||
{
|
||||
var $img = $('#bo_v_atc img');
|
||||
var img_wrap = $('#bo_v_atc').width();
|
||||
|
||||
$img.each(function() {
|
||||
var img_width = $(this).width();
|
||||
$(this).data("width", img_width); // 원래 이미지 사이즈
|
||||
if (img_width > img_wrap) {
|
||||
$(this).addClass('img_fix');
|
||||
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
|
||||
$(this).removeClass('img_fix');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@ -1,273 +0,0 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<script>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?=$comment_min?>); // 최소
|
||||
var char_max = parseInt(<?=$comment_max?>); // 최대
|
||||
</script>
|
||||
|
||||
<!-- 댓글 리스트 -->
|
||||
<section id="bo_vc">
|
||||
<h2>댓글</h2>
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$comment_id = $list[$i]['wr_id'];
|
||||
$cmt_depth = ""; // 댓글단계
|
||||
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 20;
|
||||
$str = $list[$i]['content'];
|
||||
if (strstr($list[$i]['wr_option'], "secret"))
|
||||
$str = $str;
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
// FLASH XSS 공격에 의해 주석 처리 - 110406
|
||||
//$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
|
||||
$str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
|
||||
?>
|
||||
<article id="c_<?=$comment_id?>" <?if ($cmt_depth) {?>style="margin-left:<?=$cmt_depth?>px;border-top-color:#e0e0e0"<?}?>>
|
||||
<header>
|
||||
<h1><?=$list[$i]['wr_name']?>님의 댓글</h1>
|
||||
<?=$list[$i]['name']?>
|
||||
<? if ($cmt_depth) {?><img src="<?=$board_skin_url?>/img/icon_reply.gif" class="icon_reply" alt="댓글의 댓글"><? } ?>
|
||||
<? if ($is_ip_view) { ?>
|
||||
아이피
|
||||
<span class="bo_vc_hdinfo"><?=$list[$i]['ip'];?></span>
|
||||
<? } ?>
|
||||
작성일
|
||||
<span class="bo_vc_hdinfo"><time datetime="<?=date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime']))?>"><?=$list[$i]['datetime']?></time></span>
|
||||
</header>
|
||||
|
||||
<!-- 댓글 출력 -->
|
||||
<p>
|
||||
<? if (strstr($list[$i]['wr_option'], "secret")) echo "<img src=\"\" alt=\"비밀글\"><br>";?>
|
||||
<?=$str?>
|
||||
</p>
|
||||
|
||||
<span id="edit_<?=$comment_id?>"></span><!-- 수정 -->
|
||||
<span id="reply_<?=$comment_id?>"></span><!-- 답변 -->
|
||||
|
||||
<input type="hidden" id="secret_comment_<?=$comment_id?>" value="<?=strstr($list[$i]['wr_option'],"secret")?>">
|
||||
<textarea id="save_comment_<?=$comment_id?>" style="display:none"><?=get_text($list[$i]['content1'], 0)?></textarea>
|
||||
|
||||
<? if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
$query_string = str_replace("&", "&", $_SERVER['QUERY_STRING']);
|
||||
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
$c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
?>
|
||||
<footer>
|
||||
<ul class="bo_vc_act">
|
||||
<? if ($list[$i]['is_reply']) { ?><li><a href="<? echo $c_reply_href; ?>" onclick="comment_box('<?=$comment_id?>', 'c'); return false;">답변</a></li><? } ?>
|
||||
<? if ($list[$i]['is_edit']) { ?><li><a href="<? echo $c_edit_href; ?>" onclick="comment_box('<?=$comment_id?>', 'cu'); return false;">수정</a></li><? } ?>
|
||||
<? if ($list[$i]['is_del']) { ?><li><a href="<? echo $list[$i]['del_link']; ?>" onclick="commen_delete('<?=$list[$i]['del_link']?>'); return false;">삭제</a></li><? } ?>
|
||||
</ul>
|
||||
</footer>
|
||||
<? } ?>
|
||||
</article>
|
||||
<?}?>
|
||||
<? if ($i == 0) { //댓글이 없다면 ?><p id="bo_vc_empty">등록된 댓글이 없습니다.</p><? } ?>
|
||||
|
||||
<? if ($is_comment_write) {
|
||||
if($w == '')
|
||||
$w = 'c';
|
||||
?>
|
||||
<aside id="bo_vc_w">
|
||||
<h2>댓글쓰기</h2>
|
||||
<form name="fviewcomment" method="post" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" autocomplete="off">
|
||||
<input type="hidden" id="w" name="w" value="<?=$w?>">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
|
||||
<input type="hidden" id="comment_id" name="comment_id" value="<?=$c_id?>">
|
||||
<input type="hidden" name="sca" value="<?=$sca?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="spt" value="<?=$spt?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="is_good" value="">
|
||||
|
||||
<fieldset id="bo_vc_winfo">
|
||||
<legend class="sound_only">작성자</legend>
|
||||
<? if ($is_guest) { ?>
|
||||
<label for="wr_name">이름<strong class="sound_only">필수</strong></label> <input type="text" id="wr_name" name="wr_name" class="fs_input required" maxLength="20" size="5" required>
|
||||
<label for="wr_password">패스워드<strong class="sound_only">필수</strong></label> <input type="password" id="wr_password" name="wr_password" class="fs_input required" maxLength="20" size="10" required>
|
||||
<? } ?>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="secret">
|
||||
<label for="wr_secret">비밀글</label>
|
||||
</fieldset>
|
||||
<? echo $captcha_html; ?>
|
||||
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?}?>
|
||||
<div id="bo_vc_warea">
|
||||
<textarea id="wr_content" name="wr_content" required
|
||||
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?> title="댓글내용입력(필수)"><? echo $c_wr_content; ?></textarea>
|
||||
<? if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?}?>
|
||||
<input type="submit" class="bo_vc_submit" value="댓글입력">
|
||||
</div>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
<script>
|
||||
var save_before = '';
|
||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
|
||||
function good_and_write()
|
||||
{
|
||||
var f = document.fviewcomment;
|
||||
if (fviewcomment_submit(f)) {
|
||||
f.is_good.value = 1;
|
||||
f.submit();
|
||||
} else {
|
||||
f.is_good.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
f.is_good.value = 0;
|
||||
|
||||
/*
|
||||
var s;
|
||||
if (s = word_filter_check(document.getElementById('wr_content').value))
|
||||
{
|
||||
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
|
||||
document.getElementById('wr_content').focus();
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g4_bbs_url+"/filter.ajax.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": "",
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 양쪽 공백 없애기
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||
if (char_min > 0 || char_max > 0)
|
||||
{
|
||||
check_byte('wr_content', 'char_count');
|
||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||
if (char_min > 0 && char_min > cnt)
|
||||
{
|
||||
alert("댓글는 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
} else if (char_max > 0 && char_max < cnt)
|
||||
{
|
||||
alert("댓글는 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!document.getElementById('wr_content').value)
|
||||
{
|
||||
alert("댓글를 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('패스워드가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
<? if($is_guest) echo chk_captcha_js(); ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function comment_box(comment_id, work)
|
||||
{
|
||||
var el_id;
|
||||
// 댓글 아이디가 넘어오면 답변, 수정
|
||||
if (comment_id)
|
||||
{
|
||||
if (work == 'c')
|
||||
el_id = 'reply_' + comment_id;
|
||||
else
|
||||
el_id = 'edit_' + comment_id;
|
||||
}
|
||||
else
|
||||
el_id = 'bo_vc_w';
|
||||
|
||||
if (save_before != el_id)
|
||||
{
|
||||
if (save_before)
|
||||
{
|
||||
document.getElementById(save_before).style.display = 'none';
|
||||
document.getElementById(save_before).innerHTML = '';
|
||||
}
|
||||
|
||||
document.getElementById(el_id).style.display = '';
|
||||
document.getElementById(el_id).innerHTML = save_html;
|
||||
// 댓글 수정
|
||||
if (work == 'cu')
|
||||
{
|
||||
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
||||
if (typeof char_count != 'undefined')
|
||||
check_byte('wr_content', 'char_count');
|
||||
if (document.getElementById('secret_comment_'+comment_id).value)
|
||||
document.getElementById('wr_secret').checked = true;
|
||||
else
|
||||
document.getElementById('wr_secret').checked = false;
|
||||
}
|
||||
|
||||
document.getElementById('comment_id').value = comment_id;
|
||||
document.getElementById('w').value = work;
|
||||
|
||||
save_before = el_id;
|
||||
}
|
||||
|
||||
if (typeof(wrestInitialized) != 'undefined')
|
||||
wrestInitialized();
|
||||
}
|
||||
|
||||
function comment_delete(url)
|
||||
{
|
||||
if (confirm("이 댓글를 삭제하시겠습니까?")) location.href = url;
|
||||
}
|
||||
|
||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||
</script>
|
||||
<? } ?>
|
||||
</section>
|
||||
@ -1,234 +0,0 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<h1 id="wrapper_title"><?=$g4['title']?></h1>
|
||||
|
||||
<form id="fwrite" name="fwrite" method="post" action="<?=$action_url?>" onsubmit="return fwrite_submit(this);" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?=$w?>">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
|
||||
<input type="hidden" name="sca" value="<?=$sca?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="spt" value="<?=$spt?>">
|
||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||
<input type="hidden" name="sod" value="<?=$sod?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<?
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
||||
$option = '';
|
||||
if ($is_notice) {
|
||||
$option .= PHP_EOL.'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'.PHP_EOL.'<label for="notice">공지</label>';
|
||||
}
|
||||
|
||||
if ($is_html) {
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||
} else {
|
||||
$option .= PHP_EOL.'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'.PHP_EOL.'<label for="html">html</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_secret) {
|
||||
if ($is_admin || $is_secret==1) {
|
||||
$option .= PHP_EOL.'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'.PHP_EOL.'<label for="secret">비밀글</label>';
|
||||
} else {
|
||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_mail) {
|
||||
$option .= PHP_EOL.'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'.PHP_EOL.'<label for="mail">답변메일받기</label>';
|
||||
}
|
||||
}
|
||||
|
||||
echo $option_hidden;
|
||||
?>
|
||||
|
||||
<table id="bo_w" class="frm_tbl">
|
||||
<tbody>
|
||||
<? if ($is_name) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" id="wr_name" name="wr_name" class="frm_input required" size="10" maxlength="20" required value="<?=$name?>"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_password) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_password">패스워드<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="password" id="wr_password" name="wr_password" class="frm_input" maxlength="20" <?=$password_required?>></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_email) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_email">이메일</label></th>
|
||||
<td><input type="text" id="wr_email" name="wr_email" class="frm_input email" size="50" value="<?=$email?>" maxlength="100"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_homepage) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_homepage">홈페이지</label></th>
|
||||
<td><input type="text" id="wr_homepage" name="wr_homepage" class="frm_input" size="50" value="<?=$homepage?>"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($option) { ?>
|
||||
<tr>
|
||||
<th scope="row">옵션</th>
|
||||
<td><?=$option?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($is_category) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="ca_name">분류<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select id="ca_name" name="ca_name" class="required" required>
|
||||
<option value="">선택하세요</option>
|
||||
<?=$category_option?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" id="wr_subject" name="wr_subject" class="frm_input required" size="50" required value="<?=$subject?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_content">내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td class="wr_content"><?=editor_html("wr_content", $content, $is_dhtml_editor);?></td>
|
||||
</tr>
|
||||
|
||||
<? for ($i=1; $is_link && $i<=G4_LINK_COUNT; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_link<?=$i?>">링크 #<?=$i?></label></th>
|
||||
<td><input type="text" id="wr_link<?=$i?>" name="wr_link<?=$i?>" class="frm_input" size="50" value="<?if($w=="u"){echo$write['wr_link'.$i];}?>"></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? for ($i=0; $is_file && $i<$file_count; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">파일 #<?=$i+1?></th>
|
||||
<td>
|
||||
<input type="file" name="bf_file[]" class="frm_file frm_input" title="파일첨부 <?=$i+1?> : 용량 <?=$upload_max_filesize?> 이하만 업로드 가능">
|
||||
<? if ($is_file_content) { ?>
|
||||
<input type="text" name="bf_content[]" class="frm_file frm_input" value="<? echo $file[$i]['bf_content']; ?>" size="50" title="파일 설명을 입력해주세요.">
|
||||
<?}?>
|
||||
<? if($w == 'u' && $file[$i]['file']) { ?>
|
||||
<input type="checkbox" id="bf_file_del<?=$i?>" name="bf_file_del[<? echo $i; ?>]" value="1"> <label for="bf_file_del<?=$i?>"><? echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
|
||||
<? if ($is_guest) { //자동등록방지 ?>
|
||||
<tr>
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td>
|
||||
<?=$captcha_html?>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" id="btn_submit" class="btn_submit" value="글쓰기" accesskey="s">
|
||||
<a href="./board.php?bo_table=<?=$bo_table?>" class="btn_cancel">취소</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
<?
|
||||
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
|
||||
if ($is_admin)
|
||||
{
|
||||
echo '
|
||||
if (ca_name_select = document.getElementById("ca_name")) {
|
||||
ca_name_select.options.length += 1;
|
||||
ca_name_select.options[ca_name_select.options.length-1].value = "공지";
|
||||
ca_name_select.options[ca_name_select.options.length-1].text = "공지";
|
||||
}';
|
||||
}
|
||||
?>
|
||||
|
||||
with (document.fwrite)
|
||||
{
|
||||
if (typeof(wr_name) != "undefined")
|
||||
wr_name.focus();
|
||||
else if (typeof(wr_subject) != "undefined")
|
||||
wr_subject.focus();
|
||||
else if (typeof(wr_content) != "undefined")
|
||||
wr_content.focus();
|
||||
|
||||
if (typeof(ca_name) != "undefined")
|
||||
if (w.value == "u") {
|
||||
ca_name.value = "<?=isset($write['ca_name'])?$write['ca_name']:'';?>";
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
<? echo get_editor_js('wr_content'); ?>
|
||||
<? echo chk_editor_js('wr_content'); ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g4_bbs_url+"/filter.ajax.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.wr_subject.value,
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.wr_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_wr_content) != "undefined")
|
||||
ed_wr_content.returnFalse();
|
||||
else
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
<? if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
@ -1,15 +1,6 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
// 회원수는 $row['mb_cnt'];
|
||||
?>
|
||||
|
||||
<table width="220" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="220" height="40" background="<?=$connect_skin_path?>/img/visit_bg.gif">
|
||||
<table width="220" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="30" align="right"><img src="<?=$connect_skin_path?>/img/icon.gif" width="14" height="14"></td>
|
||||
<td width="190"> <a href='<?=$g4['bbs_path']?>/current_connect.php'><strong>현재접속자</strong> : <?=$row['total_cnt']?> (회원 <?=$row['mb_cnt']?>)</a></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
<strong><?=$row['total_cnt']?></strong>
|
||||
|
||||
@ -2,49 +2,33 @@
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<style>
|
||||
.n_title1 { font-family:돋움; font-size:9pt; color:#FFFFFF; }
|
||||
.n_title2 { font-family:돋움; font-size:9pt; color:#5E5E5E; }
|
||||
</style>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<table id="current_connect_tbl" class="basic_tbl">
|
||||
<caption>현재접속자 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="4" height="33" bgcolor="#7BB2D6"><img src="<?=$connect_skin_path?>/img/list_top_01.gif" width="4" height="33"></td>
|
||||
<td width="60" align="center" bgcolor="#7BB2D6"><font class=n_title1><strong>번호</strong></font></td>
|
||||
<td width="5" align="center" valign="middle" bgcolor="#7BB2D6"><img src="<?=$connect_skin_path?>/img/list_top_02.gif" width="5" height="33"></td>
|
||||
<td width="5" align="center" valign="middle" bgcolor="#EEEEEE"><img src="<?=$connect_skin_path?>/img/list_top_03.gif" width="5" height="33"></td>
|
||||
<td width="" align="center" bgcolor="#EEEEEE"><font class=n_title2><strong>이름</strong></font></td>
|
||||
<td width="500" align="center" bgcolor="#EEEEEE"><font class=n_title2><strong>링크</strong></font></td>
|
||||
<td width="4" bgcolor="#EEEEEE"><img src="<?=$connect_skin_path?>/img/list_top_04.gif" width="4" height="33"></td>
|
||||
<th scope="col">번호</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">위치</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++)
|
||||
{
|
||||
echo <<<HEREDOC
|
||||
<tr>
|
||||
<td colspan=3 align='center' height='30'>{$list[$i]['num']}</td>
|
||||
<td colspan=2 align='center'>{$list[$i]['name']}</td>
|
||||
HEREDOC;
|
||||
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$location = conv_content($list[$i]['lo_location'], 0);
|
||||
|
||||
// 최고관리자에게만 허용
|
||||
// 이 조건문은 가능한 변경하지 마십시오.
|
||||
if ($list[$i]['lo_url'] && $is_admin == 'super')
|
||||
echo "<td colspan=2> <a href='{$list[$i]['lo_url']}'>{$location}</a></td>";
|
||||
else
|
||||
echo "<td colspan=2> {$location}</td>";
|
||||
|
||||
echo <<<HEREDOC
|
||||
</tr>
|
||||
<tr><td colspan='7' height='1' background='{$connect_skin_path}/img/dot_bg.gif'></td></tr>
|
||||
HEREDOC;
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=7 height=50 align=center>현재 접속자가 없습니다.</td></tr>";
|
||||
if ($list[$i]['lo_url'] && $is_admin == 'super') $display_location = "<a href=\"".$list[$i]['lo_url']."\">".$location."</a>";
|
||||
else $display_location = $location;
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="7" height="30" align="center"><?=$write_pages;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="td_num"><?=$list[$i]['num']?></td>
|
||||
<td class="td_name"><?=$list[$i]['name']?></td>
|
||||
<td><?=$display_location?></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=\"3\" class=\"empty_table\">현재 접속자가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
// 회원수는 $row['mb_cnt'];
|
||||
?>
|
||||
|
||||
<strong><?=$row['total_cnt']?></strong>
|
||||
@ -1,34 +0,0 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<table id="current_connect_tbl" class="basic_tbl">
|
||||
<caption>현재접속자 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">번호</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">위치</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$location = conv_content($list[$i]['lo_location'], 0);
|
||||
// 최고관리자에게만 허용
|
||||
// 이 조건문은 가능한 변경하지 마십시오.
|
||||
if ($list[$i]['lo_url'] && $is_admin == 'super') $display_location = "<a href=\"".$list[$i]['lo_url']."\">".$location."</a>";
|
||||
else $display_location = $location;
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_num"><?=$list[$i]['num']?></td>
|
||||
<td class="td_name"><?=$list[$i]['name']?></td>
|
||||
<td><?=$display_location?></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=\"3\" class=\"empty_table\">현재 접속자가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Before Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 139 B |
|
Before Width: | Height: | Size: 58 B |
|
Before Width: | Height: | Size: 70 B |
|
Before Width: | Height: | Size: 853 B |
|
Before Width: | Height: | Size: 58 B |
|
Before Width: | Height: | Size: 890 B |
|
Before Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 70 B |