$_POST["db_pass"] = stripslashes($_POST["db_pass"]);
     $_POST["db_pass"] = rawurldecode($_POST["db_pass"]);
     $_POST["db_pass"] = stripslashes($_POST["db_pass"]);
 }
 switch ($_POST["install"]) {
     case "lang_select":
         // lang ok, go accept licence
         checkConfigFile();
         header_html(__('License'));
         acceptLicense();
         break;
     case "License":
         // licence  ok, go choose installation or Update
         checkConfigFile();
         header_html(__('Beginning of the installation'));
         step0();
         break;
     case "Etape_0":
         // choice ok , go check system
         checkConfigFile();
         //TRANS %s is step number
         header_html(sprintf(__('Step %d'), 0));
         $_SESSION["Test_session_GLPI"] = 1;
         step1($_POST["update"]);
         break;
     case "Etape_1":
         // check ok, go import mysql settings.
         checkConfigFile();
         // check system ok, we can use specific parameters for debug
         Toolbox::setDebugMode(Session::DEBUG_MODE, 0, 0, 1);
         header_html(sprintf(__('Step %d'), 1));
<?php
	if(isset($_GET["verbose"])){$GLOBALS["VERBOSE"]=true;ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);ini_set('error_prepend_string',null);ini_set('error_append_string',null);}
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.squid.inc');
	
	
$usersmenus=new usersMenus();
if(!$usersmenus->AsSquidAdministrator){
	$tpl=new templates();
	$alert=$tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}');
	echo "alert('$alert');";
	die();	
}
if(isset($_GET["step0"])){step0();exit;}
if(isset($_GET["step1"])){step1();exit;}
if(isset($_GET["step2"])){step2();exit;}
if(isset($_GET["step3"])){step3();exit;}
if(isset($_GET["step4"])){step4();exit;}

if(isset($_POST["DOMAIN"])){Save();exit;}
if(isset($_POST["LOCALNET"])){Save();exit;}
if(isset($_POST["PROXY"])){Save();exit;}
if(isset($_POST["agree"])){agree();exit;}


start_js();