<?php
if(!defined("BASE_DIR")) exit;
if(!perm('user_groups'))
{
	no_perm();
} else {
	
	
	include_once(BASE_DIR . 'admin/class/class.groups.php');
	$groups = new Groups;
	
	$_REQUEST['sub'] = (isset($_REQUEST['sub']) && !empty($_REQUEST['sub'])) ? $_REQUEST['sub'] : 'useroverview';
	switch($_REQUEST['sub'])
	{
		case 'useroverview':
			$groups->Overview();
		break;
		
		case 'groupedit':
			$groups->GroupEdit($_REQUEST['id']);
		break;
		
		case 'delgroup':
			$groups->GroupDel($_REQUEST['id']);
		break;
		
		case 'permissions':
			$groups->GroupPermissions();
		break;
		
		case 'editpermissions':
			$groups->GroupPermissionsEdit($_REQUEST['id'],$_REQUEST['area']);
		break;
		
		
		case 'iconupload':
			include_once(BASE_DIR . 'admin/class/class.fileupload.php');
			$upload = new Fileupload(@$_REQUEST['updir'],'hidden',@$_REQUEST['divid'],@$_REQUEST['resize'],@$_REQUEST['ending']);
		break;
	}
	
}
?>