* * 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_flags["currentapp"] = "calendar"; include("../header.inc.php"); if ($id > 0) { $can_edit = false; $phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login=" . "'" . $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"); $phpgw->db->next_record(); $year = (int)($phpgw->db->f(1) / 10000); $month = ($phpgw->db->f(1) / 100) % 100; $day = $phpgw->db->f(1) % 100; $time = $phpgw->db->f(2); if ($time > 0) { $hour = $time / 10000; $minute = ($time / 100) % 100; } $duration = $phpgw->db->f(5); $priority = $phpgw->db->f(6); $type = $phpgw->db->f(7); $access = $phpgw->db->f(8); $name = $phpgw->db->f(9); $description = $phpgw->db->f(10); $name = stripslashes($name); $name = htmlspecialchars($name); $description = stripslashes($description); $description = htmlspecialchars($description); $phpgw->db->query("SELECT cal_login FROM webcal_entry_user WHERE cal_id=$id"); while ($phpgw->db->next_record()) { $participants[$phpgw->db->f("cal_login")] = 1; } $phpgw->db->query("select * from webcal_entry_repeats where cal_id='$id" . "'"); $phpgw->db->next_record(); $rpt_type = $phpgw->db->f("cal_type"); if ($phpgw->db->f("cal_end")) $rpt_end = date_to_epoch($phpgw->db->f("cal_end")); else $rpt_end = 0; $rpt_freq = $phpgw->db->f("cal_frequency"); $rpt_days = $phpgw->db->f("cal_days"); $rpt_sun = (substr($rpt_days,0,1)=='y'); $rpt_mon = (substr($rpt_days,1,1)=='y'); $rpt_tue = (substr($rpt_days,2,1)=='y'); $rpt_wed = (substr($rpt_days,3,1)=='y'); $rpt_thu = (substr($rpt_days,4,1)=='y'); $rpt_fri = (substr($rpt_days,5,1)=='y'); $rpt_sat = (substr($rpt_days,6,1)=='y'); } else { $can_edit = true; } if ($year) $thisyear = $year; if ($month) $thismonth = $month; if (! $rpt_type) $rpt_type = "none"; ?>
0) { echo "link("delete.php","id=$id") . "\" onClick=\"return confirm('" . lang_calendar("Are you sure\\nyou want to\\ndelete this entry ?") . "');\">" . lang_common("Delete") . "