Exemplo n.º 1
0
function TreePostfixDeleteHeaderCheckRule()
{
    include_once "ressources/class.main_cf_filtering.inc";
    $id = $_GET["TreePostfixDeleteHeaderCheckRule"];
    $filters = new main_header_check();
    $datas = $filters->array_ldap_source[$id];
    unset($filters->array_ldap_source[$id]);
    if (count($filters->array_ldap_source) == 0) {
        $update_array["PostfixHeadersRegex"] = $datas;
        $ldap = new clladp();
        $ldap->Ldap_del_mod("cn=artica,{$ldap->suffix}", $update_array);
    } else {
        while (list($num, $ligne) = each($filters->array_ldap_source)) {
            $update_array["PostfixHeadersRegex"][] = $filters->array_ldap_source[$num];
        }
        $ldap = new clladp();
        $ldap->Ldap_modify("cn=artica,{$ldap->suffix}", $update_array);
        if ($ldap->ldap_last_error != null) {
            echo nl2br("ID=[{$_GET["TreePostfixDeleteHeaderCheckRule"]}]\n{$ldap->ldap_last_error}");
        }
    }
    $pages = new HtmlPages();
    if ($pages->AutomaticConfig == true) {
        $filters->SaveToDaemon();
    }
    echo $pages->PagePostfixRules();
}
Exemplo n.º 2
0
function SelectBranch()
{
    $id = $_GET["SelectBranch"];
    $pages = new HtmlPages();
    if ($id == 'Root') {
        echo $pages->PageRoot();
        exit;
    }
    if (preg_match('#^ou:(.+)#', $id, $reg)) {
        echo $pages->PageOu($reg[1]);
        exit;
    }
    if (preg_match('#^user:(.+)#', $id, $reg)) {
        echo $pages->PageUser(null, $reg[1], 1);
    }
    if (preg_match('#^group:([0-9]+)#', $id, $reg)) {
        echo $pages->PageGroup($reg[1]);
        exit;
    }
    if (preg_match('#^domain:(.+),([0-9]+)#', $id, $reg)) {
        echo $pages->PageDomain($reg[1], $reg[2]);
    }
    if (preg_match('#^applications:tasks#', $id)) {
        echo $pages->PageTasks();
    }
    if (preg_match('#^applications:postfix$#', $id)) {
        echo $pages->PagePostfixIndex();
    }
    if (preg_match('#^settings:postfix:rules#', $id)) {
        echo $pages->PagePostfixRules();
    }
    if (preg_match('#^settings:postfix:tls#', $id)) {
        echo $pages->PagePostfixTLS();
    }
    if (preg_match('#^settings:postfix:domains$#', $id)) {
        echo $pages->PagePostfixDomains();
    }
    if ($id == 'settings:postfix:smtpd_client_restrictions') {
        echo $pages->PagePostfixsmtpd_client_restrictions();
        exit;
    }
    if ($id == 'settings:postfix:smtpd_sender_restrictions') {
        echo $pages->PagePostfixsmtpd_client_restrictions(1);
        exit;
    }
    if ($id == 'settings:postfix:domains:auth') {
        echo $pages->PagePostfixSMTPSaslAuth();
        exit;
    }
    if ($id == 'settings:postfix:SecurityRules') {
        echo $pages->PagePostfixSecurityRulesExplain();
        exit;
    }
    if ($id == 'applications:fetchmail') {
        echo $pages->PageFetchmail_status();
        exit;
    }
    if ($id == 'server:logmonitor') {
        echo $pages->PageLogMonitorIndex();
        exit;
    }
    if (preg_match('#^applications:fechmail#', $id)) {
        echo $pages->PageFetchmail_status();
    }
    if (preg_match('#^applications:cyrus#', $id)) {
        echo $pages->PageCyrus_status();
        exit;
    }
    if ($id == 'applications:cyrus') {
        echo $pages->PageCyrus_status();
        exit;
    }
    if ($id == 'applications:applications:cyrus2.2') {
        echo $pages->PageCyrus_status();
        exit;
    }
    if ($id == 'applications:applications:cyrus21') {
        echo $pages->PageCyrus_status();
        exit;
    }
    if ($id == 'applications:kas3') {
        echo $pages->PageKas3_status();
        exit;
    }
    if ($id == 'settings:kas3:generalSettings') {
        echo $pages->PageKas3ProcessServer();
        exit;
    }
    if ($id == 'settings:kas3:update') {
        echo $pages->PageKas3UpdateConfig();
        exit;
    }
    if ($id == 'settings:kas3:licence') {
        echo $pages->PageKas3Licence();
        exit;
    }
    if ($id == 'applications:procmail') {
        echo $pages->PageProcMailIntro();
        exit;
    }
    if (preg_match('#^settings:fetchmail:daemon#', $id)) {
        echo $pages->PageFetchmail_Daemon();
    }
    if ($id == 'applications:aveserver') {
        echo $pages->PageAveServerStatus();
        exit;
    }
    if ($id == 'settings:aveserver:licence') {
        echo $pages->PageAveserverLicenceSection();
        exit;
    }
    if ($id == 'settings:aveserver:update') {
        echo $pages->PageAveServerUpdateConfig();
        exit;
    }
    if (preg_match('#^settings:postfix:network#', $id)) {
        echo $pages->PagePostfix_maincf_interfaces();
    }
    if (preg_match('#^server:interfaces#', $id)) {
        echo $pages->PageSystem_interfaces();
    }
    if (preg_match('#^server:applications#', $id)) {
        echo $pages->PageSystem_applications_Status();
    }
    if (preg_match('#^server:organisations#', $id)) {
        echo $pages->PageOrganisations();
    }
}