diff --git a/setup/index.php b/setup/index.php index 3044814479..7a1ac4c6b0 100644 --- a/setup/index.php +++ b/setup/index.php @@ -67,23 +67,6 @@ exit; } - /* The stages are as follows: - Stage 1.1 = header does not exists yet - Stage 1.2 = header exists, but is the wrong version - Stage 1.3 = header exists and is current - Stage 2.1 = database does not exists yet - Stage 2.2 = database exists pre-beta tables - Stage 2.3 = database exists but no tables - Stage 2.4 = database and tables exists but need upgrading - Stage 2.5 = tables being modified in some way - Stage 2.6 = database and tables exists and are current - Stage 3.1 = configuration has not been done - Stage 3.2 = configuration has been completed - Stage 4.1 = install new language - Stage 5.1 = something to do with the add-on applications - Stage 5.2 = - */ - $phpgw_info["server"]["app_images"] = "templates/default/images"; echo ''; @@ -201,6 +184,7 @@ }elseif ($phpgw_info["setup"]["stage"]["config"] == 10) { echo ''; } echo ' '; diff --git a/setup/manageheader.php b/setup/manageheader.php index 66c4ddfa66..84b3ae3ff3 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -5,14 +5,34 @@ /* authentication phase */ $phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header(); - if ( $phpgw_info["setup"]["stage"]["header"] == 2){ - $phpgw_setup->show_header("Please set your header admin password",True); - }elseif ( $phpgw_info["setup"]["stage"]["header"] == 10){ - if (!$phpgw_setup->auth("Header")){ - $phpgw_setup->show_header("Please login",True); - $phpgw_setup->login_form(); - exit; - } + switch($phpgw_info["setup"]["stage"]["header"]){ + case "1": + $phpgw_info["setup"]["HeaderFormMSG"] = "Create your header.inc.php"; + $phpgw_info["setup"]["PageMSG"] = "You have not created your header.inc.php yet!
You can create it now."; + break; + case "2": + $phpgw_info["setup"]["HeaderFormMSG"] = "Your header admin password is NOT set. Please set it now!"; + $phpgw_info["setup"]["PageMSG"] = "Your header admin password is NOT set. Please set it now!"; + break; + case "3": + $phpgw_info["setup"]["HeaderFormMSG"] = "Your header.inc.php needs upgrading."; + $phpgw_info["setup"]["PageMSG"] = "Your header.inc.php needs upgrading."; + $phpgw_info["setup"]["HeaderLoginMSG"] = "Your header.inc.php needs upgrading."; + if (!$phpgw_setup->auth("Header")){ + $phpgw_setup->show_header("Please login",True); + $phpgw_setup->login_form(); + exit; + } + break; + case "10": + if (!$phpgw_setup->auth("Header")){ + $phpgw_setup->show_header("Please login",True); + $phpgw_setup->login_form(); + exit; + } + $phpgw_info["setup"]["HeaderFormMSG"] = "Edit your header.inc.php"; + $phpgw_info["setup"]["PageMSG"] = "Edit your existing header.inc.php"; + break; } switch($action){ @@ -48,10 +68,15 @@ } break; default: - $phpgw_setup->show_header("Create/Edit your header.inc.php", False, "header"); - echo '
XConfiguration completed.'; echo "
"; + echo '
Click Here to setup 1 admin account and 3 demo accounts.
This will delete all existing accounts'; echo '
Step 3 - language management 
- -
Analysis
'; + $phpgw_setup->show_header($phpgw_info["setup"]["HeaderFormMSG"], False, "header"); + echo $phpgw_info["setup"]["PageMSG"]; +/* + echo ''; + echo ' '; + echo '
Analysis
'; +*/ + echo ''; + echo '
Analysis
'; // Hardly try to find what DB-support is compiled in // this dont work with PHP 3.0.10 and lower ! diff --git a/setup/setup_demo.php b/setup/setup_demo.php index 096fad4203..3593489769 100644 --- a/setup/setup_demo.php +++ b/setup/setup_demo.php @@ -14,43 +14,40 @@ } if (! $submit) { + $phpgw_setup->show_header("Demo Server Setup"); ?> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Admin username
Admin first name
Admin last name
Admin password
Mail Suffix
Mail login type - -
-
+ + + +
+ This will create 1 admin account and 3 demo accounts
+ The username/passwords are: demo/guest, demo2/guest and demo3/guest.
+ !!!THIS WILL DELETE ALL EXISTING ACCOUNTS!!!
+
Details for Admin account 
+
+ + + + + + + + + + + + + + + + + + + + +
Admin username
Admin first name
Admin last name
Admin password
+
+
loaddb(); @@ -98,14 +95,7 @@ $phpgw_setup->db->query($sql); $phpgw_setup->db->query("insert into preferences (preference_owner, preference_value) values ('1', '$defaultprefs')"); - /* Create system records */ - $this_dir = dirname($SCRIPT_FILENAME); - $rootdir = ereg_replace("/setup","",$this_dir); - $phpgw_setup->db->query("update config set config_value = '/tmp' where config_name = 'temp_dir'"); - $phpgw_setup->db->query("update config set config_value = '$rootdir/files' where config_name = 'files_dir'"); - $phpgw_setup->db->query("update config set config_value = '$mail_suffix' where config_name = 'mail_suffix'"); - $phpgw_setup->db->query("update config set config_value = '$mail_login_type' where config_name = 'mail_login_type'"); - $phpgw_setup->db->query("delete from config where config_name = 'freshinstall'"); - echo "Done"; + Header("Location: index.php"); + exit; } ?> \ No newline at end of file