diff --git a/header.inc.php.template b/header.inc.php.template index d24a5168e4..ef3ff74cc9 100644 --- a/header.inc.php.template +++ b/header.inc.php.template @@ -42,6 +42,9 @@ "config_passwd" => "__CONFIG_PASS__" ); + /* If you want to have your domains in a select box, change to True */ + $phpgw_info["server"]["show_domain_selectbox"] = True; + /* This is used to control mcrypt's use */ $phpgw_info["server"]["mcrypt_enabled"] = __ENABLE_MCRYPT__; /* Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use. */ diff --git a/login.php b/login.php index 02f12e3944..cabdb202a1 100755 --- a/login.php +++ b/login.php @@ -14,6 +14,9 @@ $phpgw_info["flags"] = array("disable_template_class" => True, "login" => True, "currentapp" => "login", "noheader" => True); include("./header.inc.php"); + + $deny_login = False; + /* if ($code != 10 && $phpgw_info["server"]["usecookies"] == False) { Setcookie("sessionid"); @@ -21,21 +24,23 @@ Setcookie("domain"); } */ - $deny_login = False; $tmpl = new Template($phpgw_info["server"]["template_dir"]); - $tmpl->set_file(array("login_form" => "login.tpl", - "domain_row" => "login_domain_row.tpl")); - $tmpl->set_block("login_form","domain_row"); + + if (! $deny_login && ! $phpgw_info["server"]["show_domain_selectbox"]) { + $tmpl->set_file(array("login_form" => "login.tpl")); + } else if ($phpgw_info["server"]["show_domain_selectbox"]) { + $tmpl->set_file(array("login_form" => "login_selectdomain.tpl")); + } else { + $tmpl->set_file(array("login_form" => "login_denylogin.tpl")); + } // When I am updating my server, I don't want people logging in a messing // things up. function deny_login() { global $tmpl; - $tmpl->set_var("updating","