cleanup of warnings

This commit is contained in:
skeeter 2000-11-09 13:21:36 +00:00
parent 9215751229
commit 5ce0456d47
2 changed files with 23 additions and 15 deletions

View File

@ -12,7 +12,7 @@
/* $Id$ */
if (! $sessionid) {
if (!isset($sessionid) || !$sessionid) {
Header("Location: login.php");
exit;
}
@ -43,7 +43,10 @@
. "</b>";
}
if ($phpgw_info["user"]["apps"]["admin"] && $phpgw_info["server"]["checkfornewversion"]) {
if ((isset($phpgw_info["user"]["apps"]["admin"]) &&
$phpgw_info["user"]["apps"]["admin"]) &&
(isset($phpgw_info["server"]["checkfornewversion"]) &&
$phpgw_info["server"]["checkfornewversion"])) {
$phpgw->network->set_addcrlf(False);
if ($phpgw->network->open_port("phpgroupware.org",80,30)) {
$phpgw->network->write_port("GET /currentversion HTTP/1.0\nHOST: www.phpgroupware.org\n\n");
@ -75,14 +78,18 @@
<?php
//echo '<a href="javascript:opennotifywindow()">Open notify window</a>';
if(isset($code) && $code){
switch($code){
case "5":
echo lang("You do not have permissions to that application");
break;
}
}
if ($phpgw_info["user"]["apps"]["email"]
&& $phpgw_info["user"]["preferences"]["email"]["mainscreen_showmail"]) {
if ((isset($phpgw_info["user"]["apps"]["email"]) &&
$phpgw_info["user"]["apps"]["email"]) &&
(isset($phpgw_info["user"]["preferences"]["email"]["mainscreen_showmail"]) &&
$phpgw_info["user"]["preferences"]["email"]["mainscreen_showmail"])) {
echo "<!-- Mailox info -->\n";
$mbox = $phpgw->msg->login();

View File

@ -30,6 +30,7 @@
*/
$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"));
@ -51,7 +52,7 @@
{
global $phpgw_info, $code, $lastloginid, $login;
/* This needs to be this way, because if someone doesnt want to use cookies, we shouldnt sneak one in */
if ($code != 5 && $phpgw_info["server"]["usecookies"] == True){
if ($code != 5 && (isset($phpgw_info["server"]["usecookies"]) && $phpgw_info["server"]["usecookies"])){
if (!empty($login)) {
SetCookie("lastloginid",$login, time() + (24 * 3600 * 14),"/");
}
@ -88,20 +89,20 @@
deny_login();
}
if ($submit) {
if (isset($submit) && $submit) {
if (getenv(REQUEST_METHOD) != "POST") {
Header("Location: " . $phpgw->link("", "code=5"));
Header("Location: ".$phpgw->link("","code=5"));
}
$sessionid = $phpgw->session->create($login,$passwd);
if (! $sessionid) {
Header("Location: " . $phpgw_info["server"]["webserver_url"] . "/login.php?cd=5");
if (!isset($sessionid) || !$sessionid) {
Header("Location: ".$phpgw_info["server"]["webserver_url"]."/login.php?cd=5");
} else {
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php", "cd=yes"));
Header("Location: ".$phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php", "cd=yes"));
}
} else {
if ($last_loginid) {
if (isset($last_loginid) && $last_loginid) {
$phpgw->db->query("select account_id from accounts where account_lid='$last_loginid'");
$phpgw->db->next_record();