Просмотр файла blackgbs/postban.php

Размер файла: 888B
<?php
include "config.php";
if ($pass==$user_pass)
{
$ban=$_GET['ban'];
$page=$_GET['page'];
$str=$_GET['str'];
$file=file("./msg/$id.dat");
$editstr=trim($file[$str]);
$ex=explode('||',$editstr);
$name_user=htmlspecialchars(stripslashes($ex[0]));
$browser=htmlspecialchars(stripslashes($ex[1]));
$ip=trim($ex[2]);
if ($ban==brows)
{
$base="./ban/$id.dat";
if (file_exists("$base"))
{
$back=file_get_contents("$base");
}
$file=fopen("$base","w");
fputs($file,"$name_user||$browser||||".time()."||\r\n$back");
fclose($file);
}
else
{
$base="./ban/$id.dat";
if (file_exists($base))
{
$back=file_get_contents("$base");
}
$file = fopen("$base","w");
fputs($file,"$name_user||$browser||$ip||".time()."||\r\n$back");
fclose($file);
}
}
$site='http://'.$_SERVER['HTTP_HOST'].''.str_replace('postban.php','index.php',$_SERVER['PHP_SELF']).'?id='.$id.'&page='.$page;
header ("Location: $site");
?>