phpGroupWare setup ' . $title . '' . '
 phpGroupWare version ' . $phpgw_info["server"]["version"] . ' setup
'; } function loginForm($err="") { global $phpgw_info, $phpgw_domain, $SetupDomain, $SetupCookie, $FormDomain, $PHP_SELF; setup_header("Please login"); 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"; if ($phpgw_info["multiable_domains"] == True){ echo " \n"; echo "
Domain:
Password:
\n"; }else{ echo " \n"; } echo " \n"; echo "
\n"; echo "\n"; } if (isset($FormPW)) { if ($phpgw_info["multiable_domains"] == True){ if ($FormPW != $phpgw_domain[$FormDomain]["config_passwd"]) { loginForm("Invalid password."); exit; } }else{ 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 ($phpgw_info["multiable_domains"] == True){ if ($SetupCookie != $phpgw_domain[$SetupDomain]["config_passwd"]) { setcookie("SetupCookie",""); // scrub the old one setcookie("SetupDomain",""); // scrub the old one loginForm("Invalid session cookie (cookies must be enabled)"); exit; } }else{ 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"); if ($phpgw_info["multiable_domains"] == True){ setcookie("SetupDomain","$FormDomain"); } ?>