<?php
if(!defined('InEmpireCMS'))
{
	exit();
}
?>
<?php
$public_diyr['pagetitle']='管理留言';
$url="<a href='../../../'>首页</a>&nbsp;>&nbsp;<a href='../cp/'>会员中心</a>&nbsp;>&nbsp;管理留言";
require(ECMS_PATH.'e/template/incfile/header.php');
?>
<script>
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall')
       e.checked = form.chkall.checked;
    }
  }
</script>
<h1 class="head">留言管理</h1>
        <div class="clear"></div>
        <table cellpadding="0" cellspacing="0" width="100%" class="list_table">
        	<thead>
            	<tr>
                	<th align="left">留言详情</th>
                    <th width="120">留言人</th>
                    <th width="80">操作</th>
                </tr>
            </thead>
		<tbody><?php
		while($r=$empire->fetch($sql))
		{
			$i++;
			$bgcolor=" class='tableborder'";
			if($i%2==0)
			{
				$bgcolor=" bgcolor='#ffffff'";
			}
			$private='';
			if($r['isprivate'])
			{
				$private='*悄悄话* / ';
			}
			$msg='';
			if($r['uid'])
			{
				$msg=" / <a href='../msg/AddMsg/?username=$r[uname]' target='_blank'>消息回复</a>";
				$r['uname']="<b><a href='../../space/?userid=$r[uid]' target='_blank'>$r[uname]</a></b>";
			}
			$gbuname=$private.$r[uname]." / 留言于 ".$r[addtime]." / ip: ".$r[ip].$msg;
		?>
        
          <tr>
                	<td><?=nl2br($r['gbtext'])?><div style="color:#999; font-size:12px;"><?=$r[addtime]?></div>
                   <?
					if($r['retext'])
					{
					?>                             
                    <div class="reply_c" style="border:1px solid #eee; margin:10px 0; padding:5px; background:#F9F9F9;"><?=nl2br($r['retext'])?></div>
                            <?
					}
					?>	
                    
                    </td>
                    <td align="center"><?=$r[uname]?></td>
                    <td align="center"><a href="#ecms" onclick="window.open('ReGbook.php?gid=<?=$r[gid]?>','','width=600,height=380,scrollbars=yes');" class="reply">回复</a>&nbsp;<a class="del" href="index.php?enews=DelMemberGbook&gid=<?=$r[gid]?>" onclick="return confirm('确认要删除?');">删除</a></td>
                </tr>
                
		  <?
		  }
		  ?>
            
            
                
                </tbody>
          
            <tfoot>
            	<tr>
                	<td colspan="20" align="right"> <?=$returnpage?>&nbsp;</td>
                </tr>
            </tfoot>
        </table>
   
<?php
require(ECMS_PATH.'e/template/incfile/footer.php');
?>