Просмотр файла del.php

Размер файла: 988B
<?php

include("include/head.php");

echo '<u>Site\'s users list</u><br><br>';
$folder = "users";
$users = @opendir($folder) or die("Error - $folder");
while ($user_del = readdir($users)) {
if($user_del == "." || $user_del == ".." || $user_del == ".htaccess")
continue;
if (!is_file($user_del))
{
$user_del = str_replace(".class","",$user_del);

echo "<form action=\"del.php?deleteuser=$user_del\" method=\"post\">
Delete($user_del)<br/><input name=\"AdminPass\" type=\"text\" value=\"Admin Pass\"><br/>
<input type=\"submit\" value=\"Delete\" /></form>";
}
}
closedir($users);

if($AdminPass=="$Admin")
{
if(file_exists("users/$deleteuser.class"))
{
unlink("users/$deleteuser.class");
if(!file_exists("letters/$deleteuser.class"))
{
unlink("letters/$deleteuser.class"); 
}
echo 'User deleted! (<a href="del.php">Refresh</a>)<br/>';
}
else
{
echo 'This user is not exist! (<a href="del.php">Refresh</a>)<br/>';
}
}

include("include/foot.php");

?>