Ejemplo n.º 1
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.º 2
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.º 3
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));
}