<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="6%" height="33" align="left" valign="middle" bgcolor="#F1F3FE">选择</th>
<th width="6%" align="left" valign="middle" bgcolor="#F1F3FE">ID</th>
<th width="21%" align="left" valign="middle" bgcolor="#F1F3FE">标题</th>
<th width="11%" align="left" valign="middle" bgcolor="#F1F3FE">内容</span></th>
<th width='9%' align="left" valign="middle" bgcolor="#F1F3FE">发布人</th>
<th width="9%" align="left" valign="middle" bgcolor="#F1F3FE">推荐</th>
<th width="8%" align="left" valign="middle" bgcolor="#F1F3FE">审核</th>
<th width='16%' align="left" valign="middle" bgcolor="#F1F3FE">添加时间</th>
<th width="14%" align="center" valign="middle" bgcolor="#F1F3FE">管理操作</th>
</tr>
</thead>
<tbody>
<tr><?php
$sql="select count(id) from ".DB_TABLEPER_CONMENG."message order by id desc";
$total=$db->fetch_one($sql);
if($total>0){
$pagesize=10;
$page=isset($_GET["page"])?$_GET["page"]:0;
if((!$page)|| $page<1) $page=1;
$info=$db->fetch("select * from ".DB_TABLEPER_CONMENG."message order by id desc limit ".($page-1)*$pagesize.",$pagesize");
if(!empty($info)){
foreach($info as $conmeng ){
?>
<td align="left" valign="middle">
<input type="checkbox" name="spaceid[]" value="1"> </td>
<td align="left" valign="middle"><?php echo $conmeng["id"] ?></td>
<td align="left" valign="middle"><?php echo $conmeng["title"] ?></td> <td align="left" valign="middle"><?php echo $conmeng['content'];?></td>
<td align="left" valign="middle"><?php echo $conmeng['nickname'];?></td>
<td align="left" valign="middle"><?php echo $conmeng['recommend'] == '0' ? '<span style="color:#ccc">不推荐</span>' : ($conmeng['recommend'] == '1' ? '<span style="color:#009900">已推荐</span>' : ''); ?></td>
<td align="left" valign="middle"><?php echo $conmeng['audit'] == '0' ? '<span style="color:red">未审核</span>' : ($conmeng['audit'] == '1' ? '<span style="color:#009900">已审核</span>' : ''); ?></td>
<td align="left" valign="middle"><?php echo $conmeng["addtime"] ?></td>
<td align="center"><a href="view.php?id=<?php echo $conmeng["id"] ?>" >查看</a> | <a href="edit.php?id=<?php echo $conmeng["id"] ?>" onClick="edit(1, '修改')" title="修改" >修改</a> | <a href="delete.php?id=<?php echo $conmeng["id"] ?>" onClick="edit(1, '删除')" title="删除" >删除</a></td>
</tr>
<?php
}
}
?>
<tr><td colspan="9" align="center"><div align="center" class="conmengpage" ><?php echo $db->pageft($page,$total,$pagesize,1,1,1,10); ?> </div></td></tr>
<?php
}
else{echo '<tr><td colspan="8" align="center">暂无添加</td></tr>';}
?>
</table>