<?php
if(!defined("BASE_DIR")) exit;
if(!perm('manufacturer'))
{
	no_perm();
} else {
	
	if(!file_exists(BASE_DIR . 'class/Class.Manufacturer.php'))
	{
		module_not_installed('Manufacturer');
	} else {
	
		include_once(BASE_DIR . 'admin/class/class.manufacturer.php');
		$manufacturer = new Manufacturer;
		
		$_REQUEST['sub'] = (isset($_REQUEST['sub']) && !empty($_REQUEST['sub'])) ? $_REQUEST['sub'] : 'overview';
		switch($_REQUEST['sub'])
		{
			case 'overview':
				$manufacturer->showManufacturer();
			break;
			
			case 'new':
				$manufacturer->newManufacturer();
			break;
			
			case 'edit':
				$manufacturer->editManufacturer($_REQUEST['id']);
			break;
			
			case 'iconupload':
				include_once(BASE_DIR . 'admin/class/class.fileupload.php');
				$upload = new Fileupload('/uploads/manufacturer/','hidden',@$_REQUEST['divid'],130);
			break;
		}
	}
}
?>