* * http://www.radix.net/~cknudsen * * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ /* $Id$ */ $phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True, "enable_nextmatchs_class" => True); include("../header.inc.php"); $cal_info = new calendar_item; if ($id > 0) { $can_edit = false; $phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login=" . $phpgw_info["user"]["account_id"] . " AND cal_id = $id"); $phpgw->db->next_record(); if ($phpgw->db->f("cal_id") > 0) $can_edit = true; $cal = $phpgw->calendar->getevent((int)$id); $cal_info = $cal[0]; } else { if (!isset($day) || !$day) $thisday = (int)$phpgw->calendar->today["day"]; else $thisday = $day; if (!isset($month) || !$month) $thismonth = (int)$phpgw->calendar->today["month"]; else $thismonth = $month; if (!isset($year) || !$year) $thisyear = (int)$phpgw->calendar->today["year"]; else $thisyear = $year; if (!isset($hour)) $thishour = 0; else $thishour = (int)$hour; if (!isset($minute)) $thisminute = 00; else $thisminute = (int)$minute; $time = $phpgw->calendar->splittime_($phpgw->calendar->fixtime($thishour,$thisminute)); $cal_info->name = ""; $cal_info->description = ""; $cal_info->day = $thisday; $cal_info->month = $thismonth; $cal_info->year = $thisyear; $cal_info->rpt_day = $thisday + 1; $cal_info->rpt_month = $thismonth; $cal_info->rpt_year = $thisyear; $cal_info->hour = (int)$time["hour"]; $cal_info->minute = (!(int)$time["minute"]?"00":(int)$time["minute"]); $cal_info->ampm = "am"; if($cal_info->hour > 12 && $phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") { $cal_info["hour"] = $cal_info["hour"] - 12; $cal_info["ampm"] = "pm"; } $can_edit = true; } ?>

" METHOD="POST" name="addform"> \n"; ?> ampm == "pm") { $amsel = ""; $pmsel = "CHECKED"; } else { $amsel = "CHECKED"; $pmsel = ""; } } ?> db->query("select account_id,account_lid,account_lastname, account_firstname from " . "accounts where account_status !='L' and 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) $size = 15; else if ($phpgw->db->num_rows() > 5) $size = 5; else $size = $phpgw->db->num_rows(); echo "" . "\n"; ?>
:
:
: "; for ($i = 1; $i <= 31; $i++) $day_html .= "\n"; $day_html .= ""; $month_html = ""; $year_html = ""; echo $phpgw->common->dateformatorder($year_html,$month_html,$day_html); ?>
: :minute<"9"?"0".$cal_info->minute:$cal_info->minute; ?>" MAXLENGTH=2> am\n"; echo "pm\n"; } ?>
:
:
:
:
" . lang("Participants") . ":\n" . "
:
: rpt_end?"checked":""); ?>> "; for ($i = 1; $i <= 31; $i++) { $day_html .= "\n"; } $day_html .= ""; $month_html = ""; $year_html = ""; echo $phpgw->common->dateformatorder($year_html,$month_html,$day_html); ?>
: rpt_sun?"checked":"") . "> " . lang("Sunday"); echo "rpt_mon?"checked":"") . "> " . lang("Monday"); echo "rpt_tue?"checked":"") . "> " . lang("Tuesday"); echo "rpt_wed?"checked":"") . "> " . lang("Wednesday"); echo "rpt_thu?"checked":"") . "> " . lang("Thursday"); echo "rpt_fri?"checked":"") . "> " . lang("Friday"); echo "rpt_sat?"checked":"") . "> " . lang("Saturday"); ?>
:
0) { echo "link("delete.php","id=$id") . "\" onClick=\"return confirm('" . lang("Are you sure\\nyou want to\\ndelete this entry ?") . "');\">" . lang("Delete") . "
"; } } // ***** This might be out of place. I was getting tons of parse errors // from if ($can_edit) { This needs to be rewritten, because if you do // not own the entry. You should not get into this portion of the program. $phpgw->common->phpgw_footer(); ?>