<?php
@session_start();
include('checkstate.php');
   $id=$_GET['id'];
   $sql="select * from custom where state=1 and id=$id";
   $result=mysql_query($sql);
   $gradeid=mysql_result($result,0,'gradeid');
   $company=mysql_result($result,0,'company');
   if($gradeid<>''){
        $sql="select * from grade where gradeid=".$gradeid;
        $result=mysql_query($sql);
        $grade=mysql_fetch_array($result);
   }
?>
<!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><?php echo $company."-----".$grade['gradename']."-"; ?>ETW国际案例演示</title>
<link rel="stylesheet" href="media/css.css" type="text/css" media="screen" />
</head>

<body>
<div id="main">
     <div id="top"><span class="cc">:<?php echo $company; ?></span></div>
     
     
     <div id="center">
        <div class="location"><strong>当前位置 : <a href="index.php">案例演示</a> >><?php echo $grade['gradename']; ?></strong></div>
       <div id="middle">
           <div class="title"><strong><?php echo "<font color='#FF0000'>".$company."</font>"; ?></strong> 各站体访问记录一览表</div> 
<div id="weblist">
<table width="765" border="0" cellpadding="2" cellspacing="0" style="font-size:14px; line-height:25px; text-align:center; margin-top:15px; display:block; width:765px; margin:0 auto" class="table1">
  <tr> <td colspan="6" align="center">&nbsp;站体分析 </td>  </tr>
  <tr>
    <td width="142">网站地址</td>
    <td width="156">统计时间</td>
    <td width="108">访问页面数</td>
    <td width="101">访问人数</td>
    <td width="101">详细访问记录</td>
    <td width="119"><span class="red">主流引擎排名</span></td>
  </tr>
<?php
    $sql="select * from website where comid=$id";
	$result=mysql_query($sql);
	$counts=0;$p_num=0;
	while($row=mysql_fetch_array($result)){
?>
  
  <tr>
    <td align="left" style="font:Arial, Helvetica, sans-serif"><a href="http://www.<?php echo $row['weburl'];  ?>" target="_blank">www.<?php echo $row['weburl'];  ?></a></td>
    <td><?php echo substr($row['attime'],0,10)."--".$row['uptime']; ?></td>
    <td><?php echo $row['counts']; $counts=$counts+ $row['counts']; ?></td>
    <td><?php echo $row['p_num'];  $p_num=$p_num+ $row['p_num']; ?></td>
    <td><a href="http://jsq.etwun.com:8080/view.php?userid=<?php echo $row['jsqid'];?>" target="_blank">进入</a></td>
    <td><a href="seodetail.php?id=<?php echo $row['webid'];?>">进入</a></td>
  </tr>
  <?php } ?>
   <tr>
    <td><strong>合计</strong></td>
    <td>&nbsp;</td>
    <td><span class="red"><strong><?php echo $counts; ?></strong> (次)</span></td>
    <td><span class="red"><strong><?php echo $p_num; ?></strong> (个)</span></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<a href="#" id="2"></a>
 <img src="1.php?id=<?php echo $id?>" />
   </div>       
   

       </div>
        
        
     </div>
     
     <div id="foot"><P>copy right &copy; 2008-2009  <font color="#990000">ETW International</font></P></div>
</div>
</body>
</html>
