<?php
require_once("../global/checkuser2.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站连接</title>
<link rel="stylesheet" href="index.css" />
<script src="../global/jquery-latest.min.js"></script>
<style>
img {border:0;}
</style>
</head>

<body>
<div class="bigdiv">
<table cellspacing="0" cellpadding="0" style="font-size:14px;"><tr><td style="text-align:left;border-left:none;">您的位置：<a href="index.php">网站日志分析</a></td><td style="text-align:right;border-left:none;"><a href="add.php">添加日志</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table>
<div style="float:left;width:100%;border-bottom:2px solid #337abb;height:25px;font-size:14px;line-height:25px;"><ul>
<li style="float:left;width:100px;text-align:center;border:2px solid #337abb;border-top:1px solid #337abb;border-bottom:none;background:#337abb;margin-left:20px;display:inline;"><a href="index.php" style="color:#FFF;">网站日志分析</a></li>
</ul></div>
<div class="list">
<table cellspacing="0" cellpadding="0">
<tr style="background:#d3edf9;"><td style="width:12%;border-left:none;">日期</td><td style="width:80%;border-left:none;border-bottom:none;"><table cellspacing="0" cellpadding="0"><tr><td>蜘蛛</td><td>总抓取量</td><td>状态200次数</td><td>状态301次数</td><td>状态302次数</td><td>状态404次数</td><td>访问次数</td><td>总停留时间(h)</td><td>单页停留(s)</td></tr></table></td><td class='g' style='width:8%;'>操作</td></tr>
</table>
<table cellspacing="0" cellpadding="0" >
<?php
ob_start();
require_once('../global/connect.php');
require_once("../global/page.class.php");
$total=mysql_num_rows(mysql_query('select * from zhizhu')); 
$pageSize=2;
pageft($total,$pageSize,1,1,1,9,20,0);
$sql="SELECT * FROM  zhizhu order by date DESC limit $firstcount,$pageSize";
$sql=mysql_query($sql);
if($sql){ob_end_clean();
while($row=mysql_fetch_array($sql)){
$date=$row['date'];
$baidu=explode(',',$row['baidu']);
$google=explode(',',$row['google']);
$s360=explode(',',$row['s360']);
$soso=explode(',',$row['soso']);
$yahoo=explode(',',$row['yahoo']);
$bing=explode(',',$row['bing']);
$youdao=explode(',',$row['youdao']);
$sogou=explode(',',$row['sogou']);
$alexa=explode(',',$row['alexa']);
echo "<tr><td style='width:12%;border-left:none;'>$date</td><td rowspan='9' style='width:80%;border-left:none;border-bottom:none;'><table cellspacing='0' cellpadding='0'><tr><td><img src='../images/baidu.png' alt='百度'></td></td><td style='color:green'>$baidu[0]</td><td>$baidu[1]</td><td>$baidu[2]</td><td>$baidu[3]</td><td>$baidu[4]</td><td style='color:green;'>$baidu[5]</td><td>".round($baidu[6]/3600,3)."</td><td>".round($baidu[6]/$baidu[0],3)."</td></tr>";
echo "<tr><td><img src='../images/google.png' alt='谷歌'></td></td><td style='color:green'>$google[0]</td><td>$google[1]</td><td>$google[2]</td><td>$google[3]</td><td>$google[4]</td><td style='color:green;'>$google[5]</td><td>".round($google[6]/3600,3)."</td><td>".round($google[6]/$google[0],3)."</td></tr>";
echo "<tr><td><img src='../images/360.png' alt='360'></td></td><td style='color:green'>$s360[0]</td><td>$s360[1]</td><td>$s360[2]</td><td>$s360[3]</td><td>$s360[4]</td><td style='color:green;'>$s360[5]</td><td>".round($s360[6]/3600,3)."</td><td>".round($s360[6]/$s360[0],3)."</td></tr>";
echo "<tr><td><img src='../images/soso.png' alt='搜搜'></td></td><td style='color:green'>$soso[0]</td><td>$soso[1]</td><td>$soso[2]</td><td>$soso[3]</td><td>$soso[4]</td><td style='color:green;'>$soso[5]</td><td>".round($soso[6]/3600,3)."</td><td>".round($soso[6]/$soso[0],3)."</td></tr>";
echo "<tr><td><img src='../images/yahoo.png' alt='雅虎'></td></td><td style='color:green'>$yahoo[0]</td><td>$yahoo[1]</td><td>$yahoo[2]</td><td>$yahoo[3]</td><td>$yahoo[4]</td><td style='color:green;'>$yahoo[5]</td><td>".round($yahoo[6]/3600,3)."</td><td>".round($yahoo[6]/$yahoo[0],3)."</td></tr>";
echo "<tr><td><img src='../images/bing.png' alt='必应'></td></td><td style='color:green'>$bing[0]</td><td>$bing[1]</td><td>$bing[2]</td><td>$bing[3]</td><td>$bing[4]</td><td style='color:green;'>$bing[5]</td><td>".round($bing[6]/3600,3)."</td><td>".round($bing[6]/$bing[0],3)."</td></tr>";
echo "<tr><td><img src='../images/youdao.png' alt='有道'></td></td><td style='color:green'>$youdao[0]</td><td>$youdao[1]</td><td>$youdao[2]</td><td>$youdao[3]</td><td>$youdao[4]</td><td style='color:green;'>$youdao[5]</td><td>".round($youdao[6]/3600,3)."</td><td>".round($youdao[6]/$youdao[0],3)."</td></tr>";
echo "<tr><td><img src='../images/sogou.png' alt='搜狗'></td></td><td style='color:green'>$sogou[0]</td><td>$sogou[1]</td><td>$sogou[2]</td><td>$sogou[3]</td><td>$sogou[4]</td><td style='color:green;'>$sogou[5]</td><td>".round($sogou[6]/3600,3)."</td><td>".round($sogou[6]/$sogou[0],3)."</td></tr>";
echo "<tr><td><img src='../images/alexa.png' alt='alexa'></td></td><td style='color:green'>$alexa[0]</td><td>$alexa[1]</td><td>$alexa[2]</td><td>$alexa[3]</td><td>$alexa[4]</td><td style='color:green;'>$alexa[5]</td><td>".round($alexa[6]/3600,3)."</td><td>".round($alexa[6]/$alexa[0],3)."</td></tr>";
echo "</table></td><td class='g' style='width:8%;'><a href='function.php?mod=delete&id=$row[id]'>[删除]</a></td></tr>";
}}else
echo "<tr><td style='width:100%text-align:center;color:red;border-left:none;'>没有符合要求的记录!</td></tr>";
ob_end_flush();
?>
</table>
<div id="page">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $pagenav;?></div>
<div style="width:100%;height:10px;"></div>
<div style="width:98%;margin:auto;overfollow:hidden;border:2px solid #ccc;line-height:25px;font-size:14px;">
&nbsp;&nbsp;&nbsp;&nbsp;功能使用帮助说明：<br />
&nbsp;&nbsp;1、此功能用于记录网站日志分析数据。可通过添加日志按钮上传网站日志并把分析记录保存，方便与历史分析数据对比。<br />
&nbsp;&nbsp;2、只支持每天的日志文件分析，不支持多天数混合日志文件分析。
</div>
</div>
</div>
</body>
</html>
