コード例 #1
0
function ApplyConfigMimeDefang()
{
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $tpl = new templates();
    if (!$users->POSTFIX_INSTALLED) {
        echo $tpl->_ENGINE_parse_body(NotInstalled('postfix'));
        exit;
    }
    if (!$users->MIMEDEFANG_INSTALLED) {
        echo $tpl->_ENGINE_parse_body(NotInstalled('mimedefang'));
        exit;
    }
    if ($users->MimeDefangEnabled != 1) {
        echo $tpl->_ENGINE_parse_body(NotEnabled("mimedefang", "MimeDefangEnabled={$users->MimeDefangEnabled}"));
        exit;
    }
    include_once 'ressources/class.mimedefang.inc';
    include_once 'ressources/class.mysql.inc';
    $mime = new mimedefang();
    $mime->SaveToLdap();
    echo $tpl->_ENGINE_parse_body(Success("mimedefang"));
}
コード例 #2
0
function Delete_disclaimer_addr()
{
    $mime = new mimedefang();
    $tbl = explode(";", $mime->ScriptConf_array["BUILD"]["DICLAIMER_ADDR"]);
    unset($tbl[$_GET["MimeDefangDelDisclamerAddress"]]);
    $mime->ScriptConf_array["BUILD"]["DICLAIMER_ADDR"] = implode(";", $tbl);
    $mime->SaveToLdap();
}