Размер файла: 958B
<?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")
{
echo "<u>Change password($pass)</u><br/><br/>";
echo 'New password:<form action="newpass.php?name='.$name.'&pass='.$pass.'" method="post">
<input name="newpass" type="text" value=""/><br/>
<input type="submit" value="Change" /></form>
- <a href="index.php?name='.$name.'&pass='.$pass.'">Cabinet</a> / <a href="letters.php?name='.$name.'&pass='.$pass.'">Letters</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';
?>