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

?>


<?php
if ($_GET['s']=="ok")
{
mysql_query("DELETE FROM text WHERE id='".$_GET['id']."'");
?>
<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
echo "<TABLE ><TBODY><TR  bgcolor=#CCCC00 ><b><TD ><a href=?ys=".$_GET['ys']."&px=name >操作人</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=time >时间</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=ip >IP</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=f>分值</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=ing>事项</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=bz>备注</a></td><TD>删</td></b></TR>";

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

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


echo "<tr bgcolor=#fff height=2 ><td colspan=10 ></td></tr>";

$result = mysql_query("SELECT * FROM text where name = '".$_GET['gjc']."' ORDER  BY id DESC LIMIT 0,".$_SESSION['ts'] );
while($row = mysql_fetch_array($result))
  {
echo "<TR ";
?> onmouseover="this.style.background='#FFF'; " onmouseout ="this.style.background=''; this.style.borderColor=''" <?php 
echo ">";
if ($row['bz']=="")
  {
  $bz = "-";
  }
  else
  {
  $bz = $row['bz'];
  }
if ($row['name']=="")
  {
  $name = "████";
  }
  else
  {
  $name = $row['name'];
  }
echo "<TD ><input  type=text size=8 value=".$name . " /></a></td>";
echo "<TD >".date("m月d日H:i:s",$row['time'])."</td>";
echo "<TD ><input  type=text size=8 value=".$row['ip'] . " /></td>";
echo "<TD ><input  type=text size=8 value=".str_replace(" ","-",$row['f']) . " /></td>";
echo "<TD ><input  type=text size=8 value=".$row['ing'] . " /></td>";
echo "<TD ><input  type=text size=8 value=".$bz . " /></td>";
echo "<TD ><a href='?id=".$row['id']."&s=ok' >删</a></td>";
echo "</TR>";
  }
echo "<tr bgcolor=#fff height=2 ><td colspan=10 ></td></tr>";



$result = mysql_query("SELECT * FROM text 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 ">";

if ($row['bz']=="")
  {
  $bz = "-";
  }
  else
  {
  $bz = $row['bz'];
  }

if ($row['name']=="")
  {
  $name = "████";
  }
  else
  {
  $name = $row['name'];
  }


echo "<TD ><input  type=text size=8 value=".$name . " /></a></td>";
echo "<TD >".date("m月d日H:i:s",$row['time'])."</td>";
echo "<TD ><input  type=text size=8 value=".$row['ip'] . " /></td>";
echo "<TD ><input  type=text size=8 value=".str_replace(" ","-",$row['f']) . " /></td>";
echo "<TD ><input  type=text size=8 value=".$row['ing'] . " /></td>";
echo "<TD ><input  type=text size=8 value=".$bz . " /></td>";

echo "<TD ><a href='?id=".$row['id']."&s=ok' >删</a></td>";

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

?>
<?php 

$result = mysql_query("SELECT * FROM text");//查看总留言数并分页
$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>";

?> 
删[<a href="deltext.php?id=text">管理日志</a>]

<hr>
<textarea cols="88" rows="3">该处显示所有用户的操作记录。
部分英文可以义释，部分可以首拼分析，操作人全黑块，为非法数据操作，一般情况下，影响不大，如有严重情况，请及时与作者联系。
[reg：注册] [del：删除] [insert：发布信息] [check：签到] [wzdel:删除文章] [wz:发布文章] [++++:增加积分] 
</textarea>



<?php
$result = mysql_query("SELECT * FROM text ORDER  BY id DESC LIMIT 1000,100");

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

?>




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