<?php 
/*
##################################################################
#                       PHP 4&5 MySQL 4&5                        #
##################################################################
#           Copyright (c) 2004-2008 Armia Systems Inc            #
##################################################################
#               This file is part of Cybermatch site             #
##################################################################
#    Developed By: simi (simi@armia.com)                         #

##################################################################
#               Developed On:   03-04-2008                       #
##################################################################
#               Modified By:                                     #
##################################################################
#               Modified On:                                     #
##################################################################
# This script may not be distributed, sold, given away for free  #
# to third party, or used as a part of any internet services 	 #
# such as webdesign etc.                                         #
##################################################################
*/

require_once ("config.inc.php");
require_once ("includes/mysql.inc.php");
require_once ("classes/misc.class.php");
require_once ("classes/userside.class.php");

$message	= "";
$script		= "";
$mail		= "";
$vLogin		= isset($arr['vLogin'])	?	stripslashes(trim($arr['vLogin']))	:	"";
$dDob		= isset($arr['dDob'])	?	stripslashes(trim($arr['dDob']))	:	"";

if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else {
	$objM		= new misc($objDB);
	if (isset($_POST['SN'])) {
		$message	= $objM->forgot_password($_POST);
	}
	$script		= $objM->get_script($message);
	$message	= $objM->remove_script($message);
}
include_once ("title.inc.php");
include_once ("tophtml.inc.php");
?>
<script type="text/javascript" src="scripts/calendar.js"></script>
<script type="text/javascript" src="scripts/calendar-setup.js"></script>
<script type="text/javascript" src="scripts/calendar-en.js"></script>
<link href="scripts/calendar.css" rel="stylesheet" type="text/css">
<script language="javascript">
function changeCSS(obj, type)
{
	if (type == 'text') {
		obj.className = 'textbox txt-bx01';
	} else if (type == 'textarea') {
		obj.className = 'textbox txt-bx01';
	} else if (type == 'select') {
		obj.className = 'textbox txt-bx01';
	} else {
		obj.className = 'textbox txt-bx01';
	}
}

function validate()
{
	var frm = document.frmTellf;
	if (frm.vLogin.value=="") 
	{
		alert("Please enter your username.");
		frm.vLogin.className ='textbox txt-bx01';
		frm.vLogin.focus();
		return false;
	}//end if
	if (frm.dDob.value=="") 
	{
		alert("Please enter your date of birth.");
		frm.dDob.className ='textbox txt-bx01 ';
		frm.dDob.focus();
		return false;
	}//end if
	return true;
}
</script>

<div class="row">
	<div class="eight columns">
		<div class="row">
				<div class="inenr-hd"><h2>Forgot Password</h2></div>
		</div>
		<div class="search-rslts">
		 <!--<tr><td class="headings2">Fill following details</td></tr>-->
		<div class="row maintext1">
			<form name="frmTellf" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" onSubmit="return validate();">
				<div  class="row warning">
					<?php if(isset($message) && trim($message)!='')
					{
						echo $message;
					}//end if
					?>
				</div>
				
				<div class="full_row">
					<div class="two columns">Username</div>
					<div class="five columns margin_R_280"><input name="vLogin" type="text" class="textbox txt-bx01"  value="<?php echo $vLogin?>" maxlength="100"></div>
				</div>
									
				<div class="full_row">
					<div class="two columns">Date of birth</div>
					<div class="five columns margin_R_280">
						<input name="dDob" type="text" class="textbox txt-bx01" id="dDob"   value="<?php echo $dDob?>"  maxlength="100" readonly style="width:85%; float:left; margin-right:5px; ">
						<input type="button" value="V" id="button1" name="button1"  style=" width:30px;" class="button_stylenew_new">
						<script type="text/javascript" language="javascript">
						Calendar.setup({
						inputField    : "dDob",
						button        : "button1",
						ifFormat      : "%m/%d/%Y",       // format of the input field
						showsTime     : true,
						timeFormat    : "24"
						});
						</script>
					</div>
				</div>			
						
				<div class="full_row">
					<div class="two columns">&nbsp;</div>
					<div class="five columns margin_R_280"><input name="SN" value="Send Now" type="submit" class="signupbutton"></div>
				</div>					
			</form>				
			</div>
			<div id="hide"><?php echo $script?></div>
		</div>
	</div>
		
	<div class="four columns right search_result_R">
		<?php include_once ("left.inc.php");?>
	</div>
</div>
	

<?php include_once('bottomhtml.inc.php');?>
