View file banlist.php

File size: 1.15Kb
<?php
@$pas=$_GET['pas'];
@$n=$_GET['n'];
include'ini.php';
$barr=file('ban.dat');
if($n!=''){
$barr[$n]='';
$f=fopen('ban.dat','w+');
$d=implode('',$barr);
fputs($f,$d);
fclose($f);
Header('Location: banlist.php?pas='.$pas);
}
Header('Cache-Control: no-cache, must-revalidate');
Header('Content-type:application/xhtml+xml;charset=utf-8');
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>Бан-лист</title><link rel="stylesheet" type="text/css" href="style.css" /></head><body><div>';
if($pas!=$admp){die('Доступ запрещён.<div/></body></html>');}
if(@$barr[0]==''){die('Лист пуст.<hr/>[<a href="index.php?pas='.$pas.'">Вернуться</a>]</div></body></html>');}
foreach($barr as $c=>$str){
$arr=explode(':||:',$str);
echo'[<a href="banlist.php?pas='.$pas.'&amp;n='.$c.'">X</a>]:'.strtok($arr[0],' ').' <span class="bl">IP:</span>'.$arr[1].'<hr/>';
}
print'[<a href="index.php?pas='.$pas.'">Вернуться</a>]</div></body></html>';
?>