<?

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



	// ========================================================================================
	// save new category
	// ========================================================================================
	
	$PageTitle = $MsgText[0][283];
	$BrowserTitle = $MsgText[0][283];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="'.$MainURL.'/options.html">'.$MsgText[0][4].'</a> > <a href="'.$MainURL.'/admin/pages.html">'.$MsgText[0][244].'</a> > '.$MsgText[0][283];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[20] == 'y') {
		
				ReadFormArguments();
				Global $FormArguments;
			
				if (count($FormArguments) > 0) {
		
					$query = "INSERT INTO `".$Settings['DBPrefix']."core-PageCategories` (Parent, Name, Description, HideCategory) VALUES ('".$FormArguments['CatParent']."', '".$FormArguments['CatName']."', '".$FormArguments['CatDescription']."', '".$FormArguments['HideCategory']."')";

		    	  	$result = mysql_query($query) or die (mysql_error());
		
				
					header('Location: ' . $MainURL . '/admin/pages.html');
					
					
				}

		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}

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




?>
