Remove the session->loginid references

This commit is contained in:
jengo 2000-09-05 03:14:08 +00:00
parent 5b8a879df7
commit ade3d1ab28
5 changed files with 13 additions and 13 deletions

View File

@ -35,7 +35,7 @@
$sql = "insert into addressbook (owner,access,firstname,lastname,email," $sql = "insert into addressbook (owner,access,firstname,lastname,email,"
. "hphone,wphone,fax,pager,mphone,ophone,street,city,state,zip,bday," . "hphone,wphone,fax,pager,mphone,ophone,street,city,state,zip,bday,"
. "notes,company) values ('" . $phpgw->session->loginid . "','$access','" . "notes,company) values ('" . $phpgw_info["user"]["userid"] . "','$access','"
. addslashes($firstname). "','" . addslashes($firstname). "','"
. addslashes($lastname) . "','" . addslashes($lastname) . "','"
. addslashes($email) . "','" . addslashes($email) . "','"

View File

@ -27,7 +27,7 @@
$phpgw->db->query("select owner from addressbook where con='$con'"); $phpgw->db->query("select owner from addressbook where con='$con'");
$phpgw->db->next_record(); $phpgw->db->next_record();
if ($phpgw->db->f("owner") != $phpgw->session->loginid) if ($phpgw->db->f("owner") != $phpgw_info["user"]["userid"])
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
?> ?>
@ -45,10 +45,10 @@
//exit; //exit;
} else { } else {
$phpgw->db->query("delete from addressbook where owner='" . $phpgw->session->loginid $phpgw->db->query("delete from addressbook where owner='" . $phpgw_info["user"]["userid"]
. "' and con='$con'"); . "' and con='$con'");
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/", Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); "cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
} }
?>

View File

@ -21,13 +21,13 @@
if (! $con) { if (! $con) {
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/", Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); "cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
exit; exit;
} }
if (! $submit) { if (! $submit) {
$phpgw->db->query("SELECT * FROM addressbook WHERE owner='" $phpgw->db->query("SELECT * FROM addressbook WHERE owner='"
. $phpgw->session->loginid . "' AND con='$con'"); . $phpgw_info["user"]["userid"] . "' AND con='$con'");
$phpgw->db->next_record(); $phpgw->db->next_record();
$fields = array( $fields = array(
@ -75,7 +75,7 @@
. "', notes='" . addslashes($notes) . "', notes='" . addslashes($notes)
. "', company='" . addslashes($company) . "', company='" . addslashes($company)
. "', access='" . addslashes($access) . "', access='" . addslashes($access)
. "' WHERE owner='" . $phpgw->session->loginid . "' AND con='$con'"; . "' WHERE owner='" . $phpgw_info["user"]["userid"] . "' AND con='$con'";
$phpgw->db->query($sql); $phpgw->db->query($sql);

View File

@ -36,11 +36,11 @@
if ($filter != "none") { if ($filter != "none") {
$filtermethod = " access like '%,$filter,%' "; $filtermethod = " access like '%,$filter,%' ";
} else { } else {
$filtermethod = " (owner='" . $phpgw->session->loginid ."' OR access='public' " $filtermethod = " (owner='" . $phpgw_info["user"]["userid"] ."' OR access='public' "
. $phpgw->accounts->sql_search("access") . " ) "; . $phpgw->accounts->sql_search("access") . " ) ";
} }
} else { } else {
$filtermethod = " owner='" . $phpgw->session->loginid . "' "; $filtermethod = " owner='" . $phpgw_info["user"]["userid"] . "' ";
} }
if ($query) { if ($query) {

View File

@ -20,13 +20,13 @@
include("../header.inc.php"); include("../header.inc.php");
if (! $con) if (! $con)
Header("Location: " . $phpgw_info["server"]["webserver_url"] . Header("Location: " . $phpgw_info["server"]["webserver_url"] .
"/addressbook/?sessionid=" . $phpgw->session->id); "/addressbook/?sessionid=" . $phpgw_info["user"]["sessionid"]);
if ($filter != "private") if ($filter != "private")
$filtermethod = " or access='public' " . $phpgw->groups->sql_search(); $filtermethod = " or access='public' " . $phpgw->groups->sql_search();
$phpgw->db->query("SELECT * FROM addressbook WHERE con='$con' AND (owner='" $phpgw->db->query("SELECT * FROM addressbook WHERE con='$con' AND (owner='"
. $phpgw->session->loginid . "' $filtermethod)"); . $phpgw_info["user"]["userid"] . "' $filtermethod)");
$phpgw->db->next_record(); $phpgw->db->next_record();
$fields = array( $fields = array(