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

Размер файла: 1.12Kb
<?php

include 'include/head.php';

if(empty($name) or empty($pass))
{
echo 'Write name and password!';
echo '<meta http-equiv="refresh" content="2; url=login.php">';
exit;
}

if(file_exists("users/$name.class"))
{
$myFile = "users/$name.class";
$myPass = implode('', file($myFile));
if($myPass == "$pass")
{
if(file_exists("letters/$name.class"))
{
$file=file("letters/$name.class");
$count=count($file);
}
echo "- <a href=\"delete.php?name=$name&pass=$pass\">Letters delete</a><br/><br/>";
echo 'Letters('.$count.'):<form action="letters.php?name='.$name.'&pass='.$pass.'" method="post">
<input type="text" value="http://'.$Main.'/letters.php?name='.$name.'&pass='.$pass.'"/><br/>
<input type="submit" value="Letters" /></form>
- <a href="users.php?name='.$name.'&pass='.$pass.'">Users</a> / <a href="profile.php?name='.$name.'&pass='.$pass.'">Profile</a>';
}
else
{
echo 'Error in password!';
echo '<meta http-equiv="refresh" content="2; url=login.php">';
}

}
else
{
echo 'This user is not exist!';
echo '<meta http-equiv="refresh" content="2; url=login.php">';
}

include 'include/foot.php';

?>