fixes logout/login problem

This commit is contained in:
skeeter 2000-12-31 23:46:55 +00:00
parent 1ed4e92e1b
commit 6e828646fa
4 changed files with 18 additions and 12 deletions

View File

@ -40,7 +40,7 @@
$phpgw_setup->db->next_record(); $phpgw_setup->db->next_record();
if ($phpgw_setup->db->f("config_value") <> $newsetting[1]) { if ($phpgw_setup->db->f("config_value") <> $newsetting[1]) {
$phpgw_setup->db->query("DELETE FROM newsgroups"); $phpgw_setup->db->query("DELETE FROM newsgroups");
$phpgw_setup->db->query("DELETE FROM users_newsgroups"); // $phpgw_setup->db->query("DELETE FROM users_newsgroups");
} }
} }
} }

View File

@ -40,7 +40,7 @@
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"]["header"] == 10){ 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";
@ -134,17 +134,10 @@
}else{ }else{
return True; 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)) { } elseif (isset($FormPW)) {
if (isset($ConfigLogin)){ if (isset($ConfigLogin)){
if ($FormPW == $phpgw_domain[$FormDomain]["config_passwd"] && $auth_type == "Config") { if ($FormPW == $phpgw_domain[$FormDomain]["config_passwd"] && $auth_type == "Config") {
setcookie("HeaderPW"); // scrub the old one
setcookie("ConfigPW",$FormPW); setcookie("ConfigPW",$FormPW);
setcookie("ConfigDomain",$FormDomain); setcookie("ConfigDomain",$FormDomain);
$ConfigDomain = $FormDomain; $ConfigDomain = $FormDomain;
@ -162,6 +155,14 @@
return False; return False;
} }
} }
} 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;
}
} else { } else {
return False; return False;
} }
@ -353,4 +354,4 @@
} }
?> ?>

View File

@ -20,7 +20,7 @@
/* Check header and authentication */ /* Check header and authentication */
$phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header(); $phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
if ($phpgw_info["setup"]["stage"]["header"] != 10){ if ($phpgw_info["setup"]["stage"]["header"] != "10"){
Header("Location: manageheader.php"); Header("Location: manageheader.php");
exit; exit;
}elseif (!$phpgw_setup->auth("Config")){ }elseif (!$phpgw_setup->auth("Config")){

View File

@ -251,6 +251,11 @@
} }
echo '<form action="index.php" method=post>'; echo '<form action="index.php" method=post>';
echo'<br> After retrieving the file put it into place as the header.inc.php, then click continue.<br>'; echo'<br> After retrieving the file put it into place as the header.inc.php, then click continue.<br>';
echo'<input type=hidden name="FormLogout" value="header">';
// echo'<input type=hidden name="FormLogout" value="config">';
// echo'<input type=hidden name="ConfigLogin" value="Login">';
// echo'<input type=hidden name="FormPW" value="'.$phpgw_domain[$phpgw_info["server"]["default_domain"]]["config_passwd"].'">';
// echo'<input type=hidden name="FormDomain" value="'.$phpgw_info["server"]["default_domain"].'">';
echo'<input type=submit name="junk" value="continue">'; echo'<input type=submit name="junk" value="continue">';
echo "</form>"; echo "</form>";
echo "</body>"; echo "</body>";