示例#1
0
function pagelogon()
{
    $sock = new sockets();
    $user = new usersMenus();
    if ($user->SQUID_INSTALLED) {
        $sock = new sockets();
        $SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
        if ($SQUIDEnable == null) {
            $SQUIDEnable = 1;
        }
        if ($SQUIDEnable == 0) {
            $user->SQUID_INSTALLED = false;
        }
    }
    error_log("logon form " . __FILE__ . " line " . __LINE__);
    $fixed_template = $sock->GET_INFO('ArticaFixedTemplate');
    error_log("init fixed template={$fixed_template} in " . __FILE__ . " line " . __LINE__);
    if (trim($fixed_template) != null) {
        $_COOKIE["artica-template"] = $fixed_template;
    }
    $imglogon = "img/logon2.png";
    if (!$user->POSTFIX_INSTALLED) {
        if ($user->SAMBA_INSTALLED) {
            $imglogon = "img/artica-nas.png";
        }
    }
    if (!$user->POSTFIX_INSTALLED) {
        if ($user->SQUID_INSTALLED) {
            $imglogon = "img/logon-squid.png";
        }
    }
    if ($user->POSTFIX_INSTALLED) {
        if (!$user->SQUID_INSTALLED) {
            $imglogon = "img/logon-postfix.png";
        }
    }
    $persologon = $sock->GET_INFO("ArticaLogonImage");
    if (trim($persologon) != null) {
        $imglogon = $persologon;
        $imglogon = str_replace("%TEMPLATE%", "ressources/templates/{$_COOKIE["artica-template"]}", $imglogon);
    }
    if ($user->KASPERSKY_SMTP_APPLIANCE) {
        $imglogon = "img/logon-k.png";
    }
    if ($user->KASPERSKY_WEB_APPLIANCE) {
        $imglogon = "img/logon-squidk.png";
    }
    if ($user->ZARAFA_APPLIANCE) {
        $imglogon = "img/logon-zarafa.png";
    }
    $page = CurrentPageName();
    $newacc = "<div style='float:left;margin-left:-180px;width:179px;margin-top:-50px'>\n<table style='width:100%'>\n<tr " . CellRollOver("Loadjs('{$page}?script=autoaccount')", "{create_your_user_account}") . ">\n<td width=1%>\n\t<img src='img/member-64-add.png'>\n</td>\n<td nowrap valign='top'><H3>{register}</H3>\n<p class=caption>{create_your_user_account}</p>\n</td>\n</tr>\n</table>\n</div>";
    error_log("-> buildFrontEnd  " . __FILE__ . " line " . __LINE__);
    $sock->getFrameWork("cmd.php?buildFrontEnd=yes");
    error_log("-> CheckAutousers  " . __FILE__ . " line " . __LINE__);
    if (!CheckAutousers()) {
        $newacc = null;
    }
    $logonForm = logonForm();
    $html = "\n<script>\nfunction SaveSession(){\n\tvar template=document.getElementById('template').value;\n\tvar lang=document.getElementById('lang').value;\n\tSet_Cookie('artica-template', template, '3600', '/', '', '');\n\tSet_Cookie('artica-language', lang, '3600', '/', '', '');\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('lang',lang);\n\tXHR.sendAndLoad('{$page}', 'GET');\t\t\n\tlocation.reload();\n}\n\nfunction LoadModal(){\n\$('#loginform').modal({onOpen: function (dialog) {\n\tdialog.overlay.fadeIn('slow', function () {\n\t\tdialog.container.slideDown('slow', function () {\n\t\t\tdialog.data.fadeIn('slow');\n\t\t});\n\t});\n}});\n\n\n\n}\n</script>\n{$newacc}\n{$navigator}\n<center>\n{$logonForm}\n<div style='width:667px;height:395px;\n\tbackground-position:center top;\n\tbackground-image:url({$imglogon});\n\tbackground-repeat:no-repeat;border:1px solid #FFFFFF'>\n</div>\n</center>";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
示例#2
0
function pagelogon()
{
    $sock = new sockets();
    $user = new usersMenus();
    if ($user->SQUID_INSTALLED) {
        $sock = new sockets();
        $SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
        if (!is_numeric($SQUIDEnable)) {
            $SQUIDEnable = 1;
        }
        if ($SQUIDEnable == 0) {
            $user->SQUID_INSTALLED = false;
        }
    }
    error_log("logon form " . __FILE__ . " line " . __LINE__);
    $fixed_template = $sock->GET_INFO('ArticaFixedTemplate');
    error_log("init fixed template={$fixed_template} in " . __FILE__ . " line " . __LINE__);
    if (trim($fixed_template) != null) {
        $_COOKIE["artica-template"] = $fixed_template;
    }
    $imglogon = "img/logon2.png";
    if (!$user->POSTFIX_INSTALLED) {
        if ($user->SAMBA_INSTALLED) {
            $imglogon = "img/artica-nas.png";
        }
    }
    if (!$user->POSTFIX_INSTALLED) {
        if ($user->SQUID_INSTALLED) {
            $imglogon = "img/logon-squid.png";
        }
    }
    if ($user->POSTFIX_INSTALLED) {
        if (!$user->SQUID_INSTALLED) {
            $imglogon = "img/logon-postfix.png";
        }
    }
    $persologon = $sock->GET_INFO("ArticaLogonImage");
    if (trim($persologon) != null) {
        $imglogon = $persologon;
        $imglogon = str_replace("%TEMPLATE%", "ressources/templates/{$_COOKIE["artica-template"]}", $imglogon);
    }
    if ($user->KASPERSKY_SMTP_APPLIANCE) {
        $imglogon = "img/logon-k.png";
    }
    //if($user->KASPERSKY_WEB_APPLIANCE){$imglogon="img/logon-squidk.png";}
    if ($user->KASPERSKY_WEB_APPLIANCE) {
        $imglogon = "img/logo-artica-kav.png";
    }
    if ($user->ZARAFA_APPLIANCE) {
        $imglogon = "img/logon-zarafa.png";
    }
    if ($user->OPENVPN_APPLIANCE) {
        $imglogon = "img/logo-openvpn.png";
    }
    if ($user->APACHE_APPLIANCE) {
        $imglogon = "img/artica-apache.png";
    }
    if ($user->MYCOSI_APPLIANCE) {
        $imglogon = "img/my-cosi-3d.png";
    }
    $page = CurrentPageName();
    $center_bg = null;
    $newacc = "<div style='float:left;margin-left:-180px;width:179px;margin-top:-50px'>\n<table style='width:100%'>\n<tr " . CellRollOver("Loadjs('{$page}?script=autoaccount')", "{create_your_user_account}") . ">\n<td width=1%>\n\t<img src='img/member-64-add.png'>\n</td>\n<td nowrap valign='top'><H3>{register}</H3>\n<p class=caption>{create_your_user_account}</p>\n</td>\n</tr>\n</table>\n</div>\n<script>\n\tChangeHTMLTitle();\n</script>\n\t\n\n";
    error_log("-> buildFrontEnd  " . __FILE__ . " line " . __LINE__);
    $sock->getFrameWork("cmd.php?buildFrontEnd=yes");
    error_log("-> CheckAutousers  " . __FILE__ . " line " . __LINE__);
    if (!CheckAutousers()) {
        $newacc = null;
    }
    if ($user->KASPERSKY_WEB_APPLIANCE) {
        //$GLOBALS["CHANGE_TEMPLATE"]="squid.kav.html";
        //$imglogon=null;
        //$addedlogo="<div style='float:left;margin-left:-190px;width:537px;height:474px;background-image:url(/img/bg_kavweb-appliance.jpg);background-position:left top;'></div>";
        //
    }
    if ($imglogon != null) {
        $imglogon = "background-image:url({$imglogon});";
    }
    $logonForm = logonForm();
    $sock = new sockets();
    $logon_parameters = unserialize(base64_decode($sock->GET_INFO("LogonPageSettings")));
    if ($logon_parameters["LANGUAGE_SELECTOR_REMOVE"] == null) {
        $logon_parameters["LANGUAGE_SELECTOR_REMOVE"] = "0";
    }
    if (!is_numeric($logon_parameters["LANGUAGE_SELECTOR_REMOVE"])) {
        $logon_parameters["LANGUAGE_SELECTOR_REMOVE"] = 0;
    }
    if ($logon_parameters["DEFAULT_LANGUAGE"] == null) {
        $logon_parameters["DEFAULT_LANGUAGE"] = "en";
    }
    $html = "\n<script>\nfunction SaveSession(){\n\tvar LANGUAGE_SELECTOR_REMOVE={$logon_parameters["LANGUAGE_SELECTOR_REMOVE"]};\n\tvar template=document.getElementById('template').value;\n\tif(LANGUAGE_SELECTOR_REMOVE==0){\n\t\tvar lang=document.getElementById('lang').value;\n\t}else{\n\t\tvar lang='{$logon_parameters["DEFAULT_LANGUAGE"]}';\n\t}\n\tSet_Cookie('artica-template', template, '3600', '/', '', '');\n\tSet_Cookie('artica-language', lang, '3600', '/', '', '');\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('lang',lang);\n\tXHR.sendAndLoad('{$page}', 'GET');\t\t\n\tlocation.reload();\n}\n\nfunction LoadModal(){\n\$('#loginform').modal({onOpen: function (dialog) {\n\tdialog.overlay.fadeIn('slow', function () {\n\t\tdialog.container.slideDown('slow', function () {\n\t\t\tdialog.data.fadeIn('slow');\n\t\t});\n\t});\n}});\n\n\n\n\n}\n</script>\n{$addedlogo}\n{$newacc}\n\n<center>\n{$logonForm}\n<div style='width:667px;height:395px;\n\tbackground-position:center top;\n\t{$imglogon}\n\tbackground-repeat:no-repeat;border:1px solid #FFFFFF'>\n</div>\n</center>\n\n<script>ChangeHTMLTitle();</script>\n";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html);
    //SET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__,$html);
    echo $html;
}
示例#3
0
        header("location:users.index.php");
        exit;
    }
}
if (count($_GET) > 0) {
    include_once 'ressources/class.templates.inc';
    include_once 'ressources/class.ldap.inc';
    include_once 'ressources/class.user.inc';
    include_once 'ressources/class.langages.inc';
    include_once 'ressources/class.sockets.inc';
    include_once 'ressources/class.mysql.inc';
    include_once 'ressources/class.privileges.inc';
    include_once 'ressources/class.browser.detection.inc';
}
if (isset($_GET["logon-form-build"])) {
    logonForm(true);
    exit;
}
if (isset($_GET["popup-lang"])) {
    TEMPLATE_LANG_POPUP();
    exit;
}
if (isset($_GET["TEMPLATE_LANG_LINK"])) {
    TEMPLATE_LANG_LINK();
    exit;
}
if (isset($_GET["script"])) {
    if ($_GET["script"] == "autoaccount") {
        autoaccount_js();
        exit;
    }