commiting while I go to lunch

This commit is contained in:
seek3r 2000-12-27 19:59:23 +00:00
parent 329e8b3f00
commit 7ec19342e2
5 changed files with 148 additions and 145 deletions

View File

@ -30,6 +30,7 @@
$phpgw_info["server"]["server_root"] = "{SERVER_ROOT}"; $phpgw_info["server"]["server_root"] = "{SERVER_ROOT}";
$phpgw_info["server"]["include_root"] = "{INCLUDE_ROOT}"; $phpgw_info["server"]["include_root"] = "{INCLUDE_ROOT}";
$phpgw_info["server"]["header_admin_password"] = "{HEADER_ADMIN_PASSWORD}";
$phpgw_domain["default"] = array ( $phpgw_domain["default"] = array (
"db_host" => "{DB_HOST}", "db_host" => "{DB_HOST}",
@ -80,7 +81,7 @@
\**************************************************************************/ \**************************************************************************/
$phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["include_root"]."/phpgwapi/inc"; $phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["include_root"]."/phpgwapi/inc";
include($phpgw_info["server"]["server_root"]."/version.inc.php"); include($phpgw_info["server"]["server_root"]."/version.inc.php");
$phpgw_info["server"]["versions"]["header"] = "1.8"; $phpgw_info["server"]["versions"]["header"] = "1.9";
// This is a fix for NT // This is a fix for NT
if (!isset($phpgw_info["flags"]["noapi"]) || if (!isset($phpgw_info["flags"]["noapi"]) ||
!$phpgw_info["flags"]["noapi"] == True){ !$phpgw_info["flags"]["noapi"] == True){

View File

@ -3,9 +3,21 @@
include("./inc/functions.inc.php"); include("./inc/functions.inc.php");
include("../version.inc.php"); include("../version.inc.php");
/* processing and discovery phase */ /* 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("Config")){
$phpgw_setup->show_header("Please login",True);
$phpgw_setup->login_form();
exit;
}else{ /* authentication settled. Moving to the database portion. */
$phpgw_setup->loaddb();
}
}
$phpgw_setup->check_header(); $phpgw_setup->check_header();
//echo "phpgw_info[setup][stage]: ".$phpgw_info["setup"]["stage"]."<br>";
if ( $phpgw_info["setup"]["stage"] >= 1.4){ if ( $phpgw_info["setup"]["stage"] >= 1.4){
if (!$phpgw_setup->header_auth()){ if (!$phpgw_setup->header_auth()){
$phpgw_setup->show_header("Please login",True); $phpgw_setup->show_header("Please login",True);
@ -21,7 +33,6 @@
} }
switch($action){ switch($action){
case "download": case "download":
header("Content-disposition: attachment; filename=\"header.inc.php\""); header("Content-disposition: attachment; filename=\"header.inc.php\"");

View File

@ -16,7 +16,7 @@
var $db; var $db;
var $template; var $template;
function show_header($title = "",$nologoutbutton = False) function show_header($title = "",$nologoutbutton = False, $logoutfrom = "config")
{ {
global $phpgw_info, $PHP_SELF; global $phpgw_info, $PHP_SELF;
echo ' echo '
@ -36,34 +36,33 @@
if ($nologoutbutton) { if ($nologoutbutton) {
echo "&nbsp;"; echo "&nbsp;";
} else { } else {
echo '<a href="' . $PHP_SELF . '?FormLogout=True" class="link">Logout</a>&nbsp;'; echo '<a href="' . $PHP_SELF . '?FormLogout='.$logoutfrom.'" class="link">Logout</a>&nbsp;';
} }
echo "</td></tr></table>"; echo "</td></tr></table>";
} }
function loginForm($login_msg="", $header_login_msg="") function login_form()
{ {
global $phpgw_info, $phpgw_domain, $SetupDomain, $SetupPW, $PHP_SELF; global $phpgw_info, $phpgw_domain, $PHP_SELF;
echo "<p><body bgcolor='#ffffff'>\n"; echo "<p><body bgcolor='#ffffff'>\n";
echo "<table border=\"0\" align=\"center\">\n"; echo "<table border=\"0\" align=\"center\">\n";
if ( $phpgw_info["setup"]["stage"] >= 1.4){ if ($phpgw_info["setup"]["stage"]["header"] == 10){
echo " <tr bgcolor=\"486591\">\n"; echo " <tr bgcolor=\"486591\">\n";
echo " <td colspan=\"2\"><font color=\"fefefe\">&nbsp;<b>Setup/Config Admin Login</b></font></td>\n"; echo " <td colspan=\"2\"><font color=\"fefefe\">&nbsp;<b>Setup/Config Admin Login</b></font></td>\n";
echo " </tr>\n"; echo " </tr>\n";
if ($err != "") { echo " <tr bgcolor='#e6e6e6'><td colspan='2'><font color='#ff0000'>".$phpgw_info["setup"]["ConfigLoginMSG"]."</font></td></tr>\n";
echo " <tr bgcolor='#e6e6e6'><td colspan='2'><font color='#ff0000'>".$login_msg."</font></td></tr>\n";
}
echo " <tr bgcolor=\"e6e6e6\">\n"; echo " <tr bgcolor=\"e6e6e6\">\n";
echo " <td><form action='".$PHP_SELF."' method='POST'>\n"; echo " <td><form action='index.php' method='POST'>\n";
if (count($phpgw_domain) > 1){ if (count($phpgw_domain) > 1){
echo " <table><tr><td>Domain: </td><td><input type='text' name='FormDomain' value=''></td></tr>\n"; echo " <table><tr><td>Domain: </td><td><input type='text' name='FormDomain' value='phpgroupware.org'></td></tr>\n";
echo " <tr><td>Password: </td><td><input type='password' name='FormPW' value=''></td></tr></table>\n"; echo " <tr><td>Password: </td><td><input type='password' name='FormPW' value='changeme'></td></tr></table>\n";
}else{ }else{
reset($phpgw_domain); reset($phpgw_domain);
$default_domain = each($phpgw_domain); $default_domain = each($phpgw_domain);
echo " <input type='password' name='FormPW' value=''>\n"; echo " <input type='password' name='FormPW' value=''>\n";
echo " <input type='hidden' name='FormDomain' value='".$default_domain[0]."'>\n"; echo " <input type='hidden' name='FormDomain' value='".$default_domain[0]."'>\n";
} }
echo " <input type='submit' name='Login' value='Login'>\n"; echo " <input type='submit' name='ConfigLogin' value='Login'>\n";
echo " </form></td>\n"; echo " </form></td>\n";
echo " </tr>\n"; echo " </tr>\n";
} }
@ -71,12 +70,10 @@
echo " <tr bgcolor=\"486591\">\n"; echo " <tr bgcolor=\"486591\">\n";
echo " <td colspan=\"2\"><font color=\"fefefe\">&nbsp;<b>Header Admin Login</b></font></td>\n"; echo " <td colspan=\"2\"><font color=\"fefefe\">&nbsp;<b>Header Admin Login</b></font></td>\n";
echo " </tr>\n"; echo " </tr>\n";
if ($err != "") { echo " <tr bgcolor='#e6e6e6'><td colspan='2'><font color='#ff0000'>".$phpgw_info["setup"]["HeaderLoginMSG"]."</font></td></tr>\n";
echo " <tr bgcolor='#e6e6e6'><td colspan='2'><font color='#ff0000'>".$header_login_msg."</font></td></tr>\n";
}
echo " <tr bgcolor=\"e6e6e6\">\n"; echo " <tr bgcolor=\"e6e6e6\">\n";
echo " <td><form action='createheader.php' method='POST'>\n"; echo " <td><form action='manageheader.php' method='POST'>\n";
echo " <input type='password' name='HeaderPW' value='changethis'>\n"; echo " <input type='password' name='FormPW' value='changethis'>\n";
echo " <input type='submit' name='HeaderLogin' value='Login'>\n"; echo " <input type='submit' name='HeaderLogin' value='Login'>\n";
echo " </form></td>\n"; echo " </form></td>\n";
echo " </tr>\n"; echo " </tr>\n";
@ -89,26 +86,26 @@
{ {
global $phpgw_domain, $phpgw_info; global $phpgw_domain, $phpgw_info;
if(!file_exists("../header.inc.php") || !is_file("../header.inc.php")) { if(!file_exists("../header.inc.php") || !is_file("../header.inc.php")) {
$phpgw_info["setup"]["stage"] = 1.1;
$phpgw_info["setup"]["header_msg"] = "Stage One"; $phpgw_info["setup"]["header_msg"] = "Stage One";
return 1;
}else{ }else{
include("../header.inc.php"); include("../header.inc.php");
if (!isset($phpgw_info["server"]["header_admin_password"])){ if (!isset($phpgw_info["server"]["header_admin_password"])){
$phpgw_info["setup"]["stage"] = 1.2;
$phpgw_info["setup"]["header_msg"] = "Stage One (No header admin password set)"; $phpgw_info["setup"]["header_msg"] = "Stage One (No header admin password set)";
return 2;
}elseif (!isset($phpgw_domain) || $phpgw_info["server"]["versions"]["header"] != $phpgw_info["server"]["versions"]["current_header"]) { }elseif (!isset($phpgw_domain) || $phpgw_info["server"]["versions"]["header"] != $phpgw_info["server"]["versions"]["current_header"]) {
$phpgw_info["setup"]["stage"] = 1.3;
$phpgw_info["setup"]["header_msg"] = "Stage One (Upgrade your header.inc.php)"; $phpgw_info["setup"]["header_msg"] = "Stage One (Upgrade your header.inc.php)";
return 3;
}else{ /* header.inc.php part settled. Moving to authentication */ }else{ /* header.inc.php part settled. Moving to authentication */
$phpgw_info["setup"]["stage"] = 1.4;
$phpgw_info["setup"]["header_msg"] = "Stage One (Completed)"; $phpgw_info["setup"]["header_msg"] = "Stage One (Completed)";
return 10;
} }
} }
} }
function generate_header() function generate_header()
{ {
global $setting, $phpgw_setup; global $setting, $phpgw_setup, $phpgw_info;
$phpgw_setup->template->set_file(array("header" => "header.inc.php.template")); $phpgw_setup->template->set_file(array("header" => "header.inc.php.template"));
while(list($k,$v) = each($setting)) { while(list($k,$v) = each($setting)) {
@ -117,86 +114,78 @@
return $phpgw_setup->template->parse("out","header"); return $phpgw_setup->template->parse("out","header");
} }
function config_auth() function auth($auth_type = "Config")
{ {
global $phpgw_domain, $FormLogout, $FormDomain, $FormHeaderPW, $FormPW, $SetupDomain, $HTTP_POST_VARS, $login_msg; global $phpgw_domain, $phpgw_info, $HTTP_POST_VARS, $FormLogout, $ConfigLogin, $HeaderLogin, $FormDomain, $FormPW, $ConfigDomain, $ConfigPW, $HeaderPW;
if (isset($FormLogout)) { if (isset($FormLogout)) {
setcookie("SetupPW"); // scrub the old one if ($FormLogout == "config"){
setcookie("SetupDomain"); // scrub the old one setcookie("ConfigPW"); // scrub the old one
setcookie("HeaderPW"); // scrub the old one setcookie("ConfigDomain"); // scrub the old one
$login_msg = "You have sucessfully logged out"; $phpgw_info["setup"]["ConfigLoginMSG"] = "You have sucessfully logged out";
return False; return False;
} elseif (isset($SetupPW)) { }elseif($FormLogout == "header"){
if ($SetupPW != $phpgw_domain[$SetupDomain]["config_passwd"]) { setcookie("HeaderPW"); // scrub the old one
setcookie("SetupPW"); // scrub the old one $phpgw_info["setup"]["HeaderLoginMSG"] = "You have sucessfully logged out";
setcookie("SetupDomain"); // scrub the old one return False;
$login_msg = "Invalid session cookie (cookies must be enabled)"; }
} elseif (isset($ConfigPW)) {
if ($ConfigPW != $phpgw_domain[$ConfigDomain]["config_passwd"] && $auth_type == "Config") {
setcookie("ConfigPW"); // scrub the old one
setcookie("ConfigDomain"); // scrub the old one
$phpgw_info["setup"]["ConfigLoginMSG"] = "Invalid session cookie (cookies must be enabled)";
return False;
}else{
return True;
}
} elseif (isset($HeaderPW)) {
if ($HeaderPW != $phpgw_info["server"]["header_admin_password"] && $auth_type == "Header") {
setcookie("HeaderPW"); // scrub the old one
$phpgw_info["setup"]["HeaderLoginMSG"] = "Invalid session cookie (cookies must be enabled)";
return False; return False;
}else{ }else{
return True; return True;
} }
} elseif (isset($FormPW)) { } elseif (isset($FormPW)) {
if ($FormPW == $phpgw_domain[$FormDomain]["config_passwd"]) { if (isset($ConfigLogin)){
setcookie("SetupPW",$FormPW); if ($FormPW == $phpgw_domain[$FormDomain]["config_passwd"] && $auth_type == "Config") {
setcookie("SetupDomain",$FormDomain); setcookie("ConfigPW",$FormPW);
$SetupDomain = $FormDomain; setcookie("ConfigDomain",$FormDomain);
$ConfigDomain = $FormDomain;
return True; return True;
}else{ }else{
$login_msg = "Invalid password"; $phpgw_info["setup"]["ConfigLoginMSG"] = "Invalid password";
return False; return False;
} }
} else { }elseif (isset($HeaderLogin)){
return False; if ($FormPW == $phpgw_info["server"]["header_admin_password"] && $auth_type == "Header") {
} setcookie("HeaderPW",$FormPW);
}
function header_auth()
{
global $phpgw_domain, $FormHeaderPW, $FormHeaderLogout,$HTTP_POST_VARS, $header_login_msg;
if (isset($FormHeaderLogout)) {
setcookie("HeaderPW"); // scrub the old one
$header_login_msg = "You have sucessfully logged out";
return False;
} elseif (isset($HeaderPW)) {
if ($HeaderPW != $phpgw_info["server"]["header_admin_password"]) {
setcookie("SetupPW"); // scrub the old one
setcookie("SetupDomain"); // scrub the old one
setcookie("HeaderPW"); // scrub the old one
$header_login_msg = "Invalid session cookie (cookies must be enabled)";
return False;
}else{
return True;
}
} elseif (isset($FormHeaderPW)) {
if ($FormHeaderPW == $phpgw_info["server"]["header_admin_password"]) {
setcookie("HeaderPW",$HeaderPW);
return True; return True;
}else{ }else{
$header_login_msg = "Invalid password"; $phpgw_info["setup"]["HeaderLoginMSG"] = "Invalid password";
return False; return False;
} }
}
} else { } else {
return False; return False;
} }
} }
function loaddb() function loaddb()
{ {
global $phpgw_info, $phpgw_domain, $SetupDomain; global $phpgw_info, $phpgw_domain, $ConfigDomain;
/* Database setup */ /* Database setup */
if (!isset($phpgw_info["server"]["api_inc"])) { if (!isset($phpgw_info["server"]["api_inc"])) {
$phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["server_root"]."/phpgwapi/inc"; $phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["server_root"]."/phpgwapi/inc";
} }
include($phpgw_info["server"]["api_inc"] . "/phpgw_db_".$phpgw_domain[$SetupDomain]["db_type"].".inc.php"); include($phpgw_info["server"]["api_inc"] . "/phpgw_db_".$phpgw_domain[$ConfigDomain]["db_type"].".inc.php");
$this->db = new db; $this->db = new db;
$this->db->Host = $phpgw_domain[$SetupDomain]["db_host"]; $this->db->Host = $phpgw_domain[$ConfigDomain]["db_host"];
$this->db->Type = $phpgw_domain[$SetupDomain]["db_type"]; $this->db->Type = $phpgw_domain[$ConfigDomain]["db_type"];
$this->db->Database = $phpgw_domain[$SetupDomain]["db_name"]; $this->db->Database = $phpgw_domain[$ConfigDomain]["db_name"];
$this->db->User = $phpgw_domain[$SetupDomain]["db_user"]; $this->db->User = $phpgw_domain[$ConfigDomain]["db_user"];
$this->db->Password = $phpgw_domain[$SetupDomain]["db_pass"]; $this->db->Password = $phpgw_domain[$ConfigDomain]["db_pass"];
$phpgw_schema_proc = new phpgw_schema_proc($phpgw_domain[$SetupDomain]["db_type"]); $phpgw_schema_proc = new phpgw_schema_proc($phpgw_domain[$ConfigDomain]["db_type"]);
} }
function check_db() function check_db()
@ -214,23 +203,15 @@
} }
if (isset($phpgw_info["setup"]["oldver"]["phpgwapi"])){ if (isset($phpgw_info["setup"]["oldver"]["phpgwapi"])){
if ($phpgw_info["setup"]["oldver"]["phpgwapi"] == $phpgw_info["server"]["versions"]["phpgwapi"]){ if ($phpgw_info["setup"]["oldver"]["phpgwapi"] == $phpgw_info["server"]["versions"]["phpgwapi"]){
$this->db->query("select config_value from config where config_name='freshinstall'"); $phpgw_info["setup"]["header_msg"] = "Stage 2 (Tables Complete)";
$this->db->next_record(); return 10;
$configed = $this->db->f("config_value");
if ($configed){
$phpgw_info["setup"]["stage"] = 3.1;
$phpgw_info["setup"]["header_msg"] = "Stage 3 (Needs Configuration)";
}else{ }else{
$phpgw_info["setup"]["stage"] = 3.2;
$phpgw_info["setup"]["header_msg"] = "Stage 3 (Configuration OK)";
}
}else{
$phpgw_info["setup"]["stage"] = 2.4;
$phpgw_info["setup"]["header_msg"] = "Stage 2 (Tables need upgrading)"; $phpgw_info["setup"]["header_msg"] = "Stage 2 (Tables need upgrading)";
return 4;
} }
}else{ }else{
$phpgw_info["setup"]["stage"] = 2.2;
$phpgw_info["setup"]["header_msg"] = "Stage 2 (Tables appear to be pre-beta)"; $phpgw_info["setup"]["header_msg"] = "Stage 2 (Tables appear to be pre-beta)";
return 2;
} }
}else{ }else{
/* no tables, so checking if we can create them */ /* no tables, so checking if we can create them */
@ -240,16 +221,34 @@
*/ */
$db_rights = $this->db->query("CREATE TABLE phpgw_testrights ( testfield varchar(5) NOT NULL )"); $db_rights = $this->db->query("CREATE TABLE phpgw_testrights ( testfield varchar(5) NOT NULL )");
$this->db->query("DROP TABLE phpgw_testrights");
if (isset($db_rights)){ if (isset($db_rights)){
//if (isset($isdb)){ //if (isset($isdb)){
$phpgw_info["setup"]["stage"] = 2.3;
$phpgw_info["setup"]["header_msg"] = "Stage 2 (Create tables)"; $phpgw_info["setup"]["header_msg"] = "Stage 2 (Create tables)";
return 3;
}else{ }else{
$phpgw_info["setup"]["stage"] = 2.1;
$phpgw_info["setup"]["header_msg"] = "Stage 2 (Create Database)"; $phpgw_info["setup"]["header_msg"] = "Stage 2 (Create Database)";
return 1;
}
}
}
function check_config()
{
global $phpgw_info;
$this->db->Halt_On_Error = "no";
if ($phpgw_info["setup"]["stage"]["db"] == 10){
$this->db->query("select config_value from config where config_name='freshinstall'");
$this->db->next_record();
$configed = $this->db->f("config_value");
if ($configed){
$phpgw_info["setup"]["header_msg"] = "Stage 3 (Configuration OK)";
return 10;
}else{
$phpgw_info["setup"]["header_msg"] = "Stage 3 (Needs Configuration)";
return 1;
} }
$this->db->query("DROP TABLE phpgw_testrights");
} }
} }

View File

@ -17,24 +17,17 @@
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home", "noapi" => True); $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home", "noapi" => True);
include("./inc/functions.inc.php"); include("./inc/functions.inc.php");
/* processing and discovery phase */ /* processing and discovery phase */
$phpgw_setup->check_header(); $phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
//echo "phpgw_info[setup][stage]: ".$phpgw_info["setup"]["stage"]."<br>"; if ( $phpgw_info["setup"]["stage"]["header"] == 10){
if ( $phpgw_info["setup"]["stage"] >= 1.4){ if (!$phpgw_setup->auth("Config")){
if (!$phpgw_setup->config_auth()){
$phpgw_setup->show_header("Please login",True); $phpgw_setup->show_header("Please login",True);
$phpgw_setup->loginForm($login_msg); $phpgw_setup->login_form();
exit; exit;
}else{ /* authentication settled. Moving to the database portion. */ }else{ /* authentication settled. Moving to the database portion. */
$phpgw_setup->loaddb(); $phpgw_setup->loaddb();
$phpgw_setup->check_db(); $phpgw_info["setup"]["stage"]["db"] = $phpgw_setup->check_db();
} $phpgw_info["setup"]["stage"]["config"] = $phpgw_setup->check_config();
}else{
if (!$phpgw_setup->header_auth()){
$phpgw_setup->show_header("Header.inc.php needs updating",True);
$phpgw_setup->loginForm("", $header_login_msg);
exit;
} }
} }
@ -44,21 +37,21 @@
$submsg = "At your request, this script is going to take the evil action of deleting your existing tables and re-creating them in the new format."; $submsg = "At your request, this script is going to take the evil action of deleting your existing tables and re-creating them in the new format.";
$subaction = "deleted"; $subaction = "deleted";
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "drop"; $phpgw_info["setup"]["currentver"]["phpgwapi"] = "drop";
$phpgw_info["setup"]["stage"] = 2.5; $phpgw_info["setup"]["stage"]["db"] = 5;
break; break;
case "Upgrade": case "Upgrade":
$subtitle = "Upgrading Tables"; $subtitle = "Upgrading Tables";
$submsg = "At your request, this script is going to attempt to upgrade your old tables to the new format."; $submsg = "At your request, this script is going to attempt to upgrade your old tables to the new format.";
$subaction = "upgraded"; $subaction = "upgraded";
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "oldversion"; $phpgw_info["setup"]["currentver"]["phpgwapi"] = "oldversion";
$phpgw_info["setup"]["stage"] = 2.5; $phpgw_info["setup"]["stage"]["db"] = 5;
break; break;
case "Create": case "Create":
$subtitle = "Creating Tables"; $subtitle = "Creating Tables";
$submsg = "At your request, this script is going to attempt to the tables for you."; $submsg = "At your request, this script is going to attempt to the tables for you.";
$subaction = "created"; $subaction = "created";
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "new"; $phpgw_info["setup"]["currentver"]["phpgwapi"] = "new";
$phpgw_info["setup"]["stage"] = 2.5; $phpgw_info["setup"]["stage"]["db"] = 5;
break; break;
} }
@ -92,20 +85,20 @@
echo '<table border="1" width="100%" cellspacing="0" cellpadding="2">'; echo '<table border="1" width="100%" cellspacing="0" cellpadding="2">';
echo ' <tr><td align="left" WIDTH="20%" bgcolor="486591"><font color="fefefe">Step 1 - header.inc.php</td><td align="right" bgcolor="486591">&nbsp;</td></tr>'; echo ' <tr><td align="left" WIDTH="20%" bgcolor="486591"><font color="fefefe">Step 1 - header.inc.php</td><td align="right" bgcolor="486591">&nbsp;</td></tr>';
if ($phpgw_info["setup"]["stage"] == 1.1) { if ($phpgw_info["setup"]["stage"]["header"] <= 1) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td><form action="./createheader.php" method=post>You have not created your header.inc.php yet.<br> <input type=submit value="Create one now"></form></td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td><form action="./manageheader.php" method=post>You have not created your header.inc.php yet.<br> <input type=submit value="Create one now"></form></td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 1.2 || $phpgw_info["setup"]["stage"] == 1.3) { }elseif ($phpgw_info["setup"]["stage"]["header"] == 2 || $phpgw_info["setup"]["stage"] == 3) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td><form action="./createheader.php" method=post>Your header.inc.php is out of date. Please upgrade it.<br> <input type=submit value="Upgrade now"></form></td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td><form action="./manageheader.php" method=post>Your header.inc.php is out of date. Please upgrade it.<br> <input type=submit value="Upgrade now"></form></td></tr>';
}elseif ($phpgw_info["setup"]["stage"] >= 1.4) { }elseif ($phpgw_info["setup"]["stage"]["header"] == 10) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/completed.gif" alt="X" border="0"></td><td><form action="./createheader.php" method=post> echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/completed.gif" alt="X" border="0"></td><td><form action="./manageheader.php" method=post>
Your header.inc.php is in place and current.<br> <input type=submit value="Edit existing header.inc.php"></form></td></tr>'; Your header.inc.php is in place and current.<br> <input type=submit value="Edit existing header.inc.php"></form></td></tr>';
} }
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 2 - database management</td><td align="right" bgcolor="486591">&nbsp;</td></tr>'; echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 2 - database management</td><td align="right" bgcolor="486591">&nbsp;</td></tr>';
if ($phpgw_info["setup"]["stage"] < 2.1) { if ($phpgw_info["setup"]["stage"]["header"] < 10) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Not ready for this stage yet.</td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Not ready for this stage yet.</td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 2.1) { }elseif ($phpgw_info["setup"]["stage"]["db"] <= 1) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td><form action="index.php" method=post>Your database does not exist.<br> <input type=submit value="Create one now"></form></td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td><form action="index.php" method=post>Your database does not exist.<br> <input type=submit value="Create one now"></form></td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 2.2) { }elseif ($phpgw_info["setup"]["stage"]["db"] == 2) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>';
echo ' echo '
You appear to be running a pre-beta version of phpGroupWare<br> You appear to be running a pre-beta version of phpGroupWare<br>
@ -128,7 +121,7 @@
<input type="submit" name="action" value="Delete all my tables and data"> <input type="submit" name="action" value="Delete all my tables and data">
</form>'; </form>';
echo '</td></tr>'; echo '</td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 2.3) { }elseif ($phpgw_info["setup"]["stage"]["db"] == 3) {
/* commented out because I cannot accuratly figure out if the DB exists */ /* commented out because I cannot accuratly figure out if the DB exists */
//echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td><form action="index.php" method=post>Your database exist, would you like to create your tables now?<br> <input type=submit value="Create tables"></form></td></tr>'; //echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td><form action="index.php" method=post>Your database exist, would you like to create your tables now?<br> <input type=submit value="Create tables"></form></td></tr>';
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Make sure that your database is created and the account permissions are set.<br>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Make sure that your database is created and the account permissions are set.<br>';
@ -153,7 +146,7 @@
echo '<form action="index.php" method=post>'; echo '<form action="index.php" method=post>';
echo "<input type=\"hidden\" name=\"oldversion\" value=\"new\">\n"; echo "<input type=\"hidden\" name=\"oldversion\" value=\"new\">\n";
echo 'Once the database is setup correctly <br><input type=submit name="action" value="Create"> the tables</form></td></tr>'; echo 'Once the database is setup correctly <br><input type=submit name="action" value="Create"> the tables</form></td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 2.4) { }elseif ($phpgw_info["setup"]["stage"]["db"] == 4) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>';
echo "You appear to be running version ".$phpgw_info["setup"]["oldver"]["phpgwapi"]." of phpGroupWare.<br>\n"; echo "You appear to be running version ".$phpgw_info["setup"]["oldver"]["phpgwapi"]." of phpGroupWare.<br>\n";
echo "We will automaticly update your tables/records to ".$phpgw_info["server"]["versions"]["phpgwapi"].", but we highly recommend backing up your tables in case the script causes damage to your data.\n"; echo "We will automaticly update your tables/records to ".$phpgw_info["server"]["versions"]["phpgwapi"].", but we highly recommend backing up your tables in case the script causes damage to your data.\n";
@ -168,7 +161,7 @@
echo "<input type=\"submit\" name=\"action\" value=\"Dont touch my data\">\n"; echo "<input type=\"submit\" name=\"action\" value=\"Dont touch my data\">\n";
echo "</form>\n"; echo "</form>\n";
echo '</td></tr>'; echo '</td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 2.5) { }elseif ($phpgw_info["setup"]["stage"]["db"] == 5) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>';
echo "<table width=\"100%\">\n"; echo "<table width=\"100%\">\n";
echo " <tr bgcolor=\"486591\"><td><font color=\"fefefe\">&nbsp;<b>$subtitle</b></font></td></tr>\n"; echo " <tr bgcolor=\"486591\"><td><font color=\"fefefe\">&nbsp;<b>$subtitle</b></font></td></tr>\n";
@ -184,7 +177,7 @@
echo "<br><input type=\"submit\" value=\"Re-Check My Installation\">\n"; echo "<br><input type=\"submit\" value=\"Re-Check My Installation\">\n";
echo '</form>'; echo '</form>';
echo '</td></tr>'; echo '</td></tr>';
}elseif ($phpgw_info["setup"]["stage"] >= 2.6) { }elseif ($phpgw_info["setup"]["stage"]["db"] == 10) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/completed.gif" alt="X" border="0"></td><td>Your tables are current.'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/completed.gif" alt="X" border="0"></td><td>Your tables are current.';
echo "<form method=\"POST\" action=\"index.php\">\n"; echo "<form method=\"POST\" action=\"index.php\">\n";
echo "<input type=\"hidden\" name=\"oldversion\" value=\"new\">\n"; echo "<input type=\"hidden\" name=\"oldversion\" value=\"new\">\n";
@ -193,34 +186,33 @@
echo '</td></tr>'; echo '</td></tr>';
} }
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 3 - Configuration</td><td align="right" bgcolor="486591">&nbsp;</td></tr>'; echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 3 - Configuration</td><td align="right" bgcolor="486591">&nbsp;</td></tr>';
if ($phpgw_info["setup"]["stage"] < 3.1) { if ($phpgw_info["setup"]["stage"]["db"] < 10) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Not ready for this stage yet.</td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Not ready for this stage yet.</td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 3.1) { }elseif ($phpgw_info["setup"]["stage"]["config"] <= 1) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Please phpGroupWare for your environment.'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Please configure phpGroupWare for your environment.';
echo "<form method=\"POST\" action=\"config.php\"><input type=\"submit\" value=\"Configure Now\"></form>"; echo "<form method=\"POST\" action=\"config.php\"><input type=\"submit\" value=\"Configure Now\"></form>";
echo '</td></tr>'; echo '</td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 3.2) { }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 '</td></tr>'; echo '</td></tr>';
} }
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 4 - language management</td><td align="right" bgcolor="486591">&nbsp;</td></tr>'; echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 4 - language management</td><td align="right" bgcolor="486591">&nbsp;</td></tr>';
if ($phpgw_info["setup"]["stage"] < 4.1) { if ($phpgw_info["setup"]["stage"]["config"] < 10) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Not ready for this stage yet.</td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Not ready for this stage yet.</td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 4.1) { }elseif ($phpgw_info["setup"]["stage"]["lang"] <= 1) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>stage 4.1.<br></td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>You are ready for this stage, but this stage is not yet written.<br></td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 4.2) { }elseif ($phpgw_info["setup"]["stage"]["lang"] == 10) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>stage 4.2.<br></td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/completed.gif" alt="O" border="0"></td><td>This stage is completed<br></td></tr>';
} }
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 5 - Add-on Application Installation</td><td align="right" bgcolor="486591">&nbsp;</td></tr>'; echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 5 - Add-on Application Installation</td><td align="right" bgcolor="486591">&nbsp;</td></tr>';
if ($phpgw_info["setup"]["stage"] < 5.1) { if ($phpgw_info["setup"]["stage"]["lang"] < 10) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Not ready for this stage yet.</td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>Not ready for this stage yet.</td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 5.1) { }elseif ($phpgw_info["setup"]["stage"]["apps"] <= 1) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>stage 5.1.<br></td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>You are ready for this stage, but this stage is not yet written.<br></td></tr>';
}elseif ($phpgw_info["setup"]["stage"] == 5.2) { }elseif ($phpgw_info["setup"]["stage"]["apps"] == 10) {
echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/incomplete.gif" alt="O" border="0"></td><td>stage 5.2.<br></td></tr>'; echo '<tr><td align="center"><img src="'.$phpgw_info["server"]["app_images"].'/completed.gif" alt="O" border="0"></td><td>This stage is completed<br></td></tr>';
} }
echo '</table>'; echo '</table>';
echo "</body></html>"; echo "</body></html>";
?> ?>

View File

@ -12,4 +12,4 @@
/* $Id$ */ /* $Id$ */
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.8pre5"; $phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.8pre5";
$phpgw_info["server"]["versions"]["current_header"] = "1.8"; $phpgw_info["server"]["versions"]["current_header"] = "1.9";