function parameters_section() { $users = new usersMenus(); $page = CurrentPageName(); $boot = new boostrap_form(); $squid = new squidbee(); if (!$users->AsSquidAdministrator) { senderror("{ERROR_NO_PRIVS}"); return; } $sock = new sockets(); $SquidReverseDefaultWebSite = $sock->GET_INFO("SquidReverseDefaultWebSite"); $SquidReverseDefaultCert = $sock->GET_INFO("SquidReverseDefaultWebSite"); $EnableFreeWeb = $sock->GET_INFO("EnableFreeWeb"); if ($SquidReverseDefaultWebSite == null) { $SquidReverseDefaultWebSite = $squid->visible_hostnameF(); } if (!is_numeric($EnableFreeWeb)) { $EnableFreeWeb = 0; } $MySQLNgnixType = $sock->GET_INFO("MySQLNgnixType"); if (!is_numeric($MySQLNgnixType)) { $MySQLNgnixType = 1; } $EnableNginxStats = $sock->GET_INFO("EnableNginxStats"); if (!is_numeric($EnableNginxStats)) { $EnableNginxStats = 0; } $TuningParameters = unserialize(base64_decode($sock->GET_INFO("MySQLNginxParams"))); $ListenPort = $TuningParameters["ListenPort"]; $MySQLNginxWorkDir = $sock->GET_INFO("MySQLNginxWorkDir"); if ($MySQLNginxWorkDir == null) { $MySQLNginxWorkDir = "/home/nginxdb"; } $EnableNginx = $sock->GET_INFO("EnableNginx"); if (!is_numeric($EnableNginx)) { $EnableNginx = 1; } $boot->set_formtitle("{global_parameters}"); $boot->set_checkbox("EnableNginx", "{enable_nginx}", "{$EnableNginx}", array("TOOLTIP" => "{enable_nginx_text}")); $boot->set_checkbox("EnableFreeWeb", "{enable_freeweb}", $EnableFreeWeb, array("TOOLTIP" => "{enable_freeweb_text}")); $boot->set_checkbox("EnableArticaInNGINX", "{ArticaWebConsoleAsFrontEnd}", "{$EnableArticaInNGINX}"); $boot->set_field("SquidReverseDefaultWebSite", "{default_website}", "{$SquidReverseDefaultWebSite}"); $sql = "SELECT CommonName FROM sslcertificates ORDER BY CommonName"; $q = new mysql(); $sslcertificates[null] = "{default}"; $results = $q->QUERY_SQL($sql, 'artica_backup'); while ($ligneZ = mysql_fetch_array($results, MYSQL_ASSOC)) { $sslcertificates[$ligneZ["CommonName"]] = $ligneZ["CommonName"]; } $boot->set_list("certificate_center", "{default_certificate}", $sslcertificates, $squid->certificate_center); $boot->set_button("{apply}"); $form = $boot->Compile(); $tpl = new templates(); $button = button($tpl->_ENGINE_parse_body("{database_statistics_wizard}"), "Loadjs('MySQLNginx.wizard.php')"); $array[1] = "{server}"; $array[2] = "{client}"; $DB[] = "\n\t<H3>{statistics_database}</H3>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='font-size:16px' width=1% nowrap>{type}:</td>\n\t\t<td style='font-size:16px;font-weight:bold'>{$array[$MySQLNgnixType]}</td>\n\t</tr>"; if ($MySQLNgnixType == 1) { $DB[] = "\n\t<tr>\n\t\t<td style='font-size:16px' width=1% nowrap>{directory}:</td>\n\t\t<td style='font-size:16px;font-weight:bold'>{$MySQLNginxWorkDir}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px' width=1% nowrap>{listen_port}:</td>\n\t\t<td style='font-size:16px;font-weight:bold'>{$ListenPort}</td>\n\t</tr>"; } else { $DB[] = "\n\t\t<tr>\n\t\t<td style='font-size:16px' width=1% nowrap>{mysqlserver}:</td>\n\t\t<td style='font-size:16px;font-weight:bold'>{$TuningParameters["username"]}@{$TuningParameters["mysqlserver"]}:{$TuningParameters["RemotePort"]}</td>\n\t\t</tr>"; } $DB[] = "<tr><td colspan=2 align='right'>{$button}</td></tr>"; $DB[] = "</table>"; $html = "<div class=form style='width:95%'>{$form}</div><div class=form style='width:95%'>" . $tpl->_ENGINE_parse_body(@implode("\n", $DB)) . "</div>"; echo $html; }
function parameters() { $users = new usersMenus(); $page = CurrentPageName(); $boot = new boostrap_form(); $squid = new squidbee(); $squid_reverse = new squid_reverse(); if (!$users->AsSquidAdministrator) { senderror("{ERROR_NO_PRIVS}"); return; } $sock = new sockets(); $SquidReverseDefaultWebSite = $sock->GET_INFO("SquidReverseDefaultWebSite"); $SquidReverseDefaultCert = $sock->GET_INFO("SquidReverseDefaultWebSite"); if ($SquidReverseDefaultWebSite == null) { $SquidReverseDefaultWebSite = $squid->visible_hostnameF(); } $boot->set_formtitle("{global_parameters}"); $boot->set_field("SquidReverseDefaultWebSite", "{default_website}", "{$SquidReverseDefaultWebSite}"); $squid_reverse = new squid_reverse(); $sslcertificates = $squid_reverse->ssl_certificates_list(); $q = new mysql(); $boot->set_list("certificate_center", "{default_certificate}", $sslcertificates, $squid->certificate_center); $boot->set_button("{apply}"); echo $boot->Compile(); }