댓글 통계 정보
댓글 통계본문
일별 댓글 갯수 및 그래프 출력
<?
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
if ($is_admin != "super") alert("최고관리자만 접근 가능합니다.");
$g4[title] = '댓글 통계';
include_once("../admin.head.php");
?>
<?=subtitle($g4[title])?>
<table border=1 cellpadding=0 cellspacing=0 width=100%>
<tbody align=center>
<?
$week = Array(0=>"일","월","화","수","목","금","토");
$qry = sql_query("SELECT left(bn_datetime, 10) as day, date_format(left(bn_datetime, 10), '%w') as week_no, count(*) as cnt FROM $g4[board_new_table] WHERE wr_id<>wr_parent group by left(bn_datetime, 10) order by bn_datetime desc ");
while ($res = sql_fetch_array($qry)) {
$per = $res[cnt]/10;
?>
<tr>
<td width=100> <?=$res[day]?> (<?=$week[$res[week_no]]?>)</td>
<td width=100> <?=number_format($res[cnt])?> </td>
<td align=left>
<hr style="color:#4BBBE0; width:<?=$per?>%; height:10px;"/>
</td>
<tr>
<?}?>
</tbody>
</table>
<?
include_once("../admin.tail.php");
?>
3
댓글 2개
이렇게 하니까,좋네요