<?

/*
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 Password Unlock
	// ========================================================================================
	
	$PageTitle = $MsgText[0][506];
	$BrowserTitle = $MsgText[0][506];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > '.$MsgText[0][506];
	
	if ($Arguments2 != '' && $Arguments3 != '') {
		
		$query = "select Username,ResetCode from `".$Settings['DBPrefix']."core-Users` where Username='".addslashes($Arguments2)."' LIMIT 1";
		$result = mysql_query($query) or die (mysql_error());
	
		$row = mysql_fetch_array($result);
	
		if ($row['ResetCode'] == $Arguments3 && $row['ResetCode'] != '') {
		
			$PageContents = ''.$MsgText[0][690].'<br><br><form action="'.$MainURL.'/lost_password-save" method="post">
			<input type="hidden" name="UsernameToEdit" value="'.$row['Username'].'">
			<input type="hidden" name="ResetCode" value="'.$row['ResetCode'].'">
			
'.$MsgText[0][691].':<br><input type="password" name="Password1" size="20" maxlength="40" style="'.$FormStyle.'">
<br>'.$MsgText[0][692].':<br><input type="password" name="Password2" size="20" maxlength="40" style="'.$FormStyle.'">
<br>

<br><br>
<input type="submit" value="'.$MsgText[0][123].'" style="'.$FormStyle.'">

</form>';
		
		}
		else {
			sleep(7);
			$PageContents = $MsgText[0][515];
		}
		
	}
	else {
		sleep(3);
		$PageContents = $MsgText[0][516];	
	}
	
	
	// ========================================================================================




?>
