<?

/*
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 Existing Photo
	// ========================================================================================
	
	$PageTitle = $MsgText[0][325];
	$BrowserTitle = $MsgText[0][325];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="'.$MainURL.'/options.html">'.$MsgText[0][4].'</a> > <a href="'.$MainURL.'/admin/images.html">'.$MsgText[0][302].'</a> > '.$MsgText[0][325];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[17] == 'y') {
	
			ReadFormArguments();
			Global $FormArguments;
			
			if (count($FormArguments) > 0) {
			
				$FormArguments['Filename'] = str_replace('/','',$FormArguments['Filename']);
				
				if (is_file('./images/uploaded/'.$FormArguments['Filename'])) {
								
					unlink('./images/uploaded/'.$FormArguments['Filename']);
				
				}
								
				
				header('Location: ' . $MainURL . '/admin/images.html');
				
			}
			else {
				$PageContents = $MsgText[0][98];
			}
			
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}
	
	

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




?>
