|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/22697/root/home/queenjbs/yuchun/ |
Upload File : |
<?
include "$DOCUMENT_ROOT/conf/conf_dir.php";
//댓글
if(!$pageCount) $pageCount =4;
$show_one_page = $pageCount;
$show_view_page = 5;
$page = ( $page ) ? $page : 1;
$offset = ($page-1)*$show_one_page;
$query_limit = "limit $offset,$show_one_page";
$QUERY_TOTAL = "SELECT count(*) FROM board_comment WHERE module_name='".$tableName."' and module_no='".$Num."' ";
$QUERY = "SELECT * FROM board_comment WHERE module_name='".$tableName."' and module_no='".$Num."' ORDER BY idx desc,reg_date desc $query_limit";
$total_count = get_db($QUERY_TOTAL);
$results= mysql_query($QUERY,$db_con);
$total = mysql_affected_rows();
$total_page = ceil( $total_count / $show_one_page);
$start_num = $total_count - $offset;
for($i=0; $i<$total; $i++)
{
$rows = mysql_fetch_array($results);
$regdate = substr($rows[reg_date],0,10);
$regdateArr = explode("-",$regdate);
$today_tmp = $regdateArr[0].".".$regdateArr[1].".".$regdateArr[2];
$contents = stripslashes($rows[content]);
$reply_num= $rows[idx];
//댓글 이미지 색상
$tmp_img= get_imgColor($rows[user_no]);
$replyImg =$tmp_img[0];
$replyColor = $tmp_img[1];
if($rows[user_no] == $sessionIDX || $sessionLevel==15) $img_del = "<a href='javascript: commnet_del($rows[idx]);' style='margin:3px;'><img src='../images/sub/icon_del.jpg' alt='del' /></a>";
else $img_del="";
$COMMENT_LIST .="
<div class='mv_date_tit' id='vi".$reply_num."'>
<div class='mvdate_tit_le nobody02' style='background-color:".$replyColor.";overflow: hidden; position: relative;'>$replyImg</div>
<div class='mvdate_tit_ri'>$rows[user_name]<span class='mvis_date'>$today_tmp</span>$img_del<h2 class='font_nomal' style='word-break:break-all;'>$contents</h2></div>
</div>
";
}
echo $COMMENT_LIST;
?>