View file del.php

File size: 960B
<?php
@$pas=$_GET['pas'];
@$n=$_GET['n'];
$n=intval($n);
require('ini.php');
Header('Content-Type: application/xhtml+xml;charset=utf-8');
Header('Cache-Control: no-cache, must-revalidate');
print '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"><head><title>Delete</title>
<link rel="stylesheet" type="text/css" href="style.css" /></head><body><div>';
if($pas==$admp and isset($_GET['clear'])){
$f=fopen('book.dat','w');
fclose($f);
echo('Гocтeвaя oчищeнa.');
}elseif($pas==$admp){
$arr=file('book.dat');
unset($arr[$n]);
$f=fopen('book.dat','w');
$d=implode('',$arr);
fputs($f,$d);
fclose($f);
echo('Сообщение удалено.');
} else echo('Ошибка.');
print('<br />[<a href="index.php?pas='.$pas.'">Вернуться</a>]</div></body></html>');
?>