mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-22 10:52:00 +02:00
Working on update the owner fields to work off account_id
This commit is contained in:
parent
b33d3e05c4
commit
bca1ba9ca0
@ -21,7 +21,7 @@
|
|||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$can_edit = false;
|
$can_edit = false;
|
||||||
$phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login="
|
$phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login="
|
||||||
. "'" . $phpgw_info["user"]["userid"] . "' AND cal_id = $id");
|
. "'" . $phpgw_info["user"]["account_id"] . "' AND cal_id = $id");
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
if ($phpgw->db->f("cal_id") > 0)
|
if ($phpgw->db->f("cal_id") > 0)
|
||||||
$can_edit = true;
|
$can_edit = true;
|
||||||
@ -258,9 +258,10 @@ function validate_and_submit() {
|
|||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$phpgw->db->query("select account_lid,account_lastname, account_firstname from accounts where "
|
$phpgw->db->query("select account_id,account_lid,account_lastname, account_firstname from "
|
||||||
. "account_status !='L' and account_lid != '" . $phpgw_info["user"]["userid"] . "' and "
|
. "accounts where account_status !='L' and account_lid != '"
|
||||||
. "account_permissions like '%:calendar:%' order by account_lastname,account_firstname,account_lid");
|
. $phpgw_info["user"]["userid"] . "' and account_permissions like '%:calendar:%' "
|
||||||
|
. "order by account_lastname,account_firstname,account_lid");
|
||||||
|
|
||||||
if ($phpgw->db->num_rows() > 50)
|
if ($phpgw->db->num_rows() > 50)
|
||||||
$size = 15;
|
$size = 15;
|
||||||
@ -273,8 +274,8 @@ function validate_and_submit() {
|
|||||||
. "<TD>\n<SELECT NAME=\"participants[]\" multiple size=\"$size\">\n";
|
. "<TD>\n<SELECT NAME=\"participants[]\" multiple size=\"$size\">\n";
|
||||||
|
|
||||||
while ($phpgw->db->next_record()) {
|
while ($phpgw->db->next_record()) {
|
||||||
echo "<option value=\"" . $phpgw->db->f("account_lid") . "\"";
|
echo "<option value=\"" . $phpgw->db->f("account_id") . "\"";
|
||||||
if ($participants[$phpgw->db->f("account_lid")])
|
if ($participants[$phpgw->db->f("account_id")])
|
||||||
echo " selected";
|
echo " selected";
|
||||||
|
|
||||||
echo ">" . $phpgw->common->display_fullname($phpgw->db->f("account_lid"),
|
echo ">" . $phpgw->common->display_fullname($phpgw->db->f("account_lid"),
|
||||||
@ -284,7 +285,7 @@ function validate_and_submit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "</select><input type=\"hidden\" name=\"participants[]\" value=\""
|
echo "</select><input type=\"hidden\" name=\"participants[]\" value=\""
|
||||||
. $phpgw_info["user"]["userid"] ."\">"
|
. $phpgw_info["user"]["account_id"] ."\">"
|
||||||
. "</td></tr>\n";
|
. "</td></tr>\n";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -126,7 +126,7 @@ if (! $error) {
|
|||||||
$sql = "INSERT INTO webcal_entry (cal_create_by, cal_date, " .
|
$sql = "INSERT INTO webcal_entry (cal_create_by, cal_date, " .
|
||||||
"cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, " .
|
"cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, " .
|
||||||
"cal_access, cal_type, cal_name, cal_description ) " .
|
"cal_access, cal_type, cal_name, cal_description ) " .
|
||||||
"VALUES ('" . $phpgw_info["user"]["userid"] . "', ";
|
"VALUES ('" . $phpgw_info["user"]["account_id"] . "', ";
|
||||||
|
|
||||||
$date = mktime(0,0,0,$month,$day,$year);
|
$date = mktime(0,0,0,$month,$day,$year);
|
||||||
$sql .= date("Ymd", $date) . ", ";
|
$sql .= date("Ymd", $date) . ", ";
|
||||||
|
@ -294,7 +294,7 @@
|
|||||||
. "WHERE webcal_entry.cal_id = webcal_entry_repeats.cal_id "
|
. "WHERE webcal_entry.cal_id = webcal_entry_repeats.cal_id "
|
||||||
. "AND webcal_entry.cal_id = webcal_entry_user.cal_id "
|
. "AND webcal_entry.cal_id = webcal_entry_user.cal_id "
|
||||||
. "AND webcal_entry_groups.cal_id = webcal_entry.cal_id "
|
. "AND webcal_entry_groups.cal_id = webcal_entry.cal_id "
|
||||||
. "AND (webcal_entry_user.cal_login = '" . $phpgw_info["user"]["userid"] . "' OR (webcal_entry.cal_access='group' ";
|
. "AND (webcal_entry_user.cal_login = '" . $phpgw_info["user"]["account_id"] . "' OR (webcal_entry.cal_access='group' ";
|
||||||
$group_names = $phpgw->accounts->read_group_names();
|
$group_names = $phpgw->accounts->read_group_names();
|
||||||
if ($group_names) {
|
if ($group_names) {
|
||||||
$sql .= " AND (";
|
$sql .= " AND (";
|
||||||
@ -377,7 +377,7 @@
|
|||||||
. "ON webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
. "ON webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
||||||
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
||||||
. "AND webcal_entry.cal_type != 'M' "
|
. "AND webcal_entry.cal_type != 'M' "
|
||||||
. "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' "
|
. "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["account_id"] . "' "
|
||||||
. sql_search_calendar() . ") "
|
. sql_search_calendar() . ") "
|
||||||
. "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time";
|
. "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time";
|
||||||
} else {
|
} else {
|
||||||
@ -388,7 +388,7 @@
|
|||||||
. "FROM webcal_entry, webcal_entry_user, webcal_entry_groups "
|
. "FROM webcal_entry, webcal_entry_user, webcal_entry_groups "
|
||||||
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
||||||
. "AND webcal_entry.cal_type != 'M' AND "
|
. "AND webcal_entry.cal_type != 'M' AND "
|
||||||
. "(webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' "
|
. "(webcal_entry_user.cal_login='" . $phpgw_info["user"]["account_id"] . "' "
|
||||||
. " AND webcal_entry.cal_id=webcal_entry_user.cal_id OR "
|
. " AND webcal_entry.cal_id=webcal_entry_user.cal_id OR "
|
||||||
. "(webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
. "(webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
||||||
. sql_search_calendar() . ")) ORDER "
|
. sql_search_calendar() . ")) ORDER "
|
||||||
@ -548,7 +548,7 @@
|
|||||||
. "ON webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
. "ON webcal_entry_groups.cal_id=webcal_entry.cal_id "
|
||||||
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
. "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' "
|
||||||
. "AND webcal_entry.cal_type != 'M' "
|
. "AND webcal_entry.cal_type != 'M' "
|
||||||
. "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' "
|
. "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["account_id"] . "' "
|
||||||
. sql_search_calendar() . ") "
|
. sql_search_calendar() . ") "
|
||||||
. "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time";
|
. "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time";
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
. "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) "
|
. $words[$i] . "%') OR UPPER(webcal_entry.cal_description) "
|
||||||
. "LIKE UPPER('%" . $words[$i] . "%')) AND (webcal_entry_user.cal_login = '"
|
. "LIKE UPPER('%" . $words[$i] . "%')) AND (webcal_entry_user.cal_login = '"
|
||||||
. $phpgw_info["user"]["userid"] . "' OR (webcal_entry.cal_access='public' "
|
. $phpgw_info["user"]["account_id"] . "' OR (webcal_entry.cal_access='public' "
|
||||||
. sql_search_calendar() . ")) ORDER BY cal_date";
|
. sql_search_calendar() . ")) ORDER BY cal_date";
|
||||||
|
|
||||||
$phpgw->db->query($sql);
|
$phpgw->db->query($sql);
|
||||||
|
@ -196,7 +196,7 @@
|
|||||||
<P>
|
<P>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($phpgw_info["user"]["userid"] == $create_by) {
|
if ($phpgw_info["user"]["account_id"] == $create_by) {
|
||||||
echo "<A HREF=\"" . $phpgw->link("edit_entry.php","id=$id") . "\">"
|
echo "<A HREF=\"" . $phpgw->link("edit_entry.php","id=$id") . "\">"
|
||||||
. lang("Edit") . "</A><BR>\n<A HREF=\"" . $phpgw->link("delete.php","id=$id") . "\" onClick=\"return confirm('"
|
. lang("Edit") . "</A><BR>\n<A HREF=\"" . $phpgw->link("delete.php","id=$id") . "\" onClick=\"return confirm('"
|
||||||
. lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang("Delete") . "</A><BR>\n";
|
. lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang("Delete") . "</A><BR>\n";
|
||||||
|
@ -137,7 +137,7 @@
|
|||||||
<TR>
|
<TR>
|
||||||
<?php
|
<?php
|
||||||
// Pre-Load the repeated events
|
// Pre-Load the repeated events
|
||||||
$repeated_events = read_repeated_events($phpgw_info["user"]["userid"]);
|
$repeated_events = read_repeated_events($phpgw_info["user"]["account_id"]);
|
||||||
|
|
||||||
$today = mktime(2,0,0,date("m"), date("d"), date("Y"));
|
$today = mktime(2,0,0,date("m"), date("d"), date("Y"));
|
||||||
for ($j = 0; $j < 7; $j++) {
|
for ($j = 0; $j < 7; $j++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user