📄 year.php
字号:
<?
include_once 'inc/auth.php';
include_once 'inc/check_type.php';
echo '
<html>
<head>
<title>年度数据</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/system.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 年度数据</span>
</td>
</tr>
</table>
<br>
';
$connection = openconnection ();
$TOTAL_COUNT = 1;
for ($I = 1; $I <= 12; ++$I)
{
if ($I < 10)
{
$query = 'SELECT count(*) from SYS_LOG where TYPE=\'1\' and TIME>=\'' . date ('Y', time ()) . '-0' . $I . '-01 00:00:00\' and TIME<=\'' . date ('Y', time ()) . '-0' . $I . '-' . date ('t', time ()) . ' 23:59:59\'';
}
else
{
$query = 'SELECT count(*) from SYS_LOG where TYPE=\'1\' and TIME>=\'' . date ('Y', time ()) . '-' . $I . '-01 00:00:00\' and TIME<=\'' . date ('Y', time ()) . '-' . $I . '-' . date ('t', time ()) . ' 23:59:59\'';
}
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$MONTH_COUNT[$I] = $ROW[0];
}
$TOTAL_COUNT += $MONTH_COUNT[$I];
}
echo '<table border="0" width="70%" cellpadding="0" cellspacing="1" align="center" bgcolor="#000000" class="small">
<tr>
<td class="TableHeader">
<img src="/images/green_arrow.gif" WIDTH="20" HEIGHT="18"> 本年度按月访问统计
</td>
</tr>
<tr>
<td class="TableData">
<table border="0" height="100%" cellspacing="2" cellpadding="0" class="small">
<tr>
<td width="42" valign="top">
<table border="0" width="100%" height="100%" align="right" cellspacing="0" cellpadding="0" class="small">
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo max ($MONTH_COUNT);
echo '</td>
</tr>
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo ceil (max ($MONTH_COUNT) * 0.800000000000000044408921);
echo '</td>
</tr>
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo ceil (max ($MONTH_COUNT) * 0.59999999999999997779554);
echo '</td>
</tr>
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo ceil (max ($MONTH_COUNT) * 0.40000000000000002220446);
echo '</td>
</tr>
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo ceil (max ($MONTH_COUNT) * 0.20000000000000001110223);
echo '</td>
</tr>
</table>
</td>
';
for ($I = 1; $I <= 12; ++$I)
{
echo ' <td width="42" height="100" align="center" valign="bottom">
<table border="0" width="15" cellspacing="0" cellpadding="0" class="graph" id="table3">
<tr>
<td width="100%" valign="bottom" align="center"><img border="0" src="/images/column.gif" width="15"></td>
</tr>
<tr>
<td width="100%" height="';
echo floor ($MONTH_COUNT[$I] * 100 / max ($MONTH_COUNT));
echo '" background="/images/column.gif" valign="bottom"></td>
</tr>
</table>
</td>
';
}
echo ' </tr>
<tr>
<td align="right">0</td>
<td height=30 align="center">1月</td>
<td height=30 align="center">2月</td>
<td height=30 align="center">3月</td>
<td height=30 align="center">4月</td>
<td height=30 align="center">5月</td>
<td height=30 align="center">6月</td>
<td height=30 align="center">7月</td>
<td height=30 align="center">8月</td>
<td height=30 align="center">9月</td>
<td height=30 align="center">10月</td>
<td height=30 align="center">11月</td>
<td height=30 align="center">12月</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="1" width="70%" align="center" class="small" bgcolor="#000000" cellpadding="3">
<tr>
<td nowrap class="TableHeader" colspan="3">
<img src="/images/green_arrow.gif" WIDTH="20" HEIGHT="18"> 本年度按月访问数据
</td>
</tr>
';
for ($I = 1; $I <= 12; ++$I)
{
echo ' <tr class="TableData">
<td>
<table border="0" width="100%" align="right" cellspacing="0" cellpadding="0" class="small">
<tr>
<td nowrap align="center" width="80">';
echo $I;
echo '月</td>
<td nowrap align="center">';
echo round ($MONTH_COUNT[$I] * 100 / $TOTAL_COUNT);
echo '%</td>
<td nowrap align="center" width="100">';
echo $MONTH_COUNT[$I];
echo '</td>
</tr>
</table>
</td>
</tr>
';
}
echo '</table>
<br>
';
$TOTAL_COUNT = 1;
for ($I = 1; $I <= date ('t', time ()); ++$I)
{
if ($I < 10)
{
$query = 'SELECT count(*) from SYS_LOG where TYPE=\'1\' and TIME>=\'' . date ('Y-m', time ()) . '-0' . $I . ' 00:00:00\' and TIME<=\'' . date ('Y-m', time ()) . '-0' . $I . ' 23:59:59\'';
}
else
{
$query = 'SELECT count(*) from SYS_LOG where TYPE=\'1\' and TIME>=\'' . date ('Y-m', time ()) . '-' . $I . ' 00:00:00\' and TIME<=\'' . date ('Y-m', time ()) . '-' . $I . ' 23:59:59\'';
}
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$DAY_COUNT[$I] = $ROW[0];
}
$TOTAL_COUNT += $DAY_COUNT[$I];
}
echo '<table border="0" width="70%" cellpadding="0" cellspacing="1" align="center" bgcolor="#000000" class="small">
<tr>
<td class="TableHeader">
<img src="/images/green_arrow.gif" WIDTH="20" HEIGHT="18"> 本月份按日访问统计
</td>
</tr>
<tr>
<td class="TableData">
<table border="0" height="100%" cellspacing="2" cellpadding="0" class="small">
<tr>
<td width="42" valign="top">
<table border="0" width="100%" height="100%" align="right" cellspacing="0" cellpadding="0" class="small">
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo max ($DAY_COUNT);
echo '</td>
</tr>
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo ceil (max ($DAY_COUNT) * 0.800000000000000044408921);
echo '</td>
</tr>
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo ceil (max ($DAY_COUNT) * 0.59999999999999997779554);
echo '</td>
</tr>
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo ceil (max ($DAY_COUNT) * 0.40000000000000002220446);
echo '</td>
</tr>
<tr>
<td width="100%" align="right"><span style="font-family: 宋体"> </span>';
echo ceil (max ($DAY_COUNT) * 0.20000000000000001110223);
echo '</td>
</tr>
</table>
</td>
';
for ($I = 1; $I <= date ('t', time ()); ++$I)
{
echo ' <td width="16" height="100" align="center" valign="bottom">
<table border="0" width="10" cellspacing="0" cellpadding="0" class="graph" id="table3">
<tr>
<td width="100%" valign="bottom" align="center"><img border="0" src="/images/column_month.gif" width="10"></td>
</tr>
<tr>
<td width="100%" height="';
echo floor ($DAY_COUNT[$I] * 100 / max ($DAY_COUNT));
echo '" background="/images/column_month.gif" valign="bottom"></td>
</tr>
</table>
</td>
';
}
echo ' </tr>
<tr>
<td align="right">0</td>
<td height=30 align="center">1</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">4</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">7</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">10</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">13</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">16</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">19</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">22</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">25</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">28</td>
<td height=30 align="center"></td>
<td height=30 align="center"></td>
<td height=30 align="center">31</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="1" width="70%" align="center" class="small" bgcolor="#000000" cellpadding="3">
<tr>
<td nowrap class="TableHeader" colspan="3">
<img src="/images/green_arrow.gif" WIDTH="20" HEIGHT="18"> 本月份按日访问数据
</td>
</tr>
';
for ($I = 1; $I <= date ('t', time ()); ++$I)
{
echo ' <tr class="TableData">
<td>
<table border="0" width="100%" align="right" cellspacing="0" cellpadding="0" class="small">
<tr>
<td nowrap align="center" width="80">';
echo $I;
echo '</td>
<td nowrap align="center">';
echo round ($DAY_COUNT[$I] * 100 / $TOTAL_COUNT);
echo '%</td>
<td nowrap align="center" width="100">';
echo $DAY_COUNT[$I];
echo '</td>
</tr>
</table>
</td>
</tr>
';
}
echo '</table>
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -