* Licensed under the GNU GPL. For full terms see the file COPYING. * * Functions to delete a event. * * $Id$ */ require_once('calendar_data.php'); require_once('functions.php'); chdir('..'); require_once('../src/validate.php'); require_once('../functions/strings.php'); require_once('../functions/date.php'); require_once('../config/config.php'); require_once('../functions/page_header.php'); require_once('../src/load_prefs.php'); function confirm_deletion() { global $calself, $dyear, $dmonth, $dday, $dhour, $dminute, $calendardata, $color, $year, $month, $day; $tmparray = $calendardata["$dmonth$dday$dyear"]["$dhour$dminute"]; echo "
\n".
_("Do you really want to delete this event?") . " | \n".
" |
---|---|
" . _("Date:") . " | \n". "$dmonth/$dday/$dyear |
" . _("Time:") . " | \n". "$dhour:$dminute |
" . _("Title:") . " | \n". "$tmparray[title] |
" . _("Message:") . " | \n". "$tmparray[message] |
\n". " \n". " | \n". " \n". " |
'.
date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year));
if (isset($dyear) && isset($dmonth) && isset($dday) && isset($dhour) && isset($dminute)){
if (isset($confirmed)){
delete_event("$dmonth$dday$dyear", "$dhour$dminute");
echo ' ' . _("Event deleted!") . " \n"; echo "" . _("Day View") . "\n"; } else { readcalendardata(); confirm_deletion(); } } else { echo ' ' . _("Nothing to delete!"); } ?> |