<?php include("dh.php"); 
include("../sql/conn.php");
include("yz.php"); 
$llym = $_SERVER["HTTP_REFERER"];
?>

<?php
if ($_GET['s']=="ok")
{
mysql_query("DELETE FROM outsite WHERE id='".$_GET['id']."'");

mysql_query("INSERT INTO text (name, time, ip, ing, f, bz) 
VALUES ('".$_SESSION['name']."', '".$noww."', '".$iipp."', '跳出删除".$_GET['id']."', '0', '')");
?>
<script language="javascript">setTimeout(function (){location.href='<?php echo $llym; ?>';},2);</script>
<?
}

?>

<form action="" method="get">
搜平台名: 
<input name="gjc" type="text" id="gjc" />
<input type="submit" value="搜索" />
</form>


<?php

if($_GET['ys'])
{
$ys = $_SESSION['ts']*($_GET['ys']-1);
}	 
else
{
$ys = 0;
}

if($_GET['px'])
{
$px = $_GET['px'];
}	 
else
{
$px = id;
}

?>

 
 <?php
echo "<TABLE ><TBODY><TR  bgcolor=#CCCC00 >";
  echo "<td>查</td>";
  echo "<td><a href=?ys=".$_GET['ys']."&px=ip>IP</a></td>";
  echo "<td><a href=?ys=".$_GET['ys']."&px=time1>时间</a></td>";
  echo "<td><a href=?ys=".$_GET['ys']."&px=kf>平台</a></td>";
  echo "<td><a href=?ys=".$_GET['ys']."&px=name>游戏</a></td>";
  echo "<td><a href=?ys=".$_GET['ys']."&px=len>服务器</a></td>";
  echo "<td><a href=?ys=".$_GET['ys']."&y=len>y</a></td>";
  echo "<td><a href=?ys=".$_GET['ys']."&m=len>m</a></td>";
  echo "<td><a href=?ys=".$_GET['ys']."&d=len>d</a></td>";
echo "</TR>";

$result = mysql_query("SELECT * FROM outsite where kf = '".$_GET['gjc']."' and kf<> '' ORDER  BY ".$px." DESC LIMIT ".$ys.",".$_SESSION['ts']);

while($row = mysql_fetch_array($result))
  {
echo "<TR ";
?> onmouseover="this.style.background='#FFF'; " onmouseout ="this.style.background=''; this.style.borderColor=''" <?php 
echo ">";


echo "<TD ><a target=_blank href=http://www.baidu.com/baidu?word=".$row['ip']." >IP</a></td>";
echo "<TD ><textarea  cols=18 rows=1>".$row['ip'] . "</textarea></td>";
  $tim = date("m月d日H:i:s",$row['time1']);
echo "<TD ><textarea  cols=18 rows=1>".$tim. "</textarea></td>";
echo "<TD ><textarea  cols=8 rows=1>".$row['kf'] . "</textarea></td>";
echo "<TD ><textarea  cols=8 rows=1>".$row['name'] . "</textarea></td>";
echo "<TD ><textarea  cols=8 rows=1>".$row['len'] . "</textarea></td>";
echo "<TD ><textarea  cols=4 rows=1>".$row['y'] . "</textarea></td>";
echo "<TD ><textarea  cols=2 rows=1>".$row['m'] . "</textarea></td>";
echo "<TD ><textarea  cols=2 rows=1>".$row['d'] . "</textarea></td>";

echo "</TR>";
  }

$result = mysql_query("SELECT * FROM outsite ORDER  BY ".$px." DESC LIMIT ".$ys.",".$_SESSION['ts']);

while($row = mysql_fetch_array($result))
  {
echo "<TR ";
?> onmouseover="this.style.background='#FFF'; " onmouseout ="this.style.background=''; this.style.borderColor=''" <?php 
echo ">";


echo "<TD ><a target=_blank href=http://www.baidu.com/baidu?word=".$row['ip']." >IP</a></td>";
echo "<TD ><textarea  cols=18 rows=1>".$row['ip'] . "</textarea></td>";
  $tim = date("m月d日H:i:s",$row['time1']);
echo "<TD ><textarea  cols=18 rows=1>".$tim. "</textarea></td>";
echo "<TD ><textarea  cols=8 rows=1>".$row['kf'] . "</textarea></td>";
echo "<TD ><textarea  cols=8 rows=1>".$row['name'] . "</textarea></td>";
echo "<TD ><textarea  cols=8 rows=1>".$row['len'] . "</textarea></td>";
echo "<TD ><textarea  cols=4 rows=1>".$row['y'] . "</textarea></td>";
echo "<TD ><textarea  cols=2 rows=1>".$row['m'] . "</textarea></td>";
echo "<TD ><textarea  cols=2 rows=1>".$row['d'] . "</textarea></td>";

echo "</TR>";
  }

echo "</TBODY></TABLE>";

?>

 
<?php 
$y = date("Y",$noww);
$m = date("m",$noww);
$d = date("d",$noww);

$yy = date("Y",$noww - 86400);
$ym = date("m",$noww - 86400);
$yd = date("d",$noww - 86400);

$result = mysql_query("SELECT * FROM outsite where y='".$y."' and m='".$m."' and d= '".$d."' ");//查看总留言数并分页
$num = mysql_num_rows($result);
echo "今天总计跳出".$num."次；";

$result = mysql_query("select distinct ip from outsite where y='".$y."' and m='".$m."' and d= '".$d."' ");
$num = mysql_num_rows($result);
echo "实际IP".$num."个；<br>";

$result = mysql_query("SELECT * FROM outsite where y='".$yy."' and m='".$ym."' and d= '".$yd."' ");//查看总留言数并分页
$num = mysql_num_rows($result);
echo "昨天总计跳出".$num."次；";

$result = mysql_query("select distinct ip from outsite where y='".$yy."' and m='".$ym."' and d= '".$yd."' ");
$num = mysql_num_rows($result);
echo "实际IP".$num."个；<br>";


$result = mysql_query("SELECT * FROM outsite");//查看总留言数并分页
$num = mysql_num_rows($result);
echo "全部跳出".$num."次。";
$ys = ceil($num/$_SESSION['ts']);

for ($i=1; $i<=$ys; $i++)
{
if ($_GET['ys']!=$i)
echo " <a href=?ys=".$i."&px=".$_GET['px'].">".$i."</a> ";
else
echo "<strong>[".$i."]</strong>";

}

echo "</p>";

?> 
<hr>
<textarea cols="88" rows="3">

</textarea>
<hr>


<?php
$result = mysql_query("SELECT * FROM outsite ORDER  BY id DESC LIMIT 2000,500");

while($row = mysql_fetch_array($result))
{
mysql_query("DELETE FROM outsite WHERE id='".$row['id']."'");
}

?>




<?php include("../sql/close.php"); ?>