* * 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; } ?>
0) { echo "link("delete.php","id=$id") . "\" onClick=\"return confirm('" . lang("Are you sure\\nyou want to\\ndelete this entry ?") . "');\">" . lang("Delete") . "