<?php
require_once("../../global/checkuser1.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>
 function setCookie(sName,sValue,expireHours) {
  var cookieString = sName + "=" + escape(sValue);
  //;判断是否设置过期时间
  if (expireHours>0) {
    var date = new Date();
    date.setTime(date.getTime + expireHours * 3600 * 1000);
    cookieString = cookieString + "; expire=" + date.toGMTString();
  }
  document.cookie = cookieString+";path=/";
 }
</script>
</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;<a style="color:#ccc;">导出本月数据</a>&nbsp;&nbsp;&nbsp;&nbsp;<a style="color:#ccc;">导出全部数据</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;margin-left:20px;display:inline;border:2px solid #337abb;border-top:1px solid #337abb;border-bottom:none;background:#337abb;"><a style="color:#FFF;" href="../flow/index.php" onclick="setCookie('B','1')">流量数据统计</a></li>
<li style="float:left;width:100px;text-align:center;"><a href="../consulting/index.php" onclick="setCookie('B','2')">咨询数据统计</a></li>
</ul></div>
<div class="list">
<table cellspacing="0" cellpadding="0"><tr style="background:#d3edf9;"><td style="border-left:none;" >google收录</td><td>百度收录</td><td>google反链</td><td>百度反链</td><td>昨日收录</td><td>PR值</td><td>IP</td><td>PV</td><td>alexa</td><td style="width:12%;">数据日期</td><td class="g">操作</td></tr>
<?php
ob_start();
require_once("../../global/page.class.php");
require_once("../../global/connect.php");
$pageSize=11;
$total=mysql_num_rows(mysql_query("SELECT * FROM flow")); 
pageft($total,$pageSize,1,1,1,9,20,0);
$sql="SELECT * FROM  flow order by id DESC limit $firstcount,$pageSize";
$sql=mysql_query($sql);
if($sql){ob_end_clean();
while($row=mysql_fetch_array($sql)){
echo "<tr><td style='border-left:none;color:green;'>".$row["google"]."</td><td style='color:green;'>".$row["baidu"]."</td><td>".$row["goutlink"]."</td><td>".$row["boutlink"]."</td><td>".$row["baiduday"]."</td><td>".$row["pr"]."</td><td style='color:green;'>".$row["ip"]."</td><td style='color:green;'>".$row["pv"]."</td><td>".$row["alexa"]."</td><td style=\"width:12%;\">".$row["adddate"]."</td><td class='g'><a href=\"function.php?mod=delete&id=$row[id]\">[删除]</a><a href=\"modify.php?id=$row[id]\">[修改]</a></td></li>";
}}else
echo "<tr><td style='color:red;text-align:center;border:none;'>暂时没有记录！</td></tr>";
ob_end_flush();
?>
</table>
<table cellspacing="0" cellpadding="0" style="margin-top:10px;"><tr style="background:#d3edf9;"><td style="width:15%;border-left:none;border-top:1px solid #000000;">网站\对比数据</td><td style="width:12%;border-top:1px solid #000000;">google收录</td><td style="width:12%;border-top:1px solid #000000;">百度收录</td><td style="width:12%;border-top:1px solid #000000;">google反链</td><td style="width:12%;border-top:1px solid #000000;">百度反链</td><td style="width:12%;border-top:1px solid #000000;">昨日收录</td><td style="width:12%;border-top:1px solid #000000;">PR值</td><td style="width:12%;border-top:1px solid #000000;">alexa</td></tr>
<?php
$sqlget=mysql_query("select * from flow order by id DESC limit 0,1");
$websitemy=mysql_query("select * from website where type='友好'");
while($rowsite=mysql_fetch_array($websitemy)){
$mysite=$rowsite["surl"];
$url='http://'.str_replace('http://','',$rowsite['url']);
$url2=str_replace('http://','',$rowsite['url']);
}
while($row=mysql_fetch_array($sqlget)){
echo "<tr style='color:red;'><td style=\"width:15%;border-left:none;\"><a href='$url' target='_blank' style='color:red;'>".$mysite."</a></td><td style=\"width:12%;\"><a href='http://www.google.com/search?q=site%3A$url2' target='_blank' style='color:red;'>".$row["google"]."</a></td><td style=\"width:12%;\"><a href='http://www.baidu.com/s?wd=site%3A$url2' target='_blank' style='color:red;'>".$row["baidu"]."</a></td><td style=\"width:12%;\"><a href='http://www.google.com.hk/search?q=link%3A$url2' target='_blank' style='color:red;'>".$row["goutlink"]."</a></td><td style=\"width:12%;\"><a href='http://www.baidu.com/s?wd=domain%3A$url2' target='_blank' style='color:red;'>".$row["boutlink"]."</a></td><td style=\"width:12%;\"><a href='http://www.baidu.com/s?wd=site%3A$url2&lm=1' target='_blank' style='color:red;'>".$row["baiduday"]."</a></td><td style=\"width:12%;\">".$row["pr"]."</td><td style=\"width:12%;\"><a href='http://www.alexa.com/search?q=$url2' target='_blank' style='color:red;'>".$row["alexa"]."</a></td></tr>";
}
?>
</table>
<table cellspacing="0" cellpadding="0">
<?php
require_once("flowdata.php");
?>
</table>
<div>&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>
