<?
ob_start();
session_start();

		if($_SESSION['lang']=='')
		{
		$_SESSION['lang'] = "en";
		}	
	include 'languages/lang_forgpassword_'.$_SESSION['lang'].'.php';
   include 'languages/lang_common_'.$_SESSION['lang'].'.php';
   include("include/db.inc.php"); 
   include("include/bit_functions.inc.php"); 
   include("include/mail.php"); include("include/banner_inc.php");
   $db1=new db;
   $db1->open();
  mysql_query("SET NAMES 'utf8'");  $currency_symbol_new=symbol_currency();
   if(isset($_POST['submit']))
	{
	    $email=$_POST['email'];
		$sql = "select * from user where email='$email'";
		$x=mysql_query($sql) or die(mysql_error());
		$res=mysql_fetch_array($x);
		if($res)
		{   
	      	forget_mail($res['uname'],$res['email'],$res['password'],$res['id']);
			header("location:"._BASEURL_."/forgot-your-password/msg/");
			exit();
			
		}else{
?>
	<script language="javascript">
			alert("You have entered an Invalid Email Address");
			window.location.href="<?=_BASEURL_?>/forgot-your-password/index.html";
	</script>
<?

	}
	}
?>
<!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>
<base href="<?=_BASEURL_?>/" />
<meta content="<?=_TITLE1_?> offers bargain auctions of new brand products. Save up to 70% for every product almost. Bid and Win high quality products. <?=_TITLE1_?> offers amazing bargains." />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Info-Tech Ltd. | We simplify web 2.0"/>
<title><?=_DOOBIDFOR_PASS_?></title>  
<link href="<?=_BASEURLCSSNEW_?>/login.css" rel="stylesheet" type="text/css" />
<link href="<?=_BASEURLCSSNEW_?>/index.css" rel="stylesheet" type="text/css" />
<link href="<?=_BASEURLCSSNEW_?>/index_sec.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 6]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(<?=_BASEURLCSSNEW_?>/ie6.css?0:102290); /* ]]> */</style><![endif]-->
<!--[if gte IE 7]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(<?=_BASEURLCSSNEW_?>/ie7.css?0:99961); /* ]]> */</style><![endif]-->

<script src="include/validation.js"></script>
<script type="text/javascript" language="JavaScript">

function validate()
{
	var email=trim(document.frm.email.value);
	if(is_empty(email))
	{
		alert("Please enter your email address!");
		document.frm.email.focus();
		return false;
	}
	
	return true;
}
</script>
   
</head>
<body>  
<div id="container" >
  <? include("header.php");?>
<div class="lm90px"> <div id="accountleft2">
  <div class="buygreen1" >
    <div class="buygreen2"><H1 style="color:#FFFFFF; padding-top:5PX">GREENFAIR PASSWORD RESET</H1></div>
    <div class="buygreen3"></div>
  </div>
  <div class="allm100px">
  <div class="allm10px">
    <div id="main_blue_screen">
      <div class="problue">
        <div class="probluemid"><H1 style="color:#FFFFFF; padding-top:5PX">Enter your Email Address</H1></div>
        <div class="probel"></div>
      </div>


<form name"frm" method="post" onSubmit="return validate();">
  <table width="750" cellspacing="0"  cellpadding="0" align="center" class="lm40px">
            <tr>
              <td valign="top">
                  
                
                      <table width="100%">
                        <tr>
                          <td colspan="4" align="center" width="146"><input name="address_type" value="1" type="hidden">                          </td>
                        </tr>
                        <tr>
                          <td colspan="4"><? if(isset($_REQUEST['msg'])){
 /* $forget=mysql_query("select email from user where id=".$_GET['id']);
  $row=mysql_fetch_array($forget);*/
  ?>	
  <div>
  
	<div style="padding:5px 20px 10px 20px" class="tac normaltextredbold13_profile">Your Password has been sent to your Email Address</div>
	
    </div>
  <?  }?>
</td>
                        </tr>  <tr><td colspan="4"> <div  style="margin-bottom:15px"><strong><?=_UHAV_FGRT_LOGIN_?></strong></div>
		<div style="margin-bottom:15px"><?=_NOPROBL_EMAIL_INFO_?></div></td></tr>
                        <tr>
                          <td colspan="4">&nbsp;</td>
                        </tr>
                        <tr>
                          <td colspan="2"><strong>
                            <?=_UREMAIL11_?>
                          </strong></td>
                          <td colspan="2"><input name="email" type="text" class="inputtext" style="width:350px; border-color:#e2e3e2" /></td>
                        </tr>
                        <tr>
                          <td></td>
                          <td></td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                
                        <tr>
                          <td colspan="4" height="50" align="center"><div class="tac">
                            <input type="submit" name="submit" class="aztec" value=" " />
                        </div></td>
                        </tr>
                      </table>
                  </td>
            </tr>
          </table>

	</form>
 <div class="tf1">
        <div class="tf2"></div>
        <div class="tf3"></div>
      </div>
    </div>
  </div>
</div>
  <div class="tft1">
        <div class="tft2"></div>
        <div class="tft3"></div>
      </div>

</div>
  <div  class="w99">
  <h3 class="tac">Advertisment Sponsors</h3>
  <? 
  $page='loginpage';
  $query_num=mysql_query("select bid from zb_banners where `status`='1' and pagename='$page' order by rand() limit 0,4");
 while($brow=mysql_fetch_array($query_num))
  {
  ?>
<?=banner_home("loginpage","bottom",158,103,$brow['bid']);?>
<? }?>
</div>


</div>
<? include("footer.php");?>

</div>
 

  
	



</body>
</html>
