include_once('ressources/class.ini.inc'); include_once('ressources/class.ccurl.inc'); include_once('ressources/class.system.network.inc'); include_once('ressources/class.mysql.syslogs.inc'); $user=new usersMenus(); if($user->AsSquidAdministrator==false){ $tpl=new templates(); echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');"; die();exit(); } if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["wizard1"])){wizard1();exit;} if(isset($_GET["wizard2"])){wizard2();exit;} if(isset($_GET["wizard3"])){wizard3();exit;} if(isset($_GET["wizard4"])){wizard4();exit;} if(isset($_GET["wizard5"])){wizard5();exit;} if(isset($_GET["wizard6"])){wizard6();exit;} if(isset($_GET["wizard7"])){wizard7();exit;} if(isset($_GET["wizard8"])){wizard8();exit;} if(isset($_GET["wizard9"])){wizard9();exit;} if(isset($_GET["wizard10"])){wizard10();exit;} if(isset($_GET["wizard11"])){wizard11();exit;} if(isset($_GET["wizard12"])){wizard12();exit;} if(isset($_POST["EnableRemoteStatisticsAppliance"])){Save();exit;} if(isset($_POST["SERVER"])){wizard_save();exit;} if(isset($_POST["SquidDBListenPort"])){wizard_save();exit;} js();
function wizard4() { if (!isset($_SESSION["WIZINSTANCE"]["WIZHOST"])) { wizard3(); exit; } $page = CurrentPageName(); $tpl = new templates(); if ($_SESSION["WIZINSTANCE"]["WIZHOST"] == null) { $_SESSION["WIZINSTANCE"]["WIZHOST"] = time() . ".domain.tld"; } $ou = $_SESSION["WIZINSTANCE"]["WIZOU"]; if ($ou == null) { $ou = "{none}"; } $html = "<div class=explain style='font-size:14px'>{welcome_new_instance_wizard_finish}</div>\n\t<div id='buildinstance-progress'></div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{ipaddr} {virtual}:</td>\n\t\t<td style='font-size:14px;font-weight:bold'>{$_SESSION["WIZINSTANCE"]["WIZIPADDR"]}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{netmask}:</td>\n\t\t<td style='font-size:14px;font-weight:bold'>{$_SESSION["WIZINSTANCE"]["WIZIPMASK"]}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{gateway}:</td>\n\t\t<td style='font-size:14px;font-weight:bold'>{$_SESSION["WIZINSTANCE"]["WIZIPGW"]}</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{organization}:</td>\n\t\t<td style='font-size:14px;font-weight:bold'>{$ou}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{hostname}:</td>\n\t\t<td style='font-size:14px;font-weight:bold'>{$_SESSION["WIZINSTANCE"]["WIZHOST"]}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2><hr></td>\n\t</tR>\n\t<tr>\n\t\n\t\t<td align='left'>" . button("{previous}", "LoadAjax('new_instance_wizard','{$page}?wiz3=yes');", 16) . "</td>\n\t\t<td colspan=2 align='right'>" . button("{build_instance}", "WIZ_BUILD()", 16) . "</td>\n\t</tr>\t\n\t\n\t</tbody>\n\t<table>\n\t\n\t<script>\nvar XWIZ_WIZ_BUILD= function (obj) {\n\t var results=obj.responseText;\n\t if(results.length>3){alert(results);\n\t \tLoadAjaxTiny('buildinstance-progress','{$page}?progress=0');\n\t\treturn;\n\t}\n\t LoadAjaxTiny('buildinstance-progress','{$page}?progress=50');\n\t WIZ_BUILD_INSTANCE();\n\t}\t\t\n\t\n\tfunction WIZ_BUILD(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('WIZ_BUILD','yes');\n\t\tXHR.sendAndLoad('{$page}', 'POST',XWIZ_WIZ_BUILD);\t\n\t}\n\t\nvar XWIZ_BUILD_INSTANCE=function (obj) {\n\t var results=obj.responseText;\n\t if(results.length>3){alert(results);\n\t \tLoadAjaxTiny('buildinstance-progress','{$page}?progress=0');\n\t\treturn;\n\t}\n\t LoadAjaxTiny('buildinstance-progress','{$page}?progress=100');\n\t if(document.getElementById('multiples-instances-list-start')){RefreshTableMultiples();}\n\t \$('#table-postfix-multiples-instances').flexReload();\n\t}\t\n\t\n\tfunction WIZ_BUILD_INSTANCE(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('WIZ_BUILD_INSTANCE','yes');\n\t\tXHR.sendAndLoad('{$page}', 'POST',XWIZ_BUILD_INSTANCE);\t\n\t\n\t}\n\t\n\t"; echo $tpl->_ENGINE_parse_body($html); }
include_once 'ressources/class.main_cf.inc'; $user = new usersMenus(); $tpl = new templates(); if ($user->AsArticaAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges}'); } if (isset($_GET["wizard1"])) { wizard1(); exit; } if (isset($_GET["wizard2"])) { wizard2(); exit; } if (isset($_GET["wizard3"])) { wizard3(); exit; } if (isset($_GET["wizard4"])) { wizard4(); exit; } if (isset($_GET["wizard5"])) { wizard5(); exit; } if (isset($_GET["wizard6"])) { wizard6(); exit; } if (isset($_GET["wizard7"])) {