<?

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



	// ========================================================================================
	// new cat
	// ========================================================================================
	
		
	$PageTitle = '<img src="'.$ImagesURL.'/admin/admincp_articles.gif" width="22" height="21"> '.$MsgText[7][34];
	$BrowserTitle = $MsgText[7][34];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > '.$MsgText[7][34];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[703] == 'y') {
			
			ReadFormArguments();
			Global $FormArguments;
			
			if (count($FormArguments) > 0) {
			
										
				$query = "INSERT INTO `".$Settings['DBPrefix']."na-Categories` (CategoryName, CategoryDescription, Parent) VALUES ('".$FormArguments['CategoryName']."', '".$FormArguments['CategoryDescription']."', '".$FormArguments['Parent']."')";
			  	$result = mysql_query($query) or die (mysql_error());
		
				
				header('Location: ' . $MainURL . '/admin/articles.html');
						
					
			
			}
			else {
				$PageContents = $MsgText[0][98];
			}


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

	}
	else {
	
		RedirectToLogin();
	
	}

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




?>
