diff --git a/setup/class_setup.inc b/setup/class_setup.inc
index 636d63955940a30a10eb2fded77ad32a38176b89..5b1ca78723a23b107da7a1b75e9166720b4d7da5 100644 (file)
--- a/setup/class_setup.inc
+++ b/setup/class_setup.inc
class setup
{
- var $i_steps = 8; // Number of setup steps
+ var $i_steps = 9; // Number of setup steps
var $i_current= 1; // Current step
var $i_last = 1; // Last setup step;
var $o_steps = array();
$this->o_steps[4] = new setup_step_4();
$this->o_steps[5] = new setup_step_5();
$this->o_steps[6] = new setup_step_6();
- $this->o_steps[7] = new setup_step_7();
- $this->o_steps[8] = new setup_step_8();
-
+ $this->o_steps[7] = new setup_step_6a();
+ $this->o_steps[8] = new setup_step_7();
+ $this->o_steps[9] = new setup_step_8();
+
+ /* Ensure that setup is not reachable if gosa.conf (CONFIG_FILE) */
+ if(file_exists(CONFIG_DIR."/".CONFIG_FILE)){
+ session_destroy();
+ header("Location: index.php") ;
+ exit();
+ }
+
foreach($this->o_steps as $key => $step){
$this->o_steps[$key]->parent = $this;
}
}
}
}
+
+ $step = -1;
+
+ if(isset($_POST['setup_goto_step'])){
+ $step= $_POST['setup_goto_step'];
+ }
+
if(isset($_GET['step'])){
$step = $_GET['step'];
}elseif(isset($_POST['next'])){
$step = $this->i_current - 1;
}
- if(isset($_POST['setup_goto_step'])){
- $step= $_POST['setup_goto_step'];
- }
-
$once = true;
foreach($_POST as $name => $value){
if(preg_match("/^step_[0-9]*$/",$name) && $once ){
$str = "";
foreach($this->o_steps as $key => $step){
+ $step -> update_strings();
+
$s_title = $step -> get_title();
$s_info = $step -> get_small_info();
$b_active = $step -> is_active();
$b_enabled = $step -> is_enabled();
- $_SESSION['js'] = 0;
if($_SESSION['js']){
$str .="<div >";
}
+
+ function get_bottom_html()
+ {
+ $str ="";
+ $str.=" <div style='text-align:right;float:top;'>";
+ if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){
+ $str .= "<input type='submit' name='last' value='"._("Backward")."'>";
+ }else{
+ $str .= "<input type='button' name='last' value='"._("Backward")."' disabled>";
+ }
+
+ $str .= "<input type='submit' name='next' value='"._("Forward")."'>";
+ $str .="</div>";
+ return($str);
+ }
+
+
/* Create header entry */
function get_header_html()
{
$str ="";
$str.=" <div >";
- $str.=" <div>";
- $str.=" <font style='font-size:20px;float:top'>";
+ $str.=" <div style='padding:3px;'>";
+ $str.=" <img src='images/system.png' alt='' class='center'>";
$str.= $this->o_steps[$this->i_current]->get_long_title();
- $str.=" </font>";
+ $str.=" ";
$str.=" </div>";
- $str.=" <div style='text-align:right;float:top;'>";
- if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){
- $str.=" <input class='center' type='image' name='last' src='images/setup_step_back.png' title='"._("Last step")."'>";
- }else{
- $str.=" <img class='center' src='images/setup_step_back_gray.png' title='"._("Last step")."'>";
- }
-# if(isset($this->o_steps[$this->i_current +1]) && $this->o_steps[$this->i_current +1]->is_enabled()){
- $str.=" <input class='center' type='image' name='next' src='images/setup_step_forward.png' title='"._("Next step")."'>";
-# }else{
-# $str.=" <img class='center' src='images/setup_step_forward_gray.png' title='"._("Next step")."'>";
-# }
- $str.= " </div>";
+# $str.=" <div style='text-align:right;float:top;'>";
+# if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){
+# $str.=" <input class='center' type='image' name='last' src='images/setup_step_back.png' title='"._("Last step")."'>";
+# }else{
+# $str.=" <img class='center' src='images/setup_step_back_gray.png' title='"._("Last step")."'>";
+# }
+# if(isset($this->o_steps[$this->i_current +1]) && $this->o_steps[$this->i_current +1]->is_enabled()){
+# $str.=" <input class='center' type='image' name='next' src='images/setup_step_forward.png' title='"._("Next step")."'>";
+# }else{
+# $str.=" <img class='center' src='images/setup_step_forward_gray.png' title='"._("Next step")."'>";
+# }
+# $str.= " </div>";
$str.= "</div>";
return ($str);
}