<?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;"><a  href="../flow/index.php" onclick="setCookie('B','1')">流量数据统计</a></li>
<li style="float:left;width:100px;text-align:center;border:2px solid #337abb;border-top:1px solid #337abb;border-bottom:none;background:#337abb;"><a style="color:#FFF;" 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="width:12%;border-left:none;">日期</td><td>成交量</td><td>上门量</td><td>有效量</td><td>咨询量</td><td>点击量</td><td style="width:10%">竞价费用(百元)</td><td style="width:24%">广告转化率/网络转化率/最总成交率</td><td style="width:8%" class="g">操作</td></tr></table>
<table cellspacing="0" cellpadding="0">
<?php
ob_start();
require_once("../../global/page.class.php");
require_once("../../global/connect.php");
$pageSize=15;
$total=mysql_num_rows(mysql_query("SELECT * FROM consulting")); 
pageft($total,$pageSize,1,1,1,9,20,0);
$sql="SELECT * FROM  consulting order by id DESC limit $firstcount,$pageSize";
$sql=mysql_query($sql);
if($sql){ob_end_clean();
while($row=mysql_fetch_array($sql)){
$money=(float)$row["money"]/100;
echo "<tr><td style=\"width:12%;border-left:none;\">".$row["date"]."</td><td style='color:red;'>".$row["chengjiao"]."</td><td style='color:green;'>".$row["shangmen"]."</td><td style='color:green;'>".$row["youxiao"]."</td><td>".$row["zixun"]."</td><td>".$row["dianji"]."</td><td style=\"width:10%;\">".$money."</td><td style=\"width:24%;\">".$row["guanggao"]."&nbsp;/&nbsp;".$row["wangluo"]."&nbsp;/&nbsp;".$row["zuizhong"]."</td><td style=\"width:8%;\" class='g'><a href=\"function.php?mod=delete&id=$row[id]\">[删除]</a><a href=\"modify.php?id=$row[id]\">[修改]</a></td></tr>";
}}else
echo "<tr><td style='color:red;text-align:center;'>暂时没有记录！</td></tr>";
ob_end_flush();
?>
</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、广告转化率=有效量/咨询量&nbsp;&nbsp;|&nbsp;&nbsp;网络转化率=咨询量/点击量&nbsp;&nbsp;|&nbsp;&nbsp;最终成交率=成交量/上门量
</div>
</div>
</div>
</body>
</html>
