<?php
define('EmpireCMSAdmin','1');
require("../../class/connect.php");
require("../../class/db_sql.php");
require("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
//验证用户
$lur=is_login();
$logininid=$lur['userid'];
$loginin=$lur['username'];
$loginrnd=$lur['rnd'];
$loginlevel=$lur['groupid'];
$loginadminstyleid=$lur['adminstyleid'];


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>信息</title>
<link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td>位置：<a href="InfoMain.php">信息统计</a></td>
  </tr>
</table>
<br>

<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  <tr class="header"> 
    <td height="25" colspan="5">信息统计</td>
  </tr>
  <tr class="header">
	<td width="5%" height="25"><div align="center">tid</div></td>
    <td width="14%" height="25"><div align="center">表名</div></td>
    <td width="8%"><div align="center">已审核</div></td>
    <td width="8%"><div align="center">未审核</div></td>
    <td width="8%"><div align="center">总数</div></td>
  </tr>
	  <?php
	  $alltbinfos=0;
	  $sql=$empire->query("select tid,tbname,tname,isdefault from {$dbtbpre}enewstable order by tid");
	  while($tr=$empire->fetch($sql))
	  {
		$thistb=$tr['tid'];
		$infotbname='ecms_'.$tr['tbname'];
		$tbinfos=eGetTableRowNum($dbtbpre.$infotbname);//已审核
		$checkinfotbname='ecms_'.$tr['tbname'].'_check';
		$checktbinfos=eGetTableRowNum($dbtbpre.$checkinfotbname);//未审核
		$alltbinfos=$tbinfos+$checktbinfos;//总数
		$tname=$tr['tname'];
		if($tr['isdefault'])
		{
			$tname='<b>'.$tname.'</b>';
		}
		$exp='|'.$thistb.',';
		$addnumr=explode($exp,$pur['lastnuminfotb']);
		$addnumrt=explode('|',$addnumr[1]);
		$addnum=(int)$addnumrt[0];
		$totaltbinfos+=$tbinfos;
		$totalchecktbinfos+=$checktbinfos;
		$totalqchecktbinfos+=$qchecktbinfos;
		$totalalltbinfos+=$alltbinfos;
	  ?>
  <tr bgcolor="#FFFFFF"> 
    <td align="right"><?=$tr['tid']?></td>
    <td height="25">
		<div align="center"><a href="../ListAllInfo.php?tbname=<?=$tr['tbname']?>" title="*<?=$infotbname?>" target="_blank">
	    <?=$tname?>
	    </a></div></td>
    <td align="right"><div align="right"><a href="../ListAllInfo.php?tbname=<?=$tr['tbname']?>" target="_blank"><?=$tbinfos?></a></div></td>
    <td align="right"><div align="right"><a href="../ListAllInfo.php?tbname=<?=$tr['tbname']?>&ecmscheck=1" target="_blank"><?=$checktbinfos?></a></div></td>
    <td align="right"><?=$alltbinfos?></td>
  </tr>
	  <?php
	  }
	  ?>
  <tr  bgcolor="#FFFFFF">
    <td height="25" colspan=5><div align="right">总计<?=$totalalltbinfos?>，已审核<?=$totaltbinfos?>，未审核<?=$totalchecktbinfos?></div></td>
  </tr>
</table>


<p>&nbsp;</p>
</body>
</html>
<?php
db_close();
$empire=null;
?>