Example #1
0
function TEMPLATE_SETTINGS()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $tpl = new templates();
    $users = new usersMenus();
    $squid = new squidbee();
    $error = null;
    $t = time();
    $button = "<hr>" . button("{save}", "Save{$t}()", 40);
    $TEMPLATE_TITLE = $_GET["TEMPLATE_TITLE"];
    $SquidTemplatesMicrosoft = intval($sock->GET_INFO("SquidTemplatesMicrosoft"));
    $SquidHTTPTemplateLanguage = $sock->GET_INFO("SquidHTTPTemplateLanguage");
    if ($SquidHTTPTemplateLanguage == null) {
        $SquidHTTPTemplateLanguage = "en";
    }
    $lang = $_GET["lang"];
    $ENABLED = 1;
    $xtpl = new template_simple("ERR_ADS_BLOCK", $SquidHTTPTemplateLanguage);
    if (!$users->CORP_LICENSE) {
        $ENABLED = 0;
        $error = "<p class=text-error>{MOD_TEMPLATE_ERROR_LICENSE}</p>";
        $button = null;
    }
    $html = "\n<div style='font-size:40px;margin-bottom:30px'>{error_page}</div>\t\n\n{$error}\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{subject}:</td>\n\t\t<td>" . Field_text("TITLE-{$t}", utf8_decode($xtpl->TITLE), "font-size:24px;width:90%") . "</td>\t\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px;vertical-align:middle'>{content}:</td>\n\t\t<td><textarea\n\t\tstyle='width:100%;height:350px;font-size:24px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\tCourier,monospace;background-color:white;color:black' id='BODY-{$t}'>" . utf8_decode($xtpl->BODY) . "</textarea>\n\t</tr>\t\n<tr>\n\t<td class=legend style='font-size:24px' width=1% nowrap>{remove_artica_version}:</td>\n\t<td width=99%>" . Field_checkbox_design("SquidADSTemplateNoVersion-{$t}", 1, $xtpl->SquidADSTemplateNoVersion) . "</td>\n</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{background_color}:</td>\n\t\t<td>" . Field_ColorPicker("SquidADSTemplateBackgroundColor-{$t}", $xtpl->SquidADSTemplateBackgroundColor, "font-size:24px;width:150px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>{font_family}:</td>\n\t<td><textarea\n\tstyle='width:100%;height:150px;font-size:24px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\tCourier,monospace;background-color:white;color:black' id='SquidADSTemplateFamily-{$t}'>{$xtpl->SquidADSTemplateFamily}</textarea>\n\t</td>\n\t</tr>\n\t<tr>\n\t<td class=legend style='font-size:24px'>{font_color}:</td>\n\t<td>" . Field_ColorPicker("SquidADSTemplateFontColor-{$t}", $xtpl->SquidADSTemplateFontColor, "font-size:24px;width:150px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:24px'>Smiley:</td>\n\t\t<td>" . Field_text("SquidADSTemplateSmiley-{$t}", $xtpl->SquidADSTemplateSmiley, "width:120px;font-size:24px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t<td colspan=2 align='right'>{$button}</td>\n\t</tr>\n<script>\n\tvar xSave{$t}=function(obj){\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue)};\n\tLoadjs('privoxy.progress.template.php');\n}\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('TEMPLATE_TITLE','ERR_ADS_BLOCK');\n\tXHR.appendData('lang','{$lang}');\n\tXHR.appendData('SquidADSTemplateFamily',document.getElementById('SquidADSTemplateFamily-{$t}').value);\n\tXHR.appendData('SquidADSTemplateBackgroundColor',document.getElementById('SquidADSTemplateBackgroundColor-{$t}').value);\n\tXHR.appendData('SquidADSTemplateFontColor',document.getElementById('SquidADSTemplateFontColor-{$t}').value);\n\tXHR.appendData('SquidADSTemplateSmiley',document.getElementById('SquidADSTemplateSmiley-{$t}').value);\n\tXHR.appendData('TITLE',encodeURIComponent(document.getElementById('TITLE-{$t}').value));\n\tXHR.appendData('BODY',encodeURIComponent(document.getElementById('BODY-{$t}').value));\n\tif(document.getElementById('SquidADSTemplateNoVersion-{$t}').checked){XHR.appendData('SquidADSTemplateNoVersion',1);}else{XHR.appendData('SquidADSTemplateNoVersion',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n\nfunction EnableForm{$t}(){\n\tvar ENABLED={$ENABLED};\n\tif(ENABLED==1){return;}\n\t\n\tdocument.getElementById('SquidADSTemplateSmiley-{$t}').disabled=true;\n\tdocument.getElementById('SquidADSTemplateFamily-{$t}').disabled=true;\n\tdocument.getElementById('SquidADSTemplateBackgroundColor-{$t}').disabled=true;\n\tdocument.getElementById('SquidADSTemplateFontColor-{$t}').disabled=true;\n\tdocument.getElementById('SquidADSTemplateNoVersion-{$t}').disabled=true;\n}\nEnableForm{$t}();\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #2
0
function Page()
{
    $ruleid = $_GET["ID"];
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $sock = new wifidog_settings($ruleid);
    $wifidog_templates = new wifidog_templates($ruleid);
    $this_feature_is_disabled_corp_license = $tpl->javascript_parse_text("{this_feature_is_disabled_corp_license}");
    $CORP = 0;
    if ($users->CORP_LICENSE) {
        $CORP = 1;
    }
    $USE_TERMS = intval($sock->GET_INFO("USE_TERMS"));
    $html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{page_size}:</td>\n\t\t<td>" . Field_text("SizePage-{$t}", $wifidog_templates->SizePage, "font-size:22px;width:230px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{margin}:</td>\n\t\t<td>" . Field_text("MarginPage-{$t}", $wifidog_templates->MarginPage, "font-size:22px;width:230px") . "</td>\n\t</tr>\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_family}:</td>\n\t\t<td>\t<textarea style='margin-top:5px;font-family:Courier New;\nfont-weight:bold;width:99%;height:40px;border:5px solid #8E8E8E;\noverflow:auto;font-size:18px !important' id='FontFamily-{$t}'>{$wifidog_templates->FontFamily}</textarea></td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_size}:</td>\n\t\t<td>" . Field_text("FontSize-{$t}", $wifidog_templates->FontSize, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{background_color}:</td>\n\t\t<td>" . Field_ColorPicker("backgroundColor-{$t}", $wifidog_templates->backgroundColor, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_color}:</td>\n\t\t<td>" . Field_ColorPicker("FontColor-{$t}", $wifidog_templates->FontColor, "font-size:22px;width:230px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{links_color}:</td>\n\t\t<td>" . Field_ColorPicker("LinksColor-{$t}", $wifidog_templates->LinksColor, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_color} ({title2}):</td>\n\t\t<td>" . Field_ColorPicker("TitleColor-{$t}", $wifidog_templates->TitleColor, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_size} ({title2}):</td>\n\t\t<td>" . Field_text("TitleFontSize-{$t}", $wifidog_templates->TitleFontSize, "font-size:22px;width:230px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_size} ({subtitle}):</td>\n\t\t<td>" . Field_text("SubTitleFontSize-{$t}", $wifidog_templates->SubTitleFontSize, "font-size:22px;width:230px") . "</td>\n\t</tr>\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_color} ({button}):</td>\n\t\t<td>" . Field_ColorPicker("ButtonFontColor-{$t}", $wifidog_templates->ButtonFontColor, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_size} (button):</td>\n\t\t<td style='font-size:22px'>" . Field_text("Button2014FontSize-{$t}", $wifidog_templates->Button2014FontSize, "font-size:22px;width:230px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{background_color} (button):</td>\n\t\t<td style='font-size:22px'>" . Field_ColorPicker("Button2014Bgcolor-{$t}", $wifidog_templates->Button2014Bgcolor, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{background_color} (button/Over):</td>\n\t\t<td style='font-size:22px'>" . Field_ColorPicker("Button2014BgcolorOver-{$t}", $wifidog_templates->Button2014BgcolorOver, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\t\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{border_color} (button):</td>\n\t\t<td style='font-size:22px'>" . Field_ColorPicker("Button2014BgcolorBorder-{$t}", $wifidog_templates->Button2014BgcolorBorder, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{spacer} ({button}):</td>\n\t\t<td style='font-size:22px'>" . Field_ColorPicker("SpacerButton-{$t}", $wifidog_templates->SpacerButton, "font-size:22px;width:230px") . "</td>\n\t</tr>\t\n\t\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_color} ({inside_form}):</td>\n\t\t<td>" . Field_ColorPicker("FormFontColor-{$t}", $wifidog_templates->FormFontColor, "font-size:22px;width:230px") . "</td>\n\t</tr>\n\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{forms_design}:</td>\n\t\t<td>\t<textarea style='margin-top:5px;font-family:Courier New;\nfont-weight:bold;width:99%;height:250px;border:5px solid #8E8E8E;\noverflow:auto;font-size:18px' id='FormStyle-{$t}'>{$wifidog_templates->FormStyle}</textarea></td>\n\t</tr>\t\n\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{FieldsStyle}:</td>\n\t\t<td>\t<textarea style='margin-top:5px;font-family:Courier New;\nfont-weight:bold;width:99%;height:250px;border:5px solid #8E8E8E;\noverflow:auto;font-size:18px' id='FieldsStyle-{$t}'>{$wifidog_templates->FieldsStyle}</textarea></td>\n\t</tr>\t\t\t\t\n\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{LegendsStyle}:</td>\n\t\t<td>\t<textarea style='margin-top:5px;font-family:Courier New;\nfont-weight:bold;width:99%;height:250px;border:5px solid #8E8E8E;\noverflow:auto;font-size:18px' id='LegendsStyle-{$t}'>{$wifidog_templates->LegendsStyle}</textarea></td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{TextErrorStyle}:</td>\n\t\t<td>\t<textarea style='margin-top:5px;font-family:Courier New;\nfont-weight:bold;width:99%;height:250px;border:5px solid #8E8E8E;\noverflow:auto;font-size:18px' id='TextErrorStyle-{$t}'>{$wifidog_templates->TextErrorStyle}</textarea></td>\n\t</tr>\t\t\n\t\n\t\n\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", "42px") . "</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\n\tvar xSave{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\t\$('#HOSTPOT_RULES').flexReload();\n\t}\t\n\t\n\tfunction Save{$t}(){\n\t\tvar CORP={$CORP};\n\t\tif(CORP==0){alert('{$this_feature_is_disabled_corp_license}');return;}\t\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\tXHR.appendData('MarginPage',encodeURIComponent(document.getElementById('MarginPage-{$t}').value));\n\t\tXHR.appendData('SizePage',encodeURIComponent(document.getElementById('SizePage-{$t}').value));\n\t\tXHR.appendData('backgroundColor',encodeURIComponent(document.getElementById('backgroundColor-{$t}').value));\n\t\tXHR.appendData('FontColor',encodeURIComponent(document.getElementById('FontColor-{$t}').value));\n\t\tXHR.appendData('TitleColor',encodeURIComponent(document.getElementById('TitleColor-{$t}').value));\n\t\tXHR.appendData('TitleFontSize',encodeURIComponent(document.getElementById('TitleFontSize-{$t}').value));\n\t\tXHR.appendData('FontFamily',encodeURIComponent(document.getElementById('FontFamily-{$t}').value)); \n\t\tXHR.appendData('FontSize',encodeURIComponent(document.getElementById('FontSize-{$t}').value));\n\t\tXHR.appendData('FormStyle',encodeURIComponent(document.getElementById('FormStyle-{$t}').value));\n\t\tXHR.appendData('FieldsStyle',encodeURIComponent(document.getElementById('FieldsStyle-{$t}').value));\n\t\tXHR.appendData('LegendsStyle',encodeURIComponent(document.getElementById('LegendsStyle-{$t}').value));\n\t\tXHR.appendData('SpacerButton',encodeURIComponent(document.getElementById('SpacerButton-{$t}').value));\n\t\tXHR.appendData('ButtonFontColor',encodeURIComponent(document.getElementById('ButtonFontColor-{$t}').value));\n\t\tXHR.appendData('SubTitleFontSize',encodeURIComponent(document.getElementById('SubTitleFontSize-{$t}').value));\n\t\tXHR.appendData('LinksColor',encodeURIComponent(document.getElementById('LinksColor-{$t}').value));\n\t\tXHR.appendData('TextErrorStyle',encodeURIComponent(document.getElementById('TextErrorStyle-{$t}').value));\n\t\tXHR.appendData('FormFontColor',encodeURIComponent(document.getElementById('FormFontColor-{$t}').value));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tXHR.appendData('Button2014FontSize',encodeURIComponent(document.getElementById('Button2014FontSize-{$t}').value));\n\t\tXHR.appendData('Button2014Bgcolor',encodeURIComponent(document.getElementById('Button2014Bgcolor-{$t}').value));\n\t\tXHR.appendData('Button2014BgcolorOver',encodeURIComponent(document.getElementById('Button2014BgcolorOver-{$t}').value));\n\t\tXHR.appendData('Button2014BgcolorBorder',encodeURIComponent(document.getElementById('Button2014BgcolorBorder-{$t}').value));\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n\t}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
function cron_index()
{
    $users = new usersMenus();
    $sock = new sockets();
    $page = CurrentPageName();
    $InterfaceFonts = $sock->GET_INFO("InterfaceFonts");
    if ($InterfaceFonts == null) {
        $InterfaceFonts = "'Lucida Grande',Arial, Helvetica, sans-serif";
    }
    $DisableWarnNotif = $sock->GET_INFO("DisableWarnNotif");
    $DisableJGrowl = $sock->GET_INFO("DisableJGrowl");
    $jgrowl_no_clamav_update = $sock->GET_INFO("jgrowl_no_clamav_update");
    $DisableFrontEndArticaEvents = $sock->GET_INFO("DisableFrontEndArticaEvents");
    $jgrowl_no_kas_update = $sock->GET_INFO("jgrowl_no_kas_update");
    $AllowShutDownByInterface = $sock->GET_INFO('AllowShutDownByInterface');
    $jGrowlMaxEvents = $sock->GET_INFO('jGrowlMaxEvents');
    $DisableToolTips = $_COOKIE["DisableToolTips"];
    $DisableHelpToolTips = $_COOKIE["DisableHelpToolTips"];
    $DisableNoOrganization = $sock->GET_INFO('DisableNoOrganization');
    $DisableAPTNews = $sock->GET_INFO('DisableAPTNews');
    $DisableWarningCalculation = $sock->GET_INFO('DisableWarningCalculation');
    $DisableFrontBrowseComputers = $sock->GET_INFO('DisableFrontBrowseComputers');
    $DisableFrontArticaMeta = $sock->GET_INFO('ArticaMetaRemoveIndex');
    $DisableJqueryDropDown = $sock->GET_INFO('DisableJqueryDropDown');
    $DisableFreeWebToolBox = $sock->GET_INFO('DisableFreeWebToolBox');
    $DisableTimeCapsuleToolBox = $sock->GET_INFO('DisableTimeCapsuleToolBox');
    $EnableWebPageDebugging = $sock->GET_INFO("EnableWebPageDebugging");
    $ArticaTabsTimeout = $sock->GET_INFO("ArticaTabsTimeout");
    $DoNotutf8EncodeJS = $sock->GET_INFO("DoNotutf8EncodeJS");
    if (!is_numeric($ArticaTabsTimeout)) {
        $ArticaTabsTimeout = 800;
    }
    //no_organization
    if (!is_numeric($DoNotutf8EncodeJS)) {
        $DoNotutf8EncodeJS = 0;
    }
    if (!is_numeric($DisableWarnNotif)) {
        $DisableWarnNotif = 0;
    }
    if ($DisableJGrowl == null) {
        $DisableJGrowl = 0;
    }
    if ($jgrowl_no_clamav_update == null) {
        $jgrowl_no_clamav_update = 0;
    }
    if ($DisableFrontEndArticaEvents == null) {
        $DisableFrontEndArticaEvents = 0;
    }
    if ($AllowShutDownByInterface == null) {
        $AllowShutDownByInterface = 0;
    }
    if ($ArticaInCgroups == null) {
        $ArticaInCgroups = 0;
    }
    if ($DisableFreeWebToolBox == null) {
        $DisableFreeWebToolBox = 0;
    }
    if ($DisableTimeCapsuleToolBox == null) {
        $DisableTimeCapsuleToolBox = 0;
    }
    if (!is_numeric($DisableJqueryDropDown)) {
        $DisableJqueryDropDown = 0;
    }
    $DoNotutf8EncodeJS = Field_checkbox_design("DoNotutf8EncodeJS", 1, $DoNotutf8EncodeJS);
    $DisableWarnNotif = Field_checkbox_design("DisableWarnNotif", 1, $DisableWarnNotif);
    $DisableJGrowl = Field_checkbox_design("DisableJGrowl", 1, $DisableJGrowl);
    $jgrowl_no_clamav_update = Field_checkbox_design("jgrowl_no_clamav_update", 1, $jgrowl_no_clamav_update);
    $DisableFrontEndArticaEvents = Field_checkbox_design("DisableFrontEndArticaEvents", 1, $DisableFrontEndArticaEvents);
    $jgrowl_no_kas_update = Field_checkbox_design("jgrowl_no_kas_update", 1, $jgrowl_no_kas_update);
    $AllowShutDownByInterface = Field_checkbox_design("AllowShutDownByInterface", 1, $AllowShutDownByInterface);
    $DisableNoOrganization = Field_checkbox_design("DisableNoOrganization", 1, $DisableNoOrganization);
    $DisableAPTNews = Field_checkbox_design("DisableAPTNews", 1, $DisableAPTNews);
    $DisableWarningCalculation = Field_checkbox_design("DisableWarningCalculation", 1, $DisableWarningCalculation);
    $DisableFrontBrowseComputers = Field_checkbox_design("DisableFrontBrowseComputers", 1, $DisableFrontBrowseComputers);
    $DisableFrontArticaMeta = Field_checkbox_design("DisableFrontArticaMeta", 1, $DisableFrontArticaMeta);
    $DisableJqueryDropDown = Field_checkbox_design("DisableJqueryDropDown", 1, $DisableJqueryDropDown);
    $DisableFreeWebToolBox = Field_checkbox_design("DisableFreeWebToolBox", 1, $DisableFreeWebToolBox);
    $DisableTimeCapsuleToolBox = Field_checkbox_design("DisableTimeCapsuleToolBox", 1, $DisableTimeCapsuleToolBox);
    $DenyMiniWebFromStandardPort = $sock->GET_INFO("DenyMiniWebFromStandardPort");
    $DisableSpecialCharacters = $sock->GET_INFO("DisableSpecialCharacters");
    if (!is_numeric($EnableWebPageDebugging)) {
        $EnableWebPageDebugging = 0;
    }
    $ForceDefaultGreenColor = $sock->GET_INFO("ForceDefaultGreenColor");
    $ForceDefaultTopBarrColor = $sock->GET_INFO("ForceDefaultTopBarrColor");
    $ForceDefaultButtonColor = $sock->GET_INFO("ForceDefaultButtonColor");
    if ($ForceDefaultGreenColor == null) {
        $ForceDefaultGreenColor = "005447";
    }
    if ($ForceDefaultTopBarrColor == null) {
        $ForceDefaultTopBarrColor = "005447";
    }
    if ($ForceDefaultButtonColor == null) {
        $ForceDefaultButtonColor = "5CB85C";
    }
    if (!is_numeric($DenyMiniWebFromStandardPort)) {
        $DenyMiniWebFromStandardPort = 0;
    }
    if (!is_numeric($DisableSpecialCharacters)) {
        $DisableSpecialCharacters = 0;
    }
    if ($jGrowlMaxEvents == null) {
        $jGrowlMaxEvents = 50;
    }
    $jgrowl_no_kas_update = "\t<tr>\n\t\t<td class=legend style='font-size:22px'>{jgrowl_no_kas_update}:</td>\n\t\t<td valign='top'>{$jgrowl_no_kas_update}</tD>\n\t</tr>\n\t<tr><td colspan=2 style='border-top:1px solid #005447'>&nbsp;</td></tr>";
    if (!$users->kas_installed) {
        $jgrowl_no_kas_update = null;
    }
    $noclamav = "\t<tr>\n\t\t<td class=legend style='font-size:22px'>{jgrowl_no_clamav_update}:</td>\n\t\t<td>{$jgrowl_no_clamav_update}</tD>\n\t</tr>\n\t<tr><td colspan=2 style='border-top:1px solid #005447'>&nbsp;</td></tr>";
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $noclamav = null;
    }
    $t = time();
    $html = "\n\t<div style='font-size:26px'>{frontend_disables_options_explain}</div>\n\t<div id='articaschedulesdiv'></div>\n\t<div id='{$t}'></div>\n\t<div style='width:98%' class=form>\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>font:</td>\n\t\t<td valign='top'>" . Field_text("InterfaceFonts", $InterfaceFonts, "font-size:22px;width:99%") . "</tD>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{background_color}:</td>\n\t\t<td valign='top'>" . Field_ColorPicker("ForceDefaultGreenColor", $ForceDefaultGreenColor, "font-size:22px;width:200px") . "</tD>\n\t</tr>\n\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{top_barr_color}:</td>\n\t\t<td valign='top'>" . Field_ColorPicker("ForceDefaultTopBarrColor", $ForceDefaultTopBarrColor, "font-size:22px;width:200px") . "</tD>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{button_color}:</td>\n\t\t<td valign='top'>" . Field_ColorPicker("ForceDefaultButtonColor", $ForceDefaultButtonColor, "font-size:22px;width:200px") . "</tD>\n\t</tr>\t\t\t\t\n\t\t\t\t\n\t<tr>\t\t\t\n\t<td colspan=2 align='right'>\n\t\t\t<hr>" . button("{apply}", "SaveArticaIndexPage2()", 28) . "\n\t\t\t\t\n\t\t</td>\n\t</tr>\t\n\t</table>\n\t</div>\n\t\n<div style='width:98%' class=form>\t\n<table style='width:100%'>\n<tr>\n\t\t<td class=legend style='font-size:22px'>{EnableWebPageDebugging}:</td>\n\t\t<td valign='top'>" . Field_checkbox_design("EnableWebPageDebugging", 1, $EnableWebPageDebugging) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable}:{icon_artica_events_front_end}:</td>\n\t\t<td valign='top'>{$DisableFrontEndArticaEvents}</tD>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{DoNotutf8EncodeJS}:</td>\n\t\t<td valign='top'>{$DoNotutf8EncodeJS}</tD>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable_jgrowl}:</td>\n\t\t<td valign='top'>{$DisableJGrowl}</tD>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{DisableJqueryDropDown}:</td>\n\t\t<td valign='top'>{$DisableJqueryDropDown}</tD>\n\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable}:{no_organization}:</td>\n\t\t<td valign='top'>{$DisableNoOrganization}</tD>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{DisableAPTNews}:</td>\n\t\t<td valign='top'>{$DisableAPTNews}</tD>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{DisableWarningCalculation}:</td>\n\t\t<td valign='top'>{$DisableWarningCalculation}</tD>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable}:{browse_computers}:</td>\n\t\t<td valign='top'>{$DisableFrontBrowseComputers}</tD>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{DisableSpecialCharacters}:</td>\n\t\t<td valign='top'>" . Field_checkbox_design("DisableSpecialCharacters", 1, $DisableSpecialCharacters) . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable}:{meta-console}:</td>\n\t\t<td valign='top'>{$DisableFrontArticaMeta}</tD>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{deny_access_from_the_standard_port}:</td>\n\t\t<td>" . Field_checkbox_design("DenyMiniWebFromStandardPort", 1, $DenyMiniWebFromStandardPort, "DenyMiniWebFromStandardPortCheck()") . "</td>\n\t</tr>\t\t\n\t\t \n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{ArticaTabsTimeout}:</td>\n\t\t<td valign='top' style='font-size:22px'>" . Field_text("ArticaTabsTimeout", $ArticaTabsTimeout, "font-size:22px;width:110px") . "&nbsp;Ms</tD>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{jGrowlMaxEvents}:</td>\n\t\t<td valign='top'>" . Field_text("jGrowlMaxEvents", $jGrowlMaxEvents, "font-size:22px;width:110px") . "</tD>\n\t</tr>\t\n\t\n{$noclamav}\n{$jgrowl_no_kas_update}\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{enable_shutdown_interface}:</td>\n\t\t<td valign='top'>{$AllowShutDownByInterface}</tD>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable_tooltips}:</td>\n\t\t<td valign='top'>" . Field_checkbox_design("DisableToolTips", 1, $DisableToolTips, "DisableToolTipsSave()") . "</tD>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable_help_tooltips}:</td>\n\t\t<td valign='top'>" . Field_checkbox_design("DisableHelpToolTips", 1, $DisableHelpToolTips, "DisableToolTipsSave()") . "</tD>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable_freewebs_toolbox}:</td>\n\t\t<td valign='top'>{$DisableFreeWebToolBox}</tD>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{disable_TimeCapsule_toolbox}:</td>\n\t\t<td valign='top'>{$DisableTimeCapsuleToolBox}</tD>\n\t</tr>\t\n\t\n\t<tr>\t\t\t\n\t<td colspan=2 align='right'>\n\t\t\t<hr>" . button("{apply}", "SaveArticaIndexPage{$t}()", 36) . "\n\t\t\t\t\n\t\t</td>\n\t</tr>\n</table>\n</div>\n\n\n<script>\n\tfunction DisableToolTipsSave(){\n\t\tvar DisableToolTips=0;\n\t\tvar DisableHelpToolTips=0;\n\t\tif(document.getElementById('DisableToolTips').checked){ DisableToolTips=1;}\n\t\tif(document.getElementById('DisableHelpToolTips').checked){ DisableHelpToolTips=1;}\n\t\tSet_Cookie('DisableToolTips', DisableToolTips, '3600', '/', '', '');\n\t\tSet_Cookie('DisableHelpToolTips', DisableHelpToolTips, '3600', '/', '', '');\n\t\tCacheOff();\n\t\n\t}\n\t\n\tvar x_SaveArticaIndexPage2= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\treloadStylesheets();\n\t}\t\n\n\t\n\tvar xSaveArticaIndexPage{$t}=function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\tif(results.length>0){alert(results);}\n\t\tCacheOff();\n\t}\t\n\t\n\t \n\tfunction SaveArticaIndexPage2(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('InterfaceFonts',document.getElementById('InterfaceFonts').value);\n\t\tXHR.appendData('ForceDefaultButtonColor',document.getElementById('ForceDefaultButtonColor').value);\n\t\tXHR.appendData('ForceDefaultGreenColor',document.getElementById('ForceDefaultGreenColor').value);\n\t\tXHR.appendData('ForceDefaultTopBarrColor',document.getElementById('ForceDefaultTopBarrColor').value);\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveArticaIndexPage2);\n\t\t\n\t}\n\nfunction SaveArticaIndexPage{$t}(){\n\tvar XHR = new XHRConnection();\n\t\n\tif(document.getElementById('DisableWarnNotif')){\n\t\tif(document.getElementById('DisableWarnNotif').checked){XHR.appendData('DisableWarnNotif',1);}else{XHR.appendData('DisableWarnNotif',0);}\n\t}\n\tif(document.getElementById('DisableJGrowl').checked){XHR.appendData('DisableJGrowl',1);}else{XHR.appendData('DisableJGrowl',0);}\n\tif(document.getElementById('DisableFrontEndArticaEvents').checked){XHR.appendData('DisableFrontEndArticaEvents',1);}else{XHR.appendData('DisableFrontEndArticaEvents',0);}\n\tif(document.getElementById('AllowShutDownByInterface').checked){XHR.appendData('AllowShutDownByInterface',1);}else{XHR.appendData('AllowShutDownByInterface',0);}\t\n\tif(document.getElementById('DisableNoOrganization').checked){XHR.appendData('DisableNoOrganization',1);}else{XHR.appendData('DisableNoOrganization',0);}\n\tif(document.getElementById('DisableAPTNews').checked){XHR.appendData('DisableAPTNews',1);}else{XHR.appendData('DisableAPTNews',0);}\n\tif(document.getElementById('DisableWarningCalculation').checked){XHR.appendData('DisableWarningCalculation',1);}else{XHR.appendData('DisableWarningCalculation',0);}\n\tif(document.getElementById('DisableFrontBrowseComputers').checked){XHR.appendData('DisableFrontBrowseComputers',1);}else{XHR.appendData('DisableFrontBrowseComputers',0);}\n\tif(document.getElementById('DisableFrontArticaMeta').checked){XHR.appendData('DisableFrontArticaMeta',1);}else{XHR.appendData('DisableFrontArticaMeta',0);}\n\tif(document.getElementById('DisableJqueryDropDown').checked){XHR.appendData('DisableJqueryDropDown',1);}else{XHR.appendData('DisableJqueryDropDown',0);}\n\tif(document.getElementById('DisableTimeCapsuleToolBox').checked){XHR.appendData('DisableTimeCapsuleToolBox',1);}else{XHR.appendData('DisableTimeCapsuleToolBox',0);}\n\tif(document.getElementById('DisableFreeWebToolBox').checked){XHR.appendData('DisableFreeWebToolBox',1);}else{XHR.appendData('DisableFreeWebToolBox',0);}\n\tif(document.getElementById('EnableWebPageDebugging').checked){XHR.appendData('EnableWebPageDebugging',1);}else{XHR.appendData('EnableWebPageDebugging',0);}\n\tif(document.getElementById('DisableSpecialCharacters').checked){XHR.appendData('DisableSpecialCharacters',1);}else{XHR.appendData('DisableSpecialCharacters',0);}\n\tif(document.getElementById('DenyMiniWebFromStandardPort').checked){XHR.appendData('DenyMiniWebFromStandardPort',1);}else{XHR.appendData('DenyMiniWebFromStandardPort',0);}\n\tif(document.getElementById('DoNotutf8EncodeJS').checked){XHR.appendData('DoNotutf8EncodeJS',1);}else{XHR.appendData('DoNotutf8EncodeJS',0);}\n\t\n\t\n\t\n\t\n\tAnimateDiv('{$t}');\n\n\t\n\n\t\n\tif(document.getElementById('jgrowl_no_kas_update')){\n\t\tif(document.getElementById('jgrowl_no_kas_update').checked){\n\t\t\tXHR.appendData('jgrowl_no_kas_update',1);}else{\n\t\t\tXHR.appendData('jgrowl_no_kas_update',0);\n\t\t}\n\t}\n\t\n\tif(document.getElementById('jgrowl_no_clamav_update')){\t\n\t\t\tif(document.getElementById('jgrowl_no_clamav_update').checked){\n\t\t\tXHR.appendData('jgrowl_no_clamav_update',1);}\n\t\t\telse{XHR.appendData('jgrowl_no_clamav_update',0);\n\t\t\t}\n\t}\n\t\n\tXHR.appendData('ArticaTabsTimeout',document.getElementById('ArticaTabsTimeout').value);\n\tXHR.appendData('jGrowlMaxEvents',document.getElementById('jGrowlMaxEvents').value);\n\tXHR.sendAndLoad('{$page}', 'GET',xSaveArticaIndexPage{$t});\n\t\n}\n\t\n</script>\n\n\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "RTMMailConfig.php");
}
function page()
{
    $sock = new sockets();
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $t = time();
    $ArticaHotSpotSMTP = unserialize(base64_decode($sock->GET_INFO("ArticaHotSpotSMTP")));
    if (trim($ArticaHotSpotSMTP["SKIN_FONT_SIZE"]) == null) {
        $ArticaHotSpotSMTP["SKIN_FONT_SIZE"] = "22px";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_BUTTON_SIZE"]) == null) {
        $ArticaHotSpotSMTP["SKIN_BUTTON_SIZE"] = "32px";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_FONT_FAMILY"] == null)) {
        $ArticaHotSpotSMTP["SKIN_FONT_FAMILY"] = "Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_FONT_COLOR"]) == null) {
        $ArticaHotSpotSMTP["SKIN_FONT_COLOR"] = "000000";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_BACKGROUND_COLOR"]) == null) {
        $ArticaHotSpotSMTP["SKIN_BACKGROUND_COLOR"] = "263849";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_BUTTON_BG_COLOR"]) == null) {
        $ArticaHotSpotSMTP["SKIN_BUTTON_BG_COLOR"] = "5CB85C";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_BUTTON_BD_COLOR"]) == null) {
        $ArticaHotSpotSMTP["SKIN_BUTTON_BD_COLOR"] = "398439";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_BUTTON_TXT_COLOR"]) == null) {
        $ArticaHotSpotSMTP["SKIN_BUTTON_TXT_COLOR"] = "FFFFFF";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_BUTTON_BG_COLOR_HOVER"]) == null) {
        $ArticaHotSpotSMTP["SKIN_BUTTON_BG_COLOR_HOVER"] = "47A447";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_CONTENT_WIDTH"]) == null) {
        $ArticaHotSpotSMTP["SKIN_CONTENT_WIDTH"] = "485px";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_CONTENT_HEIGHT"]) == null) {
        $ArticaHotSpotSMTP["SKIN_CONTENT_HEIGHT"] = "221px";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_CONTENT_BG_COLOR"]) == null) {
        $ArticaHotSpotSMTP["SKIN_CONTENT_BG_COLOR"] = null;
    }
    if (trim($ArticaHotSpotSMTP["SKIN_LABEL_FONT_SIZE"]) == null) {
        $ArticaHotSpotSMTP["SKIN_LABEL_FONT_SIZE"] = "10pt";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_TEXT_LOGON"]) == null) {
        $ArticaHotSpotSMTP["SKIN_TEXT_LOGON"] = null;
    }
    if (trim($ArticaHotSpotSMTP["SKIN_LINK_COLOR"]) == null) {
        $ArticaHotSpotSMTP["SKIN_LINK_COLOR"] = "000000";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_COMPANY_NAME"]) == null) {
        $ArticaHotSpotSMTP["SKIN_COMPANY_NAME"] = null;
    }
    if (trim($ArticaHotSpotSMTP["SKIN_COMPANY_NAME_FONT_SIZE"]) == null) {
        $ArticaHotSpotSMTP["SKIN_COMPANY_NAME_FONT_SIZE"] = "15px";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_COMPANY_NAME_FONT_COLOR"]) == null) {
        $ArticaHotSpotSMTP["SKIN_COMPANY_NAME_FONT_COLOR"] = "FFFFFF";
    }
    if (!is_numeric($ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_TOP"])) {
        $ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_TOP"] = "50";
    }
    if (!is_numeric($ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_HEIGHT"])) {
        $ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_HEIGHT"] = "0";
    }
    if (!is_numeric($ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_WIDTH"])) {
        $ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_WIDTH"] = "401";
    }
    if (trim($ArticaHotSpotSMTP["SKIN_COMPANY_LOGO"]) == null) {
        $ArticaHotSpotSMTP["SKIN_COMPANY_LOGO"] = "logo-hotspot.png";
    }
    $licenseerror = $tpl->javascript_parse_text("{this_feature_is_disabled_corp_license}");
    $license_error = "<p class=text-error>{this_feature_is_disabled_corp_license}</p>";
    $license = 0;
    if ($users->CORP_LICENSE) {
        $button = button("{apply}", "SaveHotSpot{$t}()", 26);
        $license_error = null;
        $license = 1;
    }
    $html = "{$license_error}<div class=form style='width:98%'>\n\t\t\t<center style='background-color:#CCCCCC'><img src='img/{$ArticaHotSpotSMTP["SKIN_COMPANY_LOGO"]}' style='margin:20px'></center>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{picture}/logo:</td>\n\t\t\t<td style='font-size:16px'>" . button("{upload}", "Loadjs('squid.webauth.tweaks.upload.php')", 26) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{picture} {top_position}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_COMPANY_LOGO_TOP", $ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_TOP"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{picture} {height}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_COMPANY_LOGO_HEIGHT", $ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_HEIGHT"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{picture} {width}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_COMPANY_LOGO_WIDTH", $ArticaHotSpotSMTP["SKIN_COMPANY_LOGO_WIDTH"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{fontsize}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_FONT_SIZE", $ArticaHotSpotSMTP["SKIN_FONT_SIZE"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{links_color}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_LINK_COLOR", $ArticaHotSpotSMTP["SKIN_LINK_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{label} {fontsize}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_LABEL_FONT_SIZE", $ArticaHotSpotSMTP["SKIN_LABEL_FONT_SIZE"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\t\n\t\t\t\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{buttons_size}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_BUTTON_SIZE", $ArticaHotSpotSMTP["SKIN_BUTTON_SIZE"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{background_color} (button):</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_BUTTON_BG_COLOR", $ArticaHotSpotSMTP["SKIN_BUTTON_BG_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{background_color} (button/Over):</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_BUTTON_BG_COLOR_HOVER", $ArticaHotSpotSMTP["SKIN_BUTTON_BG_COLOR_HOVER"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\t\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{border_color} (button):</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_BUTTON_BD_COLOR", $ArticaHotSpotSMTP["SKIN_BUTTON_BD_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{font_color} (button):</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_BUTTON_TXT_COLOR", $ArticaHotSpotSMTP["SKIN_BUTTON_TXT_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{logon_message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SKIN_TEXT_LOGON'>{$ArticaHotSpotSMTP["SKIN_TEXT_LOGON"]}</textarea>\n\t\t</td>\n\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{font_family}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_FONT_FAMILY", $ArticaHotSpotSMTP["SKIN_FONT_FAMILY"], "font-size:22px;width:350px") . "</td>\n\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{font_color}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_FONT_COLOR", $ArticaHotSpotSMTP["SKIN_FONT_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{background_color}:</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_BACKGROUND_COLOR", $ArticaHotSpotSMTP["SKIN_BACKGROUND_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{windows_content} ({width}):</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_CONTENT_WIDTH", $ArticaHotSpotSMTP["SKIN_CONTENT_WIDTH"], "font-size:22px;width:150px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{windows_content} ({height}):</td>\n\t\t\t<td style='font-size:16px'>" . Field_text("SKIN_CONTENT_HEIGHT", $ArticaHotSpotSMTP["SKIN_CONTENT_HEIGHT"], "font-size:22px;width:150px") . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{background_color} ({windows_content}):</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_CONTENT_BG_COLOR", $ArticaHotSpotSMTP["SKIN_CONTENT_BG_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{footer_message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SKIN_COMPANY_NAME'>{$ArticaHotSpotSMTP["SKIN_COMPANY_NAME"]}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{fontsize} ({footer_message}):</td>\n\t\t<td style='font-size:16px'>" . Field_text("SKIN_COMPANY_NAME_FONT_SIZE", $ArticaHotSpotSMTP["SKIN_COMPANY_NAME_FONT_SIZE"], "font-size:22px;width:100px") . "</td>\n\t</tr>\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{font_color} ({footer_message}):</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_COMPANY_NAME_FONT_COLOR", $ArticaHotSpotSMTP["SKIN_COMPANY_NAME_FONT_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{background_color} ({footer_message}):</td>\n\t\t\t<td style='font-size:16px'>" . Field_ColorPicker("SKIN_COMPANY_NAME_BG_COLOR", $ArticaHotSpotSMTP["SKIN_COMPANY_NAME_BG_COLOR"], "font-size:22px;width:100px") . "</td>\n\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>{$button}</td>\n\t\t</tr>\t\t\t\t\t\n\t</table>\n\t</div>\n<script>\n\tvar x_SaveHotSpot{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t}\n\t\n\n\t\nfunction SaveHotSpot{$t}(){\n\tvar license={$license};\n\tif(license==0){ alert('{$licenseerror}');return;}\n\tvar XHR = new XHRConnection();\n\t\n\t\n\tXHR.appendData('SKIN_FONT_SIZE',document.getElementById('SKIN_FONT_SIZE').value);\n\tXHR.appendData('SKIN_BUTTON_SIZE',document.getElementById('SKIN_BUTTON_SIZE').value);\n\tXHR.appendData('SKIN_FONT_FAMILY',document.getElementById('SKIN_FONT_FAMILY').value);\n\tXHR.appendData('SKIN_FONT_COLOR',document.getElementById('SKIN_FONT_COLOR').value);\n\tXHR.appendData('SKIN_BACKGROUND_COLOR',document.getElementById('SKIN_BACKGROUND_COLOR').value);\n\tXHR.appendData('SKIN_BUTTON_BG_COLOR',document.getElementById('SKIN_BUTTON_BG_COLOR').value);\n\tXHR.appendData('SKIN_BUTTON_BD_COLOR',document.getElementById('SKIN_BUTTON_BD_COLOR').value);\n\tXHR.appendData('SKIN_BUTTON_BG_COLOR_HOVER',document.getElementById('SKIN_BUTTON_BG_COLOR_HOVER').value);\n\t\n\tXHR.appendData('SKIN_CONTENT_WIDTH',document.getElementById('SKIN_CONTENT_WIDTH').value);\n\tXHR.appendData('SKIN_CONTENT_HEIGHT',document.getElementById('SKIN_CONTENT_HEIGHT').value);\n\tXHR.appendData('SKIN_CONTENT_BG_COLOR',document.getElementById('SKIN_CONTENT_BG_COLOR').value);\n\tXHR.appendData('SKIN_LABEL_FONT_SIZE',document.getElementById('SKIN_LABEL_FONT_SIZE').value);\n\tXHR.appendData('SKIN_TEXT_LOGON',document.getElementById('SKIN_TEXT_LOGON').value);\n\tXHR.appendData('SKIN_LINK_COLOR',document.getElementById('SKIN_LINK_COLOR').value);\n\tXHR.appendData('SKIN_COMPANY_NAME',document.getElementById('SKIN_COMPANY_NAME').value);\n\tXHR.appendData('SKIN_COMPANY_NAME_FONT_SIZE',document.getElementById('SKIN_COMPANY_NAME_FONT_SIZE').value);\n\tXHR.appendData('SKIN_COMPANY_NAME_FONT_COLOR',document.getElementById('SKIN_COMPANY_NAME_FONT_COLOR').value);\n\tXHR.appendData('SKIN_COMPANY_LOGO_TOP',document.getElementById('SKIN_COMPANY_LOGO_TOP').value);\n\tXHR.appendData('SKIN_COMPANY_LOGO_HEIGHT',document.getElementById('SKIN_COMPANY_LOGO_HEIGHT').value);\n\tXHR.appendData('SKIN_COMPANY_LOGO_WIDTH',document.getElementById('SKIN_COMPANY_LOGO_WIDTH').value);\n\t\n\t\n\t\n\tXHR.sendAndLoad('{$page}', 'POST',x_SaveHotSpot{$t});\n}\n\n\n</script>\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #5
0
function skin(){
	$page=CurrentPageName();
	$sock=new sockets();
	$tpl=new templates();
	$users=new usersMenus();
	$error=null;
	$UFDBGUARD_TITLE_1=null;
	$UFDBGUARD_TITLE_2=null;
	$UFDBGUARD_PARA1=null;
	$UFDBGUARD_PARA2=null;
	$UfdbGuardHTTPNoVersion=0;
	$UfdbGuardHTTPBackgroundColor="#8c1919";
	$UfdbGuardHTTPFamily="Calibri, Candara, Segoe, \"Segoe UI\", Optima, Arial, sans-serif";
	$UfdbGuardHTTPFontColor="#FFFFFF";
	
	$UfdbGuardHTTPEnablePostmaster=1;
	$UfdbGuardHTTPNoVersion=intval($sock->GET_INFO("UfdbGuardHTTPNoVersion"));
	$UfdbGuardHTTPBackgroundColor=$sock->GET_INFO("UfdbGuardHTTPBackgroundColor");
	$UfdbGuardHTTPBackgroundColorBLK=$sock->GET_INFO("UfdbGuardHTTPBackgroundColorBLK");
	$UfdbGuardHTTPBackgroundColorBLKBT=$sock->GET_INFO("UfdbGuardHTTPBackgroundColorBLKBT");
	$UfdbGuardHTTPDisableHostname=intval($sock->GET_INFO("UfdbGuardHTTPDisableHostname"));
	
	
	#0300AC
	
	$UFDBGUARD_TITLE_1=$sock->GET_INFO("UFDBGUARD_TITLE_1");
	$UFDBGUARD_PARA1=$sock->GET_INFO("UFDBGUARD_PARA1");
	$UFDBGUARD_TITLE_2=$sock->GET_INFO("UFDBGUARD_TITLE_2");
	$UFDBGUARD_PARA2=$sock->GET_INFO("UFDBGUARD_PARA2");
	if($UFDBGUARD_TITLE_1==null){$UFDBGUARD_TITLE_1="{UFDBGUARD_TITLE_1}";}
	if($UFDBGUARD_PARA1==null){$UFDBGUARD_PARA1="{UFDBGUARD_PARA1}";}
	if($UFDBGUARD_PARA2==null){$UFDBGUARD_PARA2="{UFDBGUARD_PARA2}";}
	if($UFDBGUARD_TITLE_2==null){$UFDBGUARD_TITLE_2="{UFDBGUARD_TITLE_2}";}
	$UfdbGuardHTTPEnablePostmaster=$sock->GET_INFO("UfdbGuardHTTPEnablePostmaster");
	
	if(!is_numeric($UfdbGuardHTTPEnablePostmaster)){$UfdbGuardHTTPEnablePostmaster=1;}
	if($UfdbGuardHTTPBackgroundColor==null){$UfdbGuardHTTPBackgroundColor="#8c1919";}
	if($UfdbGuardHTTPBackgroundColorBLK==null){$UfdbGuardHTTPBackgroundColorBLK="#0300AC";}
	if($UfdbGuardHTTPBackgroundColorBLKBT==null){$UfdbGuardHTTPBackgroundColorBLKBT="#625FFD";}
	
	
	
	if($UfdbGuardHTTPFamily==null){$UfdbGuardHTTPFamily="Calibri, Candara, Segoe, \"Segoe UI\", Optima, Arial, sans-serif";}
	
	$t=time();
	$button="<hr>".button("{apply}", "Save$t()",32);
	
	if(!$users->CORP_LICENSE){
		$error="<p class=text-error>{MOD_TEMPLATE_ERROR_LICENSE}</p>";
		$button=null;
	}
	
	$html="$error<div style='width:98%' class=form>
	<table style='width:100%'>
	<tr>
		<td class=legend style='font-size:22px' width=1% nowrap>{remove_proxy_hostname}:</td>
		<td width=99%>". Field_checkbox("UfdbGuardHTTPDisableHostname-$t",1,$UfdbGuardHTTPDisableHostname)."</td>		
	</tr>	
	<tr>
		<td class=legend style='font-size:22px' width=1% nowrap>{remove_artica_version}:</td>
		<td width=99%>". Field_checkbox("UfdbGuardHTTPNoVersion-$t",1,$UfdbGuardHTTPNoVersion)."</td>		
	</tr>
	<tr>
		<td class=legend style='font-size:22px'>{add_webmaster}:</td>
		<td>". Field_checkbox("UfdbGuardHTTPEnablePostmaster-$t",1,$UfdbGuardHTTPEnablePostmaster)."</td>		
	</tr>				
	<tr>
		<td class=legend style='font-size:22px'>{background_color}:</td>
		<td>".Field_ColorPicker("UfdbGuardHTTPBackgroundColor-$t",$UfdbGuardHTTPBackgroundColor,"font-size:22px;width:150px")."</td>
	</tr>
	<tr>
		<td class=legend style='font-size:22px'>{background_color} Unlock Page:</td>
		<td>".Field_ColorPicker("UfdbGuardHTTPBackgroundColorBLK-$t",$UfdbGuardHTTPBackgroundColorBLK,"font-size:22px;width:150px")."</td>
	</tr>	
	<tr>
		<td class=legend style='font-size:22px'>{background_color} Button - Unlock Page:</td>
		<td>".Field_ColorPicker("UfdbGuardHTTPBackgroundColorBLKBT-$t",$UfdbGuardHTTPBackgroundColorBLKBT,"font-size:22px;width:150px")."</td>
	</tr>	
	
	<tr>
		<td class=legend style='font-size:22px'>{font_family}:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='UfdbGuardHTTPFamily-$t'>$UfdbGuardHTTPFamily</textarea>
		</td>
	</tr>
	<tr>
		<td class=legend style='font-size:22px'>{font_color}:</td>
		<td>".Field_ColorPicker("UfdbGuardHTTPFontColor-$t",$UfdbGuardHTTPFontColor,"font-size:22px;width:150px")."</td>
	</tr>
	
	
	<tr>
		<td class=legend style='font-size:22px'>{titletext} 1:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='UFDBGUARD_TITLE_1-$t'>$UFDBGUARD_TITLE_1</textarea>
		</td>
	</tr>
	<tr>
		<td class=legend style='font-size:22px'>{parapgraph} 1:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='UFDBGUARD_PARA1-$t'>$UFDBGUARD_PARA1</textarea>
		</td>
	</tr>	
	<tr>
		<td class=legend style='font-size:22px'>{titletext} 2:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='UFDBGUARD_TITLE_2-$t'>$UFDBGUARD_TITLE_2</textarea>
		</td>
	</tr>
	<tr>
		<td class=legend style='font-size:22px'>{parapgraph} 2:</td>
		<td><textarea 
			style='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",
			Courier,monospace;background-color:white;color:black' id='UFDBGUARD_PARA2-$t'>$UFDBGUARD_PARA2</textarea>
		</td>
	</tr>	
	<tr>
	<td colspan=2 align='right'>$button</td>
	</tr>	
<script>
var xSave$t=function(obj){
		var tempvalue=obj.responseText;
		if(tempvalue.length>3){alert(tempvalue)};
		RefreshTab('main_squidguardweb_error_pages'); 
	}

	function Save$t(){
     var XHR = new XHRConnection();
     XHR.appendData('CATEGORY','0');
     XHR.appendData('UFDBGUARD_TITLE_1',encodeURIComponent(document.getElementById('UFDBGUARD_TITLE_1-$t').value));
     XHR.appendData('UFDBGUARD_PARA1',encodeURIComponent(document.getElementById('UFDBGUARD_PARA1-$t').value));
     XHR.appendData('UFDBGUARD_PARA2',encodeURIComponent(document.getElementById('UFDBGUARD_PARA2-$t').value));
     XHR.appendData('UFDBGUARD_TITLE_2',encodeURIComponent(document.getElementById('UFDBGUARD_TITLE_2-$t').value));
     XHR.appendData('UfdbGuardHTTPFamily',document.getElementById('UfdbGuardHTTPFamily-$t').value);
     XHR.appendData('UfdbGuardHTTPBackgroundColor',document.getElementById('UfdbGuardHTTPBackgroundColor-$t').value);
     XHR.appendData('UfdbGuardHTTPBackgroundColorBLK',document.getElementById('UfdbGuardHTTPBackgroundColorBLK-$t').value);
     XHR.appendData('UfdbGuardHTTPBackgroundColorBLKBT',document.getElementById('UfdbGuardHTTPBackgroundColorBLKBT-$t').value);
     XHR.appendData('UfdbGuardHTTPDisableHostname',document.getElementById('UfdbGuardHTTPDisableHostname-$t').value);
     
     
     
     XHR.appendData('UfdbGuardHTTPFontColor',document.getElementById('UfdbGuardHTTPFontColor-$t').value);
	 if(document.getElementById('UfdbGuardHTTPNoVersion-$t').checked){XHR.appendData('UfdbGuardHTTPNoVersion',1);}else{XHR.appendData('UfdbGuardHTTPNoVersion',0);}
     if(document.getElementById('UfdbGuardHTTPEnablePostmaster-$t').checked){XHR.appendData('UfdbGuardHTTPEnablePostmaster',1);}else{XHR.appendData('UfdbGuardHTTPEnablePostmaster',0);}

     XHR.sendAndLoad('$page', 'POST',xSave$t);     	
	
	}
</script>	
";
	
echo $tpl->_ENGINE_parse_body($html);
	
}
Example #6
0
function skin_design()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $tpl = new templates();
    $users = new usersMenus();
    $t = time();
    $error = null;
    if ($_GET["zmd5"] == null) {
        echo FATAL_ERROR_SHOW_128("MD5 key is null!");
        return;
    }
    $q = new mysql_squid_builder();
    $sql = "SELECT * FROM webauth_rules WHERE `zmd5`='{$_GET["zmd5"]}'";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
    if (!$q->ok) {
        echo $q->mysql_error_html();
    }
    $UfdbGuardHTTPNoVersion = $ligne["UfdbGuardHTTPNoVersion"];
    $UfdbGuardHTTPBackgroundColor = $ligne["UfdbGuardHTTPBackgroundColor"];
    $UfdbGuardHTTPFamily = $ligne["UfdbGuardHTTPFamily"];
    $UfdbGuardHTTPFontColor = $ligne["UfdbGuardHTTPFontColor"];
    $UFDBGUARD_TITLE_1 = $ligne["UFDBGUARD_TITLE_1"];
    $UFDBGUARD_PARA1 = $ligne["UFDBGUARD_PARA1"];
    $UFDBGUARD_TITLE_2 = $ligne["UFDBGUARD_TITLE_2"];
    $UFDBGUARD_PARA2 = $ligne["UFDBGUARD_PARA2"];
    $UfdbGuardHTTPEnablePostmaster = $ligne["UfdbGuardHTTPEnablePostmaster"];
    $UfdbGuardHTTPBackgroundColorBLK = $ligne["UfdbGuardHTTPBackgroundColorBLK"];
    $UfdbGuardHTTPBackgroundColorBLKBT = $ligne["UfdbGuardHTTPBackgroundColorBLKBT"];
    $UfdbGuardHTTPDisableHostname = intval($ligne["UfdbGuardHTTPDisableHostname"]);
    $UFDBGUARD_UNLOCK_LINK = $ligne["UFDBGUARD_UNLOCK_LINK"];
    $UFDBGUARD_TICKET_LINK = $ligne["UFDBGUARD_TICKET_LINK"];
    $TICKET_TEXT = $ligne["TICKET_TEXT"];
    $TICKET_TEXT_SUCCESS = $ligne["TICKET_TEXT_SUCCESS"];
    if ($UFDBGUARD_TITLE_1 == null) {
        $UFDBGUARD_TITLE_1 = "{UFDBGUARD_TITLE_1}";
    }
    if ($UFDBGUARD_PARA1 == null) {
        $UFDBGUARD_PARA1 = "{UFDBGUARD_PARA1}";
    }
    if ($UFDBGUARD_PARA2 == null) {
        $UFDBGUARD_PARA2 = "{UFDBGUARD_PARA2}";
    }
    if ($UFDBGUARD_TITLE_2 == null) {
        $UFDBGUARD_TITLE_2 = "{UFDBGUARD_TITLE_2}";
    }
    if (!is_numeric($UfdbGuardHTTPEnablePostmaster)) {
        $UfdbGuardHTTPEnablePostmaster = 1;
    }
    if ($UfdbGuardHTTPBackgroundColor == null) {
        $UfdbGuardHTTPBackgroundColor = "#8c1919";
    }
    if ($UfdbGuardHTTPBackgroundColorBLK == null) {
        $UfdbGuardHTTPBackgroundColorBLK = "#0300AC";
    }
    if ($UfdbGuardHTTPBackgroundColorBLKBT == null) {
        $UfdbGuardHTTPBackgroundColorBLKBT = "#625FFD";
    }
    if ($UfdbGuardHTTPFontColor == null) {
        $UfdbGuardHTTPFontColor = "#FFFFFF";
    }
    if ($TICKET_TEXT == null) {
        $TICKET_TEXT = "{ufdb_ticket_text}";
    }
    if ($TICKET_TEXT_SUCCESS == null) {
        $TICKET_TEXT_SUCCESS = "{ufdb_ticket_text_success}";
    }
    if ($UfdbGuardHTTPFamily == null) {
        $UfdbGuardHTTPFamily = "Calibri, Candara, Segoe, \"Segoe UI\", Optima, Arial, sans-serif";
    }
    $button = "<hr>" . button("{apply}", "Save{$t}()", 32);
    if (!$users->CORP_LICENSE) {
        $error = "<p class=text-error>{MOD_TEMPLATE_ERROR_LICENSE}</p>";
        $button = null;
    }
    $html = "{$error}<div style='width:98%' class=form>\n<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px' width=1% nowrap>{remove_proxy_hostname}:</td>\n\t\t<td width=99%>" . Field_checkbox_design("UfdbGuardHTTPDisableHostname-{$t}", 1, $UfdbGuardHTTPDisableHostname) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px' width=1% nowrap>{remove_artica_version}:</td>\n\t\t<td width=99%>" . Field_checkbox_design("UfdbGuardHTTPNoVersion-{$t}", 1, $UfdbGuardHTTPNoVersion) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{add_webmaster}:</td>\n\t\t<td>" . Field_checkbox_design("UfdbGuardHTTPEnablePostmaster-{$t}", 1, $UfdbGuardHTTPEnablePostmaster) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{background_color}:</td>\n\t\t<td>" . Field_ColorPicker("UfdbGuardHTTPBackgroundColor-{$t}", $UfdbGuardHTTPBackgroundColor, "font-size:22px;width:150px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{background_color} Unlock Page:</td>\n\t\t<td>" . Field_ColorPicker("UfdbGuardHTTPBackgroundColorBLK-{$t}", $UfdbGuardHTTPBackgroundColorBLK, "font-size:22px;width:150px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{background_color} Button - Unlock Page:</td>\n\t\t<td>" . Field_ColorPicker("UfdbGuardHTTPBackgroundColorBLKBT-{$t}", $UfdbGuardHTTPBackgroundColorBLKBT, "font-size:22px;width:150px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_family}:</td>\n\t\t<td><textarea\n\t\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\t\tCourier,monospace;background-color:white;color:black' id='UfdbGuardHTTPFamily-{$t}'>{$UfdbGuardHTTPFamily}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{font_color}:</td>\n\t\t<td>" . Field_ColorPicker("UfdbGuardHTTPFontColor-{$t}", $UfdbGuardHTTPFontColor, "font-size:22px;width:150px") . "</td>\n\t</tr>\n\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{titletext} 1:</td>\n\t\t<td><textarea\n\t\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\t\tCourier,monospace;background-color:white;color:black' id='UFDBGUARD_TITLE_1-{$t}'>{$UFDBGUARD_TITLE_1}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{parapgraph} 1:</td>\n\t\t<td><textarea\n\t\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\t\tCourier,monospace;background-color:white;color:black' id='UFDBGUARD_PARA1-{$t}'>{$UFDBGUARD_PARA1}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{titletext} 2:</td>\n\t\t<td><textarea\n\t\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\t\tCourier,monospace;background-color:white;color:black' id='UFDBGUARD_TITLE_2-{$t}'>{$UFDBGUARD_TITLE_2}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{parapgraph} 2:</td>\n\t\t<td><textarea\n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='UFDBGUARD_PARA2-{$t}'>{$UFDBGUARD_PARA2}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{submit_ticket_text}:</td>\n\t\t<td><textarea\n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='TICKET_TEXT-{$t}'>{$TICKET_TEXT}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{submit_ticket_text} ({success}):</td>\n\t\t<td><textarea\n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='TICKET_TEXT_SUCCESS-{$t}'>{$TICKET_TEXT_SUCCESS}</textarea>\n\t\t</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{UFDBGUARD_UNLOCK_LINK}:</td>\n\t\t<td>" . Field_text("UFDBGUARD_UNLOCK_LINK-{$t}", $UFDBGUARD_UNLOCK_LINK, "font-size:22px;width:100%") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{UFDBGUARD_TICKET_LINK}:</td>\n\t\t<td>" . Field_text("UFDBGUARD_TICKET_LINK-{$t}", $UFDBGUARD_TICKET_LINK, "font-size:22px;width:100%") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 align='right'>{$button}</td>\n\t</tr>\n\t<script>\n\t\tvar xSave{$t}=function(obj){\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue);return;};\n\t\t\tRefreshTab('ERROR_PAGE_SKIN_TAB');\n\t\t}\n\n\t\tfunction Save{$t}(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('zmd5','{$_GET["zmd5"]}');\n\t\t\tXHR.appendData('UFDBGUARD_TITLE_1',encodeURIComponent(document.getElementById('UFDBGUARD_TITLE_1-{$t}').value));\n\t\t\tXHR.appendData('UFDBGUARD_TITLE_2',encodeURIComponent(document.getElementById('UFDBGUARD_TITLE_2-{$t}').value));\n\t\t\tXHR.appendData('UFDBGUARD_PARA1',encodeURIComponent(document.getElementById('UFDBGUARD_PARA1-{$t}').value));\n\t\t\tXHR.appendData('UFDBGUARD_PARA2',encodeURIComponent(document.getElementById('UFDBGUARD_PARA2-{$t}').value));\n\t\t\tXHR.appendData('UFDBGUARD_UNLOCK_LINK',encodeURIComponent(document.getElementById('UFDBGUARD_UNLOCK_LINK-{$t}').value));\n\t\t\tXHR.appendData('UFDBGUARD_TICKET_LINK',encodeURIComponent(document.getElementById('UFDBGUARD_TICKET_LINK-{$t}').value));\n\t\t\tXHR.appendData('TICKET_TEXT',encodeURIComponent(document.getElementById('TICKET_TEXT-{$t}').value));\n\t\t\tXHR.appendData('TICKET_TEXT_SUCCESS',encodeURIComponent(document.getElementById('TICKET_TEXT_SUCCESS-{$t}').value));\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tXHR.appendData('UfdbGuardHTTPFamily',document.getElementById('UfdbGuardHTTPFamily-{$t}').value);\n\t\t\tXHR.appendData('UfdbGuardHTTPBackgroundColor',document.getElementById('UfdbGuardHTTPBackgroundColor-{$t}').value);\n\t\t\tXHR.appendData('UfdbGuardHTTPBackgroundColorBLK',document.getElementById('UfdbGuardHTTPBackgroundColorBLK-{$t}').value);\n\t\t\tXHR.appendData('UfdbGuardHTTPBackgroundColorBLKBT',document.getElementById('UfdbGuardHTTPBackgroundColorBLKBT-{$t}').value);\n\t\t\tXHR.appendData('UfdbGuardHTTPDisableHostname',document.getElementById('UfdbGuardHTTPDisableHostname-{$t}').value);\n\t\t\tXHR.appendData('UfdbGuardHTTPFontColor',document.getElementById('UfdbGuardHTTPFontColor-{$t}').value);\n\t\t\tif(document.getElementById('UfdbGuardHTTPNoVersion-{$t}').checked){XHR.appendData('UfdbGuardHTTPNoVersion',1);}else{XHR.appendData('UfdbGuardHTTPNoVersion',0);}\n\t\t\tif(document.getElementById('UfdbGuardHTTPEnablePostmaster-{$t}').checked){XHR.appendData('UfdbGuardHTTPEnablePostmaster',1);}else{XHR.appendData('UfdbGuardHTTPEnablePostmaster',0);}\n     \t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\n\t}\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
function general_settings()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $tpl = new templates();
    $users = new usersMenus();
    $squid = new squidbee();
    $error = null;
    $LicenseInfos = unserialize(base64_decode($sock->GET_INFO("LicenseInfos")));
    $WizardSavedSettings = unserialize(base64_decode($sock->GET_INFO("WizardSavedSettings")));
    if ($LicenseInfos["EMAIL"] == null) {
        $LicenseInfos["EMAIL"] = $WizardSavedSettings["mail"];
    }
    if ($LicenseInfos["EMAIL"] == null) {
        $LicenseInfos["EMAIL"] = "*****@*****.**";
    }
    $LicenseInfos["EMAIL"] = str_replace("'", "", $LicenseInfos["EMAIL"]);
    $LicenseInfos["EMAIL"] = str_replace('"', "", $LicenseInfos["EMAIL"]);
    $LicenseInfos["EMAIL"] = str_replace(' ', "", $LicenseInfos["EMAIL"]);
    $SquidHTTPTemplateNoVersion = 0;
    $SquidHTTPTemplateBackgroundColor = "#8c1919";
    $SquidHTTPTemplateFamily = "Calibri, Candara, Segoe, \"Segoe UI\", Optima, Arial, sans-serif";
    $SquidHTTPTemplateFontColor = "#FFFFFF";
    $SquidHTTPTemplateEnablePostmaster = 1;
    $SquidHTTPTemplateNoVersion = intval($sock->GET_INFO("SquidHTTPTemplateNoVersion"));
    $SquidHTTPTemplateBackgroundColor = $sock->GET_INFO("SquidHTTPTemplateBackgroundColor");
    $SquidHTTPTemplateBackgroundColorBLK = $sock->GET_INFO("SquidHTTPTemplateBackgroundColorBLK");
    $SquidHTTPTemplateBackgroundColorBLKBT = $sock->GET_INFO("SquidHTTPTemplateBackgroundColorBLKBT");
    $SquidHTTPTemplateDisableHostname = intval($sock->GET_INFO("SquidHTTPTemplateDisableHostname"));
    $SquidHTTPTemplateEnablePostmaster = $sock->GET_INFO("SquidHTTPTemplateEnablePostmaster");
    $SquidHTTPTemplateLanguage = $sock->GET_INFO("SquidHTTPTemplateLanguage");
    if ($SquidHTTPTemplateLanguage == null) {
        $SquidHTTPTemplateLanguage = "en-us";
    }
    $SquidHTTPTemplateFontColor = $sock->GET_INFO("SquidHTTPTemplateFontColor");
    $SquidHTTPTemplateFamily = $sock->GET_INFO("SquidHTTPTemplateFamily");
    if ($SquidHTTPTemplateFontColor == null) {
        $SquidHTTPTemplateFontColor = "#FFFFFF";
    }
    if ($SquidHTTPTemplateBackgroundColor == null) {
        $SquidHTTPTemplateBackgroundColor = "#8c1919";
    }
    if ($SquidHTTPTemplateBackgroundColorBLK == null) {
        $SquidHTTPTemplateBackgroundColorBLK = "#0300AC";
    }
    if ($SquidHTTPTemplateBackgroundColorBLKBT == null) {
        $SquidHTTPTemplateBackgroundColorBLKBT = "#625FFD";
    }
    if ($SquidHTTPTemplateFamily == null) {
        $SquidHTTPTemplateFamily = "Calibri, Candara, Segoe, \"Segoe UI\", Optima, Arial, sans-serif";
    }
    if (!is_numeric($SquidHTTPTemplateEnablePostmaster)) {
        $SquidHTTPTemplateEnablePostmaster = 1;
    }
    $cache_mgr_user = $sock->GET_INFO("cache_mgr_user");
    $t = time();
    $button = "<hr>" . button("{apply}", "Loadjs('squid.templates.single.progress.php')", 32) . "&nbsp;&nbsp;|&nbsp;&nbsp;" . button("{save}", "Save{$t}()", 32);
    $LICENSE = 1;
    if (!$users->CORP_LICENSE) {
        $LICENSE = 0;
        $error = "<p class=text-error>{MOD_TEMPLATE_ERROR_LICENSE}</p>";
        $cache_mgr_user = $LicenseInfos["EMAIL"];
        $button = null;
    }
    if ($cache_mgr_user == null) {
        $cache_mgr_user = $LicenseInfos["EMAIL"];
    }
    $languages = unserialize(@file_get_contents("/usr/share/artica-postfix/ressources/databases/squid.default.templates.db"));
    while (list($lang, $line) = each($languages)) {
        if ($lang == "templates") {
            continue;
        }
        $flang[$lang] = "{$lang}";
    }
    $xtpl = new template_simple();
    reset($xtpl->arrayxLangs);
    while (list($lang, $xarr) = each($xtpl->arrayxLangs)) {
        while (list($index, $z) = each($xarr)) {
            unset($flang[$z]);
        }
    }
    $flang[null] = "{not_defined}";
    $flang[$SquidHTTPTemplateLanguage] = $SquidHTTPTemplateLanguage;
    unset($flang["templates"]);
    ksort($flang);
    $html = "{$error}\n<div class=explain style='font-size:22px'>{simple_template_gene_explain}</div>\n<div style='width:98%' class=form>\n<table style='width:100%'>\n<tr>\n\t<td class=legend style='font-size:22px' width=1% nowrap>{postmaster}:</td>\n\t<td width=99%>" . Field_text("cache_mgr_user-{$t}", $cache_mgr_user, "font-size:22px;width:80%") . "</td>\n</tr>\n<tr>\n\t<td class=legend style='font-size:22px' width=1% nowrap>{language}:</td>\n\t<td width=99%>" . Field_array_Hash($flang, "SquidHTTPTemplateLanguage-{$t}", $SquidHTTPTemplateLanguage, "style:font-size:22px") . "</td>\n</tr>\n<tr>\n\t<td class=legend style='font-size:22px' width=1% nowrap>{remove_artica_version}:</td>\n\t<td width=99%>" . Field_checkbox_design("SquidHTTPTemplateNoVersion-{$t}", 1, $SquidHTTPTemplateNoVersion) . "</td>\n</tr>\n<tr>\n\t<td class=legend style='font-size:22px'>{background_color}:</td>\n\t<td>" . Field_ColorPicker("SquidHTTPTemplateBackgroundColor-{$t}", $SquidHTTPTemplateBackgroundColor, "font-size:22px;width:150px") . "</td>\n</tr>\n<tr>\n\t<td class=legend style='font-size:22px'>{font_family}:</td>\n\t<td><textarea\n\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\tCourier,monospace;background-color:white;color:black' id='SquidHTTPTemplateFamily-{$t}'>{$SquidHTTPTemplateFamily}</textarea>\n\t</td>\n</tr>\n<tr>\n\t<td class=legend style='font-size:22px'>{font_color}:</td>\n\t<td>" . Field_ColorPicker("SquidHTTPTemplateFontColor-{$t}", $SquidHTTPTemplateFontColor, "font-size:22px;width:150px") . "</td>\n</tr>\n\t\n\t\n<tr>\n<tr>\n\t<td colspan=2 align='right' style='font-size:40px'>{$button}</td>\n</tr>\n<script>\n\tvar xSave{$t}=function(obj){\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue)};\n\t\tRefreshTab('main_squidguardweb_error_pages');\n\t}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('TEMPLATE_DEFAULT','1');\n\tXHR.appendData('cache_mgr_user',document.getElementById('cache_mgr_user-{$t}').value);\n\tXHR.appendData('SquidHTTPTemplateLanguage',document.getElementById('SquidHTTPTemplateLanguage-{$t}').value);\n\tXHR.appendData('SquidHTTPTemplateFamily',document.getElementById('SquidHTTPTemplateFamily-{$t}').value);\n\tXHR.appendData('SquidHTTPTemplateBackgroundColor',document.getElementById('SquidHTTPTemplateBackgroundColor-{$t}').value);\n\tXHR.appendData('SquidHTTPTemplateFontColor',document.getElementById('SquidHTTPTemplateFontColor-{$t}').value);\n\tif(document.getElementById('SquidHTTPTemplateNoVersion-{$t}').checked){XHR.appendData('SquidHTTPTemplateNoVersion',1);}else{XHR.appendData('SquidHTTPTemplateNoVersion',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n\n\nfunction CheckForm{$t}(){\n\tvar lic={$LICENSE};\n\tif(lic==0){\n\t\tdocument.getElementById('cache_mgr_user-{$t}').disabled=true;\n\t\tdocument.getElementById('SquidHTTPTemplateLanguage-{$t}').disabled=true;\n\t\tdocument.getElementById('SquidHTTPTemplateFamily-{$t}').disabled=true;\n\t\tdocument.getElementById('SquidHTTPTemplateBackgroundColor-{$t}').disabled=true;\n\t\tdocument.getElementById('SquidHTTPTemplateFontColor-{$t}').disabled=true;\n\t\tdocument.getElementById('SquidHTTPTemplateNoVersion-{$t}').disabled=true;\n\t}\n}\nCheckForm{$t}();\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}