<?

/*
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 = '<img src="'.$ImagesURL.'/admin/admincp_newsletter.gif" width="22" height="21"> '.$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;
			
			
			
			for ($x = 1; $x <= intval($FormArguments['SubscribersCount']); $x++) {
				
				if ($FormArguments['SubscriberSelected-'.$x] != '') {
					
					$query55 = "select * from `".$Settings['DBPrefix']."nl-Addresses` where Email='".$FormArguments['SubscriberSelected-'.$x]."' limit 1";
					$result55 = mysql_query($query55) or die (mysql_error());
						
					if (mysql_num_rows($result55) > 0) {
				
						$row55 = mysql_fetch_array($result55);	
							
						$SubscribersList .= '<br>'.$row55['Email'];
						$SubscribersNumsList .= $row55['RecordNumber'].',';
							
					}
					
				}
				
			}
				
				
				
			if ($SubscribersList != '') {
				
				$PageContents = $MsgText[5][77].'<br>'.$SubscribersList.'<br><br><br><form action="'.$MainURL.'/admin/newsletter_subscriber_delete_bulk_confirm" method="post">
<input type="hidden" name="RecordNumbers" value="'.$SubscribersNumsList.'">
<input type="submit" value="'.$MsgText[5][79].'" style="'.$FormStyle.'"><br><br><br><input type="button" value="'.$MsgText[5][80].'" onClick="window.location.href=\''.$MainURL.'/admin/newsletter_subscribers.html\'" style="'.$FormStyle.'"></form>';
				
			}
			else {
			
				$PageContents = $MsgText[5][78];
			
			}
				
			
							
			
			
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}
		


?>
