<?php 
session_start();
require 'configuration.php';
require_once 'includes/common.functions.php';
require_once ('classes/database.php');
require_once ('classes/functions.php');
$sqlObj = new mysqlClass;
$funcObj = new funcClass;

$email 	= $_GET['email'];

$code 	= $_GET['code'];

if (empty($email))
{
	die("Required data is missing");
}	
if (sha1($email) != $code)
{
	die("Security hack");
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Segnant Mailer - Change Password</title>
<script type="text/javascript" src="includes/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="includes/js/common.jquery.js"></script>
<script type="text/javascript" src="includes/js/resetpassword.jquery.js"></script>
<link rel="stylesheet" type="text/css" href="includes/css/segnantmailer.css" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="79" class="headerbg">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="headeritems">
  <tr>
    <td width="32%" rowspan="3" style="padding-left:10px;"><img src="images/logo.png" alt="" border="0" /></td>
    <td width="68%" align="right" style="padding-right:10px;" class="white">&nbsp;</td>
  </tr>
  <tr>
    <td height="42">&nbsp;</td>
  </tr>
  <tr>
    <td align="right" style="padding-right:10px;" class="size14 bold white">&nbsp;</td>
  </tr>
</table>
    </td>
  </tr>

  <tr>
    <td class="canvas" height="300" valign="top"><table width="100%" border="0" cellspacing="10" cellpadding="4">
      <tr>
        <td colspan="2" class="heading" height="50" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" height="20">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="center">
    <div id="resetPasswordTableDiv">
    <form name="resetpassword" action="resetpassword.php" method="post" style="margin: 0" onsubmit="return submitresetpassword()">
    <table width="400" border="0" cellspacing="0" cellpadding="8" align="center" class="formtable">
  <tr>
    <td colspan="2" height="40" class="size16 bold" width="400">Reset your password</td>
    </tr>
  <tr>
    <td width="50%" align="left" colspan="2"><strong>Email: <?=$_GET['email']?></strong></td>
  </tr>
  <tr>
    <td width="50%"><strong>New Password</strong></td>
    <td><strong>Confirm New Password</strong></td>
  </tr>
  <tr>
    <td><input type="password" name="password1" id="password1" maxlength="35" size="32" class="textbox" /></td>
    <td><input type="password" name="password2" id="password2" maxlength="35" size="32" class="textbox" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="right" style="text-align:right"><input type="submit" name="submit" value="Change Password" class="button size4" /></td>
  </tr>
 <tr>
  	<td align="left" height="38" colspan="2" id="preloader"><small>Please use this form to change your password.</small></td>
  </tr>

</table>
<input type="hidden" name="code" id="code" value="<?=$_GET['code']?>" />
<input type="hidden" name="email" id="email" value="<?=$_GET['email']?>" />
<input type="hidden" name="formtype" value="resetpassword" />
</form>
</div>
        </td>
      </tr>
      <tr>
        <td width="50%" valign="top">&nbsp;</td>
        <td height="100" width="50%" valign="top">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
 <? require_once 'includes/inc.footer.php' ?>
</table>
</body>
</html>
