📄 forgotpass.php
字号:
<?
/**
* ForgotPass.php
* Musicbox Version 2.1
* TeaM SCRiPTMAFiA 2005
*/
include("sources/session.php");
include("template/umlayout_top.php");
?>
<html>
<title>Forgot Password : Enter your username</title>
<body>
<?
/**
* Forgot Password form has been submitted and no errors
* were found with the form (the username is in the database)
*/
if(isset($_SESSION['forgotpass'])){
/**
* New password was generated for user and sent to user's
* email address.
*/
if($_SESSION['forgotpass']){
echo "<h1>New Password Generated</h1>";
echo "<p>Your new password has been generated "
."and sent to the email <br>associated with your account. "
."<a href=\"index.php\">Back to Main Page</a>.</p>";
}
/**
* Email could not be sent, therefore password was not
* edited in the database.
*/
else{
echo "<h1>New Password Failure</h1>";
echo "<p>There was an error sending you the "
."email with the new password,<br> so your password has not been changed. "
."<a href=\"index.php\">Back to Main Page</a>.</p>";
}
unset($_SESSION['forgotpass']);
}
else{
/**
* Forgot password form is displayed, if error found
* it is displayed.
*/
?>
<h1>Forgot Password</h1>
A new password will be generated for you and sent to the email address<br>
associated with your account, all you have to do is enter your
username.<br><br>
<? echo $form->error("user"); ?>
<form action="process.php" method="POST">
<b>Username:</b> <input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>">
<input type="hidden" name="subforgot" value="1">
<input type="submit" value="Get New Password">
</form>
<?
}
?>
<?
include("template/umlayout_bottom.php"); ?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -