[Openfirst-cvscommit] members reset.php,NONE,1.1
Brought to you by:
xtimg
From: <dav...@us...> - 2003-12-22 23:09:08
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv1975 Added Files: reset.php Log Message: initial upload --- NEW FILE: reset.php --- <?php /* * openFIRST.members - reset.php * * Copyright (C) 2003, * openFIRST Project * Original Author: David Di Biase <dav...@ea...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // Include system globals and headers include_once("../config/globals.php"); include_once($header); if(isset($_POST['set'])){ $newpass = cryptpassword($_POST['pass'],$encryption); ofirst_dbquery("UPDATE ofirst_members SET password = '".$newpass."' WHERE email = '".$_GET['email']."' AND authcode = '".$_GET['code']."';"); echo "<br><br>Your password has been successfully changed, you may now login! <a href='index.php'>Login</a>"; die(include_once($footer)); } if(isset($_GET['code'])){ $member_query = ofirst_dbquery("SELECT * FROM ofirst_members WHERE email = '".$_GET['email']."' AND authcode = '".$_GET['code']."';"); $member = ofirst_dbfetch_object($member_query); if(ofirst_dbnum_rows($member_query) == 0){ echo "<br><br>There is no account with that information, sorry!<br><br>"; }else{ ?> <h1>Reset Password</h1> <form method="POST" action="reset.php?email=<?php echo $_GET['email']; ?>&code=<?php echo $_GET['code']; ?>"> <table width="40%"> <tr> <th>New Password</th> </tr> <tr> <td><div align="center">Please enter your new password: <br> <input name="pass" type="password" id="pass" size="30"> <input name="set" type="submit" id="set" value="Set Password"> </div></td> </tr> </table> </form> <?php } } include_once($footer); ?> |