Example #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>";
    }
}
Example #2
0
function postfix_plugins_main()
{
    cookies_main();
    if ($_GET["main"] == null) {
        postfix_plugins_main_connection();
        exit;
    }
    switch ($_GET["main"]) {
        case "yes":
            $_GET["main"] = "connections";
            postfix_plugins_main_connection();
            exit;
            break;
        case "connections":
            postfix_plugins_main_connection();
            exit;
            break;
        case "antispam":
            postfix_plugins_main_antispam();
            exit;
            break;
        case "antivirus":
            postfix_plugins_main_antivirus();
            exit;
            break;
        case "mailbox":
            postfix_plugins_main_mailbox();
            exit;
            break;
        default:
            break;
    }
}
Example #3
0
function main_pureftpd()
{
    //$status=pureftpd_status();
    cookies_main();
    $users = new usersMenus();
    $tpl = new templates();
    $users->LoadModulesEnabled();
    $pure = Paragraphe('64-pureftpd-grey.png', '{APP_PUREFTPD}', '{feature_not_installed}', '');
    $events = Paragraphe('64-spam-grey.png', '{events}', '{feature_not_installed}', '');
    $apply = Paragraphe('system-64-grey.png', '{apply}', '{feature_not_installed}', '');
    $purewho = Paragraphe('folder-rules2-64-info-grey.png', '{current_connections}', '{feature_not_installed}', '');
    if ($users->PUREFTP_INSTALLED) {
        $pure = Paragraphe('64-pureftpd.png', '{APP_PUREFTPD}', '{APP_PUREFTPD_TEXT}', "javascript:Loadjs('pureftp.index.php?js=yes')");
        $events = Paragraphe('64-spam.png', '{events}', '{events_text}', "javascript:Loadjs('pureftp.events.php')");
        $apply = Paragraphe('system-64.png', '{apply}', '{apply_config_pureftpd}', "javascript:ApplyConfig('pure-ftpd');");
        $purewho = Paragraphe('folder-rules2-64-info.png', '{current_connections}', '{current_connections_text}', "javascript:Loadjs('pureftp.events.php?who=yes')");
    }
    $html = "{$tab}\n<table style='width:100%'>\n<tr>\n<td valign='top'>\n\n\t\t<table>\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$pure}</td>\n\t\t\t<td valign='top' >{$events}</td>\n\t\t\t<td valign='top'>{$purewho}</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$apply}</td>\n\t\t\t<td valign='top' >{$status}</td>\n\t\t\t<td valign='top' >&nbsp;</td>\n\t\t\t</tr>\t\t\t\t\t\n\t\t</table>\n</td>\n<td valign='top' style='width:1%'>{$pureftp_error}\n</td>\n</tr>\n</table>";
    return $tpl->_ENGINE_parse_body($html);
}