<!DOCTYPE html>
<html>
<head>
  <meta charset="<?php echo $cfg_soft_lang; ?>">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
	<title>文档信息统计</title>
	<link rel="stylesheet" href="../static/web/css/admin.css">
</head>
<body>
  <table width="98%" cellpadding="3" cellspacing="1" align="center">
    <tr> 
      <td height="26" colspan="2" background="../static/web/img/tbg.gif">文档信息统计</td>
    </tr>
    <tr> 
    <td colspan="2" align="center">
      <table width="98%" cellspacing="0" cellpadding="0">
        <tr> 
          <td>综合信息统计：</td>
          <td>
            <table width="300" cellpadding="1" cellspacing="1">
              <tr> 
                <td width="140" bgcolor="#F3ECDA">文档总数：</td>
                <td width="260">[<?php echo $row1['dd']?>]</td>
              </tr>
              <tr> 
                <td bgcolor="#F3ECDA">评论总数：</td>
                <td>[<?php echo $row2['dd']?>]</td>
              </tr>
              <tr> 
                <td bgcolor="#F3ECDA">会员总数：</td>
                <td>[<?php echo $row3['dd']?>]</td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td width="16%" height="80">频道信息统计：</td>
          <td width="84%">
            <table width="300" cellpadding="1" cellspacing="1">
              <tr align="center" bgcolor="#E8E6D7"> 
                <td width="140" bgcolor="#E8E6D7">频道名称</td>
                <td>文档总数</td>
              </tr>
              <?php
              $arcs = array();
              $dsql->Execute("aaa","Select channel,count(channel) as dd From `#@__archives`  group by channel");
              while($row = $dsql->GetArray("aaa")) $arcs[$row['channel']] = $row['dd'];
              $dsql->Execute("me","Select id,typename From `#@__channeltype`");
              while($row = $dsql->GetObject()){
              ?>
              <tr align="center"> 
                <td><?php echo $row->typename?></td>
                <td>[<?php echo (isset($arcs[$row->id]) ? $arcs[$row->id] : 0 ); ?>]</td>
              </tr>
              <?php } ?>
            </table>
          </td>
        </tr>
      </table> 
    </td>
    </tr>
    <tr> 
      <td height="26" colspan="2" bgcolor="#DFE9C0"></td>
    </tr>
  </table>
</body>
</html>