forked from extern/egroupware
fixed header management
This commit is contained in:
parent
c54b78187f
commit
b60a700dcf
@ -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 '<table border="1" width="100%" cellspacing="0" cellpadding="2">';
|
||||
@ -201,6 +184,7 @@
|
||||
}elseif ($phpgw_info["setup"]["stage"]["config"] == 10) {
|
||||
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/completed.gif" alt="X" border="0"></td><td>Configuration completed.';
|
||||
echo "<form method=\"POST\" action=\"config.php\"><input type=\"submit\" value=\"Edit Current Configuration\"></form>";
|
||||
echo '<br><a href="setup_demo.php">Click Here</a> to setup 1 admin account and 3 demo accounts. <br><b>This will delete all existing accounts</b>';
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 3 - language management</td><td align="right" bgcolor="486591"> </td></tr>';
|
||||
|
@ -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!<br> 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 '<table>
|
||||
<tr bgcolor="486591"><th colspan=2><font color="fefefe"> Analysis </font></th></tr>
|
||||
<tr><td colspan=2>';
|
||||
$phpgw_setup->show_header($phpgw_info["setup"]["HeaderFormMSG"], False, "header");
|
||||
echo $phpgw_info["setup"]["PageMSG"];
|
||||
/*
|
||||
echo '<table border="0" width="100%" cellspacing="0" cellpadding="2">';
|
||||
echo ' <tr><td align="center" WIDTH="20%" bgcolor="486591" colspan=2><font color="fefefe">Analysis</td></tr>';
|
||||
echo '</table>';
|
||||
*/
|
||||
echo '<table border="0" width="100%" cellspacing="0" cellpadding="2">';
|
||||
echo '<tr bgcolor="486591"><td align="center" colspan=2><font color="fefefe"> Analysis </font></td></tr><tr><td colspan=2>';
|
||||
// Hardly try to find what DB-support is compiled in
|
||||
// this dont work with PHP 3.0.10 and lower !
|
||||
|
||||
|
@ -14,43 +14,40 @@
|
||||
}
|
||||
|
||||
if (! $submit) {
|
||||
$phpgw_setup->show_header("Demo Server Setup");
|
||||
?>
|
||||
<form method="POST" acion="<?php echo $PHP_SELF; ?>">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>Admin username</td>
|
||||
<td><input type="text" name="username"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin first name</td>
|
||||
<td><input type="text" name="fname"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin last name</td>
|
||||
<td><input type="text" name="lname"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin password</td>
|
||||
<td><input type="password" name="passwd"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mail Suffix</td>
|
||||
<td><input type="text" name="mail_suffix" value="phpgroupware.org"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mail login type</td>
|
||||
<td>
|
||||
<select name="mail_login_type">
|
||||
<option value="vmailmgr">VMailMGR</option>
|
||||
<option value="standard">Standard</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="submit" name="submit" value="Submit"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<table border="1" width="100%" cellspacing="0" cellpadding="2">
|
||||
<tr><td>
|
||||
This will create 1 admin account and 3 demo accounts<br>
|
||||
The username/passwords are: demo/guest, demo2/guest and demo3/guest.<br>
|
||||
<b>!!!THIS WILL DELETE ALL EXISTING ACCOUNTS!!!</b><br>
|
||||
</td></tr>
|
||||
<tr><td align="left" bgcolor="486591"><font color="fefefe">Details for Admin account</td><td align="right" bgcolor="486591"> </td></tr>
|
||||
<tr><td>
|
||||
<form method="POST" acion="<?php echo $PHP_SELF; ?>">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>Admin username</td>
|
||||
<td><input type="text" name="username"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin first name</td>
|
||||
<td><input type="text" name="fname"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin last name</td>
|
||||
<td><input type="text" name="lname"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin password</td>
|
||||
<td><input type="password" name="passwd"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="submit" name="submit" value="Submit"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td></tr></table>
|
||||
<?php
|
||||
}else{
|
||||
$phpgw_setup->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;
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user