function popup_options() { $page = CurrentPageName(); $sock = new sockets(); $t = time(); $php5FuncOverloadSeven = $sock->GET_INFO("php5FuncOverloadSeven"); $php5DefaultCharset = $sock->GET_INFO("php5DefaultCharset"); $php5UploadMaxFileSize = $sock->GET_INFO("php5UploadMaxFileSize"); $php5PostMaxSize = $sock->GET_INFO("php5PostMaxSize"); $php5MemoryLimit = $sock->GET_INFO("php5MemoryLimit"); $SessionPathInMemory = trim($sock->GET_INFO("SessionPathInMemory")); $php5FuncOverloadSeven = Field_checkbox("php5FuncOverloadSeven{$t}", 1, $php5FuncOverloadSeven); $DisableMagicQuotesGpc = $sock->GET_INFO("php5DisableMagicQuotesGpc"); $DisableMagicQuotesGpc = Field_checkbox("php5DisableMagicQuotesGpc{$t}", 1, $DisableMagicQuotesGpc); $timezone_def = trim($sock->GET_INFO('timezones')); $SSLStrictSNIVHostCheck = $sock->GET_INFO("SSLStrictSNIVHostCheck"); $SSLStrictSNIVHostCheck = Field_checkbox("SSLStrictSNIVHostCheck{$t}", 1, $SSLStrictSNIVHostCheck); $EnableRRDGraphFunction = $sock->GET_INFO("EnableRRDGraphFunction"); if (!is_numeric($EnableRRDGraphFunction)) { $EnableRRDGraphFunction = 1; } $EnableRRDGraphFunction = Field_checkbox("EnableRRDGraphFunction", 1, $EnableRRDGraphFunction, "EnableRRDGraphFunctionCheck()"); $EnablePHPFPM = intval($sock->GET_INFO("EnablePHPFPM")); $EnablePHPFPMFrameWork = $sock->GET_INFO("EnablePHPFPMFrameWork"); $EnableArticaApachePHPFPM = $sock->GET_INFO("EnableArticaApachePHPFPM"); $EnablePHPFPMFreeWeb = $sock->GET_INFO("EnablePHPFPMFreeWeb"); $CleanPHPSessionTime = $sock->GET_INFO("CleanPHPSessionTime"); if (!is_numeric($CleanPHPSessionTime)) { $CleanPHPSessionTime = 2880; } if (!is_numeric($EnablePHPFPMFrameWork)) { $EnablePHPFPMFrameWork = 0; } if (!is_numeric($EnableArticaApachePHPFPM)) { $EnableArticaApachePHPFPM = 0; } if (!is_numeric($EnablePHPFPMFreeWeb)) { $EnablePHPFPMFreeWeb = 0; } if (trim($timezone_def) == null) { $timezone_def = "Europe/Berlin"; } if (!is_numeric($php5UploadMaxFileSize)) { $php5UploadMaxFileSize = 256; } if (!is_numeric($php5PostMaxSize)) { $php5PostMaxSize = 128; } if (!is_numeric($php5MemoryLimit)) { $php5MemoryLimit = 500; } if (!is_numeric($SessionPathInMemory)) { $SessionPathInMemory = 0; } $timezone = timezonearray(); for ($i = 0; $i < count($timezone); $i++) { $array[$timezone[$i]] = $timezone[$i]; } $html = "\n\t<div id='php5div'></div>\n\t<div style='width=95%' class=form>\n\t<table >\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{CleanPHPSessionTime}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("CleanPHPSessionTime{$t}", $CleanPHPSessionTime, "font-size:16px;padding:3px;width:110px") . " {minutes}</td>\n\t\t<td width=1%>" . help_icon("{CleanPHPSessionTime_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{php5FuncOverloadSeven}:</td>\n\t\t<td valign='top'>{$php5FuncOverloadSeven}</td>\n\t\t<td width=1%>" . help_icon("{php5FuncOverloadSeven_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{DisableMagicQuotesGpc}:</td>\n\t\t<td valign='top'>{$DisableMagicQuotesGpc}</td>\n\t\t<td width=1%>" . help_icon("{DisableMagicQuotesGpc_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{SSLStrictSNIVHostCheck}:</td>\n\t\t<td valign='top'>{$SSLStrictSNIVHostCheck}</td>\n\t\t<td width=1%>" . help_icon("{SSLStrictSNIVHostCheck_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnableRRDGraphFunction}:</td>\n\t\t<td valign='top'>{$EnableRRDGraphFunction}</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>Default charset:</td>\n\t\t<td valign='top'>" . Field_array_Hash(Charsets(), "php5DefaultCharset{$t}", $php5DefaultCharset, null, null, "style:font-size:16px;padding:3px") . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{timezone}:</td>\n\t\t<td valign='top'>" . Field_array_Hash($array, "timezones{$t}", $timezone_def, null, null, "style:font-size:16px;padding:3px") . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{php5UploadMaxFileSize}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("php5UploadMaxFileSize{$t}", $php5UploadMaxFileSize, "font-size:16px;padding:3px;width:60px") . " MB</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\n\t\n\t\n\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{php5PostMaxSize}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("php5PostMaxSize{$t}", $php5PostMaxSize, "font-size:16px;padding:3px;width:60px") . " MB</td>\n\t\t<td width=1%> </td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{php5MemoryLimit}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("php5MemoryLimit{$t}", $php5MemoryLimit, "font-size:16px;padding:3px;width:60px") . " MB</td>\n\t\t<td width=1%> </td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{SessionPathInMemory}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_text("SessionPathInMemory{$t}", $SessionPathInMemory, "font-size:16px;padding:3px;width:60px") . " MB</td>\n\t\t<td width=1%>" . help_icon("{SessionPathInMemory_explain}") . "</td>\n\t</tr>\n\n\t\t<tr><td colspan=3><span style='font-size:22px'>PHP-FPM</td></tr>\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnablePHPFPM}:</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_checkbox("EnablePHPFPM-{$t}", 1, $EnablePHPFPM, "EnablePHPFPMCheck{$t}()") . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnablePHPFPM} ( Framework ):</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_checkbox("EnablePHPFPMFrameWork-{$t}", 1, $EnablePHPFPMFrameWork) . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnablePHPFPM} ( Web console ):</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_checkbox("EnableArticaApachePHPFPM-{$t}", 1, $EnableArticaApachePHPFPM) . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td style='font-size:16px;vertical-align:top' class=legend nowrap>{EnablePHPFPM} ( FreeWeb ):</td>\n\t\t<td valign='top' style='font-size:16px;'>" . Field_checkbox("EnablePHPFPMFreeWeb-{$t}", 1, $EnablePHPFPMFreeWeb) . "</td>\n\t\t<td width=1%> </td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t<hr>" . button('{apply}', "SavePHP5AdvancedSettings{$t}()", 22) . "\n\t\t\n\t\t</td>\n\t</tr> \n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar x_SavePHP5AdvancedSettings{$t}=function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>2){alert(results);}\n\t\tRefreshTab('main_config_jsweb');\n\t\t}\t\n\t\n\t\n\tfunction SavePHP5AdvancedSettings{$t}(){\n \tvar XHR = new XHRConnection();\n \tvar php5DisableMagicQuotesGpc='';\n \tvar SSLStrictSNIVHostCheck='';\n \tvar EnableRRDGraphFunction=1;\n \tvar EnablePHPFPM=0;\n \tvar EnablePHPFPMFrameWork=0;\n \tvar EnableArticaApachePHPFPM=0;\n \tvar EnablePHPFPMFreeWeb=0;\n \tif(document.getElementById('php5DisableMagicQuotesGpc{$t}').checked){php5DisableMagicQuotesGpc=1;}else{php5DisableMagicQuotesGpc=0;}\n\t\tif(document.getElementById('php5FuncOverloadSeven{$t}').checked){php5FuncOverloadSeven=1;}else{php5FuncOverloadSeven=0;}\n\t\tif(document.getElementById('SSLStrictSNIVHostCheck{$t}').checked){SSLStrictSNIVHostCheck=1;}else{SSLStrictSNIVHostCheck=0;}\n\t\tif(document.getElementById('EnableRRDGraphFunction').checked){EnableRRDGraphFunction=1;}else{EnableRRDGraphFunction=0;}\n\t\t\n\t\tif(document.getElementById('EnablePHPFPM-{$t}').checked){EnablePHPFPM=1;}else{EnablePHPFPM=0;}\n\t\tif(document.getElementById('EnablePHPFPMFrameWork-{$t}').checked){EnablePHPFPMFrameWork=1;}else{EnablePHPFPMFrameWork=0;}\n\t\tif(document.getElementById('EnableArticaApachePHPFPM-{$t}').checked){EnableArticaApachePHPFPM=1;}else{EnableArticaApachePHPFPM=0;}\n\t\tif(document.getElementById('EnablePHPFPMFreeWeb-{$t}').checked){EnablePHPFPMFreeWeb=1;}else{EnablePHPFPMFreeWeb=0;}\n\t\t\n\t\tXHR.appendData('EnablePHPFPM',EnablePHPFPM);\n\t\tXHR.appendData('EnablePHPFPMFrameWork',EnablePHPFPMFrameWork);\n\t\tXHR.appendData('EnableArticaApachePHPFPM',EnableArticaApachePHPFPM);\n\t\tXHR.appendData('EnablePHPFPMFreeWeb',EnablePHPFPMFreeWeb);\n\t\t\n\t\t\n\t\tXHR.appendData('CleanPHPSessionTime',document.getElementById('CleanPHPSessionTime{$t}').value);\n\t\tXHR.appendData('php5DefaultCharset',document.getElementById('php5DefaultCharset{$t}').value);\n\t\tXHR.appendData('php5UploadMaxFileSize',document.getElementById('php5UploadMaxFileSize{$t}').value);\n\t\tXHR.appendData('php5PostMaxSize',document.getElementById('php5PostMaxSize{$t}').value);\n\t\tXHR.appendData('php5MemoryLimit',document.getElementById('php5MemoryLimit{$t}').value);\n\t\tXHR.appendData('php5DisableMagicQuotesGpc',php5DisableMagicQuotesGpc);\n\t\tXHR.appendData('php5FuncOverloadSeven',php5FuncOverloadSeven);\t\t\t\t\n\t\tXHR.appendData('SSLStrictSNIVHostCheck',SSLStrictSNIVHostCheck);\n\t\tXHR.appendData('EnableRRDGraphFunction',EnableRRDGraphFunction);\n\t\tXHR.appendData('timezones',document.getElementById('timezones{$t}').value);\n\t\tXHR.appendData('SessionPathInMemory',document.getElementById('SessionPathInMemory{$t}').value);\n\t\t\n\t\t\n \tXHR.sendAndLoad('{$page}', 'POST',x_SavePHP5AdvancedSettings{$t});\n\t}\n\t\n\tvar x_EnableRRDGraphFunctionCheck=function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>2){alert(results);}\n\t\tdocument.getElementById('php5div').innerHTML='';\n\t\t}\t\t\n\t\n\tfunction EnableRRDGraphFunctionCheck(){\n\t\tvar EnableRRDGraphFunction=0;\n\t\tif(document.getElementById('EnableRRDGraphFunction').checked){EnableRRDGraphFunction=1;}\n\t\tvar XHR = new XHRConnection();\n\t\tAnimateDiv('php5div');\n\t\tXHR.appendData('unik-EnableRRDGraphFunction',EnableRRDGraphFunction);\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_EnableRRDGraphFunctionCheck);\n\t\n\t}\n\t\n\tfunction EnablePHPFPMCheck{$t}(){\n\t\tdocument.getElementById('EnablePHPFPMFrameWork-{$t}').disabled=true;\n\t\tdocument.getElementById('EnableArticaApachePHPFPM-{$t}').disabled=true;\n\t\tdocument.getElementById('EnablePHPFPMFreeWeb-{$t}').disabled=true;\n\t\t\n\t\t\n\t\n\t\n\t\tif(document.getElementById('EnablePHPFPM-{$t}').checked){\n\t\t\tdocument.getElementById('EnablePHPFPMFrameWork-{$t}').disabled=false;\n\t\t\tdocument.getElementById('EnableArticaApachePHPFPM-{$t}').disabled=false;\n\t\t\tdocument.getElementById('EnablePHPFPMFreeWeb-{$t}').disabled=false;\n\t\t}\n\t\n\t}\n\t\n\t EnablePHPFPMCheck{$t}();\n\t</script>\t\n"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function setup_2() { if ($GLOBALS["VERBOSE"]) { echo "<span style='color:#d32d2d'>[" . __LINE__ . "] setup_2()</span><br>\n"; } $GLOBALS["DEBUG_TEMPLATE"] = true; include_once dirname(__FILE__) . "/ressources/class.langages.inc"; if ($GLOBALS["VERBOSE"]) { echo "<span style='color:#d32d2d'>[" . __LINE__ . "] articaLang()</span><br>\n"; } $langAutodetect = new articaLang(); $DetectedLanguage = $langAutodetect->get_languages(); $GLOBALS["FIXED_LANGUAGE"] = $DetectedLanguage; $savedsettings = unserialize(base64_decode($_GET["savedsettings"])); $setup_proxy = 0; $tpl = new templates(); $page = CurrentPageName(); $sock = new sockets(); $users = new usersMenus(); if ($GLOBALS["VERBOSE"]) { echo "<span style='color:#d32d2d'>[" . __LINE__ . "] OK</span><br>\n"; } $netbiosname_field = $tpl->javascript_parse_text("{netbiosname}"); $domain_field = $tpl->javascript_parse_text("{domain}"); if (count($savedsettings) < 3) { if ($GLOBALS["VERBOSE"]) { echo "<span style='color:#d32d2d'>[" . __LINE__ . "] network.php?fqdn=yes</span><br>\n"; } $hostname = base64_decode($sock->getFrameWork("network.php?fqdn=yes")); if ($hostname == null) { $users = new usersMenus(); $hostname = $users->fqdn; } $arrayNameServers = GetNamesServers(); if (strpos($hostname, '.') > 0) { $Thostname = explode(".", $hostname); $netbiosname = $Thostname[0]; unset($Thostname[0]); $domainname = @implode(".", $Thostname); } else { $netbiosname = $hostname; } if (preg_match("#[A-Za-z]+\\s+[A-Za-z]+#", $netbiosname)) { $netbiosname = null; } } else { $netbiosname = $savedsettings["netbiosname"]; $domainname = $savedsettings["domain"]; $arrayNameServers[0] = $savedsettings["DNS1"]; $arrayNameServers[1] = $savedsettings["DNS2"]; } if ($netbiosname == null) { $hostname = base64_decode($sock->getFrameWork("network.php?fqdn=yes")); if ($hostname == null) { $users = new usersMenus(); $hostname = $users->fqdn; } if (strpos($hostname, '.') > 0) { $Thostname = explode(".", $hostname); $netbiosname = $Thostname[0]; unset($Thostname[0]); $domainname = @implode(".", $Thostname); } else { $netbiosname = $hostname; } } if ($arrayNameServers[0] == null) { $arrayNameServers = GetNamesServers(); } $SetupAD = 0; if ($users->SQUID_INSTALLED) { if ($users->SAMBA_INSTALLED) { $SetupAD = 1; } } if ($users->SQUID_INSTALLED) { $setup_proxy = 1; if ($users->SQUID_REVERSE_APPLIANCE) { $setup_proxy = 0; $proxy = "<input type='hidden' id='proxy_listen_port' value='80' name='proxy_listen_port'>"; } } $dhcpd = null; $SERVICES_TITLE = null; //FIRST_WIZARD_NIC2 -> fini -> demande de reboot $t = time(); $IPADDR = $savedsettings["IPADDR"]; $NETMASK = $savedsettings["NETMASK"]; $GATEWAY = $savedsettings["GATEWAY"]; $metric = $savedsettings["metric"]; $BROADCAST = $savedsettings["BROADCAST"]; $KEEPNET = $savedsettings["KEEPNET"]; $NIC = $savedsettings["NIC"]; $VPS_COMPATIBLE = $savedsettings["VPS_COMPATIBLE"]; $nic = new system_nic("eth0"); if ($IPADDR == null) { $IPADDR = $nic->IPADDR; } if ($NETMASK == null) { $NETMASK = $nic->NETMASK; } if ($GATEWAY == null) { $GATEWAY = $nic->GATEWAY; } if ($BROADCAST == null) { $BROADCAST = $nic->BROADCAST; } if ($metric == null) { $metric = $nic->metric; } if (!is_numeric($metric)) { $metric = 100; } if ($metric < 2) { $metric = 100; } $DISABLED = false; if (trim($arrayNameServers[1]) == null) { $arrayNameServers[1] = "8.8.8.8"; } if (!is_numeric($KEEPNET)) { $KEEPNET = 0; } $NICS = new networking(); $Local_interfaces = $NICS->Local_interfaces(true); if (count($Local_interfaces) == 0) { $error = FATAL_ERROR_SHOW_128("{unable_to_retreive_network_information_refresh}"); } $timezone = timezonearray(); for ($i = 0; $i < count($timezone); $i++) { $arrayTime[$timezone[$i]] = $timezone[$i]; } $timezone_def = getLocalTimezone(); $FORM = "{$error}\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td colspan=2 style='font-size:50px;'><div style='margin-bottom:35px'>{serveretdom}</div></td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:25px;vertical-align:top' nowrap>{timezone}:</td>\n\t\t<td valign='top'>" . Field_array_Hash($arrayTime, "timezones", $timezone_def, null, null, "style:font-size:25px;padding:3px") . "</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:25px' nowrap>{netbiosname}:</td>\n\t\t<td>" . Field_text("hostname_netbios", $netbiosname, "font-size:25px;width:220px", null, null, null, false, "ChangeQuickHostnameCheck(event)") . "</td>\n\t</tr>\n\t</tr>\n\t\t<td class=legend style='font-size:25px' nowrap>{DomainOfThisserver}:</td>\n\t\t<td>" . Field_text("hostname_domain", $domainname, "font-size:25px;width:220px", null, null, null, false, "ChangeQuickHostnameCheck(event)") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 style='font-size:50px;padding-top:50px'>{network}</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 style='font-size:18px;font-weight:bolder'><div style='margin-bottom:35px'>{network_settings_will_be_applied_after_reboot}</div></td>\n\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:25px' nowrap>{keep_current_settings}:</td>\n\t\t\t<td>" . Field_checkbox("KEEPNET", 1, $KEEPNET, 'KeepNetCheck()') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:25px' nowrap>{VPS_COMPATIBLE}:</td>\n\t\t\t<td>" . Field_checkbox("VPS_COMPATIBLE", 1, $VPS_COMPATIBLE, '') . "</td>\n\t\t</tr>\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:25px' nowrap>{network_interface}:</td>\n\t\t\t<td>" . Field_array_Hash($Local_interfaces, "NIC", "{$NIC}", "ChangeWizardNetInterfaces()", null, 0, "padding:3px;font-size:25px") . "</td>\n\t\t</tr>\n\t</table>\n\t<br>\n\t<span id='INTERFACES_OBJECTS'>\t\n\t<table style='width:100%'>\t\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:25px' nowrap>{tcp_address}:</td>\n\t\t\t<td>" . field_ipv4("IPADDR", $IPADDR, 'padding:3px;font-size:25px', null, null, null, false, null, $DISABLED) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:25px'>{netmask}:</td>\n\t\t\t<td>" . field_ipv4("NETMASK", $NETMASK, 'padding:3px;font-size:25px', null, null, null, false, null, $DISABLED) . "</td>\n\t\t</tr>\n\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:25px'>{gateway}:</td>\n\t\t\t<td>" . field_ipv4("GATEWAY", $GATEWAY, 'padding:3px;font-size:25px', null, null, null, false, null, $DISABLED) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:25px'>{metric}:</td>\n\t\t\t<td>" . field_text("metric-{$t}", $metric, 'padding:3px;font-size:25px;width:90px', null, null, null, false, null, $DISABLED) . "</td>\n\t\t</tr>\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:25px'>{broadcast}:</td>\n\t\t\t<td>" . field_ipv4("BROADCAST", $BROADCAST, 'padding:3px;font-size:25px', null, null, null, false, null, $DISABLED) . "</td>\n\t\t</tr>\n\t\t</TABLE>\n\t</SPAN>\n\t<br>\n\t<table style='width:100%'>\t\n\t<tr>\n\t\t<td colspan=2 style='font-size:50px;'><div style='margin-bottom:35px'>DNS</div></td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:25px' nowrap>{primary_dns}:</td>\n\t\t<td>" . field_ipv4("DNS1", $arrayNameServers[0], "padding:3px;font-size:25px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:25px' nowrap>{secondary_dns}:</td>\n\t\t<td>" . field_ipv4("DNS2", $arrayNameServers[1], "padding:3px;font-size:25px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 style='font-size:16px;font-weight:bolder'> </td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 style='font-size:25px;font-weight:bolder'><div style='text-align:right'><hr>" . button("{next}", "ChangeQuickHostname()", "30px") . "</div></td>\n\t</tr>\n\t</table>\n\t</div>\n\t\n\t<script>\n\t\tvar X_ChangeQuickHostname= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tUnlockPage();\n\t\t\tvar setup_proxy={$setup_proxy};\n\t\t\tif(setup_proxy==1){\n\t\t\t\tLoadAjax('setup-content','{$page}?setup-proxy-type=yes&savedsettings='+results)\n\t\t\t\treturn;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tvar SetupAD={$SetupAD};\n\t\t\tif(SetupAD==1){\n\t\t\t\tLoadAjax('setup-content','{$page}?setup-active-directory=yes&savedsettings='+results)\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\tLoadAjax('setup-content','{$page}?setup-3=yes&savedsettings='+results)\n\t\t\t}\n\t\t\t\n\t\tfunction ChangeQuickHostnameCheck(e){\n\t\t\tif(checkEnter(e)){ChangeQuickHostname();}\n\t\t}\n\t\t\n\t\tfunction ChangeWizardNetInterfaces(){\n\t\t\tvar nic=document.getElementById('NIC').value;\n\t\t\tLoadAjax('INTERFACES_OBJECTS','{$page}?setup-nic=yes&t={$t}&NIC='+nic)\n\t\t\n\t\t}\n\t\t\n\t\tfunction KeepNetCheck(){\n\t\t\tdocument.getElementById('NIC').disabled=false;\n\t\t\tdocument.getElementById('hostname_netbios').disabled=false;\n\t\t\tdocument.getElementById('hostname_domain').disabled=false;\n\t\t\tdocument.getElementById('IPADDR').disabled=false;\n\t\t\tdocument.getElementById('NETMASK').disabled=false;\n\t\t\tdocument.getElementById('GATEWAY').disabled=false;\n\t\t\tdocument.getElementById('BROADCAST').disabled=false;\n\t\t\tdocument.getElementById('metric-{$t}').disabled=false;\t\n\t\t\tdocument.getElementById('DNS1').disabled=false;\n\t\t\tdocument.getElementById('DNS2').disabled=false;\n\t\t\tdocument.getElementById('VPS_COMPATIBLE').disabled=false;\n\t\t\t\n\t\t\t\n\t\t\tif(document.getElementById('KEEPNET').checked){\n\t\t\t\tdocument.getElementById('NIC').disabled=true;\n\t\t\t\tdocument.getElementById('VPS_COMPATIBLE').disabled=true;\n\t\t\t\tdocument.getElementById('IPADDR').disabled=true;\n\t\t\t\tdocument.getElementById('NETMASK').disabled=true;\n\t\t\t\tdocument.getElementById('GATEWAY').disabled=true;\n\t\t\t\tdocument.getElementById('BROADCAST').disabled=true;\n\t\t\t\tdocument.getElementById('metric-{$t}').disabled=true;\t\n\t\t\t\tdocument.getElementById('DNS1').disabled=true;\n\t\t\t\tdocument.getElementById('DNS2').disabled=true;\n\t\t\t\tdocument.getElementById('hostname_netbios').disabled=true;\n\t\t\t\tdocument.getElementById('hostname_domain').disabled=true;\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\tfunction ChangeQuickHostname(){\n\t\t\tKEEPNET=0;\n\t\t\tVPS_COMPATIBLE=0;\n\t\t\tif(document.getElementById('KEEPNET').checked){KEEPNET=1;}\n\t\t\tif(document.getElementById('VPS_COMPATIBLE').checked){VPS_COMPATIBLE=1;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tvar netbios=document.getElementById('hostname_netbios').value;\n\t\t\tvar dom=document.getElementById('hostname_domain').value;\n\t\t\tif(KEEPNET==0){\n\t\t\t\tif(netbios.length==0){alert('{$netbiosname_field} (Null!)');return;}\n\t\t\t\tif(dom.length==0){alert('{$domain_field} (Null!)');return;}\n\t\t\t\tif(dom=='localhost.localdomain'){alert('localhost.localdomain wrong domain...');return;}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(document.getElementById('proxy_listen_port')){\n\t\t\t\tXHR.appendData('proxy_listen_port',document.getElementById('proxy_listen_port').value);\n\t\t\t}\n\t\t\tif(document.getElementById('EnablePDNS')){\n\t\t\t\tvar EnablePDNS=0;\n\t\t\t\tif(document.getElementById('EnablePDNS').checked){EnablePDNS=1;}\n\t\t\t\tXHR.appendData('EnablePDNS',EnablePDNS);\n\t\t\t}\n\n\t\t\tif(document.getElementById('EnableFreeRadius')){\n\t\t\t\tvar EnableFreeRadius=0;\n\t\t\t\tif(document.getElementById('EnableFreeRadius').checked){EnableFreeRadius=1;}\n\t\t\t\tXHR.appendData('EnableFreeRadius',EnableFreeRadius);\n\t\t\t}\n\n\t\t\tif(document.getElementById('EnableDHCPServer')){\n\t\t\t\tXHR.appendData('EnableDHCPServer',document.getElementById('EnableDHCPServer').value);\n\t\t\t}\n\t\t\t\n\n\n\t\t\tif(document.getElementById('EnableWebFiltering')){\n\t\t\t\tXHR.appendData('EnableWebFiltering',document.getElementById('EnableWebFiltering').value);\n\t\t\t}\n\n\t\t\tif(document.getElementById('AsCategoriesAppliance')){\n\t\t\t\tXHR.appendData('AsCategoriesAppliance',document.getElementById('AsCategoriesAppliance').value);\n\t\t\t}\t\t\t\n\t\t\t\n\n\t\t\tif(document.getElementById('timezones')){\n\t\t\t\tXHR.appendData('timezones',document.getElementById('timezones').value);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\tXHR.appendData('KEEPNET',KEEPNET);\n\t\t\t\n\t\t\tif(KEEPNET==0){ \n\t\t\t\tXHR.appendData('VPS_COMPATIBLE',VPS_COMPATIBLE);\n\t\t\t\tXHR.appendData('NIC',document.getElementById('NIC').value);\n\t\t\t\tXHR.appendData('IPADDR',document.getElementById('IPADDR').value);\n\t\t\t\tXHR.appendData('NETMASK',document.getElementById('NETMASK').value); \n\t\t\t\tXHR.appendData('GATEWAY',document.getElementById('GATEWAY').value);\n\t\t\t\tXHR.appendData('BROADCAST',document.getElementById('BROADCAST').value);\n\t\t\t\tXHR.appendData('metric',document.getElementById('metric-{$t}').value); \n\t\t\t\tXHR.appendData('DNS1',document.getElementById('DNS1').value);\n\t\t\t\tXHR.appendData('DNS2',document.getElementById('DNS2').value);\n\t\t\t\tXHR.appendData('netbiosname',netbios);\n\t\t\t\tXHR.appendData('domain',dom);\n\t\t\t}\n\t\t\t\n\t\t\tXHR.appendData('savedsettings','{$_GET["savedsettings"]}');\n\t\t\tAnimateDiv('setup-content');\n\t\t\tLockPage();\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',X_ChangeQuickHostname);\n\t\t\t\n\t\t}\n\t\tKeepNetCheck();\n\t\tdocument.getElementById('content').style.height='1250px';\n\t</script>\n\t\n\t"; $html = "\n\t<div style='font-size:35px;font-weight:bolder;margin-bottom:10px'>{squid_net_simple}</div>\n\t{$FORM}\n\t\n\t\n\t"; echo $tpl->_ENGINE_parse_body($html); }