forked from extern/egroupware
commiting while I go to lunch
This commit is contained in:
parent
329e8b3f00
commit
7ec19342e2
@ -30,6 +30,7 @@
|
||||
|
||||
$phpgw_info["server"]["server_root"] = "{SERVER_ROOT}";
|
||||
$phpgw_info["server"]["include_root"] = "{INCLUDE_ROOT}";
|
||||
$phpgw_info["server"]["header_admin_password"] = "{HEADER_ADMIN_PASSWORD}";
|
||||
|
||||
$phpgw_domain["default"] = array (
|
||||
"db_host" => "{DB_HOST}",
|
||||
@ -80,7 +81,7 @@
|
||||
\**************************************************************************/
|
||||
$phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["include_root"]."/phpgwapi/inc";
|
||||
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
|
||||
if (!isset($phpgw_info["flags"]["noapi"]) ||
|
||||
!$phpgw_info["flags"]["noapi"] == True){
|
||||
|
@ -3,9 +3,21 @@
|
||||
include("./inc/functions.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();
|
||||
//echo "phpgw_info[setup][stage]: ".$phpgw_info["setup"]["stage"]."<br>";
|
||||
if ( $phpgw_info["setup"]["stage"] >= 1.4){
|
||||
if (!$phpgw_setup->header_auth()){
|
||||
$phpgw_setup->show_header("Please login",True);
|
||||
@ -21,7 +33,6 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
switch($action){
|
||||
case "download":
|
||||
header("Content-disposition: attachment; filename=\"header.inc.php\"");
|
||||
|
@ -16,7 +16,7 @@
|
||||
var $db;
|
||||
var $template;
|
||||
|
||||
function show_header($title = "",$nologoutbutton = False)
|
||||
function show_header($title = "",$nologoutbutton = False, $logoutfrom = "config")
|
||||
{
|
||||
global $phpgw_info, $PHP_SELF;
|
||||
echo '
|
||||
@ -36,34 +36,33 @@
|
||||
if ($nologoutbutton) {
|
||||
echo " ";
|
||||
} else {
|
||||
echo '<a href="' . $PHP_SELF . '?FormLogout=True" class="link">Logout</a> ';
|
||||
echo '<a href="' . $PHP_SELF . '?FormLogout='.$logoutfrom.'" class="link">Logout</a> ';
|
||||
}
|
||||
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 "<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 " <td colspan=\"2\"><font color=\"fefefe\"> <b>Setup/Config Admin Login</b></font></td>\n";
|
||||
echo " </tr>\n";
|
||||
if ($err != "") {
|
||||
echo " <tr bgcolor='#e6e6e6'><td colspan='2'><font color='#ff0000'>".$login_msg."</font></td></tr>\n";
|
||||
}
|
||||
echo " <tr bgcolor='#e6e6e6'><td colspan='2'><font color='#ff0000'>".$phpgw_info["setup"]["ConfigLoginMSG"]."</font></td></tr>\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){
|
||||
echo " <table><tr><td>Domain: </td><td><input type='text' name='FormDomain' value=''></td></tr>\n";
|
||||
echo " <tr><td>Password: </td><td><input type='password' name='FormPW' value=''></td></tr></table>\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='changeme'></td></tr></table>\n";
|
||||
}else{
|
||||
reset($phpgw_domain);
|
||||
$default_domain = each($phpgw_domain);
|
||||
echo " <input type='password' name='FormPW' value=''>\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 " </tr>\n";
|
||||
}
|
||||
@ -71,12 +70,10 @@
|
||||
echo " <tr bgcolor=\"486591\">\n";
|
||||
echo " <td colspan=\"2\"><font color=\"fefefe\"> <b>Header Admin Login</b></font></td>\n";
|
||||
echo " </tr>\n";
|
||||
if ($err != "") {
|
||||
echo " <tr bgcolor='#e6e6e6'><td colspan='2'><font color='#ff0000'>".$header_login_msg."</font></td></tr>\n";
|
||||
}
|
||||
echo " <tr bgcolor='#e6e6e6'><td colspan='2'><font color='#ff0000'>".$phpgw_info["setup"]["HeaderLoginMSG"]."</font></td></tr>\n";
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td><form action='createheader.php' method='POST'>\n";
|
||||
echo " <input type='password' name='HeaderPW' value='changethis'>\n";
|
||||
echo " <td><form action='manageheader.php' method='POST'>\n";
|
||||
echo " <input type='password' name='FormPW' value='changethis'>\n";
|
||||
echo " <input type='submit' name='HeaderLogin' value='Login'>\n";
|
||||
echo " </form></td>\n";
|
||||
echo " </tr>\n";
|
||||
@ -89,26 +86,26 @@
|
||||
{
|
||||
global $phpgw_domain, $phpgw_info;
|
||||
if(!file_exists("../header.inc.php") || !is_file("../header.inc.php")) {
|
||||
$phpgw_info["setup"]["stage"] = 1.1;
|
||||
$phpgw_info["setup"]["header_msg"] = "Stage One";
|
||||
return 1;
|
||||
}else{
|
||||
include("../header.inc.php");
|
||||
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)";
|
||||
return 2;
|
||||
}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)";
|
||||
return 3;
|
||||
}else{ /* header.inc.php part settled. Moving to authentication */
|
||||
$phpgw_info["setup"]["stage"] = 1.4;
|
||||
$phpgw_info["setup"]["header_msg"] = "Stage One (Completed)";
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generate_header()
|
||||
{
|
||||
global $setting, $phpgw_setup;
|
||||
global $setting, $phpgw_setup, $phpgw_info;
|
||||
|
||||
$phpgw_setup->template->set_file(array("header" => "header.inc.php.template"));
|
||||
while(list($k,$v) = each($setting)) {
|
||||
@ -117,86 +114,78 @@
|
||||
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)) {
|
||||
setcookie("SetupPW"); // scrub the old one
|
||||
setcookie("SetupDomain"); // scrub the old one
|
||||
setcookie("HeaderPW"); // scrub the old one
|
||||
$login_msg = "You have sucessfully logged out";
|
||||
return False;
|
||||
} elseif (isset($SetupPW)) {
|
||||
if ($SetupPW != $phpgw_domain[$SetupDomain]["config_passwd"]) {
|
||||
setcookie("SetupPW"); // scrub the old one
|
||||
setcookie("SetupDomain"); // scrub the old one
|
||||
$login_msg = "Invalid session cookie (cookies must be enabled)";
|
||||
if ($FormLogout == "config"){
|
||||
setcookie("ConfigPW"); // scrub the old one
|
||||
setcookie("ConfigDomain"); // scrub the old one
|
||||
$phpgw_info["setup"]["ConfigLoginMSG"] = "You have sucessfully logged out";
|
||||
return False;
|
||||
}elseif($FormLogout == "header"){
|
||||
setcookie("HeaderPW"); // scrub the old one
|
||||
$phpgw_info["setup"]["HeaderLoginMSG"] = "You have sucessfully logged out";
|
||||
return False;
|
||||
}
|
||||
} 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;
|
||||
}else{
|
||||
return True;
|
||||
}
|
||||
} elseif (isset($FormPW)) {
|
||||
if ($FormPW == $phpgw_domain[$FormDomain]["config_passwd"]) {
|
||||
setcookie("SetupPW",$FormPW);
|
||||
setcookie("SetupDomain",$FormDomain);
|
||||
$SetupDomain = $FormDomain;
|
||||
return True;
|
||||
}else{
|
||||
$login_msg = "Invalid password";
|
||||
return False;
|
||||
if (isset($ConfigLogin)){
|
||||
if ($FormPW == $phpgw_domain[$FormDomain]["config_passwd"] && $auth_type == "Config") {
|
||||
setcookie("ConfigPW",$FormPW);
|
||||
setcookie("ConfigDomain",$FormDomain);
|
||||
$ConfigDomain = $FormDomain;
|
||||
return True;
|
||||
}else{
|
||||
$phpgw_info["setup"]["ConfigLoginMSG"] = "Invalid password";
|
||||
return False;
|
||||
}
|
||||
}elseif (isset($HeaderLogin)){
|
||||
if ($FormPW == $phpgw_info["server"]["header_admin_password"] && $auth_type == "Header") {
|
||||
setcookie("HeaderPW",$FormPW);
|
||||
return True;
|
||||
}else{
|
||||
$phpgw_info["setup"]["HeaderLoginMSG"] = "Invalid password";
|
||||
return False;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}else{
|
||||
$header_login_msg = "Invalid password";
|
||||
return False;
|
||||
}
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function loaddb()
|
||||
{
|
||||
global $phpgw_info, $phpgw_domain, $SetupDomain;
|
||||
global $phpgw_info, $phpgw_domain, $ConfigDomain;
|
||||
/* Database setup */
|
||||
if (!isset($phpgw_info["server"]["api_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->Host = $phpgw_domain[$SetupDomain]["db_host"];
|
||||
$this->db->Type = $phpgw_domain[$SetupDomain]["db_type"];
|
||||
$this->db->Database = $phpgw_domain[$SetupDomain]["db_name"];
|
||||
$this->db->User = $phpgw_domain[$SetupDomain]["db_user"];
|
||||
$this->db->Password = $phpgw_domain[$SetupDomain]["db_pass"];
|
||||
$this->db->Host = $phpgw_domain[$ConfigDomain]["db_host"];
|
||||
$this->db->Type = $phpgw_domain[$ConfigDomain]["db_type"];
|
||||
$this->db->Database = $phpgw_domain[$ConfigDomain]["db_name"];
|
||||
$this->db->User = $phpgw_domain[$ConfigDomain]["db_user"];
|
||||
$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()
|
||||
@ -214,23 +203,15 @@
|
||||
}
|
||||
if (isset($phpgw_info["setup"]["oldver"]["phpgwapi"])){
|
||||
if ($phpgw_info["setup"]["oldver"]["phpgwapi"] == $phpgw_info["server"]["versions"]["phpgwapi"]){
|
||||
$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"]["stage"] = 3.1;
|
||||
$phpgw_info["setup"]["header_msg"] = "Stage 3 (Needs Configuration)";
|
||||
}else{
|
||||
$phpgw_info["setup"]["stage"] = 3.2;
|
||||
$phpgw_info["setup"]["header_msg"] = "Stage 3 (Configuration OK)";
|
||||
}
|
||||
$phpgw_info["setup"]["header_msg"] = "Stage 2 (Tables Complete)";
|
||||
return 10;
|
||||
}else{
|
||||
$phpgw_info["setup"]["stage"] = 2.4;
|
||||
$phpgw_info["setup"]["header_msg"] = "Stage 2 (Tables need upgrading)";
|
||||
return 4;
|
||||
}
|
||||
}else{
|
||||
$phpgw_info["setup"]["stage"] = 2.2;
|
||||
$phpgw_info["setup"]["header_msg"] = "Stage 2 (Tables appear to be pre-beta)";
|
||||
return 2;
|
||||
}
|
||||
}else{
|
||||
/* 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 )");
|
||||
$this->db->query("DROP TABLE phpgw_testrights");
|
||||
|
||||
if (isset($db_rights)){
|
||||
//if (isset($isdb)){
|
||||
$phpgw_info["setup"]["stage"] = 2.3;
|
||||
$phpgw_info["setup"]["header_msg"] = "Stage 2 (Create tables)";
|
||||
return 3;
|
||||
}else{
|
||||
$phpgw_info["setup"]["stage"] = 2.1;
|
||||
$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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,24 +17,17 @@
|
||||
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home", "noapi" => True);
|
||||
include("./inc/functions.inc.php");
|
||||
|
||||
/* processing and discovery phase */
|
||||
$phpgw_setup->check_header();
|
||||
//echo "phpgw_info[setup][stage]: ".$phpgw_info["setup"]["stage"]."<br>";
|
||||
if ( $phpgw_info["setup"]["stage"] >= 1.4){
|
||||
if (!$phpgw_setup->config_auth()){
|
||||
$phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
|
||||
if ( $phpgw_info["setup"]["stage"]["header"] == 10){
|
||||
if (!$phpgw_setup->auth("Config")){
|
||||
$phpgw_setup->show_header("Please login",True);
|
||||
$phpgw_setup->loginForm($login_msg);
|
||||
$phpgw_setup->login_form();
|
||||
exit;
|
||||
}else{ /* authentication settled. Moving to the database portion. */
|
||||
$phpgw_setup->loaddb();
|
||||
$phpgw_setup->check_db();
|
||||
}
|
||||
}else{
|
||||
if (!$phpgw_setup->header_auth()){
|
||||
$phpgw_setup->show_header("Header.inc.php needs updating",True);
|
||||
$phpgw_setup->loginForm("", $header_login_msg);
|
||||
exit;
|
||||
$phpgw_info["setup"]["stage"]["db"] = $phpgw_setup->check_db();
|
||||
$phpgw_info["setup"]["stage"]["config"] = $phpgw_setup->check_config();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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.";
|
||||
$subaction = "deleted";
|
||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "drop";
|
||||
$phpgw_info["setup"]["stage"] = 2.5;
|
||||
$phpgw_info["setup"]["stage"]["db"] = 5;
|
||||
break;
|
||||
case "Upgrade":
|
||||
$subtitle = "Upgrading Tables";
|
||||
$submsg = "At your request, this script is going to attempt to upgrade your old tables to the new format.";
|
||||
$subaction = "upgraded";
|
||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "oldversion";
|
||||
$phpgw_info["setup"]["stage"] = 2.5;
|
||||
$phpgw_info["setup"]["stage"]["db"] = 5;
|
||||
break;
|
||||
case "Create":
|
||||
$subtitle = "Creating Tables";
|
||||
$submsg = "At your request, this script is going to attempt to the tables for you.";
|
||||
$subaction = "created";
|
||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "new";
|
||||
$phpgw_info["setup"]["stage"] = 2.5;
|
||||
$phpgw_info["setup"]["stage"]["db"] = 5;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -92,20 +85,20 @@
|
||||
|
||||
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"> </td></tr>';
|
||||
if ($phpgw_info["setup"]["stage"] == 1.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>';
|
||||
}elseif ($phpgw_info["setup"]["stage"] == 1.2 || $phpgw_info["setup"]["stage"] == 1.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>';
|
||||
}elseif ($phpgw_info["setup"]["stage"] >= 1.4) {
|
||||
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>
|
||||
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="./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"]["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="./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"]["header"] == 10) {
|
||||
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>';
|
||||
}
|
||||
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 2 - database management</td><td align="right" bgcolor="486591"> </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>';
|
||||
}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>';
|
||||
}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 '
|
||||
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">
|
||||
</form>';
|
||||
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 */
|
||||
//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>';
|
||||
@ -153,7 +146,7 @@
|
||||
echo '<form action="index.php" method=post>';
|
||||
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>';
|
||||
}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 "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";
|
||||
@ -168,7 +161,7 @@
|
||||
echo "<input type=\"submit\" name=\"action\" value=\"Dont touch my data\">\n";
|
||||
echo "</form>\n";
|
||||
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 "<table width=\"100%\">\n";
|
||||
echo " <tr bgcolor=\"486591\"><td><font color=\"fefefe\"> <b>$subtitle</b></font></td></tr>\n";
|
||||
@ -184,7 +177,7 @@
|
||||
echo "<br><input type=\"submit\" value=\"Re-Check My Installation\">\n";
|
||||
echo '</form>';
|
||||
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 "<form method=\"POST\" action=\"index.php\">\n";
|
||||
echo "<input type=\"hidden\" name=\"oldversion\" value=\"new\">\n";
|
||||
@ -193,34 +186,33 @@
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 3 - Configuration</td><td align="right" bgcolor="486591"> </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>';
|
||||
}elseif ($phpgw_info["setup"]["stage"] == 3.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.';
|
||||
}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 configure phpGroupWare for your environment.';
|
||||
echo "<form method=\"POST\" action=\"config.php\"><input type=\"submit\" value=\"Configure Now\"></form>";
|
||||
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 "<form method=\"POST\" action=\"config.php\"><input type=\"submit\" value=\"Edit Current Configuration\"></form>";
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo ' <tr><td align="left" bgcolor="486591"><font color="fefefe">Step 4 - language management</td><td align="right" bgcolor="486591"> </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>';
|
||||
}elseif ($phpgw_info["setup"]["stage"] == 4.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>';
|
||||
}elseif ($phpgw_info["setup"]["stage"] == 4.2) {
|
||||
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>';
|
||||
}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>You are ready for this stage, but this stage is not yet written.<br></td></tr>';
|
||||
}elseif ($phpgw_info["setup"]["stage"]["lang"] == 10) {
|
||||
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"> </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>';
|
||||
}elseif ($phpgw_info["setup"]["stage"] == 5.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>';
|
||||
}elseif ($phpgw_info["setup"]["stage"] == 5.2) {
|
||||
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>';
|
||||
}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>You are ready for this stage, but this stage is not yet written.<br></td></tr>';
|
||||
}elseif ($phpgw_info["setup"]["stage"]["apps"] == 10) {
|
||||
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 "</body></html>";
|
||||
?>
|
||||
|
@ -12,4 +12,4 @@
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.8pre5";
|
||||
$phpgw_info["server"]["versions"]["current_header"] = "1.8";
|
||||
$phpgw_info["server"]["versions"]["current_header"] = "1.9";
|
||||
|
Loading…
Reference in New Issue
Block a user