팁텍 글보기에서 관련(답변)글 리스트 보이기
페이지 정보
본문
gbview.skin.php 에서 넣고 싶은 위치에 추가해주세요.
아무래도 보기화면의 코멘트 아래쪽이나 윗쪽에 뿌려주면 좋겠죠.
<?
/***********************************************************************
* 작업자 : root(http://www.threes.org)
* 읽고 있는 글이 답변글이거나 답변글이 달린 글일 경우
* 읽고 있는 글 하단에 같은 글에 속한 글의 리스트를 뿌려준다
*
* 테이블 디자인은 사용자가 보기좋게 수정해서 사용하세요.
***********************************************************************/
$sql = " select *
from $write_table
where wr_num = '$write[wr_num]' and wr_comment = 0
order by wr_reply ";
$result = sql_query($sql);
if(mysql_num_rows($result) > 1) {
echo "<table width='100%' border=1 cellpadding=0 cellspacing=0>\n";
for ($i=0; $row=mysql_fetch_array($result); $i++) {
$wr_name = gblayer($row[mb_id], cut_str($row[wr_name],12,''), $row[wr_email], $row[wr_homepage]);
$wr_ca_name = get_category_name($write_table, $row[ca_id]);
$wr_commentcnt = "";
if ($row[wr_commentcnt]) {
$wr_commentcnt = "($row[wr_commentcnt])";
}
$wr_datetime = substr($row[wr_datetime],2,8);
$wr_reply = "";
if (strlen($row[wr_reply]) > 0) {
for ($k=0; $k<strlen($row[wr_reply]); $k++) {
$wr_reply .= " ";
}
}
$wr_icon_reply = "";
if ($wr_reply) {
$wr_icon_reply = "<img src='$board_skin/icon_reply.gif' align='absmiddle'>";
}
$wr_href = "./?doc=bbs/gnuboard.php&$qstr&page=$page&wr_id=$row[wr_id]";
$subject = cut_str($row[wr_subject], $board[bo_subject_len], "…");
$subject = get_text($subject);
if ($wr_id == $row[wr_id]) {
//$wr_num = "<font color=crimson><b>→</b></font>";
$wr_num = "<img src='$board_skin/icon_arrow.gif' border=0>";
} else {
$wr_num = " ";
}
?>
<tr align=center>
<td height=25><?=$wr_num?></td>
<? if ($is_category) { ?><td colspan=2><?=$wr_ca_name?></td><? } ?>
<td align=left>
<?=$wr_reply?>
<?=$wr_icon_reply?>
<a href='<?=$wr_href?>'><? if ($row[is_notice]) echo "<b><span class=notice>"; ?><?=$subject?><? if ($row[is_notice]) echo "</span></b>"; ?></a>
<?=$wr_commentcnt?>
<td><?=$wr_name?></td>
<td><?=$wr_datetime?></td>
<td><?=$row[wr_hit]?></td>
</tr>
<?
}
echo "</table>";
}
/***********************************************************************/
?>
//root님
출처는 아래 링크...........
아무래도 보기화면의 코멘트 아래쪽이나 윗쪽에 뿌려주면 좋겠죠.
<?
/***********************************************************************
* 작업자 : root(http://www.threes.org)
* 읽고 있는 글이 답변글이거나 답변글이 달린 글일 경우
* 읽고 있는 글 하단에 같은 글에 속한 글의 리스트를 뿌려준다
*
* 테이블 디자인은 사용자가 보기좋게 수정해서 사용하세요.
***********************************************************************/
$sql = " select *
from $write_table
where wr_num = '$write[wr_num]' and wr_comment = 0
order by wr_reply ";
$result = sql_query($sql);
if(mysql_num_rows($result) > 1) {
echo "<table width='100%' border=1 cellpadding=0 cellspacing=0>\n";
for ($i=0; $row=mysql_fetch_array($result); $i++) {
$wr_name = gblayer($row[mb_id], cut_str($row[wr_name],12,''), $row[wr_email], $row[wr_homepage]);
$wr_ca_name = get_category_name($write_table, $row[ca_id]);
$wr_commentcnt = "";
if ($row[wr_commentcnt]) {
$wr_commentcnt = "($row[wr_commentcnt])";
}
$wr_datetime = substr($row[wr_datetime],2,8);
$wr_reply = "";
if (strlen($row[wr_reply]) > 0) {
for ($k=0; $k<strlen($row[wr_reply]); $k++) {
$wr_reply .= " ";
}
}
$wr_icon_reply = "";
if ($wr_reply) {
$wr_icon_reply = "<img src='$board_skin/icon_reply.gif' align='absmiddle'>";
}
$wr_href = "./?doc=bbs/gnuboard.php&$qstr&page=$page&wr_id=$row[wr_id]";
$subject = cut_str($row[wr_subject], $board[bo_subject_len], "…");
$subject = get_text($subject);
if ($wr_id == $row[wr_id]) {
//$wr_num = "<font color=crimson><b>→</b></font>";
$wr_num = "<img src='$board_skin/icon_arrow.gif' border=0>";
} else {
$wr_num = " ";
}
?>
<tr align=center>
<td height=25><?=$wr_num?></td>
<? if ($is_category) { ?><td colspan=2><?=$wr_ca_name?></td><? } ?>
<td align=left>
<?=$wr_reply?>
<?=$wr_icon_reply?>
<a href='<?=$wr_href?>'><? if ($row[is_notice]) echo "<b><span class=notice>"; ?><?=$subject?><? if ($row[is_notice]) echo "</span></b>"; ?></a>
<?=$wr_commentcnt?>
<td><?=$wr_name?></td>
<td><?=$wr_datetime?></td>
<td><?=$row[wr_hit]?></td>
</tr>
<?
}
echo "</table>";
}
/***********************************************************************/
?>
//root님
출처는 아래 링크...........
관련링크
댓글목록
등록된 댓글이 없습니다.