exit;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["table-list"])) {
    main_search();
    exit;
}
if (isset($_POST["source_pattern"])) {
    smtp_generic_map_add();
    exit;
}
if (isset($_POST["delete"])) {
    smtp_generic_map_del();
    exit;
}
main_table();
if (isset($_GET["item_js"])) {
    item_js();
    exit;
}
function item_js_delete()
{
    $t = time();
    $tpl = new templates();
    $page = CurrentPageName();
    header("content-type: application/x-javascript");
    $ID = $_GET["item-delete-js"];
    $ou = base64_decode($_GET["ou"]);
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.mysql.inc');


	$user=new usersMenus();
	if($user->AsPostfixAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["smtp_generic_map_list"])){smtp_generic_map_list();exit;}
	if(isset($_GET["source_pattern"])){smtp_generic_map_add();exit;}
	if(isset($_GET["smtp_generic_map_del"])){smtp_generic_map_del();exit;}
		
	js();
function js(){
	$tpl=new templates();
	$title=$tpl->_ENGINE_parse_body("{smtp_generic_maps}");
	$page=CurrentPageName();
	if($_GET["ou"]==null){$_GET["ou"]=base64_encode("POSTFIX_MAIN");}
	$ou_decoded=base64_decode($_GET["ou"]);
	$html="
		function smtp_generic_maps_load(){
			YahooWin('550','$page?popup=yes&ou={$_GET["ou"]}','$title::$ou_decoded');		
			}
	smtp_generic_maps_load();";
	
	echo $html;