<?php
// $Id: categories.php,v 1.6 2003/09/20 08:15:48 rcastley Exp $
/**
* Categories toolbar handler
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.6 $
**/

// ensure this file is being included by a parent file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

require_once("menubar/html/menucategories.php");

$cid = mosGetParam( $_POST, "cid", array() );

$published = 0;
if (@$cid) {
	$database->setQuery( "SELECT published FROM #__categories WHERE id='$cid[0]'" );
	$published = $database->loadResult();
}

switch ($task){
	case "edit":
		menucategory::EDIT_MENU( $published );
		break;
	case "new":
		menucategory::NEW_MENU();
		break;
	default:
		menucategory::DEFAULT_MENU();
		break;
}
?>