File size: 610B
<?
include"../sys/fnc.php";
$d=trim(htmlspecialchars($_GET['d']));
if($d!="")
{
$fail=array_reverse(file("../../data/book.dat"));
unset($fail[$d]);
$fp=fopen("../../data/book.dat","w");
fputs($fp,implode("",array_reverse($fail)));
fclose($fp);
echo'<font color="red">Сообщение удалено!</font>';
}
/*
$login=$_SESSION['name'];
$time = time();
$file = fopen("../data/book.dat", "a+");
$str = htmlspecialchars("$login::$time", ENT_QUOTES)."\n";
flock($file, LOCK_EX);
fwrite($file, $str);
flock($file, LOCK_UN);
fclose($file)*/
?>