<?
$sub_menu = "400210";
include_once("./_common.php");

auth_check($auth[$sub_menu], "r");

$token		= get_token();
include_once("$g4[path]/head.sub.php");
?>
<script type="text/javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<style type="text/css">
.subject	{ border:1px solid #EFEFEF; background-color:#FBFBFB; padding:5px; line-height:160%; margin:3px; }
</style>
<link rel="stylesheet" href="<?=$g4[path]?>/adm/admin.style.css" type="text/css">
<?
$write_table	= $g4[write_prefix] . $table;
$bbsinfo		= sql_fetch("select wr_id, wr_subject, mb_id, wr_name, wr_is_comment, wr_content, wr_email, wr_homepage from $write_table where wr_id='$wrid'");
if($bbsinfo[wr_is_comment]) $subject = cut_str($bbsinfo[wr_content], 80);
else	$subject = $bbsinfo[wr_subject];
$mb				= get_member($bbsinfo[mb_id]);
if($mb[mb_id]) $nick = get_sideview($bbsinfo[mb_id], $bbsinfo[wr_name], $bbsinfo[wr_email], $bbsinfo[wr_homepage]);
else		alert_close("비회원에 대한 신고 내용은 따로 기록하지 않습니다.");

$sql_where	= "where 1 and db_table='$table' and db_wrid='$wrid'";
$sql	= "select count(db_recno) as cnt, db_why_report from $zmb[table_blacklist_report] $sql_where group by db_why_report";
$row	= sql_query($sql);
$i		= 0;
$colspan = 3;
?>
<?=subtitle("신고 된 내용")?>
<div class="subject">
	<div>글쓴이 : <?=$nick?></div>
	<div>제목 : <?=$subject?></div>
</div>
<table width=98% cellpadding=0 cellspacing=1 border=0 align="center">
<colgroup width=70%>
<colgroup width=30%>
<tr><td colspan='<?=$colspan?>' class='line1'></td></tr>
<tr class='bgcol1 bold col1 ht center'>
    <td>신고사유</td>
	<td>신고 수</td>
</tr>
<? while($rd = sql_fetch_array($row)) : ?>
<tr><td colspan='<?=$colspan?>' class='line2'></td></tr>
<tr class='list<?=$list?> col1 ht center'>
	<td align="left">&nbsp;&nbsp;<?=$rd[db_why_report]?></td>
    <td><?=$rd[cnt]?></td>
</tr>
<? $i++;
endwhile; ?>
<script type='text/javascript'>document.getElementById('bo_skin_<?=$i?>').value='<?=$row[bo_skin]?>';</script>
<?
if ($i == 0)
    echo "<tr height='50'><td colspan='$colspan' align=center height=100 bgcolor=#ffffff>신고 내용을 정리 하셨습니다.</td></tr>"; 
?>
<tr><td colspan='<?=$colspan?>' class='line2'></td></tr>
</table>
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");
?>
<table width=100% cellpadding=3 cellspacing=1>
<tr>
	<td align=center><input type="button" value="확인" class="btn1" onclick="window.close();">
	<input type="button" value="신고사유 삭제" class="btn1" onclick="if(confirm('누적 된 신고 내용을 삭제 합니다. \n블라인드 된 게시물의 차단 정보는 유지 됩니다.')) zm_gourl('./zm.report_process.php?mode=report_del&table=<?=$table?>&wrid=<?=$wrid?>')"></td>
</tr>
</table>

<script language="javascript">
</script>
</body>
</html>