diff --git a/setup/inc/setup_auth.inc.php b/setup/inc/setup_auth.inc.php index 86a7b13578..309a0f015f 100644 --- a/setup/inc/setup_auth.inc.php +++ b/setup/inc/setup_auth.inc.php @@ -15,54 +15,58 @@ // password in ../header.inc.php to protect all of the setup // pages from unauthorized use. - function setup_header() + function setup_header($title = "") { global $phpgw_info; - echo 'phpGroupWare - setupphpGroupWare setup ' . $title . '' . '
 phpGroupWare version ' . $phpgw_info["server"]["version"] . ' setup
'; } -function loginForm($err="") { - global $PHP_SELF; - echo "phpGroupWare Setup - please Login\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - if ($err != "") { - echo " \n"; - } - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 Setup Login
".$err."
\n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "\n"; -} + function loginForm($err="") + { + global $PHP_SELF; + + setup_header("Please login"); -if (isset($FormPW) ) { - if ($FormPW != $phpgw_info["server"]["config_passwd"]) { - loginForm("Invalid password."); - exit; - } - // Valid login, fall through and set the cookie - $SetupCookie = $FormPW; -} else if (isset($SetupCookie)) { - if ($SetupCookie != $phpgw_info["server"]["config_passwd"]) { - setcookie("SetupCookie",""); // scrub the old one - loginForm("Invalid session cookie (cookies must be enabled)"); - exit; + echo "

\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + if ($err != "") { + echo " \n"; + } + echo " \n"; + echo " \n"; + echo " \n"; + echo "
 Setup Login
".$err."
\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "\n"; } -} else { - loginForm(); - exit; -} -// Auth ok. -setcookie("SetupCookie","$SetupCookie"); -?> + + if (isset($FormPW)) { + if ($FormPW != $phpgw_info["server"]["config_passwd"]) { + loginForm("Invalid password."); + exit; + } + // Valid login, fall through and set the cookie + $SetupCookie = $FormPW; + } else if (isset($SetupCookie)) { + if ($SetupCookie != $phpgw_info["server"]["config_passwd"]) { + setcookie("SetupCookie",""); // scrub the old one + loginForm("Invalid session cookie (cookies must be enabled)"); + exit; + } + } else { + loginForm(); + exit; + } + + // Auth ok. + setcookie("SetupCookie","$SetupCookie"); +?> \ No newline at end of file diff --git a/setup/index.php b/setup/index.php index decdf1f1b2..83b15b48c2 100644 --- a/setup/index.php +++ b/setup/index.php @@ -62,20 +62,23 @@ * for applications to inteact with the user, this is how it is. * * * \**********************************************************************/ + setup_header(); + echo "
"; + $ok = true; $baseDir = $phpgw_info["server"]["server_root"]; include("./inc/core_setup.inc.php"); if (!$ok) { exit; } else { - echo "\n"; + echo "
\n"; echo ""; - echo ""; + echo ""; echo "\n"; $db->query("select app_version from applications where app_name='admin'"); $db->next_record(); $curversion = $db->f("app_version"); - echo "\n"; + echo "\n"; echo "
phpGroupWare Core StausphpGroupWare Core Staus
Core version $curversion. No updates needed.
Core version $curversion. No updates needed.
\n\n"; } // Remove the appName from all users and groupws on the system @@ -204,11 +207,6 @@ } } - - // Initial HTML output - echo "Setup phpGroupWare\n"; - echo "\n"; - // Loop through all the directories looking for possible 3rd party apps $baseDir = $phpgw_info["server"]["server_root"]; $setupFile = "/inc/setup.inc.php"; // File to look for to identify apps @@ -287,16 +285,16 @@ echo "

\n"; - echo "\n"; - echo "\n"; + echo "
Application Setup
\n"; + echo "\n"; echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo "\n"; $numApps = 0;
Application Setup
ApplicationInstalled VersionDetected VersionInstallUpgradeRemoveDo NothingApplicationInstalled VersionDetected VersionInstallUpgradeRemoveDo Nothing