if ($action == "resetpassword"): setup_site("Reset Password"); start_section("Reset Password"); Please
enter
your
user.
Your
new
password
will
be
assigned
to
the
address
<form method="post" action="login.php"> <input type="hidden" name="action" value="resetpassword" /> <table align="center" border="0" cellspacing="5" cellpadding="0" width="100%"> <td align="right" width="50%"> <input type="text" name="user" /> <input type="submit" value="Reset Password" /> $info = $users->get_user_info_from_username($user); You
do
not
appear
to
be
a
registered
user.
Please
<a href="register.php">register
</a> an
account.
$newpass = substr($info["PASSWORD"], 2, 8); $users->change_password($user, $newpass); $email_address = $info["EMAIL"]; mail($email_address, "Password reset", "Your password has been reset. Your new password is " . "From: nobody@gaim.sourceforge.net"); Your
password
has
been
reset
and
mailed
to
<?php print htmlentities($email_address) ?>.
Click
<a href="<?php print $session->localUrl($PHP_SELF) ?>">here
</a> to
go
back
to
the
login
page.
elseif ($action == "login"): $ok = $users->login($user, $password); $userinfo = $users->get_user_info_from_username($user); if ($users->logged_in()): header("Location: " . $session->localUrl("members.php")); <form method="post" action="login.php"> <input type="hidden" name="action" value="login" /> Your
login
or
password
was
invalid.
Please
try
again.
To
log
into
your
account,
enter
your
user
and
password
below.
If
you
do
not
yet
have
an
account,
please
<a href="<?php print $session->localUrl('register.php'); ?>">register
</a> one.
If
you
lost
your
password,
click
<a href="<?php print $session->localUrl($PHP_SELF) ?>?action=resetpassword">here
</a> <table align="center" border="0" cellspacing="5" cellpadding="0"> form_item("Username", "user", $user, $user_missing, 15, 15); form_item("Password", "password", $password, $password_missing, 15, 15); <div align="center"><input type="submit" value="Login" /></div>