<?

/*
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
*/



	// ========================================================================================
	// Registration Form Fields
	// ========================================================================================
	
	$PageTitle = $MsgText[0][61];
	$BrowserTitle = $MsgText[0][61];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="'.$MainURL.'/options.html">'.$MsgText[0][4].'</a> > '.$MsgText[0][61];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[13] == 'y') {
			
			ReadFormArguments();
			Global $FormArguments;
			
			
			$FinalString = str_replace('%','',$FormArguments['Custom1Title']) . '%%' . str_replace('%','',$FormArguments['Custom2Title']) . '%%' . str_replace('%','',$FormArguments['Custom3Title']);
			
			for ($i = 1; $i <= 20; $i++) {
				$FinalString .= '%%' . strtolower(substr($FormArguments['status'.$i],0,1));
			}
			
			
			//print $FinalString;
			
			DBConnect();
			
			$query = "update `".$Settings['DBPrefix']."core-Settings` set Value='".$FinalString."' where Name='RegFormOpts' LIMIT 1";
			$result = mysql_query($query) or die (mysql_error());
			
		
			header('Location: ' . $MainURL . '/options.html');		
			

		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}

	// ========================================================================================




?>
