<?php
if(!defined("BASE_DIR")) exit;
if(!perm('partners'))
{
	no_perm();
} else {
	
	if(!file_exists(BASE_DIR . 'class/Class.Partners.php'))
	{
		module_not_installed('Partners');
	} else {
	
		include_once(BASE_DIR . 'admin/class/class.partners.php');
		$partners = new Partner;
		
		
		
		$_REQUEST['sub'] = (isset($_REQUEST['sub']) && !empty($_REQUEST['sub'])) ? $_REQUEST['sub'] : 'overview';
		switch($_REQUEST['sub'])
		{
			case 'overview':
				$partners->ListPartners();
			break;
			
			case 'del':
				$partners->Delete($_REQUEST['id']);
			break;
			
			case 'edit':
				$partners->imgEdit($_REQUEST['id']);
			break;
			
			case 'iconupload':
				include_once(BASE_DIR . 'admin/class/class.fileupload.php');
				$upload = new Fileupload('/uploads/partner/','hidden',@$_REQUEST['divid'],150);
			break;
		}
	}
}
?>