<html><head><title>删除留言</title></head><body>

<font color="red">请不要刷新页面，以免误删留言！</font>
<?php 
header("Content-Type: text/html; charset=utf-8");
function del($del1)
{$del2=1;
$sc1=fopen("../liuyan.txt","r+");

while(!feof($sc1)){
if($del2!=$del1){
$file1=fgets($sc1);
$file2=$file2.$file1;}else{$file1=fgets($sc1);}
$del2=$del2+1;
}fclose($sc1);file_put_contents("../liuyan.txt",$file2);}



$del1=$_GET["deln"];
$dell=strlen($del1);
if($dell!=0)
{

array_walk($del1,"del");$deln="";
}




include("alln.php");
$y1=$_GET["y"];
if($y1>0){$y=ceil($y1);}else{$y=1;}
$yq=$y*10-9;
$yh=$y*10;$ys=$y-1;$yx=$y+1;
$a=fopen("../liuyan.txt","r");
while(!feof($a))
{
$n=$n+1;$xq=fgets($a);
$x=str_replace("&lt;br/&gt;","<br/>",$xq);
$cd=strlen($x);$n0=$alln-$n+1;
if($cd>100)
{$e=str_split($x,100);$x=$e[0];
$o="<a href='../all.php?i=".$n0."'>……</a>";}else{$o="";}
echo '<form action="" method="get">';
if($n >= $yq)
{if($n <= $yh)
{
echo "<hr/><input type='checkbox' name='deln[]' value='".$n." '/>".$n0.")  ".$x.$o;}}}
echo "<br/><hr/><hr/>";
echo '<input type="submit" name="1" value="       删除        " /></form>'."<hr/>";

$nu=$n/10+1;

if($ys>0){
echo '<a href="del.php?y='.$ys.'">上页</a>';
}
$nu1=ceil($nu)-1;
echo "< ".$y."/".$nu1." >";
if($yx<=$nu){echo '<a href="del.php?y='.$yx.'">下页</a>';
echo "    ";}
fclose($a);
echo '<p><form action="" method="get" >
<input type="text" name="y" />
<input type="submit" name="y1" value="跳页"/></form></p>';
?>