<?

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



	// ========================================================================================
	// Delete archived message
	// ========================================================================================
	
	$query = "select * from `".$Settings['DBPrefix']."nl-Settings`";
	$result = mysql_query($query) or die (mysql_error());
	while ($row = mysql_fetch_array($result)) {
		$nlSettings[$row['Name']] = $row['Value'];
	}
	
	
	$PageTitle = '<img src="'.$ImagesURL.'/admin/admincp_newsletter.gif" width="22" height="21"> '.$MsgText[5][11];
	$BrowserTitle = $MsgText[5][11];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="' . $MainURL . '/options.html">'.$MsgText[0][4].'</a> > <a href="'.$MainURL.'/admin/newsletter_archived.html">'.$MsgText[5][4].'</a> > '.$MsgText[5][26];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[502] == 'y') {
			
			ReadFormArguments();
			Global $FormArguments;
			
		
			$query5 = "update `".$Settings['DBPrefix']."nl-Messages` set Title='".$FormArguments['Title']."', Message='".$FormArguments['Message']."' where RecordNumber='".$FormArguments['MessageIDToEdit']."' limit 1";
			$result5 = mysql_query($query5) or die (mysql_error());
				
							
			header('Location: ' . $MainURL . '/admin/newsletter_archived.html');
			
			
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}
		


?>
