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

Размер файла: 638B
<?php
include "config.php";
if($pass==$user_pass)
{
if (!empty($_GET['str']))
{
$str=$_GET['str'];
}
if (!empty($_GET['act']))
{
$act=$_GET['act'];
}
else
{
$act='0';
}
if ($act=="del")
{
$file=fopen("./ban/$id.dat","w");
fclose($file);
}
if ($act=="bandel")
{
$file=file("./ban/$id.dat");
$delstr=trim($file[$str]);
$buff=file_get_contents("./ban/$id.dat");
$buff=str_replace("$delstr\r\n","",$buff);
$file=fopen("./ban/$id.dat","w");
fputs($file,"$buff");
fclose($file);
}
}
$site='http://'.$_SERVER['HTTP_HOST'].''.str_replace('postbandel.php','index.php',$_SERVER['PHP_SELF']).'?id='.$id.'&page='.$page;
header ("Location: $site");
?>