사용자단 따옴표 수정

This commit is contained in:
chicpro
2012-11-05 17:57:59 +09:00
parent 4c7eb0290b
commit 1a21051afb
6 changed files with 142 additions and 142 deletions

View File

@ -1,4 +1,4 @@
<?
$g4_path = "../../.."; // common.php 의 상대 경로
include_once("$g4_path/common.php");
$g4_path = '../../..'; // common.php 의 상대 경로
include_once($g4_path.'/common.php');
?>

View File

@ -1,7 +1,7 @@
<?
include_once("./_common.php");
include_once('./_common.php');
if (!function_exists('convert_charset'))
if (!function_exists('convert_charset'))
{
/*
-----------------------------------------------------------
@ -11,7 +11,7 @@ if (!function_exists('convert_charset'))
없으면 mb_convert_encoding 함수를 사용한다.
둘다 없으면 사용할 수 없다.
*/
function convert_charset($from_charset, $to_charset, $str)
function convert_charset($from_charset, $to_charset, $str)
{
if( function_exists('iconv') )
@ -23,13 +23,13 @@ if (!function_exists('convert_charset'))
}
}
header("Content-Type: text/html; charset=$g4[charset]");
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')
if (strtolower($g4['charset']) == 'euc-kr')
{
//$subject = convert_charset('utf-8', 'cp949', $subject);
//$content = convert_charset('utf-8', 'cp949', $content);
@ -39,18 +39,18 @@ if (strtolower($g4[charset]) == 'euc-kr')
//$filter = explode(",", strtolower(trim($config['cf_filter'])));
// strtolower 에 의한 한글 변형으로 아래 코드로 대체 (곱슬최씨님이 알려 주셨습니다.)
$filter = explode(",", trim($config['cf_filter']));
for ($i=0; $i<count($filter); $i++)
for ($i=0; $i<count($filter); $i++)
{
$str = $filter[$i];
// 제목 필터링 (찾으면 중지)
$subj = "";
$pos = strpos($subject, $str);
if ($pos !== false)
if ($pos !== false)
{
if (strtolower($g4[charset]) == 'euc-kr')
if (strtolower($g4['charset']) == 'euc-kr')
$subj = convert_charset('utf-8', 'cp949', $str);//cp949 로 변환해서 반환
else
else
$subj = $str;
break;
}
@ -58,11 +58,11 @@ for ($i=0; $i<count($filter); $i++)
// 내용 필터링 (찾으면 중지)
$cont = "";
$pos = strpos($content, $str);
if ($pos !== false)
if ($pos !== false)
{
if (strtolower($g4[charset]) == 'euc-kr')
if (strtolower($g4['charset']) == 'euc-kr')
$cont = convert_charset('utf-8', 'cp949', $str);//cp949 로 변환해서 반환
else
else
$cont = $str;
break;
}

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
@ -17,16 +17,16 @@ if ($is_nogood) $colspan++;
.board_top { clear:both; }
.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; }
.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; }
.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }
.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }
.board_list td { padding:.5em; }
.board_list td { border-bottom:1px solid #ddd; }
.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; }
@ -57,7 +57,7 @@ if ($is_nogood) $colspan++;
<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"?>;">
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4['charset'])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option>
<?=$category_option?>
</select>
@ -101,56 +101,56 @@ if ($is_nogood) $colspan++;
<? if ($is_nogood) { ?><th><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
</tr>
<?
for ($i=0; $i<count($list); $i++) {
<?
for ($i=0; $i<count($list); $i++) {
$bg = $i%2 ? 0 : 1;
?>
<tr class="bg<?=$bg?>">
<tr class="bg<?=$bg?>">
<td class="num">
<?
if ($list[$i][is_notice]) // 공지사항
<?
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 if ($wr_id == $list[$i]['wr_id']) // 현재위치
echo "<span class='current'>{$list[$i]['num']}</span>";
else
echo $list[$i][num];
echo $list[$i]['num'];
?>
</td>
<? if ($is_checkbox) { ?><td class="checkbox"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<? if ($is_checkbox) { ?><td class="checkbox"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i]['wr_id']?>"></td><? } ?>
<td class="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> ";
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> ";
}
if ($list[$i][is_notice])
echo "<a href='{$list[$i][href]}'><span class='notice'>{$list[$i][subject]}</span></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>";
echo "<a href='{$list[$i]['href']}'>{$list[$i]['subject']}</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]['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']}>"; }
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 " " . $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;
?>
</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="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><? } ?>
</tr>
<? } // end for ?>
@ -221,7 +221,7 @@ if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
if ('<?=$sop?>' == 'and')
if ('<?=$sop?>' == 'and')
document.fsearch.sop[0].checked = true;
if ('<?=$sop?>' == 'or')
@ -281,7 +281,7 @@ function select_copy(sw) {
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div style="height:12px; line-height:1px; font-size:1px;">&nbsp;</div>
@ -10,13 +10,13 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<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>
<span style="color:#888888;">작성일 : <?=date("y-m-d H:i", strtotime($view['wr_datetime']))?></span>
</div>
<!-- 링크 버튼 -->
<div style="float:right;">
<?
ob_start();
<?
ob_start();
?>
<? 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> "; } ?>
@ -39,8 +39,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<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]))?>
<? 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>
@ -57,13 +57,13 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<tr>
<td height=30 background="<?=$board_skin_path?>/img/view_dot.gif" style="color:#888;">
<div style="float:left;">
&nbsp;글쓴이 :
&nbsp;글쓴이 :
<?=$view[name]?><? if ($is_ip_view) { echo "&nbsp;($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) { ?>&nbsp;<img src="<?=$board_skin_path?>/img/icon_good.gif" border='0' align=absmiddle> 추천 : <?=number_format($view[wr_good])?><? } ?>
<? if ($is_nogood) { ?>&nbsp;<img src="<?=$board_skin_path?>/img/icon_nogood.gif" border='0' align=absmiddle> 비추천 : <?=number_format($view[wr_nogood])?><? } ?>
<img src="<?=$board_skin_path?>/img/icon_view.gif" border='0' align=absmiddle> 조회 : <?=number_format($view['wr_hit'])?>
<? if ($is_good) { ?>&nbsp;<img src="<?=$board_skin_path?>/img/icon_good.gif" border='0' align=absmiddle> 추천 : <?=number_format($view['wr_good'])?><? } ?>
<? if ($is_nogood) { ?>&nbsp;<img src="<?=$board_skin_path?>/img/icon_nogood.gif" border='0' align=absmiddle> 비추천 : <?=number_format($view['wr_nogood'])?><? } ?>
&nbsp;
</div>
</td>
@ -72,60 +72,60 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
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 "&nbsp;&nbsp;<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 "&nbsp;<span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span>";
echo "&nbsp;<span style=\"color:#ff6600; font-size:11px;\">[{$view[file][$i][download]}]</span>";
echo "&nbsp;<span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view[file][$i][datetime]}</span>";
echo "<a href=\"javascript:file_download('{$view['file'][$i]['href']}', '".urlencode($view['file'][$i]['source'])."');\" title='{$view['file'][$i]['content']}'>";
echo "&nbsp;<span style=\"color:#888;\">{$view['file'][$i]['source']} ({$view['file'][$i]['size']})</span>";
echo "&nbsp;<span style=\"color:#ff6600; font-size:11px;\">[{$view['file'][$i]['download']}]</span>";
echo "&nbsp;<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]) {
for ($i=1; $i<=$g4['link_count']; $i++) {
if ($view['link'][$i]) {
$cnt++;
$link = cut_str($view[link][$i], 70);
$link = cut_str($view['link'][$i], 70);
echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
echo "&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle border='0'>";
echo "<a href='{$view[link_href][$i]}' target=_blank>";
echo "<a href='{$view['link_href'][$i]}' target=_blank>";
echo "&nbsp;<span style=\"color:#888;\">{$link}</span>";
echo "&nbsp;<span style=\"color:#ff6600; font-size:11px;\">[{$view[link_hit][$i]}]</span>";
echo "&nbsp;<span style=\"color:#ff6600; font-size:11px;\">[{$view['link_hit'][$i]}]</span>";
echo "</a></td></tr>";
}
}
?>
<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>";
for ($i=0; $i<=count($view['file']); $i++) {
if ($view['file'][$i]['view'])
echo $view['file'][$i]['view'] . "<p>";
}
?>
<!-- 내용 출력 -->
<span id="writeContents"><?=$view[content];?></span>
<span id="writeContents"><?=$view['content'];?></span>
<?//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 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>
</div>
<? } ?>
<? 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 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>
<? } ?>
@ -138,7 +138,7 @@ for ($i=1; $i<=$g4[link_count]; $i++) {
<?
// 코멘트 입출력
include_once("./view_comment.php");
include_once('./view_comment.php');
?>
<div style="height:1px; line-height:1px; font-size:1px; background-color:#ddd; clear:both;">&nbsp;</div>
@ -161,15 +161,15 @@ include_once("./view_comment.php");
<script type="text/javascript">
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("'"+decodeURIComponent(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" src="<?=$g4['path']?>/js/board.js"></script>
<script type="text/javascript">
window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
resizeBoardImage(<?=(int)$board['bo_image_width']?>);
drawFont();
}
</script>

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<script type="text/javascript">
@ -14,12 +14,12 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
<div id="commentContents">
<?
for ($i=0; $i<count($list); $i++) {
$comment_id = $list[$i][wr_id];
$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 "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; ?></td>
<td><? for ($k=0; $k<strlen($list[$i]['wr_comment_reply']); $k++) echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; ?></td>
<td width='100%'>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
@ -33,14 +33,14 @@ for ($i=0; $i<count($list); $i++) {
<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>
<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 "&nbsp;<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> "; } ?>
<? if ($is_ip_view) { echo "&nbsp;<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> "; } ?>
&nbsp;
</div>
</div>
@ -48,9 +48,9 @@ for ($i=0; $i<count($list); $i++) {
<!-- 코멘트 출력 -->
<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"))
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>";
$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);
@ -60,12 +60,12 @@ for ($i=0; $i<count($list); $i++) {
echo $str;
?>
</div>
<? if ($list[$i][trackback]) { echo "<p>".$list[$i][trackback]."</p>"; } ?>
<? if ($list[$i]['trackback']) { echo "<p>".$list[$i]['trackback']."</p>"; } ?>
<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>
<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>
@ -129,7 +129,7 @@ for ($i=0; $i<count($list); $i++) {
</td></tr></table>
</div>
<script type="text/javascript" src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<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;

View File

@ -1,9 +1,9 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
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>";
include_once($g4['path'].'/lib/cheditor4.lib.php');
echo "<script src='{$g4['cheditor4_path']}/cheditor.js'></script>";
echo cheditor1('wr_content', '100%', '250');
}
?>
@ -22,7 +22,7 @@ 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=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?>">
@ -75,33 +75,33 @@ var char_max = parseInt(<?=$write_max?>); // 최대
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<?
$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>공지&nbsp;";
<?
$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.'>공지&nbsp;';
}
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>&nbsp;";
$option .= '<input onclick="html_auto_br(this);" type=checkbox value="'.$html_value.'" name="html" '.$html_checked.'><span class=w_title>html</span>&nbsp;';
}
}
if ($is_secret) {
if ($is_admin || $is_secret==1) {
$option .= "<input type=checkbox value='secret' name='secret' $secret_checked><span class=w_title>비밀글</span>&nbsp;";
$option .= '<input type=checkbox value="secret" name="secret" '.$secret_checked.'><span class=w_title>비밀글</span>&nbsp;';
} else {
$option_hidden .= "<input type=hidden value='secret' name='secret'>";
$option_hidden .= '<input type=hidden value="secret" name="secret">';
}
}
if ($is_mail) {
$option .= "<input type=checkbox value='mail' name='mail' $recv_email_checked>답변메일받기&nbsp;";
$option .= '<input type=checkbox value="mail" name="mail" '.$recv_email_checked.'>답변메일받기&nbsp;';
}
}
@ -139,7 +139,7 @@ if ($option) {
<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
<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><?}?>
<? } ?>
@ -148,7 +148,7 @@ if ($option) {
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<? if ($is_link) { ?>
<? for ($i=1; $i<=$g4[link_count]; $i++) { ?>
<? for ($i=1; $i<=$g4['link_count']; $i++) { ?>
<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>
@ -163,8 +163,8 @@ if ($option) {
<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>
파일첨부<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>
@ -175,7 +175,7 @@ if ($option) {
var flen = 0;
function add_file(delete_code)
{
var upload_count = <?=(int)$board[bo_upload_count]?>;
var upload_count = <?=(int)$board['bo_upload_count']?>;
if (upload_count && flen >= upload_count)
{
alert("이 게시판은 "+upload_count+"개 까지만 파일 업로드가 가능합니다.");
@ -229,7 +229,7 @@ if ($option) {
<tr>
<td class=write_head>트랙백주소</td>
<td><input class='ed' size=50 name=wr_trackback itemname="트랙백" value="<?=$trackback?>">
<? if ($w=="u") { ?><input type=checkbox name="re_trackback" value="1">핑 보냄<? } ?></td>
<? if ($w=='u') { ?><input type=checkbox name="re_trackback" value="1">핑 보냄<? } ?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
@ -255,11 +255,11 @@ if ($option) {
</td></tr></table>
</form>
<script type="text/javascript" src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<script type="text/javascript" src="<?=$g4['path']?>/js/jquery.kcaptcha.js"></script>
<script type="text/javascript">
<?
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
if ($is_admin)
if ($is_admin)
{
echo "
if (typeof(document.fwrite.ca_name) != 'undefined')
@ -268,10 +268,10 @@ if ($is_admin)
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 = '공지';
}";
}
}
?>
with (document.fwrite)
with (document.fwrite)
{
if (typeof(wr_name) != "undefined")
wr_name.focus();
@ -285,7 +285,7 @@ with (document.fwrite)
ca_name.value = "<?=$write[ca_name]?>";
}
function html_auto_br(obj)
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
@ -298,7 +298,7 @@ function html_auto_br(obj)
obj.value = "";
}
function fwrite_submit(f)
function fwrite_submit(f)
{
/*
var s = "";
@ -319,7 +319,7 @@ function fwrite_submit(f)
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;
@ -328,8 +328,8 @@ function fwrite_submit(f)
}
if (document.getElementById('tx_wr_content')) {
if (!ed_wr_content.outputBodyText()) {
alert('내용을 입력하십시오.');
if (!ed_wr_content.outputBodyText()) {
alert('내용을 입력하십시오.');
ed_wr_content.returnFalse();
return false;
}
@ -365,9 +365,9 @@ function fwrite_submit(f)
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if (typeof(ed_wr_content) != "undefined")
if (typeof(ed_wr_content) != "undefined")
ed_wr_content.returnFalse();
else
else
f.wr_content.focus();
return false;
}
@ -380,15 +380,15 @@ function fwrite_submit(f)
document.getElementById('btn_list').disabled = true;
<?
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/write_update.php';";
if ($g4['https_url'])
echo "f.action = '{$g4['https_url']}/{$g4['bbs']}/write_update.php';";
else
echo "f.action = './write_update.php';";
?>
return true;
}
</script>
<script type="text/javascript" src="<?="$g4[path]/js/board.js"?>"></script>
<script type="text/javascript" src="<?=$g4['path']?>/js/board.js"></script>
<script type="text/javascript"> window.onload=function() { drawFont(); } </script>