View file use/adm/del_user.php

File size: 1.58Kb
<?php
Defined('ADMIN_S_S') or die ('Доступ запрещен!!!');
if ($_POST[pokaz]!=1)
{

// Запуск  генератора
$fp = fopen ("use/log/counter.txt", "r");
$bytes = filesize("use/log/counter.txt");
$buffer = fread($fp, $bytes);
fclose ($fp);
$count = explode("|", $buffer);
echo "<form name='red' action='$_SERVER[self]' method='post'>";
echo "<input name='pokaz' type='hidden' value='1'>";
echo "<input name='id' type='hidden' value='del_user'>";
echo '<select size="1" name="id3">';
$i=0;
while ($count[$i] != "")
{
echo "<option value='$count[$i]'>$count[$i]</option>";
$i++;
}
echo '</select>&nbsp;&nbsp;';
echo '<input type="submit" value="Удалить">';
echo '</form>';

}
else
{
   if ("$_POST[id3]" != 'admin')
   {

   include("use/$_POST[id3].php");

$fp = fopen ("use/log/counter.txt", "r");
$bytes = filesize("use/log/counter.txt");
$buffer = fread($fp, $bytes);
$buffer = str_replace("|$_POST[id3]","",$buffer);
fclose ($fp);
 $fp = fopen ("use/log/counter.txt", "w+");
fwrite($fp,$buffer);
fclose ($fp);

$fp = fopen ("use/log/counter2.txt","r");
$buffer2 = fread ($fp,filesize("use/log/counter2.txt"));
$buffer2 = $buffer2-1;
fclose ($fp);
$fp = fopen ("use/log/counter2.txt","w+");
fwrite($fp,$buffer2);
fclose($fp);


unlink ("use/$_POST[id3].php");
@unlink ("use/v_p/$_POST[id3]count.txt");
@unlink ("use/v_p/$_POST[id3]post.txt");
echo 'Успешно<br/><a href="/admin.php?int=use/adm/ind.php">Далее</a>';

    }
    else
    {
    echo  'Эту запись удалять нельзя!!!<br /><a href="/admin.php?int=use/adm/ind.php">Далее</a>';
    	};

};





?>