<?

/*
FlexCMS (http://www.flexcms.com)
Flexible, Powerful, Affordable.

Contents of this file are protected by the copyright
notice found at http://www.flexcms.com/flex/pages/copyright.html,
and its usage is subject to the terms of the licensing agreement 
available at http://www.flexcms.com/flex/pages/license.html
*/



	// ========================================================================================
	// Lost Username Send
	// ========================================================================================
	
	$PageTitle = $MsgText[0][707];
	$BrowserTitle = $MsgText[0][707];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > '.$MsgText[0][707];
	
	ReadFormArguments();
	Global $FormArguments;
	
	if (count($FormArguments) > 0) {
	
		
	$query = "select Username,Email from `".$Settings['DBPrefix']."core-Users` where Email='".addslashes(VerifyCleanString($FormArguments['Email'],1))."' LIMIT 1";
	$result = mysql_query($query) or die (mysql_error());
	
	$row = mysql_fetch_array($result);
	
	if ($row['Email'] != '') {
				
		$Message = $Settings['SiteName'].' '.$MsgText[0][707]."\n\n".$MsgText[0][99].': '.$row['Username']."\n\n".$MainURL.'/login.html'."\n\n\n\n".$MsgText[0][142].','."\n".$Settings['SiteName']."\n".$IndexURL;
		mail($row['Email'], $Settings['SiteName'].' '.$MsgText[0][707], $Message, 'From: "'.$Settings['SiteName'].'" <'.$Settings['ContactEmail'].'>','-f'.$Settings['ContactEmail']);
		
		$PageContents = $MsgText[0][709];	
		
	}
	else {
		$PageContents = $MsgText[0][514];	
	}
	
	
	}
	else {
		$PageContents = $MsgText[0][98];
	}
	
	
	// ========================================================================================




?>
