<?php
if(!defined("BASE_DIR")) exit;
if(!perm('users'))
{
	no_perm();
} else {
	
	include_once(BASE_DIR . 'admin/class/class.user.php');
	$user = new Users;
	
	$_REQUEST['sub'] = (isset($_REQUEST['sub']) && !empty($_REQUEST['sub'])) ? $_REQUEST['sub'] : 'showusers';
	switch($_REQUEST['sub'])
	{
		case 'showusers':
			$user->UserOverview();
		break;
		
		case 'usermultiaction':
			$user->UserMultiaction($_POST['uaction']);
		break;
		
		case 'showusersajax':
			$_REQUEST['noout'] = 1;
			$user->UserOverviewAjax();
		break;
		
		case 'edituser':
			$user->EditUser($_REQUEST['user']);
		break;
		
		case 'openclose':
			$user->OpenClose($_REQUEST['openclose'],$_REQUEST['user']);
		break;
		
		case 'checkuserdata':
			$_REQUEST['noout'] = 1;
			$user->CheckUserData(@$_REQUEST['ext']);
		break;
		
		case 'convertguesttouser':
			$user->ConvertOrderToUser($_GET['order']);
		break;
		
		case 'adduser':
			$user->AddUser();
		break;
	}
	
}
?>