<?php
if(!defined("BASE_DIR")) exit;
if(!perm('navigation_edit'))
{
	no_perm();
} else {
	
	include_once(BASE_DIR . 'admin/class/class.navi.php');
	$navi = new Navi;
	
	$_REQUEST['sub'] = (isset($_REQUEST['sub']) && !empty($_REQUEST['sub'])) ? $_REQUEST['sub'] : 'list';
	switch($_REQUEST['sub'])
	{
		case 'list':
			$navi->ListNavi();
		break;
		
		case 'speedbar':
			$navi->Speedbar();
		break;
		
		case 'edit':
			$navi->EditNavi($_REQUEST['id']);
		break;
		
		case 'editnavidoc':
			$navi->EditNaviDoc($_REQUEST['id']);
		break;
		
		case 'delete':
			$navi->DeleteNaviDoc($_REQUEST['id'], $_REQUEST['navi']);
		break;
		
		case 'newnaviitem':
			$navi->NewNaviDoc($_REQUEST['id']);
		break;
		
		case 'deletenavi':
			$navi->DelNavi($_REQUEST['id']);
		break;
	}
}
?>