<?php
/**************************************************************************
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.
@Authors: Ryan Thompson(hide@address.com)
***************************************************************************/
include("./data.php");
$service['add_header'] = FALSE;
$service['no_session'] = TRUE;
include('./config.inc.php');
if($_POST['retrieve'])
{
$get_password = $user->forgot_password($_POST['email_address'], $_POST['username']);
} elseif(isset($_POST['cancel']))
{
header("Location: http://$O->url");
}
echo $layout->page_header;
?>
<style>
.tbl {
position: relative;
top: 150px;
width: 400px;
height: 50px;
background: #224466;
color: #FFFFFF;
font-weight: bold;
font-size: 10pt;
}
</style>
<br>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table align="center" cellspacing="0" cellpadding="0" border="0" class="tbl">
<tr>
<td colspan="2" style="font-size: 12pt">Retrieve Password</td>
</tr>
<tr style="background: #336699">
<td width="200">Username:</td>
<td><input type="text" name="username" value="<?php echo $_POST['username']?>" size="15"></td>
</tr>
<tr style="background: #336699">
<td width="200">Email Address:</td>
<td><input type="text" name="email_address" value="<?php echo $_POST['email_address']?>" size="40"></td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="submit" class="button1" name="retrieve" value="Retrieve Password">
<input type="submit" class="button1" name="cancel" value="<?php echo $text['cancel']?>">
</td>
</tr>
<tr>
<td colspan="2" style="font-size: 9pt;font-weight: normal">
*For security reasons O cannot retrieve original passwords
but will create and send a temporary password to the above address.
</td>
</tr>
</table>
<table align="center" style="position:relative;top:150px;width:400px">
<tr>
<td style="background:#D6D6D6;color:#000000;">
<?php
if($error->buffer)
{
echo $error->display();
} elseif($get_password) {
echo "A new password has been sent to the above address.";
}
?>
</td>
</tr>
</table>
</form>
</body>
</html>