summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3506988)
raw | patch | inline | side by side (parent: 3506988)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 Jan 2007 08:32:37 +0000 (08:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 Jan 2007 08:32:37 +0000 (08:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5640 594d385d-05f5-0310-b6e9-bd551577e9d8
13 files changed:
html/setup.old | [new file with mode: 0644] | patch | blob |
html/setup.php | [deleted file] | patch | blob | history |
setup/class_setup.inc | [new file with mode: 0644] | patch | blob |
setup/class_setupStep.inc | [new file with mode: 0644] | patch | blob |
setup/class_setupStep1.inc | [new file with mode: 0644] | patch | blob |
setup/class_setupStep2.inc | [new file with mode: 0644] | patch | blob |
setup/class_setupStep3.inc | [new file with mode: 0644] | patch | blob |
setup/class_setupStep4.inc | [new file with mode: 0644] | patch | blob |
setup/class_setupStep5.inc | [new file with mode: 0644] | patch | blob |
setup/main.inc | [new file with mode: 0644] | patch | blob |
setup/setup.tpl | [new file with mode: 0644] | patch | blob |
setup/setup_frame.tpl | [new file with mode: 0644] | patch | blob |
setup/setup_step1.tpl | [new file with mode: 0644] | patch | blob |
diff --git a/html/setup.old b/html/setup.old
--- /dev/null
+++ b/html/setup.old
@@ -0,0 +1,158 @@
+<?php
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2003 Cajus Pollmeier
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// Starting the Session to save Form Information
+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 ("functions_setup.inc");
+
+// Save the Post Data (back and forward button)
+foreach ($_POST as $key => $val){
+ $_SESSION['ldapconf'][$key] = $val;
+}
+
+/* Don't call setup if gosa.conf exists */
+if (file_exists(CONFIG_DIR."/gosa.conf")){
+ header("location:index.php");
+ exit();
+}
+
+// Check if theres the example
+if (!file_exists(CONFIG_TEMPLATE_DIR."/gosa.conf")){
+ echo "error example of gosa.conf not present!";
+}
+
+// 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";
+//if(isset($_SESSION['ldapconf'])) print "\$_SESSION['ldapconf']=ok";
+//if(isset($_POST['getconf'])) print "\$_POST['getconf']=ok";
+
+if ((
+ isset($_SESSION['classes']) &&
+ isset($_SESSION['ldapconf']) &&
+ (
+ isset($_POST['getconf']) || isset($_GET['getconfig']) ))){
+ echo parse_contrib_conf();
+ exit;
+}
+
+/* Set detected samba version */
+if (isset($classes['samba2'])) {
+ $samba= "3";
+} else {
+ $samba= "2";
+}
+
+/* Set template compile directory */
+$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 accessible, please check existence and rights of this directory!"), $smarty->compile_dir);
+ echo $_SESSION['errors'];
+ exit();
+}
+
+/* Language setup */
+$lang= get_browser_language();
+header("Content-type: text/html; charset=UTF-8");
+$lang.=".UTF-8";
+putenv("LANGUAGE=");
+putenv("LANG=$lang");
+setlocale(LC_ALL, $lang);
+$GLOBALS['t_language']= $lang;
+$GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/';
+
+/* Set the text domain as 'messages' */
+$domain = 'messages';
+bindtextdomain($domain, "$BASE_DIR/locale");
+textdomain($domain);
+
+if ($_SERVER["REQUEST_METHOD"] != "POST"){
+ // @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to");
+}
+
+/* Fill template with required values */
+$smarty->assign ('date', gmdate("D, d M Y H:i:s"));
+
+if(isset ($_POST['next'])){
+ $next = $_POST['next'];
+} else {
+ $next = 1;
+}
+
+if(isset($_POST['back'])) {
+ $next = $next -2 ;
+}
+
+if($next < 1){
+ $next = 1;
+}
+
+// How this works
+
+// Every functioon called below, has two modes
+// If the parameter is false, we only test if this function
+// is called witout an error
+// Is the return value = false, then there was an error
+// and we call this func again, to output the error
+
+// I hope this will work fine ^^
+if((show_setup_page1(false))||($next == 1)) {
+ show_setup_page1();
+} elseif((show_setup_page2(false))||($next==2)) {
+ show_setup_page2();
+} elseif((show_setup_page3(false))||($next==3)) {
+ show_setup_page3();
+} 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
+elseif((!create_user_for_setup(false))) {
+ create_user_for_setup();
+}
+// this is the last Page which shows the downloadable conf file
+else {
+ show_setup_page5();
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/html/setup.php b/html/setup.php
--- a/html/setup.php
+++ /dev/null
@@ -1,158 +0,0 @@
-<?php
-/*
- This code is part of GOsa (https://gosa.gonicus.de)
- Copyright (C) 2003 Cajus Pollmeier
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-// Starting the Session to save Form Information
-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 ("functions_setup.inc");
-
-// Save the Post Data (back and forward button)
-foreach ($_POST as $key => $val){
- $_SESSION['ldapconf'][$key] = $val;
-}
-
-/* Don't call setup if gosa.conf exists */
-if (file_exists(CONFIG_DIR."/gosa.conf")){
- header("location:index.php");
- exit();
-}
-
-// Check if theres the example
-if (!file_exists(CONFIG_TEMPLATE_DIR."/gosa.conf")){
- echo "error example of gosa.conf not present!";
-}
-
-// 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";
-//if(isset($_SESSION['ldapconf'])) print "\$_SESSION['ldapconf']=ok";
-//if(isset($_POST['getconf'])) print "\$_POST['getconf']=ok";
-
-if ((
- isset($_SESSION['classes']) &&
- isset($_SESSION['ldapconf']) &&
- (
- isset($_POST['getconf']) || isset($_GET['getconfig']) ))){
- echo parse_contrib_conf();
- exit;
-}
-
-/* Set detected samba version */
-if (isset($classes['samba2'])) {
- $samba= "3";
-} else {
- $samba= "2";
-}
-
-/* Set template compile directory */
-$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 accessible, please check existence and rights of this directory!"), $smarty->compile_dir);
- echo $_SESSION['errors'];
- exit();
-}
-
-/* Language setup */
-$lang= get_browser_language();
-header("Content-type: text/html; charset=UTF-8");
-$lang.=".UTF-8";
-putenv("LANGUAGE=");
-putenv("LANG=$lang");
-setlocale(LC_ALL, $lang);
-$GLOBALS['t_language']= $lang;
-$GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/';
-
-/* Set the text domain as 'messages' */
-$domain = 'messages';
-bindtextdomain($domain, "$BASE_DIR/locale");
-textdomain($domain);
-
-if ($_SERVER["REQUEST_METHOD"] != "POST"){
- // @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to");
-}
-
-/* Fill template with required values */
-$smarty->assign ('date', gmdate("D, d M Y H:i:s"));
-
-if(isset ($_POST['next'])){
- $next = $_POST['next'];
-} else {
- $next = 1;
-}
-
-if(isset($_POST['back'])) {
- $next = $next -2 ;
-}
-
-if($next < 1){
- $next = 1;
-}
-
-// How this works
-
-// Every functioon called below, has two modes
-// If the parameter is false, we only test if this function
-// is called witout an error
-// Is the return value = false, then there was an error
-// and we call this func again, to output the error
-
-// I hope this will work fine ^^
-if((show_setup_page1(false))||($next == 1)) {
- show_setup_page1();
-} elseif((show_setup_page2(false))||($next==2)) {
- show_setup_page2();
-} elseif((show_setup_page3(false))||($next==3)) {
- show_setup_page3();
-} 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
-elseif((!create_user_for_setup(false))) {
- create_user_for_setup();
-}
-// this is the last Page which shows the downloadable conf file
-else {
- show_setup_page5();
-}
-
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/setup/class_setup.inc b/setup/class_setup.inc
--- /dev/null
+++ b/setup/class_setup.inc
@@ -0,0 +1,142 @@
+<?php
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+require_once("class_setupStep.inc");
+
+class setup extends plugin
+{
+
+ var $i_steps = 5; // Number of setup steps
+ var $i_current= 1; // Current step
+ var $i_last = 1; // Last setup step;
+ var $o_steps = array();
+
+ var $captured_values = array();
+
+ function setup()
+ {
+ for($i = 1 ; $i <= $this->i_steps; $i ++ ){
+ $class= "setup_step_".$i;
+ $this->o_steps[$i] = new $class();
+ }
+ }
+
+ function execute()
+ {
+ $smarty = get_smarty();
+ $this->o_steps[$this->i_last]->set_active(FALSE);
+ $this->o_steps[$this->i_current]->set_active();
+ $content = $this->o_steps[$this->i_current]->execute();
+ return($content);
+ }
+
+
+ /* Save posted attributes */
+ function save_object()
+ {
+ /* Call save_object for current setup step */
+ $this->o_steps[$this->i_current] -> save_object();
+
+ /* Get attributes from setup step */
+ $tmp = $this->o_steps[$this->i_current]->get_attributes();
+ foreach($tmp as $name => $value){
+ $this->captured_values[$name] = $value;
+ }
+
+ /* check if current setup step is completed now
+ and activate the next step if possible */
+ for($i = 1 ; $i <= $this->i_steps ; $i ++ ){
+ if($this->o_steps[$i]->is_completed()){
+ if(isset($this->o_steps[($i+1)])){
+ $this->o_steps[($i+1)]->set_enabled();
+ }
+ }
+ }
+
+ /* Check if step was selected */
+ if(isset($_GET['step'])){
+ $step = $_GET['step'];
+
+ if($this->selectable_step($step)){
+ $this->i_last = $this->i_current;
+ $this->i_current = $_GET['step'];
+ }
+ }
+ }
+
+
+ /* Create navigation menu */
+ function get_navigation_html()
+ {
+ $str = "<table>";
+
+ foreach($this->o_steps as $key => $step){
+
+ $s_title = $step -> get_title();
+ $s_info = $step -> get_small_info();
+ $b_active = $step -> is_active();
+ $b_enabled = $step -> is_enabled();
+
+ $str .= "<tr><td>";
+ if($b_enabled){
+ $str .= "<a href='?step=".$key."'>";
+ $str .= "<font color='darkblue' style='font-size:14pt;'>".$s_title."</font>";
+ if($b_active){
+ $str .= "<div style='padding-left:16px;'>";
+ $str .= " <font style='font-size:10pt;'>".$s_info."</font>";
+ $str .= "</div>";
+ }
+ $str .= "</a>";
+ }else{
+ $str .= "<font color='darkgrey' style='font-size:14pt;'>".$s_title."</font>";
+ }
+ $str .= "<p class='seperator'> </p>";
+ $str .= "</td></tr>";
+ }
+ $str .="</table>";
+ return($str);
+ }
+
+
+ /* Create header entry */
+ function get_header_html()
+ {
+ $str ="<font style='font-size:20px;' color='darkblue'>";
+ $str.= $this->o_steps[$this->i_current]->get_long_title();
+ $str.="</font>";
+ return ($str);
+ }
+
+
+ /* Check if the given step id is valid and selectable */
+ function selectable_step($id)
+ {
+ if(isset($this->o_steps[$id]) && $this->o_steps[$id]->is_enabled()){
+ return(true);
+ }
+ return(false);
+ }
+}
+
+
+
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/class_setupStep.inc b/setup/class_setupStep.inc
--- /dev/null
@@ -0,0 +1,105 @@
+<?php
+
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+class setup_step extends plugin
+{
+ var $s_title = "Still undefined";
+ var $s_title_long = "This is a still undefined long title";
+ var $s_info = "This info is still undefined. This setup step detect the type of your ldap. This is a basic requirement for gosa.";
+ var $is_active = false;
+ var $is_enabled = false;
+ var $is_completed = false;
+
+ var $attributes = array();
+
+ function get_title()
+ {
+ return($this->s_title);
+ }
+
+ function get_long_title()
+ {
+ return($this->s_title_long);
+ }
+
+ function get_small_info()
+ {
+ return($this->s_info);
+ }
+
+ function is_active()
+ {
+ return($this->is_active);
+ }
+
+ function is_enabled()
+ {
+ return($this->is_enabled);
+ }
+
+ function is_completed()
+ {
+ return($this->is_completed);
+ }
+
+ function set_active($value = TRUE)
+ {
+ if($value){
+ $this->is_active = TRUE;
+ }else{
+ $this->is_active = FALSE;
+ }
+ }
+
+ function set_enabled($value = TRUE)
+ {
+ if($value){
+ $this->is_enabled = TRUE;
+ }else{
+ $this->is_enabled = FALSE;
+ }
+ }
+
+ function set_completed($value = TRUE)
+ {
+ if($value){
+ $this->is_completed = TRUE;
+ }else{
+ $this->is_completed = FALSE;
+ }
+ }
+
+ /* Return attributes handled by this setup step */
+ function get_attributes()
+ {
+ $tmp = array();
+ foreach($this->attributes as $attr){
+ $tmp[$attr] = $this->$attr;
+ }
+ return($tmp);
+ }
+}
+
+
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/class_setupStep1.inc b/setup/class_setupStep1.inc
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+class setup_step_1 extends setup_step
+{
+ var $attributes = array("lang");
+ var $lang = "en_EN";
+ var $languages = array();
+
+ function setup_step_1()
+ {
+ $this->is_enabled = TRUE;
+ $this->is_active = TRUE;
+
+ $this->s_title = _("Language selection");
+ $this->s_title_long = _("Please choose a language");
+ $this->s_info = _("This step is allows you to define your prefered language.");
+
+ $this->languages = array("de_DE" => _("German"),
+ "fr_FR" => _("French"),
+ "en_EN" => _("English"),
+ "ru_RU" => _("Russian"));
+ }
+
+ function execute()
+ {
+ $smarty = get_smarty();
+ $smarty->assign("languages", $this->languages);
+ $smarty->assign("lang", $this->lang);
+ return($smarty->fetch(get_template_path("setup_step1.tpl",TRUE,dirname(__FILE__))));
+ }
+
+ function save_object()
+ {
+ if((isset($_POST['lang'])) && isset($this->languages[$_POST['lang']])) {
+ $this->lang = $_POST['lang'];
+ $this->is_completed = TRUE;
+ $_SESSION['lang'] = $this->lang;
+ }
+ }
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/class_setupStep2.inc b/setup/class_setupStep2.inc
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+class setup_step_2 extends setup_step
+{
+
+ function setup_step_2()
+ {
+
+ }
+
+ function execute()
+ {
+ return("plug1");
+ }
+
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/class_setupStep3.inc b/setup/class_setupStep3.inc
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+class setup_step_3 extends setup_step
+{
+
+ function setup_step_3()
+ {
+
+ }
+
+ function execute()
+ {
+ return("plug1");
+ }
+
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/class_setupStep4.inc b/setup/class_setupStep4.inc
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+class setup_step_4 extends setup_step
+{
+
+ function setup_step_4()
+ {
+
+ }
+
+ function execute()
+ {
+ return("plug1");
+ }
+
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/class_setupStep5.inc b/setup/class_setupStep5.inc
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+class setup_step_5 extends setup_step
+{
+
+ function setup_step_5()
+ {
+
+ }
+
+ function execute()
+ {
+ return("plug1");
+ }
+
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/main.inc b/setup/main.inc
--- /dev/null
+++ b/setup/main.inc
@@ -0,0 +1,37 @@
+<?php
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+restore_error_handler();
+
+/* Create a new setup class if necessary */
+if (!isset($_SESSION['setup']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){
+ $_SESSION['setup']= new setup ();
+}
+$setup= $_SESSION['setup'];
+
+/* Execute formular */
+$setup->save_object();
+$display= $setup->execute();
+
+/* Store changes in session */
+$_SESSION['setup']= $setup;
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/setup.tpl b/setup/setup.tpl
--- /dev/null
+++ b/setup/setup.tpl
@@ -0,0 +1,4 @@
+<div style='background-color: #009900;'>
+{$php_errors}
+sadffasdsdfa
+</div>
diff --git a/setup/setup_frame.tpl b/setup/setup_frame.tpl
--- /dev/null
+++ b/setup/setup_frame.tpl
@@ -0,0 +1,27 @@
+<body style='background-image:none;background-color: #F4F4F4; padding:10px;'>
+
+{$php_errors}
+<form action='setup.php' name='mainform' method='post' enctype='multipart/form-data'>
+<table style='width:100%;'>
+ <tr>
+ <td colspan=2 style='border:1px solid #CCC; height: 40px; vertical-align:top;' >
+ GOsa Setup blabla
+ </td>
+ </tr>
+ <tr>
+ <td style='border:1px solid #CCC; height: 450px; width:200px; vertical-align:top;' rowspan=2>
+ {$navigation}
+ </td>
+ <td colspan=2 style='border:1px solid #CCC; height: 40px; vertical-align:top;' >
+ {$header}
+ </td>
+ </tr>
+ <tr>
+ <td style='border:1px solid #CCC; vertical-align:top;'>
+ {$contents}
+ </td>
+ </tr>
+</table>
+</form>
+</body>
+</html>
diff --git a/setup/setup_step1.tpl b/setup/setup_step1.tpl
--- /dev/null
+++ b/setup/setup_step1.tpl
@@ -0,0 +1,6 @@
+{t}Language{/t}
+
+<select name='lang' title='{t}Please your prefered language here{/t}'>
+{html_options options=$languages selected=$lang}
+</select>
+<input type='submit'>