<?

/*
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 Subscriber
	// ========================================================================================
	
	$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 = $MsgText[5][30];
	$BrowserTitle = $MsgText[5][30];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="' . $MainURL . '/options.html">'.$MsgText[0][4].'</a> > <a href="' . $MainURL . '/admin/newsletter_subscribers.html">'.$MsgText[5][3].'</a> > '.$MsgText[5][30];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[502] == 'y') {
							
		
			ReadFormArguments();
			Global $FormArguments;
			
			if (count($FormArguments) > 0) {
			
																																		
				$query5 = "delete from `".$Settings['DBPrefix']."nl-Addresses` where RecordNumber='".$FormArguments['RecordNumber']."' limit 1";
				$result5 = mysql_query($query5) or die (mysql_error());
				
							
				header('Location: ' . $MainURL . '/admin/newsletter_subscribers.html');
				
			}
			else {
				$PageContents = $MsgText[0][98];
			}
			
			
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}
		


?>
