File size: 866B
<?php
@$pas=$_GET['pas'];
@$n=$_GET['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 $n!=''){
$arr=file('themes.dat');
$fn=strtok($arr[$n],':||:');
unlink('data/'.$fn);
unset($arr[$n]);
$f=fopen('themes.dat','w');
$d=implode('',$arr);
fputs($f,$d);
fclose($f);
echo 'Тема удалена';
}else echo 'Ошибка.';
print '<hr />[<a href="index.php?pas='.$pas.'">К темам</a>]</div></body></html>';
?>