일반게시판 글읽기 댓글 작업 중

This commit is contained in:
whitedot
2012-11-28 12:52:12 +09:00
parent 20d4346e32
commit 016664d489
3 changed files with 64 additions and 76 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
data data
dbconfig.php dbconfig.php
install.bak install.bak
test.php

View File

@ -136,12 +136,12 @@ ob_end_flush();
</div> </div>
<? } ?> <? } ?>
</article> <?
// 코멘트 입출력
include_once('./view_comment.php');
?>
<? </article>
// 코멘트 입출력
include_once('./view_comment.php');
?>
<div> <div>
<? 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>&nbsp;"; } ?> <? 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>&nbsp;"; } ?>

View File

@ -1,38 +1,34 @@
<? <?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// $cwin 은 코멘트 새창일 때
?> ?>
<script type="text/javascript"> <script>
// 글자수 제한 // 글자수 제한
var char_min = parseInt(<?=$comment_min?>); // 최소 var char_min = parseInt(<?=$comment_min?>); // 최소
var char_max = parseInt(<?=$comment_max?>); // 최대 var char_max = parseInt(<?=$comment_max?>); // 최대
</script> </script>
<? if ($cwin==1) { ?><table width=100% cellpadding=10 align=center><tr><td><?}?> <? if ($cwin==1) { ?><?}?>
<!-- 코멘트 리스트 --> <!-- 코멘트 리스트 -->
<div id="commentContents"> <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 "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; ?></td>
<td width='100%'>
<table border=0 cellpadding=0 cellspacing=0 width=100%> <!-- 코멘트 리스트 -->
<tr>
<td height=1 colspan=3 bgcolor="#dddddd"><td> <section>
</tr> <h2>이 글에 대한 댓글목록</h2>
<tr> <?
<td height=1 colspan=3></td> for ($i=0; $i<count($list); $i++) {
</tr> $comment_id = $list[$i]['wr_id'];
<tr> $comment_depth = strlen($list[$i]['wr_comment_reply']);
<td valign=top> ?>
<div style="height:28px; background:url(<?=$board_skin_path?>/img/co_title_bg.gif); clear:both; line-height:28px;"> <article>
<div style="float:left; margin:2px 0 0 2px;"> <header>
<h1></h1>
</header>
<a name="c_<?=$comment_id?>"></a>
<strong><?=$list[$i]['name']?></strong> <strong><?=$list[$i]['name']?></strong>
<span style="color:#888888; font-size:11px;"><?=$list[$i]['datetime']?></span> <span style="color:#888888; font-size:11px;"><?=$list[$i]['datetime']?></span>
</div> </div>
@ -46,7 +42,6 @@ for ($i=0; $i<count($list); $i++) {
</div> </div>
<!-- 코멘트 출력 --> <!-- 코멘트 출력 -->
<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> "; if (strstr($list[$i]['wr_option'], "secret")) echo "<span style='color:#ff6600;'>*</span> ";
$str = $list[$i]['content']; $str = $list[$i]['content'];
@ -65,24 +60,12 @@ for ($i=0; $i<count($list); $i++) {
<span id='reply_<?=$comment_id?>' style='display:none;'></span><!-- 답변 --> <span id='reply_<?=$comment_id?>' style='display:none;'></span><!-- 답변 -->
</div> </div>
<input type=hidden id='secret_comment_<?=$comment_id?>' value="<?=strstr($list[$i]['wr_option'],"secret")?>"> <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> <textarea id='save_comment_<?=$comment_id?>' style='display:none;'><?=get_text($list[$i]['content1'], 0)?></textarea>
</tr> </article>
<tr> <?}?>
<td height=5 colspan=3></td> </section>
</tr>
</table>
</td>
</tr>
</table>
<? } ?>
</div>
<!-- 코멘트 리스트 -->
<? if ($is_comment_write) { ?> <? 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;"> <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=w id=w value='c'>
<input type=hidden name=bo_table value='<?=$bo_table?>'> <input type=hidden name=bo_table value='<?=$bo_table?>'>
@ -96,6 +79,11 @@ for ($i=0; $i<count($list); $i++) {
<input type=hidden name=cwin value='<?=$cwin?>'> <input type=hidden name=cwin value='<?=$cwin?>'>
<input type=hidden name=is_good value=''> <input type=hidden name=is_good value=''>
<section>
<h2>이 글에 댓글쓰기</h2>
</section>
<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;"> <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> <tr>
<td colspan="2" style="padding:5px 0 0 5px;"> <td colspan="2" style="padding:5px 0 0 5px;">
@ -126,7 +114,6 @@ for ($i=0; $i<count($list); $i++) {
</tr> </tr>
</table> </table>
</form> </form>
</td></tr></table>
</div> </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>
@ -316,4 +303,4 @@ comment_box('', 'c'); // 코멘트 입력폼이 보이도록 처리하기위해
</script> </script>
<? } ?> <? } ?>
<? if($cwin==1) { ?></td><tr></table><p align=center><a href="javascript:window.close();"><img src="<?=$board_skin_path?>/img/btn_close.gif" border="0"></a><br><br><?}?> <? if($cwin==1) { ?><?}?>