示例#1
0
function main_switch()
{
    cookies_main();
    //if(GET_CACHED(__FILE__,__FUNCTION__,$_GET["main"])){return;}
    $array["transport_settings"] = '{transport_settings}';
    $array["security_settings"] = '{security_settings}';
    $array["tweaks"] = '{tweaks}';
    if (isset($_GET["ajaxmenu"])) {
        echo "<div id='main_config_postfix'>";
    }
    switch ($_GET["main"]) {
        case "transport_settings":
            $html = Transport_rules_redirect();
            //SET_CACHED(__FILE__,__FUNCTION__,$_GET["main"],$html);
            echo $html;
            break;
        case "transport_settings_rules":
            $html = Transport_rules();
            //SET_CACHED(__FILE__,__FUNCTION__,$_GET["main"],$html);
            echo $html;
            break;
        case "security_settings":
            $html = security();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "security2":
            $html = security2();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "tweaks":
            $html = tweaks();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "filters":
            $html = filters_section();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "mailbox":
            $html = mailbox_section();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "status":
            $html = status_section();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "filters-connect":
            $html = filters_connect_section();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        default:
            $html = Transport_rules();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
    }
    if (isset($_GET["ajaxmenu"])) {
        echo "</div>";
    }
}
示例#2
0
$tr[] = $debug;
$tr[] = $artica_stats;
$tr[] = $banner;
$tr[] = $mime;
$tr[] = $RemoteSyslog;
$tr[] = $HaProxy;
$tr[] = $mailman;
$tr[] = $mailbox_cmd;
$tr[] = $mastercf;
$tr[] = $maincf;
$tr[] = $maincfedit;
$tr[] = $performances;
$tr[] = $varspool;
$tr[] = $other;
$tr[] = $removePostfix;
$tr = Transport_rules($tr);
$icons = CompileTr4($tr);
$html = "<center><div style='width:80%'>{$icons}</div></center>";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($icons);
function Transport_rules($tr)
{
    //$datas=GET_CACHED(__FILE__,__FUNCTION__,null,TRUE);
    //if($datas<>null){return $datas;}
    $sock = new sockets();
    $page = CurrentPageName();
    $users = new usersMenus();
    $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
    $EnableArticaSMTPFilter = $sock->GET_INFO("EnableArticaSMTPFilter");
    $EnableArticaSMTPFilter = 0;
    $failedtext = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}";