Ejemplo n.º 1
0
function page()
{
    $usersmenus = new usersMenus();
    $kas = new kas_filter();
    $pattern_date = $kas->GetPatternDate();
    $linkPattern = texttooltip('{ave_pattern_date}', '{time_date_com_text_moscow}', 'http://www.timeanddate.com/worldclock/city.html?n=166');
    if ($usersmenus->AsPostfixAdministrator == true or $usersmenus->AllowChangeKas == true or $usersmenus->AllowChangeAntiSpamSettings == true) {
    } else {
        header('location:users.index.php');
        exit;
    }
    $html = "\n<div class='caption'><strong>{$linkPattern}:&nbsp;{$pattern_date}</div>\n<table style='width:600px' align=center>\n<tr>\n<td width=1% valign='top'><img src='img/caterpillarkas.jpg'>\n</td>\n<td valign='top'>\n\t<table>";
    if ($usersmenus->AsPostfixAdministrator == true) {
        $html = $html . "<tr><td valign='top'>  " . Paragraphe('folder-caterpillar.jpg', '{antispam_engine}', '{antispam_engine_text}', 'kas.engine.settings.php') . "</td></tr>\n\t\t<tr><td valign='top' >" . Paragraphe('folder-lego.jpg', '{product_update_settings}', '{product_update_settings_text}', 'kas.keepupd2date.settings.php') . "</td></tr>\n\t\t<tr><td valign='top' >" . Paragraphe('folder-licence.jpg', '{product_licence}', '{product_licence_text}', 'kas.licence.settings.php') . "</td></tr>";
    }
    if ($usersmenus->AllowChangeKas == true) {
        $artica = new artica_general();
        if ($artica->EnableGroups == 'yes') {
            $html = $html . "<tr><td valign='top'>  " . Paragraphe('folder-groupe.jpg', '{antispam_rules_group}', '{antispam_rules_group_text}', 'kas.group.rules.php') . "</td></tr>";
        } else {
            $html = $html . "<tr><td valign='top'>  " . Paragraphe('folder-rules-64.jpg', '{antispam_rules}', '{antispam_rules_text}', 'kas.group.rules.php') . "</td></tr>";
        }
    }
    if ($usersmenus->AllowChangeAntiSpamSettings == true) {
        $html = $html . "<tr><td valign='top'>  " . Paragraphe('folder-userrules-64.jpg', '{antispam_user_rules}', '{antispam_user_rules_text}', 'kas.user.rules.php') . "</td></tr>";
    }
    $html = $html . "</table>\n</td>\n</tr>\n</table>\n";
    $tpl = new template_users('Kaspersky Anti-spam', $html);
    echo $tpl->web_page;
}
Ejemplo n.º 2
0
function PageKas3Licence()
{
    $tpl = new templates();
    $yum = new usersMenus();
    if ($yum->AsPostfixAdministrator == false) {
        return $tpl->_ENGINE_parse_body("<h3>{not allowed}</H3>");
    }
    include_once 'ressources/class.kas-filter.inc';
    $kas1 = new KasLicence();
    $kas = new kas_filter();
    $st = $kas->KasStatus();
    $html = "<h5>{licence status}</h5>\n\t\t\n\t\t\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td width='65%' valign='top'>\n\t\t<div style='background-color:white;font-size:11px;padding:3px;border:1px solid #CCCCCC'>\n\t\t{$kas1->fulldata}\n\t\t</div>\n\t\t{$st}</table>\n\t\t</td>\n\t\t<td width='35%' valign='top'>" . AddAnewKey() . "</td>\n\t\t</tr>\n\t\t</table>";
    return $tpl->_ENGINE_parse_body($html);
}
Ejemplo n.º 3
0
function SaveSettings()
{
    $kas = new kas_filter();
    if ($kas->error == true) {
        $html = "{error_no_socks}";
    } else {
        while (list($num, $val) = each($_POST)) {
            $kas->array_datas[$num] = $val;
        }
        if ($kas->SaveFile()) {
            $html = "{success}";
        } else {
            $html = "{failed}";
        }
    }
    unset($_POST);
    $tpl = new templates();
    echo $tpl->_parse_body($html);
}
Ejemplo n.º 4
0
function RightInfos()
{
    $kas = new kas_filter();
    $st = RoundedLightGrey($kas->KasStatus() . "</table>");
    $html = applysettings("kas") . "<br>{$st}";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Ejemplo n.º 5
0
function ApplyConfigKas()
{
    $prod = "kas_main_settings";
    $tpl = new templates();
    $user = new usersMenus();
    if ($user->AllowChangeKas == false) {
        echo $tpl->_parse_body(NotAllowed($prod));
        return null;
    }
    if ($user->kas_installed == false) {
        echo $tpl->_parse_body(NotInstalled($prod));
        return null;
    }
    $ldap = new clladp();
    $kas = new kas_single();
    $kas->SaveToserver();
    $sock = new sockets();
    $sock->getfile('kasrules:' . dirname(__FILE__) . '/ressources/conf/kasDatas');
    $kas = new kas_filter();
    $kas->SaveFile();
    $kas = new kas_dns();
    $kas->SaveToServer();
    echo $tpl->_parse_body(Success($prod));
}
Ejemplo n.º 6
0
function TreeKas3SaveSettings()
{
    include_once 'ressources/class.kas-filter.inc';
    unset($_GET["TreeKas3SaveSettings"]);
    $kas = new kas_filter();
    if ($kas->error == true) {
        $html = "{error_no_socks}";
    } else {
        while (list($num, $val) = each($_GET)) {
            $kas->array_datas[$num] = $val;
        }
        if ($kas->SaveFile()) {
            $html = "{success}";
        } else {
            $html = "{failed}";
        }
    }
    unset($_GET);
    $tpl = new templates();
    echo html_entity_decode($tpl->_ENGINE_parse_body($html));
}
function RightInfos()
{
    $kas = new kas_filter();
    $st = RoundedLightGrey($kas->KasStatus() . "</table>");
    $perf = Paragraphe('proxy-64.png', '{update_now}', '{update_now}', "javascript:KasUpdates();");
    $pref_force = Paragraphe('proxy-delete-64.png', '{clean_update}', '{clean_update}', "javascript:KasforceUpdates();");
    $perf = RoundedLightGrey($perf);
    $pref_force = RoundedLightGrey($pref_force);
    $html = applysettings("kas") . "{$perf}<br>{$pref_force}<br>{$st}";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}