Пример #1
0
function load_modules_list()
{
    $tpl = new templates();
    $array = $tpl->parsePHPModules();
    $page = CurrentPageName();
    $data = array();
    $data['page'] = 1;
    $data['total'] = $total;
    $data['rows'] = array();
    $c = 0;
    if ($_POST["query"] != null) {
        $search = $_POST["query"];
        $search = str_replace(".", "\\.", $search);
        $search = str_replace("*", ".*?", $search);
    }
    if ($_POST["sortorder"] == "asc") {
        ksort($array);
    } else {
        krsort($array);
    }
    while (list($module, $array_f) = each($array)) {
        if ($search != null) {
            if (!preg_match("#{$search}#", $module)) {
                continue;
            }
        }
        $html = array();
        if (is_array($array_f)) {
            while (list($a, $b) = each($array_f)) {
                if (is_array($b)) {
                    while (list($c, $d) = each($b)) {
                        //$html[]="<br><span style='font-size:11px'><strong>$c</strong>:$d</span>";
                    }
                } else {
                    $html[] = "<br><span style='font-size:11px'><strong>{$a}</strong>:{$b}</span>";
                }
            }
        }
        $c++;
        $data['rows'][] = array('id' => $module, 'cell' => array("<img src='img/arrow-right-24.png'>", "<strong style='font-size:14px;style='color:{$color}'>{$href}{$module}</a></strong>" . @implode("", $html)));
    }
    $data['total'] = $c;
    echo json_encode($data);
}
Пример #2
0
function buildPage()
{
    if ($GLOBALS["VERBOSE"]) {
        echo "<H1>buildPage() function line " . __LINE__ . "</H1>";
    }
    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';
    include_once dirname(__FILE__) . "/ressources/class.langages.inc";
    $page = CurrentPageName();
    $users = new usersMenus();
    $sock = new sockets();
    unset($_SESSION);
    unset($_COOKIE["artica-template"]);
    $sslcert = null;
    $GLOBALS["DEBUG_TEMPLATE"] = true;
    if ($GLOBALS["VERBOSE"]) {
        echo "<H1>articaLang() function line " . __LINE__ . "</H1>";
    }
    $langAutodetect = new articaLang();
    $DetectedLanguage = $langAutodetect->get_languages();
    if ($GLOBALS["VERBOSE"]) {
        echo "<H1>DetectedLanguage = {$DetectedLanguage} line " . __LINE__ . "</H1>";
    }
    $GLOBALS["FIXED_LANGUAGE"] = $DetectedLanguage;
    $TEMPLATE_INDEX = "logon.html";
    if (!isset($GLOBALS["FixedLanguage"])) {
        $GLOBALS["FixedLanguage"] = $sock->GET_INFO("FixedLanguage");
    }
    $ie = browser_detection();
    if ($ie == "ie") {
        FATAL_ERROR_SHOW_128_NO_IE();
        return;
    }
    $logo = "logo.gif";
    $logo_bg = "bg_header.gif";
    $bg_color = "#005447";
    $ProductName = "Artica";
    $link_company_name = "http://www.articatech.com";
    $OEM_CompanyName = "Artica Tech";
    $template = null;
    $MikrotikTransparent = intval($sock->GET_INFO('MikrotikTransparent'));
    $SquidActHasReverse = $sock->GET_INFO("SquidActHasReverse");
    $AsSquidLoadBalancer = $sock->GET_INFO("AsSquidLoadBalancer");
    $SSlBumpAllowLogon = intval($sock->GET_INFO("SSlBumpAllowLogon"));
    if (!is_numeric($SquidActHasReverse)) {
        $SquidActHasReverse = 0;
    }
    if (!is_numeric($AsSquidLoadBalancer)) {
        $AsSquidLoadBalancer = 0;
    }
    $LOCK_TEMPLATE = false;
    $AsCategoriesAppliance = intval($sock->GET_INFO("AsCategoriesAppliance"));
    $AsMetaServer = intval($sock->GET_INFO("AsMetaServer"));
    $EnableNginx = intval($sock->GET_INFO("EnableNginx"));
    $SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
    if (!is_numeric($SQUIDEnable)) {
        $SQUIDEnable = 1;
    }
    if ($SQUIDEnable == 0) {
        if ($EnableNginx == 1) {
            $SquidActHasReverse = 1;
        }
    }
    $hostname = $sock->GET_INFO("myhostname");
    if ($hostname == null) {
        $hostname = $sock->getFrameWork("system.php?hostname-g=yes");
        $sock->SET_INFO($hostname, "myhostname");
    }
    if ($hostname == null) {
        $hostname = $users->hostname;
    }
    if ($GLOBALS["VERBOSE"]) {
        echo "new templates() line:" . __LINE__ . "<br>\n";
    }
    $tpl2 = new templates();
    if ($users->KASPERSKY_WEB_APPLIANCE) {
        if ($GLOBALS["VERBOSE"]) {
            echo "<div style='background-color:white;color:black'>" . __LINE__ . ": KASPERSKY_WEB_APPLIANCE DETECTED</div>\n";
        }
        $template = "Kav4Proxy";
        $logo = "logo-kav.gif";
    }
    if ($users->ZARAFA_APPLIANCE) {
        $template = "zarafa";
        $logo = "logo-kav.gif";
    }
    if ($users->MYCOSI_APPLIANCE) {
        $logo_bg = "bg_header_kavweb.gif";
        $logo = "logo-mycosi.gif";
        $bg_color = "#FFB683";
        $ProductName = "MyCosi";
        $template = "myCosi";
    }
    if ($users->APACHE_APPLIANCE) {
        $template = "Apache";
        $users->SAMBA_APPLIANCE = false;
        $logo = "logo-kav.gif";
    }
    if ($users->WEBSECURIZE) {
        $LOCK_TEMPLATE = true;
        $users->SQUID_APPLIANCE = false;
        $template = "Websecurize";
        $users->SAMBA_APPLIANCE = false;
        $logo = "logo-kav.gif";
        $ProductName = "Web Securize";
        $link_company_name = "http://www.lemnia.com";
        $OEM_CompanyName = "LEMNIA SAS";
    }
    if ($users->LANWANSAT) {
        $LOCK_TEMPLATE = true;
        $users->SQUID_APPLIANCE = false;
        $template = "LanWanSAT";
        $users->SAMBA_APPLIANCE = false;
        $logo = "logo-kav.gif";
        $ProductName = "LanWanSAT Proxy";
        $link_company_name = "http://lanwansan.synology.me/wordpress/";
        $OEM_CompanyName = "LanWanSan";
    }
    $LinkColor = "white";
    if (is_file("/usr/share/artica-postfix/ressources/templates/{$template}/logon-link-color.conf")) {
        $LinkColor = trim(@file_get_contents("/usr/share/artica-postfix/ressources/templates/{$template}/logon-link-color.conf"));
    }
    if ($GLOBALS["VERBOSE"]) {
        echo "<H1>template={$template} line " . __LINE__ . "</H1>";
    }
    if ($users->SQUID_APPLIANCE) {
        if (!$users->KASPERSKY_WEB_APPLIANCE) {
            if ($GLOBALS["VERBOSE"]) {
                echo "<div style='background-color:{$LinkColor};color:black'>" . __LINE__ . ": SQUID_APPLIANCE DETECTED</div>\n";
            }
            $template = "Squid";
        }
    }
    if (!$LOCK_TEMPLATE) {
        if ($users->LOAD_BALANCE_APPLIANCE) {
            $template = "LoadBalance";
        }
        if ($users->HAPRROXY_APPLIANCE) {
            $template = "LoadBalance";
        }
        if ($users->WEBSTATS_APPLIANCE) {
            $template = "WebStats";
        }
        if ($users->GATEWAY_APPLIANCE) {
            $template = "Gateway";
            $TEMPLATE_INDEX = "logon.html";
        }
        if ($users->WORDPRESS_APPLIANCE) {
            $template = "Wordpress";
        }
        if ($AsCategoriesAppliance == 1) {
            $template = "UfdbCat";
        }
        if ($AsMetaServer == 1) {
            $template = "MetaServer";
        }
    }
    if ($template == null) {
        if ($users->SQUID_INSTALLED) {
            if (!$users->POSTFIX_INSTALLED) {
                if (!$users->SAMBA_INSTALLED) {
                    $SQUIDEnable = $sock->GET_INFO("SQUIDEnable");
                    if (!is_numeric($SQUIDEnable)) {
                        $SQUIDEnable = 1;
                    }
                    if ($SQUIDEnable == 1) {
                        $template = "Squid";
                    }
                }
            }
        }
    }
    if ($template == null) {
        if ($users->POSTFIX_INSTALLED) {
            if ($users->cyrus_imapd_installed) {
                $template = "Postfix";
                $TEMPLATE_INDEX = "logon.html";
            }
            if ($users->ZARAFA_INSTALLED) {
                $template = "zarafa";
                $TEMPLATE_INDEX = "logon.html";
            }
        }
    }
    if ($template == null) {
        if ($users->POSTFIX_INSTALLED) {
            if (!$users->SQUID_INSTALLED) {
                if (!$users->SAMBA_INSTALLED) {
                    $template = "Postfix";
                    $TEMPLATE_INDEX = "logon.html";
                }
            }
        }
    }
    if (trim($template) == null) {
        if ($users->SAMBA_APPLIANCE) {
            $template = "Samba";
        }
    }
    if (trim($template) == null) {
        if ($users->WORDPRESS_INSTALLED) {
            $template = "Wordpress";
        }
    }
    if (trim($template) == null) {
        if ($users->SQUID_INSTALLED) {
            $template = "Squid";
        }
    }
    if (trim($template) == null) {
        if ($users->SAMBA_INSTALLED) {
            $template = "Samba";
        }
    }
    if (trim($template) == null) {
        if ($users->APACHE_INSTALLED) {
            $template = "Apache";
        }
    }
    if ($template == "Squid") {
        if ($SquidActHasReverse == 1) {
            $TEMPLATE_INDEX = "logonr.html";
        }
        if ($AsSquidLoadBalancer == 1) {
            $TEMPLATE_INDEX = "logonb.html";
        }
        if ($MikrotikTransparent == 1) {
            $TEMPLATE_INDEX = "logon_mikrotik.html";
        }
    }
    if ($users->APP_UFDBGUARD_INSTALLED) {
        $q = new mysql_squid_builder();
        $sql = "SELECT COUNT( * ) AS tcount FROM personal_categories WHERE PublicMode=1";
        writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
        $ligneCatz = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        if ($ligneCatz["tcount"] > 0) {
            $categoriesPublic = "<span style='color:{$LinkColor}'>&nbsp;|&nbsp;</span>\n\t\t\t<a href='public.categories.personnal.php' style='color:{$LinkColor}'>" . $tpl2->_ENGINE_parse_body("{categories}") . "</a>&nbsp;";
        }
    }
    if ($GLOBALS["VERBOSE"]) {
        echo "<H1>template={$template} line " . __LINE__ . "</H1>";
    }
    if ($template != null) {
        $jquery = null;
        include_once dirname(__FILE__) . "/ressources/class.page.builder.inc";
        if ($GLOBALS["VERBOSE"]) {
            echo "new pagebuilder() line " . __LINE__ . "</H1>";
        }
        $p = new pagebuilder();
        if (is_file("ressources/templates/{$template}/{$TEMPLATE_INDEX}")) {
        }
        $tpl = @file_get_contents("ressources/templates/{$template}/{$TEMPLATE_INDEX}");
        if ($GLOBALS["VERBOSE"]) {
            echo "<H1>ressources/templates/{$template}/{$TEMPLATE_INDEX} (" . strlen($tpl) . ") length line " . __LINE__ . "</H1>";
        }
        foreach (glob("ressources/templates/{$template}/css/*.css") as $filename) {
            //$datas=@file_get_contents("$filename");
            //$datas=str_replace("\n", " ", $datas);
            $css[] = "<link href=\"/{$filename}\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" >";
        }
        $log[] = "<!-- TEMPLATE_INDEX:{$TEMPLATE_INDEX} -->";
        if ($GLOBALS["VERBOSE"]) {
            echo "Scanning ressources/templates/{$template}/js/*.js" . __LINE__ . "<br>\n";
        }
        foreach (glob("ressources/templates/{$template}/js/*.js") as $filename) {
            $filename = basename($filename);
            if (preg_match("#^jquery-([0-9\\.]+)\\.min\\.js#", $filename)) {
                $log[] = "<!-- jquery = {$filename} -->";
                $jquery = $filename;
                continue;
            }
            $js[] = "<script type=\"text/javascript\" src=\"/ressources/templates/{$template}/js/{$filename}\"></script>";
            $log[] = "<!-- {$filename} -->";
        }
        $lang2Link = "<a href=\"javascript:blur();\" OnClick=\"javascript:PopupLogonLang()\" style='color:{$LinkColor} !important'>{language}</a>";
        if (trim($GLOBALS["FixedLanguage"]) != null) {
            $lang2Link = null;
        }
        if ($jquery != null) {
            $jquery = "<script type=\"text/javascript\" src=\"/ressources/templates/{$template}/js/{$jquery}\"></script>";
        }
        $jslogon = "<script type=\"text/javascript\" src=\"logon.php?start=yes\"></script>";
        if ($ProductName != null) {
            $ProductName = "<input type='hidden' id='change-artica-name' value='{$ProductName}'>";
        }
        $jsArtica = $p->jsArtica();
        $js[] = "<script type=\"text/javascript\" language=\"javascript\" src=\"/js/jquery.reject.js\"></script>";
        $css[] = "<link href=\"/css/jquery.reject.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" >";
        $sock = new sockets();
        $TITLE_RESSOURCE = "ressources/templates/{$template}/TITLE";
        $favicon = $p->favicon($template);
        if ($GLOBALS["VERBOSE"]) {
            echo "replace tokens line:" . __LINE__ . "<br>\n";
        }
        if (is_file($TITLE_RESSOURCE)) {
            $title = @file_get_contents($TITLE_RESSOURCE);
            $title = str_replace("%server", $users->hostname, $title);
        } else {
            $title = $users->hostname;
        }
        $FPM = null;
        if (method_exists("templates", "parsePHPModules")) {
            $modules = $tpl2->parsePHPModules();
            $PHPVERSION = null;
            if (isset($modules["Core"]["PHP Version"])) {
                if (preg_match("#([0-9\\.]+)#", $modules["Core"]["PHP Version"], $re)) {
                    $PHPVERSION = "&nbsp;|&nbsp;PHP v.{$re[1]}";
                }
            }
            if (isset($modules["cgi-fcgi"]["php-fpm"])) {
                $FPM = " (PHP-FPM)";
            }
        }
        $WizardSavedSettings = unserialize(base64_decode($sock->GET_INFO("WizardSavedSettings")));
        $WizardSavedSettingsSend = $sock->GET_INFO("WizardSavedSettingsSend");
        $UnlockCompanyName = $sock->GET_INFO("UnlockCompanyName");
        if (!is_numeric($WizardSavedSettingsSend)) {
            $WizardSavedSettingsSend = 0;
        }
        $roundcube_uri = roundcube_uri($users);
        if ($roundcube_uri != null) {
            $miniadm = "<span style='color:{$LinkColor} !important'>&nbsp;|&nbsp;</span><a href=\"{$roundcube_uri}\" style='color:{$LinkColor};text-decoration:underline'>WebMail<a>&nbsp;";
        }
        $miniadm = $miniadm . "<span style='color:{$LinkColor}'>&nbsp;|&nbsp;</span><a href='miniadm.logon.php' style='color:{$LinkColor}'>End-User WebAccess</a>&nbsp;";
        if (!isset($WizardSavedSettings["company_name"])) {
            $WizardSavedSettings["company_name"] = null;
        }
        $company_name = $WizardSavedSettings["company_name"];
        if ($UnlockCompanyName != null) {
            $company_name = $UnlockCompanyName;
        }
        if ($company_name != null) {
            $company_name = "<center style='margin:5px;font-size:16px;padding:5px;\n\t\t\t\tborder-top:1px solid {$LinkColor};border-bottom:1px solid {$LinkColor}'>-&nbsp;{$company_name}&nbsp;-</center>";
        }
        $company_name = "<center style='margin:5px;font-size:12px;padding:5px;'>-&nbsp;{$hostname}&nbsp;-</center>{$company_name}";
        $WEBSEVERV = null;
        if (isset($_SERVER["SERVER_SOFTWARE"])) {
            if (preg_match("#Apache\\/([0-9\\.]+)#", $_SERVER["SERVER_SOFTWARE"], $re)) {
                $WEBSEVERV = "&nbsp;|&nbsp;Apache v{$re[1]}";
            }
            if (preg_match("#lighttpd\\/([0-9\\.]+)#", $_SERVER["SERVER_SOFTWARE"], $re)) {
                $WEBSEVERV = "&nbsp;|&nbsp;LigHttpd v{$re[1]}";
            }
        }
        if ($users->SQUID_INSTALLED) {
            if ($SQUIDEnable == 1) {
                if ($GLOBALS["VERBOSE"]) {
                    echo "<div style='background-color:white;color:black'>" . __LINE__ . ": SQUID INSTALLED</div>\n";
                }
                $userslogs = "<span style='color:{$LinkColor}'>&nbsp;|&nbsp;</span><a href='squid.access-sql.php' style='color:{$LinkColor}'>Proxy requests</a>&nbsp;";
                $EnableSquidUrgencyPublic = $sock->GET_INFO("EnableSquidUrgencyPublic");
                if (!is_numeric($EnableSquidUrgencyPublic)) {
                    $EnableSquidUrgencyPublic = 0;
                }
                if ($EnableSquidUrgencyPublic == 1) {
                    $urgency_mode = $tpl2->_ENGINE_parse_body("{urgency_mode}");
                    $userslogs = "<span style='color:{$LinkColor}'>&nbsp;|&nbsp;</span><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urgency.php',true);\" style='color:{$LinkColor}'>{$urgency_mode}</a>&nbsp;{$userslogs}";
                }
                if ($SSlBumpAllowLogon == 1) {
                    if (is_file("/usr/share/artica-postfix/ressources/squid/certificate.der")) {
                        $certificate = $tpl2->_ENGINE_parse_body("{certificate}");
                        $sslcert = "<span style='color:{$LinkColor}'>&nbsp;|&nbsp;</span>\n\t\t\t\t\t\t\t\t<a href='ressources/squid/certificate.der' style='color:{$LinkColor}'>\n\t\t\t\t\t\t{$certificate}</a>&nbsp;\n\t\t\t\t\t\t\t\t";
                    }
                }
            }
        } else {
            if ($GLOBALS["VERBOSE"]) {
                echo "<div style='background-color:white;color:{$LinkColor}'>" . __LINE__ . ": SQUID !!NOT!! INSTALLED</div>\n";
            }
        }
        if ($users->KAV4PROXY_INSTALLED) {
            $WEBSEVERV = "&nbsp;|&nbsp;Kav4Proxy v{$users->KAV4PROXY_VERSION}";
        }
        $ARTICAVER = @file_get_contents("VERSION") . $WEBSEVERV . $PHPVERSION . $FPM;
        $tpl = str_replace("{COPYRIGHT}", "{$lang2Link}{$miniadm}{$userslogs}{$sslcert}{$categoriesPublic}<br>{$company_name}Copyright 2003 - " . date('Y') . "&nbsp;<a href=\"{$link_company_name}\" style='color:{$LinkColor}'>{$OEM_CompanyName}</a>", $tpl);
        $tpl = str_replace("{copy-right}", "{$lang2Link}{$miniadm}{$userslogs}{$sslcert}{$categoriesPublic}<br>{$company_name}Copyright 2003 - " . date('Y') . "&nbsp;<a href=\"{$link_company_name}\" style='color:{$LinkColor}'>{$OEM_CompanyName}</a>", $tpl);
        $tpl = str_replace("{TEMPLATE_HEAD}", "<!-- HEAD TITLE: {$TITLE_RESSOURCE} -->\n{$favicon}\n{$jquery}\n{$jsArtica}\n" . @implode("\n", $js) . "\n{$jslogon}\n" . @implode("\n", $css) . "\n" . @implode("\n", $log), $tpl);
        $tpl = str_replace("{ARTICA_VERSION}", $ARTICAVER, $tpl);
        if ($SQUIDEnable == 1) {
            $tpl = str_replace("{SQUID_VERSION}", $users->SQUID_VERSION, $tpl);
        } else {
            $tpl = str_replace("{SQUID_VERSION}", null, $tpl);
        }
        $tpl = str_replace("{POSTFIX_VERSION}", $users->POSTFIX_VERSION, $tpl);
        $tpl = str_replace("{SAMBA_VERSION}", $users->SAMBA_VERSION, $tpl);
        $tpl = str_replace("{CROSSROADS_VERSION}", $users->CROSSROADS_VERSION, $tpl);
        $tpl = str_replace("{APACHE_VERSION}", $users->APACHE_VERSION, $tpl);
        if (!function_exists("ldap_connect")) {
            $tpl = str_replace("{LOGON_BUTTON}", "<span id='YouCanAnimateIt'></span><script>Loadjs('{$page}?ldap_connect=yes');</script>", $tpl);
        }
        if ($GLOBALS["VERBOSE"]) {
            echo "p->YahooBody() line:" . __LINE__ . "<br>\n";
        }
        $tpl = str_replace("{TEMPLATE_BODY_YAHOO}", $p->YahooBody(), $tpl);
        if (trim($GLOBALS["FixedLanguage"]) == null) {
            $tpl = str_replace("{TEMPLATE_LANG_LINK}", "<span id='llang-select'></span><script>LoadAjaxTiny('llang-select','{$page}?TEMPLATE_LANG_LINK=yes')</script>", $tpl);
        } else {
            $tpl = str_replace("{TEMPLATE_LANG_LINK}", null, $tpl);
        }
        $tpl = str_replace("{artica_username}", $_GET["MEM_USERNAME"], $tpl);
        $reject_browser_automation = null;
        if (isset($_GET["automation"])) {
            $reject_browser_automation = "&automation=yes";
        }
        $tpl = str_replace("{LOGON_BUTTON}", "<span id='YouCanAnimateIt'></span>\n\t\t\t<script>Loadjs('{$page}?reject-browser=yes{$reject_browser_automation}');</script><input type='hidden' id='template' value='{$template}'>{$ProductName}" . button("{login}", "SendLogonStart()", "18px"), $tpl);
        $tpl = str_replace("{TEMPLATE_TITLE_HEAD}", $title, $tpl);
        if (strpos($tpl, "{ZARAFA_VERSION") > 0) {
            $sock = new sockets();
            $tpl = str_replace("{ZARAFA_VERSION}", $sock->getFrameWork("zarafa.php?getversion=yes"), $tpl);
        }
        if (trim($GLOBALS["FixedLanguage"]) == null) {
            $tpl2->language = $DetectedLanguage;
        }
        if ($GLOBALS["VERBOSE"]) {
            echo "Langage {$tpl2->language} line:" . __LINE__ . "<br>\n";
        }
        $tpl = str_replace("User name", $tpl2->_ENGINE_parse_body("{username2}"), $tpl);
        $tpl = str_replace("Password", $tpl2->_ENGINE_parse_body("{password}"), $tpl);
        if ($GLOBALS["VERBOSE"]) {
            echo "Success return form " . strlen($tpl) . " bytes lenght<br>\n";
        }
        if ($GLOBALS["VERBOSE"]) {
            echo "Success return complete page line " . __LINE__ . "<br>\n";
        }
        return $tpl2->_ENGINE_parse_body($tpl) . "<script>//LockPage();</script>";
    }
    $html = "<html xmlns='http://www.w3.org/1999/xhtml'>\n<head>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n\t<title></title>\n\t<meta name='keywords' content=''>\n\t<meta name='description' content=\"\">\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\n\t<link href='css/styles_main.css'    rel=\"styleSheet\"  type='text/css' />\n\n\t<link href='css/styles_header.css'  rel=\"styleSheet\"  type='text/css' />\n\t<link href='css/styles_middle.css'  rel=\"styleSheet\"  type='text/css' />\n\t<link href='css/styles_tables.css'  rel=\"styleSheet\"  type='text/css' />\n\t<link href=\"css/styles_rounded.css\" rel=\"stylesheet\"  type=\"text/css\" />\n\t<!--[if lt IE 7]>\n\t<link rel='stylesheet' type='text/css' href='css/styles_ie.css' />\n\t<![endif]-->\n\t<!--[if IE 7]>\n\t<link rel='stylesheet' type='text/css' href='css/styles_ie7.css' />\n\t<![endif]-->\n\t\t<link rel=\"stylesheet\" type=\"text/css\" rel=\"styleSheet\"  href=\"ressources/templates/default/contact.css\" />\n\t\t<link rel=\"stylesheet\" type=\"text/css\" rel=\"styleSheet\"  href=\"ressources/templates/default/menus_top.css\" />\n\t\t<link href=\"css/calendar.css\" rel=\"stylesheet\" type=\"text/css\">\n\t\t<link href=\"js/jqueryFileTree.css\" rel=\"stylesheet\" type=\"text/css\">\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/uploadify.css\" />\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/artica-theme/jquery-ui-1.7.2.custom.css\" />\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.jgrowl.css\" />\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.cluetip.css\" />\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.treeview.css\" />\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/thickbox.css\" media=\"screen\"/>\n\t\t<div id='PopUpInfos' style='position:absolute'></div>\n\t\t<div id='find' style='position:absolute'></div>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"XHRConnection.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"JavaScript\" src=\"mouse.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"default.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/cookies.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery-1.6.1.min.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jqueryFileTree.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery.easing.1.3.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery-ui-1.8.custom.min.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/thickbox-compressed.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery.simplemodal-1.3.3.min.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery.jgrowl_minimized.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery.cluetip.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery.blockUI.js\"></script>\n\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"js/jquery.treeview.min.js\"></script>\n\t\t<script type='text/javascript' language='javascript' src='/js/jquery.uilock.min.js'></script>\n\t\t<script type='text/javascript' language='javascript' src='/js/jquery.blockUI.js'></script>  \n\t\t<!-- js Artica  -->\n\n\n</head>\n<body>\n<!-- LINE " . __LINE__ . " -->\t\t\n<center>\n<div style=\"width:900px;background-image:url(/css/images/{$logo_bg});background-repeat:repeat-x;background-position:center top;margin:0px;padding:0px;\">\n\t<table style=\"width:100%;margin:0px;padding:0px;border:0px;\">\n\t\t<tr>\n\t\t    <td valign=\"top\" style='padding:0px;margin:0px;border:0px;padding-top:24px'>\n\t\t\t<div style=\"height:72px\">\n\t\t\t\t<table style=\"padding:0px;margin:0px;border:0px;margin-left:-6px;\">\n\t\t\t\t<tr>\n\t\t\t   \t\t<td style='padding:0px;border:0px;' valign=\"top\" align=\"left\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<table style=\"margin:0px;border:0px;padding:0px;\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t \t\t\t\t<td style=\"margin:0px;padding:0px;background-color:{$bg_color}\" width=\"160px\">\n\n\t\t\t\t\t\t\t\t<img src='/css/images/{$logo}' style=\"margin:0px;padding:0px;\">\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style=\"margin:0px;padding:0px;\" valign=\"middle\">\n\t\t\t\t\t\t\t\t<div style=\"margin-top:-7px;padding-left:5px\"> </div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style=\"margin:0px;padding:0px;border:0px solid black\" valign=\"middle\" align='right' width=50%>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\n\t\t\t\t\t  </td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t  <td style='height:25px'>\n\t\t\t\t\t<div id='menus_2'><ul></ul></div id='menus_2'>\n\t\t\t\t </td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\n\t\t</div>\n\t\t     </td>\n\t\t  \n\t\t\t\n\t\t \n\t    \t</tr>\n\t\t<tr>\n\t\t<td valign=\"top\" colspan=2 style=\"margin:0px;padding:0px;padding-top:4px;background-color:white;\">\t\n<div id='middle'>\n\t<div id='content' style='background-color:white;'>\n\t\t<table style='width:100%'>\n\t\t\t<tr>\n\n\t\t\t\t<td valign='top' style='padding:0px;margin:0px;width:150px'>\n\t\t\t\t\t\n\t\t\t\t</td>\n\t\t\t\t<td valign='top' style='padding-left:3px'>\n\t\t\t\t\t<div id='template_users_menus'></div>\n\t\t\t\t\t<div id='BodyContentTabs'></div>\n\t\t\t\t\t\t<div id='BodyContent'>\n\t\t\t\t\t\t\t<h1 id='template_title'></h1>\n\t\t\t\t\t\t\t<!-- content -->\n\t\t\t\t\t\t\t\n\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('logon.php', '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\n</script>\n\n\n<center>\n\t<div id='loginform'></div>\n</center>\n<!-- content end -->\n\t\t\t\t\t\t</div>\n\n\t\t\t\t</td>\n\n\t\t\t\t<td valign='top'></td>\n\t\t\t</tr>\t\n\t</table>\t\n\n\t<div class='clearleft'></div>\n\t<div class='clearright'></div>\n\t</div id='content'>\n\n</div id='middle'>\n</td>\n</tr>\n<tr>\n<td valign='top' align=left colspan=2 >\n<div style='background-color:#736e6c;font-size:13px;color:{$LinkColor};height:25px;padding:0px;margin:0px;padding-top:5px;\nwidth:900px;text-align:center;margin-left:-5px;margin-bottom:-3px'>\n\n<strong>{$ProductName} Copyright 2006-" . date('Y') . "</strong>\n</div>\n</td>\n</tr>\n</table>\n</div>\n</center>\n<script>\ndocument.getElementById('loginform').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\nLoadjs('logon.php?start=yes',true);</script>\n\t\t<div id=\"SetupControl\" style='width:0;height:0'></div>\n\t\t<div id=\"dialogS\" style='width:0;height:0'></div> \n\t\t<div id=\"dialogT\" style='width:0;height:0'></div> \n\t\t<div id=\"dialog0\" style='width:0;height:0'></div> \n\t\t<div id=\"dialog1\" style='width:0;height:0'></div>\n\t\t<div id=\"dialog2\" style='width:0;height:0'></div> \n\t\t<div id=\"dialog3\" style='width:0;height:0'></div>\n\t\t<div id=\"dialog4\" style='width:0;height:0'></div>\n\t\t<div id=\"dialog5\" style='width:0;height:0'></div>\n\t\t<div id=\"dialog6\" style='width:0;height:0'></div>\n\t\t<div id=\"YahooUser\" style='width:0;height:0'></div>\n\t\t<div id=\"logsWatcher\" style='width:0;height:0'></div>\n\t\t<div id=\"WinORG\" style='width:0;height:0'></div>\n\t\t<div id=\"WinORG2\" style='width:0;height:0'></div>\n\t\t<div id=\"RTMMail\" style='width:0;height:0'></div>\n\t\t<div id=\"Browse\" style='width:0;height:0'></div>\n\t\t<div id=\"SearchUser\" style='width:0;height:0'></div>\n</body>\n</html>";
    return $html;
}