<?

/*
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 guestbook entry
	// ========================================================================================
	
	
	$PageTitle = $MsgText[6][12];
	$BrowserTitle = $MsgText[6][12];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="' . $MainURL . '/options.html">'.$MsgText[0][4].'</a> > <a href="'.$MainURL.'/admin/guestbook_manage.html">'.$MsgText[6][2].'</a> > '.$MsgText[6][12];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[601] == 'y') {
							
		
			ReadFormArguments();
			Global $FormArguments;
			
			if (count($FormArguments) > 0) {
			
																																		
				$query5 = "delete from `".$Settings['DBPrefix']."gb-Messages` where RecordNumber='".$FormArguments['RecordNumber']."' limit 1";
				$result5 = mysql_query($query5) or die (mysql_error());
				
							
				header('Location: ' . $MainURL . '/admin/guestbook_manage.html');
				
			}
			else {
				$PageContents = $MsgText[0][98];
			}
			
			
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}
		


?>
