Commit final.
[CLab.git] / forgotpass.php
blob7e35191ae76686b21793751557cc6f9dafc83951
1 <?
2 /**
3 * ForgotPass.php
4 Last Updated: August 26, 2004
5 */
6 include_once("include/session.php");
7 /**
8 * Forgot Password form has been submitted and no errors
9 * were found with the form (the username is in the database)
11 if(isset($_SESSION['forgotpass'])){
12 /**
13 * New password was generated for user and sent to user's
14 * email address.
16 if($_SESSION['forgotpass']){
17 echo "<h3>Nueva Clave Generada</h3>";
18 echo "<p>Tu nueva clave ha sido generada y enviada a el correo asociado con tu cuenta. "
19 ."<a href=\"./\">Continuar</a>.</p>";
21 /**
22 * Email could not be sent, therefore password was not
23 * edited in the database.
25 else{
26 echo "<h3>Fallo al Recuperar Contraseña</h3>";
27 echo "<p>Hubo un error mientras se te enviaba el corrreo con la nueva clave, asi que tu clave no a sido cambiada."
28 ."<a href=\"./\">Continuar</a>.</p>";
31 unset($_SESSION['forgotpass']);
33 else{
35 /**
36 * Forgot password form is displayed, if error found
37 * it is displayed.
41 <h3>Recuperación de Constraseña</h3>
42 Una nueva clave será envíada a tu cuenta de correo y será asociada a tu usuario.<br><br>
43 <? echo $form->error("user"); ?>
44 <form action="process.php" method="POST">
45 <b>Usuario o Carné:</b> <input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>">
46 <input type="hidden" name="subforgot" value="1">
47 <input type="submit" value="Obtener nueva clave">
48 </form>
54 </body>
55 </html>