View file deltheme.php

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