글 목록수 카운트 관련 정보
글 목록수 카운트 관련본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
자바때기님의 싸이월드 방명록 스킨을 수정해서 쓰려고 하는데 글 목록수를 5개로 주면 한페이지에 본문 글만 다섯개 뜨는게 아니라 댓글 수까지 포함이되어 5개가 뜹니다.
글 목록수를 5개로 했을때
5 본문
-댓글
-댓글
4 본문
-댓글
이렇게 뜹니다.
원래라면
5 본문
-댓글
-댓글
4 본문
-댓글
3 본문
2 본문
1 본문
이런식으로 떠야하는데 말이죠.
아래는 리스트스킨 소스입니다. 자바때기님 스킨은 리스트스킨에 소스가 다 들어가있더라구요; 적용될만한 다른 파일은 따로 없습니다.
여기서 글 목록수(카운트)에 작용하는 소스 좀 알려주세요. 어떻게 묶인것인지두요; 부탁드립니다.ㅠㅠ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if($is_admin)set_session("ss_delete_token", $token = uniqid(time()));
if (!$board[bo_9]) alert("여유필드 9번 : 글쓰기 남길말");
if (!$board[bo_10]) alert("여유필드 10번 : 댓글쓰기 남길말");
$noLoginValue = $board[bo_9];
$noContentValue = $board[bo_10];
?>
<style>
.bbs_form { margin:0; }
.bbs_linei { background-color:#D6D2C7; height:1px; } //게시판 줄 색깔 바꾸기
.bbs_lineo { background-color:#FFFFFF; height:10px; } //게시판 줄 색깔 바꾸기
.bbs_no { background-color:blue; height:30px; } //게시판 내용 글씨
.bbs_fs { color:gray; font-size:11px; } //게시판 날짜
.bbs_ft {font-size: 9pt; width:100%; font-family: "돋움", "굴림","seoul", "verdana", "arial"; background-color:#FFFFFF;color:#000000;border:1 solid cccccc;color:#000000;overflow: auto}
.bbs_tt { CURSOR:pointer; }
.num { color:333333; margin-right:10; font-family:tahoma; font-size:7pt; }
.name { color:#000000;text-decoration:none font-size:8pt; }
.date { color:#aaaaaa; font-family:tahoma; font-size:7pt; }
.c_name { color:#aaaaaa; text-decoration:none font-size:8pt; }
.c_date { color:#aaaaaa; font-family:tahoma; font-size:7pt; }
a.bbs:link, a.bbs:visited, a.bbs:active { text-decoration:none;}
a.bbs:hover { text-decoration:none; color:#3366cc; }
textarea {font-size: 9pt; width:100%; font-family: "돋움", "굴림","seoul", "verdana", "arial"; background-color:#FFFFFF;color:#000000;border:1 solid cccccc;color:#000000;overflow: auto}
</style>
<script language="JavaScript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>
<?
if ($w == "") {
$is_name = false;
$is_password = false;
if (!$member[mb_id] || ($is_admin && $w == 'u' && $member[mb_id] != $write[mb_id])) {
$is_name = true;
$is_password = true;
}
$password_required = "required";
$content = $board[bo_insert_content];
// 글자수 제한 설정값
if ($is_admin)
{
$write_min = $write_max = 0;
}
else
{
$write_min = (int)$board[bo_write_min];
$write_max = (int)$board[bo_write_max];
}
include_once("./norobot.inc.php");
}
if (!$subject) $subject = 싸이월드방명록;
?>
<form name="ffwrite" method="post" action="javascript:fwrite_check(document.ffwrite);" enctype="multipart/form-data" autocomplete="off">
<input type=hidden name=w value="">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=wr_subject value="<?=$subject?>">
<? if ($is_password) { ?><input type="hidden" name="wr_password" value="<?=$norobot_str?>"><? } ?>
<? if ($is_norobot) { ?><input type="hidden" name="wr_key" value="<?=$norobot_key?>"><? } ?>
<table width="<?=$width?>" align="center" cellpadding="5" cellspacing="0" bgcolor="#f6f6f6">
<tr><td height="1px" bgColor="#cccccc"></td></tr>
<tr><td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? if ($is_name) { ?>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td>
<input class="bbs_ft" maxLength="20" size="13" name="wr_name" itemname="이름" required style="height:23; padding:4;" value="손님" onFocus="clearText(this)"> ※ 손님은 등록만 가능하며 <span style="color:red">수정</span> 및 <span style="color:red">삭제</span>를 할 수 없습니다.
</td>
<td align="right" class=write_head><img id='kcaptcha_image' border='0' width=120 height=20 onclick="imageClick();" style="cursor:pointer;" title="글자가 잘안보이는 경우 클릭하시면 새로운 글자가 나옵니다."></td>
<td align="right"><input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required></td>
</table>
</td>
</tr>
<? } ?>
<td>
<textarea class="bbs_ft" name="wr_content" itemname="내용" required style="width:100%;height:60; padding:4;" onFocus="clearText(this)"><?= $noLoginValue ?></textarea>
</td>
</tr>
<tr>
<td align="right" style="padding-top:5px; ">
<? if($is_member) { ?>
<span style='font-size:8.5pt;font-family:돋움;word-break:break-all;'><font color="#b38413">Secret </font><input type=checkbox value='secret' name='secret' $secret_checked onfocus=blur()> </span>
<? } ?>
<input type="image" id="btn_submit" src="<?=$board_skin_path?>/img/btn_write.gif" border="0" align="absmiddle">
</td>
</tr>
</table>
</td></tr><tr><td height="1px" bgColor="#cccccc"></td></tr></table>
</form>
<br>
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 게시판 리스트 시작 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
$wr_num = 0;
$tempArr= null;
for ($i=0; $i<count($list); $i++) {
$list_id = $list[$i][wr_id];
if($i == 0) $tempArr .= "\"$list_id\"";
else $tempArr .= ",\"$list_id\"";
?>
<a name="c_<?=$list_id?>"></a>
<?
// 부모글
if($wr_num != $list[$i][wr_num]){
?>
<tr><td colspan="6" class="bbs_lineo"> </td></tr>
<tr><td colspan="6" class="bbs_linei"></td></tr>
<tr bgColor="#f1f1f1">
<td height="25" colspan="5" style="padding-left : 5px;">
<span class=num>NO.<b><?= abs($list[$i][wr_num]) ?></b></span>
<?=$list[$i][name]?>
<span class=date>(<?=$list[$i][wr_datetime]?>)</span>
</td>
<td align="right" style="padding-right:5px;">
<a href="javascript:list_box('<?=$list_id?>', 'r');" title="댓글">댓글</a>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?> | <a href="javascript:list_box('<?=$list_id?>', 'u');">수정</a> | <a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&sca=<?=$sca?><? echo $is_admin?'&token='.$token:'';?>';}">삭제</a>
<? } ?>
</td>
</tr>
<tr >
<td colspan="6" style="padding-left : 5px; height:100px; ">
<span id="content_<?= $list_id?>">
<? if (!$list[$i][reply]) {
if (strstr($list[$i][wr_option], "secret")) { //비밀글이라면..
if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) {
echo "<span style='color:#FF0000;'>비밀글</span><br>";
echo "<span style='color:#FF0000;'>관리자나 작성자 에게만 보입니다.</span><br>";
echo nl2br($list[$i][wr_content]);
} else { // 관리자나 본인이 아니라면..
echo "<span style='color:#FF0000;'>비밀글</span><br>";
echo "<span style='color:#FF0000;'>관리자나 작성자 에게만 보입니다.</span>";
}
} else { //비밀글이 아니면..
echo nl2br($list[$i][wr_content]);
}
}
?>
</span>
</td>
</tr>
<?
$Display = "none";
?>
<tr bgColor="#ffffff">
<td colspan="6" class="bbs_pp">
<textarea class="bbs_ft" id='save_content_<?=$list_id?>' type=text style='display:<?= $Display ?>;width:100%;height:40; padding:4;' required><?= $list[$i][wr_content]?></textarea>
<span id='reply_<?=$list_id?>' style='display:<?= $Display ?>; width:100%; padding:5;'></span><!-- 답변 -->
<span id='edit_<?=$list_id?>' style='display:<?= $Display ?>; width:100%; padding:5;'></span><!-- 수정 -->
</td>
</tr>
<?
// 코멘트(댓글)
}else{
$totalCount++;
?>
<tr bgColor="#f8f8f8">
<td colspan="6" style="padding-left : 5px;">
<span id="comment_<?= $list_id?>">
<?
if(strlen($list[$i][wr_reply]) > 1){
echo $list[$i][reply];
echo $list[$i][icon_reply];
}
?>
<?= ($list[$i][wr_content])?>
: <span class="c_name"><NOBR><?=$list[$i][name]?></NOBR></span> <span class="c_date">(<?=$list[$i][datetime]?>)</span>
<a href="javascript:list_box('<?=$list_id?>', 'r');" title="이 댓글에 댓글달기" class="bbs">
<img src="<?=$board_skin_path?>/img/btn_reply.gif" title="이 댓글에 댓글달기" border="0" align="absmiddle">
</a>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?>
<a href="javascript:list_box('<?=$list_id?>', 'u');" style="padding-right:2px; ">
<img src="<?=$board_skin_path?>/img/btn_edit.gif" title="수정" border="0" align="absmiddle">
</a>
<a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&sca=<?=$sca?><? echo $is_admin?'&token='.$token:'';?>';}">
<img src="<?=$board_skin_path?>/img/btn_del.gif" title="삭제" border="0" align="absmiddle">
</a>
</span>
<? } ?>
</td>
</tr>
<?
$Display = "none";
?>
<tr bgColor="#f8f8f8">
<td colspan="6" class="bbs_pp">
<img id='save_emoticon_<?=$list_id?>' style='display:<?= $Display ?>;' border="0" src="<?=$board_skin_path?>/emoticons/<?=$list[$i][subject]?>.gif">
<textarea class="bbs_ft" id='save_content_<?=$list_id?>' type=text style='display:<?= $Display ?>;width:100%;height:40; padding:4;'><?= $list[$i][wr_content]?></textarea>
<span id='reply_<?=$list_id?>' style='display:<?= $Display ?>; width:100%; padding:5;'></span><!-- 답변 -->
<span id='edit_<?=$list_id?>' style='display:<?= $Display ?>; width:100%; padding:5;'></span><!-- 수정 -->
</td>
</tr>
<? } ?>
<?
$wr_num = $list[$i][wr_num];
}
?>
<? if (count($list) == 0) { ?>
<tr><td height="100" align="center">게시물이 없습니다.</td></tr>
<? } ?>
</table>
<!-- 페이지 표시 시작 -->
<div id="pagingNew"><?=$write_pages?></div>
<!-- 검색 -->
<div style="float:right;">
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<input type="hidden" name=sfl value='wr_subject||wr_content'><input type="hidden" name=sop value="and">
<input name=stx maxlength=15 size=15 itemname="검색어" required value="<?=$stx?>" style="border-width:1; border-color:#dddddd; border-style:solid; font-family:돋움; font-size:9pt; color:#666666;">
</form>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="" height="40">
<? if ($admin_href) { ?><a href='<?=$admin_href?>'><img src="<?=$board_skin_path?>/img/btn_admin.gif" border="0" width="55" height="20" align="absmiddle" title="관리자"></a><? } ?>
</td>
</tr>
</table>
</td></tr></table>
<span id=list_write style='display:inline; width:100%; padding:10;'>
<form name="fwrite" method="post" action="javascript:fwrite_check(document.fwrite);" enctype="multipart/form-data" autocomplete="off">
<input type=hidden name=w value="" id="list_w">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="<?=$list[$i][wr_id]?>" id="list_id">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=wr_subject value="<?=$subject?>">
<? if ($is_password) { ?><input type="hidden" name="wr_password" value="<?=$norobot_str?>"><? } ?>
<? if ($is_norobot) { ?><input type="hidden" name="wr_key" value="<?=$norobot_key?>"><? } ?>
<table width="<?=$width?>" align="center" cellpadding="5" cellspacing="0" bgcolor="#f8f8f8"><tr><td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<? if ($is_name) { ?>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td>
<input class="bbs_ft" maxLength="20" size="13" name="wr_name" itemname="이름" required style="height:23; padding:4;" value="손님" onFocus="clearText(this)"> ※ 손님은 등록만 가능하며 <span style="color:red">수정</span> 및 <span style="color:red">삭제</span>를 할 수 없습니다.
</td>
<td align="right" class=write_head><img id='kcaptcha_image_copy' border='0' width=120 height=20 onclick="imageClick();" style="cursor:pointer;" title="글자가 잘안보이는 경우 클릭하시면 새로운 글자가 나옵니다."></td>
<td align="right"><input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required></td>
</table>
</td>
</tr>
</table>
</td>
</tr>
<? } ?>
<tr>
<td width="100%" style="padding-right:3px; ">
<textarea class="bbs_ft" id="list_content" name="wr_content" itemname="내용" required style="height:33; padding:4;" onFocus="clearText(this)"><?= $noContentValue ?></textarea>
</td>
</tr>
<tr>
<td align="right">
<span style='font-size:8pt;font-family:돋움;word-break:break-all;'><font color="#b38413">Secret </font><input type=checkbox value='secret' name='secret' $secret_checked onfocus=blur()> </span>
<input type="image" id="btn_submit" src="<?=$board_skin_path?>/img/btn_write_comment.gif" border="0" align="absmiddle">
</td>
</tr>
</table>
</td></tr></table>
</form>
</span>
<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
document.fsearch.sfl.value = "<?=$sfl?>";
document.fsearch.sop.value = "<?=$sop?>";
}
</script>
<script type="text/javascript"> var md5_norobot_key = ''; </script>
<script type="text/javascript" src="<?="$g4[path]/js/prototype.js"?>"></script>
<script type="text/javascript">
function imageClick() {
var url = "<?=$g4[bbs_path]?>/kcaptcha_session.php";
var para = "";
var myAjax = new Ajax.Request(
url,
{
method: 'post',
asynchronous: true,
parameters: para,
onComplete: imageClickResult
});
}
function imageClickResult(req) {
var result = req.responseText;
var img = document.createElement("IMG");
img.setAttribute("src", "<?=$g4[bbs_path]?>/kcaptcha_image.php?t=" + (new Date).getTime());
document.getElementById('kcaptcha_image').src = img.getAttribute('src');
document.getElementById('kcaptcha_image_copy').src = img.getAttribute('src');
md5_norobot_key = result;
}
<? if (!$is_member) { ?>Event.observe(window, "load", imageClick);<? } ?>
function clearText(thefield){
if (thefield.defaultValue==thefield.value) thefield.value = "";
}
function fwrite_check(f)
{
var s = "";
<?if($is_guest){ ?>
if (f.wr_name.value == "손님" ||
false){
f.wr_name.focus();
alert("닉네임을 적어주세요.")
return;
}
<? } ?>
if (f.wr_content.value == "<?= $noLoginValue ?>" ||
f.wr_content.value == "<?= $noContentValue ?>" ||
false){
f.wr_content.focus();
alert("내용을 입력해 주세요...")
return;
}
if (s = word_filter_check(f.wr_content.value)) {
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return;
}
<?if($is_guest){ ?>
if (typeof(f.wr_key) != "undefined") {
if (hex_md5(f.wr_key.value) != md5_norobot_key) {
alert("자동등록방지용 빨간글자가 순서대로 입력되지 않았습니다.");
f.wr_key.focus();
return;
}
}
<? } ?>
f.action = "./write_update.php";
f.submit();
}
var old_id, new_id;
var save_html = document.getElementById('list_write').innerHTML;
function commentTotalClose(){
var tempArr = Array(<?= $tempArr ?>);
for($i = 0 ; $i < tempArr.length ; $i++){
var commentObj = eval("document.getElementById('comment_" + tempArr[$i] + "')");
if(commentObj != null) commentObj.style.display = 'inline';
}
}
function list_box(list_id, work)
{
commentTotalClose();
imageClick();
// 답변, 수정
if (list_id)
{
if (work == 'r')
new_id = 'reply_' + list_id;
else
new_id = 'edit_' + list_id;
}
else
new_id = 'list_write';
if (old_id == new_id) {
var mode = document.getElementById(new_id).style.display;
if (mode == 'inline') {
document.getElementById(new_id).style.display = 'none';
}
else {
document.getElementById(new_id).style.display = 'inline';
}
}
else
{
if (old_id)
{
document.getElementById(old_id).style.display = 'none';
document.getElementById(old_id).innerHTML = '';
}
document.getElementById(new_id).style.display = 'inline';
document.getElementById(new_id).innerHTML = save_html;
// 수정
if (work == 'u')
{
document.getElementById('list_content').value = document.getElementById('save_content_' + list_id).value;
var commentObj = eval("document.getElementById('comment_" + list_id + "')");
if(commentObj != null)
if(commentObj.style.display == 'none') commentObj.style.display = 'inline';
else commentObj.style.display = 'none';
}
document.getElementById('list_id').value = list_id;
document.getElementById('list_w').value = work;
old_id = new_id;
}
}
list_box('', '');
new_id = 'list_write';
document.getElementById(new_id).style.display = 'none';
</script>
<?
if ($w == "") {
if (!$member[mb_id])
echo "<script language='javascript' src='$g4[path]/js/md5.js'></script>\n";
// 필터
echo "<script language='javascript'> var g4_cf_filter = '$config[cf_filter], '; </script>\n";
echo "<script language='javascript' src='$g4[path]/js/filter.js'></script>\n";
}
?>
오류 주소 :
자바때기님의 싸이월드 방명록 스킨을 수정해서 쓰려고 하는데 글 목록수를 5개로 주면 한페이지에 본문 글만 다섯개 뜨는게 아니라 댓글 수까지 포함이되어 5개가 뜹니다.
글 목록수를 5개로 했을때
5 본문
-댓글
-댓글
4 본문
-댓글
이렇게 뜹니다.
원래라면
5 본문
-댓글
-댓글
4 본문
-댓글
3 본문
2 본문
1 본문
이런식으로 떠야하는데 말이죠.
아래는 리스트스킨 소스입니다. 자바때기님 스킨은 리스트스킨에 소스가 다 들어가있더라구요; 적용될만한 다른 파일은 따로 없습니다.
여기서 글 목록수(카운트)에 작용하는 소스 좀 알려주세요. 어떻게 묶인것인지두요; 부탁드립니다.ㅠㅠ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if($is_admin)set_session("ss_delete_token", $token = uniqid(time()));
if (!$board[bo_9]) alert("여유필드 9번 : 글쓰기 남길말");
if (!$board[bo_10]) alert("여유필드 10번 : 댓글쓰기 남길말");
$noLoginValue = $board[bo_9];
$noContentValue = $board[bo_10];
?>
<style>
.bbs_form { margin:0; }
.bbs_linei { background-color:#D6D2C7; height:1px; } //게시판 줄 색깔 바꾸기
.bbs_lineo { background-color:#FFFFFF; height:10px; } //게시판 줄 색깔 바꾸기
.bbs_no { background-color:blue; height:30px; } //게시판 내용 글씨
.bbs_fs { color:gray; font-size:11px; } //게시판 날짜
.bbs_ft {font-size: 9pt; width:100%; font-family: "돋움", "굴림","seoul", "verdana", "arial"; background-color:#FFFFFF;color:#000000;border:1 solid cccccc;color:#000000;overflow: auto}
.bbs_tt { CURSOR:pointer; }
.num { color:333333; margin-right:10; font-family:tahoma; font-size:7pt; }
.name { color:#000000;text-decoration:none font-size:8pt; }
.date { color:#aaaaaa; font-family:tahoma; font-size:7pt; }
.c_name { color:#aaaaaa; text-decoration:none font-size:8pt; }
.c_date { color:#aaaaaa; font-family:tahoma; font-size:7pt; }
a.bbs:link, a.bbs:visited, a.bbs:active { text-decoration:none;}
a.bbs:hover { text-decoration:none; color:#3366cc; }
textarea {font-size: 9pt; width:100%; font-family: "돋움", "굴림","seoul", "verdana", "arial"; background-color:#FFFFFF;color:#000000;border:1 solid cccccc;color:#000000;overflow: auto}
</style>
<script language="JavaScript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>
<?
if ($w == "") {
$is_name = false;
$is_password = false;
if (!$member[mb_id] || ($is_admin && $w == 'u' && $member[mb_id] != $write[mb_id])) {
$is_name = true;
$is_password = true;
}
$password_required = "required";
$content = $board[bo_insert_content];
// 글자수 제한 설정값
if ($is_admin)
{
$write_min = $write_max = 0;
}
else
{
$write_min = (int)$board[bo_write_min];
$write_max = (int)$board[bo_write_max];
}
include_once("./norobot.inc.php");
}
if (!$subject) $subject = 싸이월드방명록;
?>
<form name="ffwrite" method="post" action="javascript:fwrite_check(document.ffwrite);" enctype="multipart/form-data" autocomplete="off">
<input type=hidden name=w value="">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=wr_subject value="<?=$subject?>">
<? if ($is_password) { ?><input type="hidden" name="wr_password" value="<?=$norobot_str?>"><? } ?>
<? if ($is_norobot) { ?><input type="hidden" name="wr_key" value="<?=$norobot_key?>"><? } ?>
<table width="<?=$width?>" align="center" cellpadding="5" cellspacing="0" bgcolor="#f6f6f6">
<tr><td height="1px" bgColor="#cccccc"></td></tr>
<tr><td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? if ($is_name) { ?>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td>
<input class="bbs_ft" maxLength="20" size="13" name="wr_name" itemname="이름" required style="height:23; padding:4;" value="손님" onFocus="clearText(this)"> ※ 손님은 등록만 가능하며 <span style="color:red">수정</span> 및 <span style="color:red">삭제</span>를 할 수 없습니다.
</td>
<td align="right" class=write_head><img id='kcaptcha_image' border='0' width=120 height=20 onclick="imageClick();" style="cursor:pointer;" title="글자가 잘안보이는 경우 클릭하시면 새로운 글자가 나옵니다."></td>
<td align="right"><input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required></td>
</table>
</td>
</tr>
<? } ?>
<td>
<textarea class="bbs_ft" name="wr_content" itemname="내용" required style="width:100%;height:60; padding:4;" onFocus="clearText(this)"><?= $noLoginValue ?></textarea>
</td>
</tr>
<tr>
<td align="right" style="padding-top:5px; ">
<? if($is_member) { ?>
<span style='font-size:8.5pt;font-family:돋움;word-break:break-all;'><font color="#b38413">Secret </font><input type=checkbox value='secret' name='secret' $secret_checked onfocus=blur()> </span>
<? } ?>
<input type="image" id="btn_submit" src="<?=$board_skin_path?>/img/btn_write.gif" border="0" align="absmiddle">
</td>
</tr>
</table>
</td></tr><tr><td height="1px" bgColor="#cccccc"></td></tr></table>
</form>
<br>
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 게시판 리스트 시작 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
$wr_num = 0;
$tempArr= null;
for ($i=0; $i<count($list); $i++) {
$list_id = $list[$i][wr_id];
if($i == 0) $tempArr .= "\"$list_id\"";
else $tempArr .= ",\"$list_id\"";
?>
<a name="c_<?=$list_id?>"></a>
<?
// 부모글
if($wr_num != $list[$i][wr_num]){
?>
<tr><td colspan="6" class="bbs_lineo"> </td></tr>
<tr><td colspan="6" class="bbs_linei"></td></tr>
<tr bgColor="#f1f1f1">
<td height="25" colspan="5" style="padding-left : 5px;">
<span class=num>NO.<b><?= abs($list[$i][wr_num]) ?></b></span>
<?=$list[$i][name]?>
<span class=date>(<?=$list[$i][wr_datetime]?>)</span>
</td>
<td align="right" style="padding-right:5px;">
<a href="javascript:list_box('<?=$list_id?>', 'r');" title="댓글">댓글</a>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?> | <a href="javascript:list_box('<?=$list_id?>', 'u');">수정</a> | <a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&sca=<?=$sca?><? echo $is_admin?'&token='.$token:'';?>';}">삭제</a>
<? } ?>
</td>
</tr>
<tr >
<td colspan="6" style="padding-left : 5px; height:100px; ">
<span id="content_<?= $list_id?>">
<? if (!$list[$i][reply]) {
if (strstr($list[$i][wr_option], "secret")) { //비밀글이라면..
if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) {
echo "<span style='color:#FF0000;'>비밀글</span><br>";
echo "<span style='color:#FF0000;'>관리자나 작성자 에게만 보입니다.</span><br>";
echo nl2br($list[$i][wr_content]);
} else { // 관리자나 본인이 아니라면..
echo "<span style='color:#FF0000;'>비밀글</span><br>";
echo "<span style='color:#FF0000;'>관리자나 작성자 에게만 보입니다.</span>";
}
} else { //비밀글이 아니면..
echo nl2br($list[$i][wr_content]);
}
}
?>
</span>
</td>
</tr>
<?
$Display = "none";
?>
<tr bgColor="#ffffff">
<td colspan="6" class="bbs_pp">
<textarea class="bbs_ft" id='save_content_<?=$list_id?>' type=text style='display:<?= $Display ?>;width:100%;height:40; padding:4;' required><?= $list[$i][wr_content]?></textarea>
<span id='reply_<?=$list_id?>' style='display:<?= $Display ?>; width:100%; padding:5;'></span><!-- 답변 -->
<span id='edit_<?=$list_id?>' style='display:<?= $Display ?>; width:100%; padding:5;'></span><!-- 수정 -->
</td>
</tr>
<?
// 코멘트(댓글)
}else{
$totalCount++;
?>
<tr bgColor="#f8f8f8">
<td colspan="6" style="padding-left : 5px;">
<span id="comment_<?= $list_id?>">
<?
if(strlen($list[$i][wr_reply]) > 1){
echo $list[$i][reply];
echo $list[$i][icon_reply];
}
?>
<?= ($list[$i][wr_content])?>
: <span class="c_name"><NOBR><?=$list[$i][name]?></NOBR></span> <span class="c_date">(<?=$list[$i][datetime]?>)</span>
<a href="javascript:list_box('<?=$list_id?>', 'r');" title="이 댓글에 댓글달기" class="bbs">
<img src="<?=$board_skin_path?>/img/btn_reply.gif" title="이 댓글에 댓글달기" border="0" align="absmiddle">
</a>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?>
<a href="javascript:list_box('<?=$list_id?>', 'u');" style="padding-right:2px; ">
<img src="<?=$board_skin_path?>/img/btn_edit.gif" title="수정" border="0" align="absmiddle">
</a>
<a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&sca=<?=$sca?><? echo $is_admin?'&token='.$token:'';?>';}">
<img src="<?=$board_skin_path?>/img/btn_del.gif" title="삭제" border="0" align="absmiddle">
</a>
</span>
<? } ?>
</td>
</tr>
<?
$Display = "none";
?>
<tr bgColor="#f8f8f8">
<td colspan="6" class="bbs_pp">
<img id='save_emoticon_<?=$list_id?>' style='display:<?= $Display ?>;' border="0" src="<?=$board_skin_path?>/emoticons/<?=$list[$i][subject]?>.gif">
<textarea class="bbs_ft" id='save_content_<?=$list_id?>' type=text style='display:<?= $Display ?>;width:100%;height:40; padding:4;'><?= $list[$i][wr_content]?></textarea>
<span id='reply_<?=$list_id?>' style='display:<?= $Display ?>; width:100%; padding:5;'></span><!-- 답변 -->
<span id='edit_<?=$list_id?>' style='display:<?= $Display ?>; width:100%; padding:5;'></span><!-- 수정 -->
</td>
</tr>
<? } ?>
<?
$wr_num = $list[$i][wr_num];
}
?>
<? if (count($list) == 0) { ?>
<tr><td height="100" align="center">게시물이 없습니다.</td></tr>
<? } ?>
</table>
<!-- 페이지 표시 시작 -->
<div id="pagingNew"><?=$write_pages?></div>
<!-- 검색 -->
<div style="float:right;">
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<input type="hidden" name=sfl value='wr_subject||wr_content'><input type="hidden" name=sop value="and">
<input name=stx maxlength=15 size=15 itemname="검색어" required value="<?=$stx?>" style="border-width:1; border-color:#dddddd; border-style:solid; font-family:돋움; font-size:9pt; color:#666666;">
</form>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="" height="40">
<? if ($admin_href) { ?><a href='<?=$admin_href?>'><img src="<?=$board_skin_path?>/img/btn_admin.gif" border="0" width="55" height="20" align="absmiddle" title="관리자"></a><? } ?>
</td>
</tr>
</table>
</td></tr></table>
<span id=list_write style='display:inline; width:100%; padding:10;'>
<form name="fwrite" method="post" action="javascript:fwrite_check(document.fwrite);" enctype="multipart/form-data" autocomplete="off">
<input type=hidden name=w value="" id="list_w">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="<?=$list[$i][wr_id]?>" id="list_id">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=wr_subject value="<?=$subject?>">
<? if ($is_password) { ?><input type="hidden" name="wr_password" value="<?=$norobot_str?>"><? } ?>
<? if ($is_norobot) { ?><input type="hidden" name="wr_key" value="<?=$norobot_key?>"><? } ?>
<table width="<?=$width?>" align="center" cellpadding="5" cellspacing="0" bgcolor="#f8f8f8"><tr><td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<? if ($is_name) { ?>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td>
<input class="bbs_ft" maxLength="20" size="13" name="wr_name" itemname="이름" required style="height:23; padding:4;" value="손님" onFocus="clearText(this)"> ※ 손님은 등록만 가능하며 <span style="color:red">수정</span> 및 <span style="color:red">삭제</span>를 할 수 없습니다.
</td>
<td align="right" class=write_head><img id='kcaptcha_image_copy' border='0' width=120 height=20 onclick="imageClick();" style="cursor:pointer;" title="글자가 잘안보이는 경우 클릭하시면 새로운 글자가 나옵니다."></td>
<td align="right"><input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required></td>
</table>
</td>
</tr>
</table>
</td>
</tr>
<? } ?>
<tr>
<td width="100%" style="padding-right:3px; ">
<textarea class="bbs_ft" id="list_content" name="wr_content" itemname="내용" required style="height:33; padding:4;" onFocus="clearText(this)"><?= $noContentValue ?></textarea>
</td>
</tr>
<tr>
<td align="right">
<span style='font-size:8pt;font-family:돋움;word-break:break-all;'><font color="#b38413">Secret </font><input type=checkbox value='secret' name='secret' $secret_checked onfocus=blur()> </span>
<input type="image" id="btn_submit" src="<?=$board_skin_path?>/img/btn_write_comment.gif" border="0" align="absmiddle">
</td>
</tr>
</table>
</td></tr></table>
</form>
</span>
<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
document.fsearch.sfl.value = "<?=$sfl?>";
document.fsearch.sop.value = "<?=$sop?>";
}
</script>
<script type="text/javascript"> var md5_norobot_key = ''; </script>
<script type="text/javascript" src="<?="$g4[path]/js/prototype.js"?>"></script>
<script type="text/javascript">
function imageClick() {
var url = "<?=$g4[bbs_path]?>/kcaptcha_session.php";
var para = "";
var myAjax = new Ajax.Request(
url,
{
method: 'post',
asynchronous: true,
parameters: para,
onComplete: imageClickResult
});
}
function imageClickResult(req) {
var result = req.responseText;
var img = document.createElement("IMG");
img.setAttribute("src", "<?=$g4[bbs_path]?>/kcaptcha_image.php?t=" + (new Date).getTime());
document.getElementById('kcaptcha_image').src = img.getAttribute('src');
document.getElementById('kcaptcha_image_copy').src = img.getAttribute('src');
md5_norobot_key = result;
}
<? if (!$is_member) { ?>Event.observe(window, "load", imageClick);<? } ?>
function clearText(thefield){
if (thefield.defaultValue==thefield.value) thefield.value = "";
}
function fwrite_check(f)
{
var s = "";
<?if($is_guest){ ?>
if (f.wr_name.value == "손님" ||
false){
f.wr_name.focus();
alert("닉네임을 적어주세요.")
return;
}
<? } ?>
if (f.wr_content.value == "<?= $noLoginValue ?>" ||
f.wr_content.value == "<?= $noContentValue ?>" ||
false){
f.wr_content.focus();
alert("내용을 입력해 주세요...")
return;
}
if (s = word_filter_check(f.wr_content.value)) {
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return;
}
<?if($is_guest){ ?>
if (typeof(f.wr_key) != "undefined") {
if (hex_md5(f.wr_key.value) != md5_norobot_key) {
alert("자동등록방지용 빨간글자가 순서대로 입력되지 않았습니다.");
f.wr_key.focus();
return;
}
}
<? } ?>
f.action = "./write_update.php";
f.submit();
}
var old_id, new_id;
var save_html = document.getElementById('list_write').innerHTML;
function commentTotalClose(){
var tempArr = Array(<?= $tempArr ?>);
for($i = 0 ; $i < tempArr.length ; $i++){
var commentObj = eval("document.getElementById('comment_" + tempArr[$i] + "')");
if(commentObj != null) commentObj.style.display = 'inline';
}
}
function list_box(list_id, work)
{
commentTotalClose();
imageClick();
// 답변, 수정
if (list_id)
{
if (work == 'r')
new_id = 'reply_' + list_id;
else
new_id = 'edit_' + list_id;
}
else
new_id = 'list_write';
if (old_id == new_id) {
var mode = document.getElementById(new_id).style.display;
if (mode == 'inline') {
document.getElementById(new_id).style.display = 'none';
}
else {
document.getElementById(new_id).style.display = 'inline';
}
}
else
{
if (old_id)
{
document.getElementById(old_id).style.display = 'none';
document.getElementById(old_id).innerHTML = '';
}
document.getElementById(new_id).style.display = 'inline';
document.getElementById(new_id).innerHTML = save_html;
// 수정
if (work == 'u')
{
document.getElementById('list_content').value = document.getElementById('save_content_' + list_id).value;
var commentObj = eval("document.getElementById('comment_" + list_id + "')");
if(commentObj != null)
if(commentObj.style.display == 'none') commentObj.style.display = 'inline';
else commentObj.style.display = 'none';
}
document.getElementById('list_id').value = list_id;
document.getElementById('list_w').value = work;
old_id = new_id;
}
}
list_box('', '');
new_id = 'list_write';
document.getElementById(new_id).style.display = 'none';
</script>
<?
if ($w == "") {
if (!$member[mb_id])
echo "<script language='javascript' src='$g4[path]/js/md5.js'></script>\n";
// 필터
echo "<script language='javascript'> var g4_cf_filter = '$config[cf_filter], '; </script>\n";
echo "<script language='javascript' src='$g4[path]/js/filter.js'></script>\n";
}
?>
댓글 전체