Code

Added a seperate scroll function for testing
[gosa.git] / html / setup.php
index 754e0261b5e6d8b00b289c6fe35e7c620e516ce2..3320ffd20fb4117e9a71921bedaddcf136c94bd6 100644 (file)
 session_start();
 $_SESSION['DEBUGLEVEL']= 1;
 
+if (!isset($_GET['js']) && !isset($_SESSION['js'])){
+  echo '<script language="JavaScript" type="text/javascript">';
+  echo '  location = "setup.php?js=true";';
+  echo '</script>';
+
+  $_SESSION['js']= FALSE;
+} elseif(isset($_GET['js'])) {
+  $_SESSION['js']= TRUE;
+}
+
 /* Load required includes */
 require_once ("../include/php_setup.inc");
 require_once ("functions.inc");
-require_once ("setup_checks.inc");
+require_once ("functions_setup.inc");
 
 // Save the Post Data (back and forward button)
 foreach ($_POST as $key => $val){
@@ -45,6 +55,10 @@ if (!file_exists(CONFIG_TEMPLATE_DIR."/gosa.conf")){
 
 // No Errors occured yet
 $_SESSION['errors']= "";
+$_SESSION['errors']             = "";
+$_SESSION['errorsAlreadyPosted']= array();
+$_SESSION['LastError']          = "";
+
 
 // Print out gosa.conf 
 //if(isset($_SESSION['classes'])) print "\$_SESSION['classes']=ok";
@@ -72,7 +86,7 @@ $smarty->compile_dir= '/var/spool/gosa';
 
 /* Check for compile directory */
 if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){
-  print_red(_("Directory '%s' specified as smarty compile directory is not accessable, check existence and rigths of this directory!"), $smarty->compile_dir);
+  print_red(_("Directory '%s' specified as smarty compile directory is not accessible, please check existence and rights of this directory!"), $smarty->compile_dir);
   echo $_SESSION['errors'];
   exit();
 }
@@ -122,13 +136,13 @@ if($next < 1){
 //  and we call this func again, to output the error
 
 // I hope this will work fine ^^
-if((!show_setup_page1(false))||($next == 1)) {
+if((show_setup_page1(false))||($next == 1)) {
   show_setup_page1();  
-} elseif((!show_setup_page2(false))||($next==2)) {
+} elseif((show_setup_page2(false))||($next==2)) {
   show_setup_page2();
-} elseif((!show_setup_page3(false))||($next==3)) {
+} elseif((show_setup_page3(false))||($next==3)) {
   show_setup_page3();
-} elseif((!show_setup_page4(false))||($next==4)) {
+} elseif((show_setup_page4(false))||($next==4)) {
   show_setup_page4();
 }
 // This is called to test if we have an administrative Group with a User in it
@@ -142,5 +156,3 @@ else {
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
-</body>
-</html>