* * 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); $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"; ?>

" METHOD="GET" name="addform"> \n"; ?> db->query("select loginid, lastname, firstname from accounts where " . "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; else if ($phpgw->db->num_rows() > 5) $size = 5; else $size = $phpgw->db->num_rows(); echo "" . "\n"; ?>
:
:
: "; if ($day == 0) $day = date("d"); 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); ?>
: :" MAXLENGTH=2> am\n"; echo "pm\n"; } ?>
:
:
:
:
" . lang_calendar("Participants") . ":\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); ?>
: " . lang_common("Sunday"); echo " " . lang_common("Monday"); echo " " . lang_common("Tuesday"); echo " " . lang_common("Wednesday"); echo " " . lang_common("Thursday"); echo " " . lang_common("Friday"); echo " " . lang_common("Saturday"); ?>
:
0) { echo "link("delete.php","id=$id") . "\" onClick=\"return confirm('" . lang_calendar("Are you sure\\nyou want to\\ndelete this entry ?") . "');\">" . lang_common("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. include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); ?>