<?php

include_once 'ressources/class.templates.inc';
include_once 'ressources/class.ldap.inc';
include_once 'ressources/class.users.menus.inc';
include_once 'ressources/class.user.inc';
include_once 'ressources/class.contacts.inc';
if (isset($_GET["SearchUserNull"])) {
    echo SearchUserNull();
    exit;
}
if (isset($_GET["userid"])) {
    echo Page($_GET["userid"]);
    exit;
}
if (isset($_GET["LoadUsersDatas"])) {
    echo Page($_GET["LoadUsersDatas"]);
    exit;
}
if (isset($_GET["TreeUserMailBoxEdit"])) {
    UserMailBoxEdit();
    exit;
}
if (isset($_GET["Cyrus_mailbox_apply_settings"])) {
    Cyrus_mailbox_apply_settings();
    exit;
}
if (isset($_GET["TreeUserAddAliases"])) {
    TreeUserAddAliases();
    exit;
}
<?php
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.user.inc');
	include_once('ressources/class.contacts.inc');
	
if(isset($_GET["SearchUserNull"])){echo SearchUserNull();exit;}
if(isset($_GET["userid"])){echo Page($_GET["userid"]);exit;}
if(isset($_GET["LoadUsersDatas"])){	echo Page($_GET["LoadUsersDatas"]);exit;}
if(isset($_GET["TreeUserMailBoxEdit"])){UserMailBoxEdit();exit;}
if(isset($_GET["Cyrus_mailbox_apply_settings"])){Cyrus_mailbox_apply_settings();exit;}
if(isset($_GET["TreeUserAddAliases"])){TreeUserAddAliases();exit;}
if(isset($_GET["TreeUserDeleteAliases"])){TreeUserDeleteAliases();exit;}
if(isset($_GET["DeleteUserGroup"])){DeleteUserGroup();exit;}
if(isset($_GET["AddMemberGroup"])){AddMemberGroup();exit;}
if(isset($_GET["SaveLdapUser"])){SaveLdapUser();exit;}
if(isset($_GET["AddnewMember"])){AddnewMember();exit();}
if(isset($_GET["DeleteMember"])){DeleteMember();exit;}
if(isset($_GET["finduser"])){finduser();exit;}
if(isset($_GET["UserAddressSubmitedForm"])){AddressInfosSave();exit;}
	
	
function Page($userid){
	$usermenu=new usersMenus();
	if(!isset($_GET["LoadUsersTab"])){$_GET["LoadUsersTab"]=0;}

	switch ($_GET["LoadUsersTab"]) {
		case 0:$body=Main_page_user($userid);break;
		case 1:$body=PageUserMailBoxForm($userid);break;
		case 2:$body=UserAliases($userid);break;