mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 23:08:53 +01:00
fixed header management
This commit is contained in:
parent
c54b78187f
commit
b60a700dcf
@ -67,23 +67,6 @@
|
|||||||
exit;
|
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";
|
$phpgw_info["server"]["app_images"] = "templates/default/images";
|
||||||
|
|
||||||
echo '<table border="1" width="100%" cellspacing="0" cellpadding="2">';
|
echo '<table border="1" width="100%" cellspacing="0" cellpadding="2">';
|
||||||
@ -201,6 +184,7 @@
|
|||||||
}elseif ($phpgw_info["setup"]["stage"]["config"] == 10) {
|
}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 '<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 "<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 '</td></tr>';
|
||||||
}
|
}
|
||||||
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 3 - language management</td><td align="right" bgcolor="486591"> </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 */
|
/* authentication phase */
|
||||||
$phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
|
$phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
|
||||||
if ( $phpgw_info["setup"]["stage"]["header"] == 2){
|
switch($phpgw_info["setup"]["stage"]["header"]){
|
||||||
$phpgw_setup->show_header("Please set your header admin password",True);
|
case "1":
|
||||||
}elseif ( $phpgw_info["setup"]["stage"]["header"] == 10){
|
$phpgw_info["setup"]["HeaderFormMSG"] = "Create your header.inc.php";
|
||||||
if (!$phpgw_setup->auth("Header")){
|
$phpgw_info["setup"]["PageMSG"] = "You have not created your header.inc.php yet!<br> You can create it now.";
|
||||||
$phpgw_setup->show_header("Please login",True);
|
break;
|
||||||
$phpgw_setup->login_form();
|
case "2":
|
||||||
exit;
|
$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){
|
switch($action){
|
||||||
@ -48,10 +68,15 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$phpgw_setup->show_header("Create/Edit your header.inc.php", False, "header");
|
$phpgw_setup->show_header($phpgw_info["setup"]["HeaderFormMSG"], False, "header");
|
||||||
echo '<table>
|
echo $phpgw_info["setup"]["PageMSG"];
|
||||||
<tr bgcolor="486591"><th colspan=2><font color="fefefe"> Analysis </font></th></tr>
|
/*
|
||||||
<tr><td colspan=2>';
|
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
|
// Hardly try to find what DB-support is compiled in
|
||||||
// this dont work with PHP 3.0.10 and lower !
|
// this dont work with PHP 3.0.10 and lower !
|
||||||
|
|
||||||
|
@ -14,43 +14,40 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! $submit) {
|
if (! $submit) {
|
||||||
|
$phpgw_setup->show_header("Demo Server Setup");
|
||||||
?>
|
?>
|
||||||
<form method="POST" acion="<?php echo $PHP_SELF; ?>">
|
<table border="1" width="100%" cellspacing="0" cellpadding="2">
|
||||||
<table border="0">
|
<tr><td>
|
||||||
<tr>
|
This will create 1 admin account and 3 demo accounts<br>
|
||||||
<td>Admin username</td>
|
The username/passwords are: demo/guest, demo2/guest and demo3/guest.<br>
|
||||||
<td><input type="text" name="username"></td>
|
<b>!!!THIS WILL DELETE ALL EXISTING ACCOUNTS!!!</b><br>
|
||||||
</tr>
|
</td></tr>
|
||||||
<tr>
|
<tr><td align="left" bgcolor="486591"><font color="fefefe">Details for Admin account</td><td align="right" bgcolor="486591"> </td></tr>
|
||||||
<td>Admin first name</td>
|
<tr><td>
|
||||||
<td><input type="text" name="fname"></td>
|
<form method="POST" acion="<?php echo $PHP_SELF; ?>">
|
||||||
</tr>
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Admin last name</td>
|
<td>Admin username</td>
|
||||||
<td><input type="text" name="lname"></td>
|
<td><input type="text" name="username"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Admin password</td>
|
<td>Admin first name</td>
|
||||||
<td><input type="password" name="passwd"></td>
|
<td><input type="text" name="fname"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Mail Suffix</td>
|
<td>Admin last name</td>
|
||||||
<td><input type="text" name="mail_suffix" value="phpgroupware.org"></td>
|
<td><input type="text" name="lname"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Mail login type</td>
|
<td>Admin password</td>
|
||||||
<td>
|
<td><input type="password" name="passwd"></td>
|
||||||
<select name="mail_login_type">
|
</tr>
|
||||||
<option value="vmailmgr">VMailMGR</option>
|
<tr>
|
||||||
<option value="standard">Standard</option>
|
<td colspan="2"><input type="submit" name="submit" value="Submit"> </td>
|
||||||
</select>
|
</tr>
|
||||||
</td>
|
</table>
|
||||||
</tr>
|
</form>
|
||||||
<tr>
|
</td></tr></table>
|
||||||
<td colspan="2"><input type="submit" name="submit" value="Submit"> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
<?php
|
<?php
|
||||||
}else{
|
}else{
|
||||||
$phpgw_setup->loaddb();
|
$phpgw_setup->loaddb();
|
||||||
@ -98,14 +95,7 @@
|
|||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
$phpgw_setup->db->query("insert into preferences (preference_owner, preference_value) values ('1', '$defaultprefs')");
|
$phpgw_setup->db->query("insert into preferences (preference_owner, preference_value) values ('1', '$defaultprefs')");
|
||||||
|
|
||||||
/* Create system records */
|
Header("Location: index.php");
|
||||||
$this_dir = dirname($SCRIPT_FILENAME);
|
exit;
|
||||||
$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";
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user