InfoMain.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. $editor=1;
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. @set_time_limit(1000);
  19. //今日信息
  20. $pur=$empire->fetch1("select lasttimeinfo,lastnuminfo,lastnuminfotb,todaytimeinfo,todaytimepl,todaynuminfo,yesterdaynuminfo from {$dbtbpre}enewspublic_up limit 1");
  21. //更新昨日信息
  22. $todaydate=date('Y-m-d');
  23. if(date('Y-m-d',$pur['todaytimeinfo'])<>$todaydate||date('Y-m-d',$pur['todaytimepl'])<>$todaydate)
  24. {
  25. DoUpdateYesterdayAddDataNum();
  26. $pur=$empire->fetch1("select lasttimeinfo,lastnuminfo,lastnuminfotb,todaytimeinfo,todaytimepl,todaynuminfo,yesterdaynuminfo from {$dbtbpre}enewspublic_up limit 1");
  27. }
  28. $sql=$empire->query("select tid,tbname,tname,isdefault from {$dbtbpre}enewstable order by tid");
  29. //签发信息
  30. $qfinfonum=$empire->gettotal("select count(*) as total from {$dbtbpre}enewswfinfo where checktno=0 and (groupid like '%,".$lur['groupid'].",%' or userclass like '%,".$lur['classid'].",%' or username like '%,".$lur['username'].",%')");
  31. ?>
  32. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  33. <html>
  34. <head>
  35. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  36. <title>信息</title>
  37. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  38. </head>
  39. <body>
  40. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  41. <tr>
  42. <td>位置:<a href="InfoMain.php<?=$ecms_hashur['whehref']?>">信息统计</a></td>
  43. </tr>
  44. </table>
  45. <br>
  46. <table width="100%" border="0" cellspacing="1" cellpadding="0">
  47. <tr>
  48. <td width="10%" height="25" class="header"><div align="center"><a href="../info/InfoMain.php<?=$ecms_hashur['whehref']?>">信息统计</a></div></td>
  49. <td width="10%" bgcolor="#C9F1FF"><div align="center"><a href="../pl/PlMain.php<?=$ecms_hashur['whehref']?>">评论统计</a></div></td>
  50. <td width="10%" bgcolor="#C9F1FF"><div align="center"><a href="../other/OtherMain.php<?=$ecms_hashur['whehref']?>">其他统计</a></div></td>
  51. <td width="58%">&nbsp;</td>
  52. <td width="6%">&nbsp;</td>
  53. <td width="6%">&nbsp;</td>
  54. </tr>
  55. </table>
  56. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  57. <tr class="header">
  58. <td height="25" colspan="6">信息发布统计 (今日信息数:<?=$pur['todaynuminfo']?>,昨天信息数:<?=$pur['yesterdaynuminfo']?>,待我签发的信息数:<a href="../workflow/ListWfInfo.php<?=$ecms_hashur['whehref']?>" target="_blank"><?=$qfinfonum?></a>) </td>
  59. </tr>
  60. <tr class="header">
  61. <td width="14%" height="25"><div align="center">表名</div></td>
  62. <td width="8%"><div align="center">已审核</div></td>
  63. <td width="8%"><div align="center">未审核</div></td>
  64. <td width="8%"><div align="center">未审核投稿</div></td>
  65. <td width="8%"><div align="center">总数</div></td>
  66. <td width="54%">从
  67. <?=date('Y-m-d H:i:s',$pur['lasttimeinfo'])?>
  68. 截止至现在的新增数量</td>
  69. </tr>
  70. <?php
  71. $i=0;
  72. $alltbinfos=0;
  73. while($tr=$empire->fetch($sql))
  74. {
  75. $i++;
  76. $bgcolor='#FFFFFF';
  77. if($i%2==0)
  78. {
  79. $bgcolor='';
  80. }
  81. $thistb=$tr['tid'];
  82. $infotbname='ecms_'.$tr['tbname'];
  83. $tbinfos=eGetTableRowNum($dbtbpre.$infotbname);//已审核
  84. $checkinfotbname='ecms_'.$tr['tbname'].'_check';
  85. $checktbinfos=eGetTableRowNum($dbtbpre.$checkinfotbname);//未审核
  86. $qchecktbinfos=$empire->gettotal("select count(*) as total from ".$dbtbpre.$checkinfotbname." where ismember=1");//投稿数
  87. $alltbinfos=$tbinfos+$checktbinfos;//总数
  88. $tname=$tr['tname'];
  89. if($tr['isdefault'])
  90. {
  91. $tname='<b>'.$tname.'</b>';
  92. }
  93. $exp='|'.$thistb.',';
  94. $addnumr=explode($exp,$pur['lastnuminfotb']);
  95. $addnumrt=explode('|',$addnumr[1]);
  96. $addnum=(int)$addnumrt[0];
  97. $totaltbinfos+=$tbinfos;
  98. $totalchecktbinfos+=$checktbinfos;
  99. $totalqchecktbinfos+=$qchecktbinfos;
  100. $totalalltbinfos+=$alltbinfos;
  101. ?>
  102. <tr bgcolor="<?=$bgcolor?>">
  103. <td height="25">
  104. <div align="center"><a href="../ListAllInfo.php?tbname=<?=$tr['tbname']?><?=$ecms_hashur['ehref']?>" title="*<?=$infotbname?>" target="_blank">
  105. <?=$tname?>
  106. </a></div></td>
  107. <td align="right"><div align="right"><a href="../ListAllInfo.php?tbname=<?=$tr['tbname']?><?=$ecms_hashur['ehref']?>" target="_blank"><?=$tbinfos?></a></div></td>
  108. <td align="right"><div align="right"><a href="../ListAllInfo.php?tbname=<?=$tr['tbname']?>&ecmscheck=1<?=$ecms_hashur['ehref']?>" target="_blank"><?=$checktbinfos?></a></div></td>
  109. <td align="right"><a href="../ListAllInfo.php?tbname=<?=$tr['tbname']?>&ecmscheck=1&sear=1&showspecial=7<?=$ecms_hashur['ehref']?>" target="_blank"><?=$qchecktbinfos?></a></td>
  110. <td align="right"><?=$alltbinfos?></td>
  111. <td><table width="320" border="0" cellspacing="0" cellpadding="0">
  112. <tr>
  113. <td width="40%" align="right"><?=$addnum?></td>
  114. <td width="60%"><div align="center"></div></td>
  115. </tr>
  116. </table></td>
  117. </tr>
  118. <?php
  119. }
  120. ?>
  121. <tr class="header">
  122. <td height="25"><div align="right">总计:</div></td>
  123. <td align="right"><div align="right"><?=$totaltbinfos?></div></td>
  124. <td align="right"><div align="right"><?=$totalchecktbinfos?></div></td>
  125. <td align="right"><?=$totalqchecktbinfos?></td>
  126. <td align="right"><?=$totalalltbinfos?></td>
  127. <td><table width="320" border="0" cellspacing="0" cellpadding="0">
  128. <tr>
  129. <td width="40%" align="right"><font color="#FFFFFF"><b><?=$pur['lastnuminfo']?></b></font></td>
  130. <td width="60%"><div align="center">
  131. <input type="button" name="Submit" value="重置截止统计" onclick="if(confirm('确认要重置信息数统计?')){self.location.href='../ecmscom.php?enews=ResetAddDataNum&type=info&from=info/InfoMain.php<?=urlencode($ecms_hashur['whehref'])?><?=$ecms_hashur['href']?>';}">
  132. </div></td>
  133. </tr>
  134. </table></td>
  135. </tr>
  136. </table>
  137. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  138. <tr>
  139. <td height="23"><font color="#666666">说明:点击“已审核”、“未审核”或“未审核投稿”数可进入相应的管理。</font></td>
  140. </tr>
  141. </table>
  142. <p>&nbsp;</p>
  143. </body>
  144. </html>
  145. <?php
  146. db_close();
  147. $empire=null;
  148. ?>