Removing the session->loginid references

This commit is contained in:
jengo 2000-09-05 03:05:32 +00:00
parent 3f51405cce
commit 5b8a879df7
7 changed files with 29 additions and 38 deletions

View File

@ -81,13 +81,7 @@
<FONT SIZE="+1" COLOR="<?php echo $H2COLOR;?>">
<br>
<?php
if (strlen($phpgw->session->firstname) || strlen($phpgw->session->lastname)) {
if (strlen($phpgw->session->firstname))
echo $phpgw->session->firstname . " ";
if (strlen($phpgw->session->lastname))
echo $phpgw->session->lastname . " ";
} else
echo $phpgw->session->loginid;
echo $phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]);
?>
</FONT>
</TD>

View File

@ -21,15 +21,15 @@
if ($id > 0) {
$can_edit = false;
$phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login="
. "'" . $phpgw->session->loginid . "' AND cal_id = $id");
. "'" . $phpgw_info["user"]["userid"] . "' AND cal_id = $id");
$phpgw->db->next_record();
if ($phpgw->db->f("cal_id") > 0)
$can_edit = true;
$phpgw->db->query("SELECT cal_create_by, cal_date, cal_time, cal_mod_date, "
. "cal_mod_time, cal_duration, cal_priority, cal_type, "
. "cal_access, cal_name, cal_description FROM webcal_entry "
. "WHERE cal_id=$id");
. "cal_mod_time, cal_duration, cal_priority, cal_type, "
. "cal_access, cal_name, cal_description FROM webcal_entry "
. "WHERE cal_id=$id");
$phpgw->db->next_record();
$year = (int)($phpgw->db->f(1) / 10000);
@ -259,8 +259,8 @@ function validate_and_submit() {
// This will cause problems if there are more then 13 permissions.
// The permissions class needs to be updated to handle this.
$phpgw->db->query("select loginid, lastname, firstname from accounts where "
. "status !='L' and loginid != '" . $phpgw->session->loginid . "' and "
. "permissions like '%:calendar:%' order by lastname,firstname,loginid");
. "status !='L' and loginid != '" . $phpgw_info["user"]["userid"] . "' and "
. "permissions like '%:calendar:%' order by lastname,firstname,loginid");
if ($phpgw->db->num_rows() > 50)
$size = 15;
@ -287,7 +287,7 @@ function validate_and_submit() {
}
echo "<input type=\"hidden\" name=\"participants[]\" value=\""
. $phpgw->session->loginid ."\">"
. $phpgw_info["user"]["userid"] ."\">"
. "</select></td></tr>\n";
?>
@ -403,8 +403,7 @@ function validate_and_submit() {
<?php
if ($id > 0) {
echo "<A HREF=\"delete.php?sessionid=" . $phpgw->session->id
. "&id=$id\" onClick=\"return confirm('"
echo "<A HREF=\"" . $phpgw->link("delete.php","id=$id") . "\" onClick=\"return confirm('"
. lang_calendar("Are you sure\\nyou want to\\ndelete this entry ?") . "');\">"
. lang_common("Delete") . "</A><BR>";
}

View File

@ -126,7 +126,7 @@ if (! $error) {
$sql = "INSERT INTO webcal_entry (cal_create_by, cal_date, " .
"cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, " .
"cal_access, cal_type, cal_name, cal_description ) " .
"VALUES ('" . $phpgw->session->loginid . "', ";
"VALUES ('" . $phpgw_info["user"]["userid"] . "', ";
$date = mktime(0,0,0,$month,$day,$year);
$sql .= date("Ymd", $date) . ", ";
@ -170,13 +170,13 @@ if (! $error) {
for ($i = 0; $i < count($participants); $i++) {
// Rewrite
$sql = "INSERT INTO webcal_entry_user (cal_id,cal_login,cal_status ) "
. "VALUES ($id, '" . $participants[$i] . "', 'A')";
. "VALUES ($id, '" . $participants[$i] . "', 'A')";
$phpgw->db->query($sql);
}
if (count($participants) == 0)
$phpgw->db->query("insert into webcal_entry_user (cal_id,cal_login,cal_status"
. ") values ($id,'" . $phpgw->session->loginid . "','A' )");
. ") values ($id,'" . $phpgw_info["user"]["userid"] . "','A' )");
}
if (strlen($rpt_type) || ! strcmp($rpt_type,'none') == 0) {

View File

@ -386,7 +386,7 @@ function month_name ( $m ) {
. "FROM webcal_entry, webcal_entry_repeats, webcal_entry_user "
. "WHERE webcal_entry.cal_id = webcal_entry_repeats.cal_id "
. "AND webcal_entry.cal_id = webcal_entry_user.cal_id "
. "AND webcal_entry_user.cal_login = '" . $phpgw->session->loginid . "' "
. "AND webcal_entry_user.cal_login = '" . $phpgw_info["user"]["userid"] . "' "
. "AND webcal_entry.cal_type='M'";
$phpgw->db->query($sql);
@ -461,7 +461,7 @@ function month_name ( $m ) {
. "ON webcal_entry_groups.cal_id=webcal_entry.cal_id "
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
. "AND webcal_entry.cal_type != 'M' "
. "AND (webcal_entry_user.cal_login='" . $phpgw->session->loginid . "' "
. "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' "
. sql_search_calendar() . ") "
. "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time";
} else {
@ -472,7 +472,7 @@ function month_name ( $m ) {
. "FROM webcal_entry, webcal_entry_user, webcal_entry_groups "
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
. "AND webcal_entry.cal_type != 'M' AND "
. "(webcal_entry_user.cal_login='" . $phpgw->session->loginid . "' "
. "(webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' "
. " AND webcal_entry.cal_id=webcal_entry_user.cal_id OR "
. "(webcal_entry_groups.cal_id=webcal_entry.cal_id "
. sql_search_calendar() . ")) ORDER "
@ -632,7 +632,7 @@ function month_name ( $m ) {
. "ON webcal_entry_groups.cal_id=webcal_entry.cal_id "
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
. "AND webcal_entry.cal_type != 'M' "
. "AND (webcal_entry_user.cal_login='" . $phpgw->session->loginid . "' "
. "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' "
. sql_search_calendar() . ") "
. "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time";

View File

@ -19,8 +19,7 @@
if (! $keywords) {
// If we reach this it becuase they didn't search for anything,
// attempt to send them back to where they where.
Header("Location: $from?sessionid=" . $phpgw->session->id . "&date=$date"
. "month=$month&day=$day&year=$year");
Header("Location: " . $phpgw->link($from,"date=$datemonth=$month&day=$day&year=$year"));
}
include("../header.inc.php");
@ -49,11 +48,11 @@
$sql = "SELECT DISTINCT webcal_entry.cal_id, webcal_entry.cal_name, "
. "webcal_entry.cal_date,webcal_entry_repeats.cal_type "
. "FROM webcal_entry, webcal_entry_user, webcal_entry_repeats, "
. "webcal_entry_groups WHERE (UPPER(webcal_entry.cal_name) LIKE UPPER('%"
. "webcal_entry_groups WHERE (UPPER(webcal_entry.cal_name) LIKE UPPER('%"
. $words[$i] . "%') OR UPPER(webcal_entry.cal_description) "
. "LIKE UPPER('%" . $words[$i] . "%')) AND (webcal_entry_user.cal_login = '"
. $phpgw->session->loginid. "' OR (webcal_entry.cal_access='public' "
. sql_search_calendar() . ")) ORDER BY cal_date";
. $phpgw_info["user"]["userid"] . "' OR (webcal_entry.cal_access='public' "
. sql_search_calendar() . ")) ORDER BY cal_date";
$phpgw->db->query($sql);
while ($phpgw->db->next_record()) {

View File

@ -191,10 +191,9 @@
<P>
<?php
if ($phpgw->session->loginid == $create_by) {
echo "<A HREF=\"edit_entry.php?sessionid=" . $phpgw->session->id . "&id=$id\">"
. lang_common("Edit") . "</A><BR>\n<A HREF=\"delete.php?sessionid="
. $phpgw->session->id . "&id=$id\" onClick=\"return confirm('"
if ($phpgw_info["user"]["userid"] == $create_by) {
echo "<A HREF=\"" . $phpgw->link("edit_entry.php","id=$id") . "\">"
. lang_common("Edit") . "</A><BR>\n<A HREF=\"" . $phpgw->link("delete.php","id=$id") . "\" onClick=\"return confirm('"
. lang_calendar("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang_common("Delete") . "</A><BR>\n";
}
?>

View File

@ -77,7 +77,7 @@
<TABLE BORDER=0 WIDTH=100%>
<TR>
<?php if (! $friendly) { ?>
<TD ALIGN="left"><A HREF="week.php?sessionid=<?php echo $phpgw->session->id; ?>&year=<?php echo $prevyear;?>&month=<?php echo $prevmonth;?>&day=<?php echo $prevday;?>">&lt;&lt;</A></TD>
<TD ALIGN="left"><A HREF="week.php?sessionid=<?php echo $phpgw_info["user"]["sessionid"]; ?>&year=<?php echo $prevyear;?>&month=<?php echo $prevmonth;?>&day=<?php echo $prevday;?>">&lt;&lt;</A></TD>
<?php } ?>
<TD ALIGN="middle"><FONT SIZE="+2" COLOR="<?php echo $H2COLOR;?>"><B>
<?php
@ -97,7 +97,7 @@
<FONT SIZE="+1" COLOR="<?php echo $H2COLOR;?>">
<?php
$phpgw->db->query("SELECT lastname, firstname FROM accounts WHERE loginid='"
. $phpgw->session->loginid . "'");
. $phpgw_info["user"]["userid"]. "'");
echo "<BR>\n";
if ($phpgw->db->next_record()) {
if (strlen($phpgw->db->f(0)) || strlen($phpgw->db->f(1))) {
@ -113,8 +113,8 @@
</TD>
<?php
if (! $friendly) {
echo "<TD ALIGN=\"right\"><A HREF=\"week.php?sessionid=" . $phpgw->session->id
. "&year=$nextyear&month=$nextmonth&day=$nextday\">&gt;&gt;</A></TD>";
echo "<TD ALIGN=\"right\"><A HREF=\"" . $phpgw->link("week.php","&year=$nextyear&month=$nextmonth&day=$nextday")
. "\">&gt;&gt;</A></TD>";
}
?>
</TR>
@ -135,7 +135,7 @@
<TR>
<?php
// Pre-Load the repeated events
$repeated_events = read_repeated_events($phpgw->session->loginid);
$repeated_events = read_repeated_events($phpgw_info["user"]["userid"]);
$today = mktime(2,0,0,date("m"), date("d"), date("Y"));
for ($j = 0; $j < 7; $j++) {
@ -148,7 +148,7 @@
else
echo "BGCOLOR=\"$CELLBG\">";
print_date_entries($date,$hide_icons,$phpgw->session->id);
print_date_entries($date,$hide_icons,$phpgw_info["user"]["sessionid"]);
echo "</TD>\n";
}