<?php
 require "../commonincludefiles.php";

 $username	= 	Escape($_REQUEST['username']);
 $emailid	 = 	Escape($_REQUEST['email']);
 
 if(($username)!="" && ($emailid)!=""  ) 
 {


			$filename="../email-template/user-forgotpassword-mail-template.html" ;
				
			$Subject =	"Your Login Detail.";	
			
			$strHtmlFileName = $filename;
		
			$fso = fopen($strHtmlFileName, "r");
		
			$strHtmlContent = "";
		
			while (!feof($fso) ) 
		
				$strHtmlContent .= fgets($fso, 4096);
		
			fclose($fso);
			
			$otherfields="name,username,userpass" ;
			
			$othervalues=$row["user_name"].",".$row["user_name"].",".$row["user_password"];
	
			$aryOtherFields = split(",", $otherfields);
		
			$aryOtherValues = split(",", $othervalues);
		
			for($intX = 0; $intX < count($aryOtherFields); $intX++) 
			{
				$strTmpVar = stripslashes(nl2br(trim($aryOtherValues[$intX])));
		
				$strHtmlContent = str_replace("#".$aryOtherFields[$intX]."#", $strTmpVar, $strHtmlContent);
			}			
			
			
			$FromMail = 'raj_mca47@yahoo.in';				
			$tomail = $emailid;
			
			$send=Sendmail($FromMail,$tomail,"","", $Subject,$strHtmlContent);
			echo "{success:'true'}";			
		}
		else { 
			echo "{success:'false'}";
		}
		
exit;
?>