* 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". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". "
\n". _("Do you really want to delete this event?") . "
" . _("Date:") . "$dmonth/$dday/$dyear
" . _("Time:") . "$dhour:$dminute
" . _("Title:") . "$tmparray[title]
" . _("Message:") . "$tmparray[message]
\n". "
\n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". "
\n". "
\n". "
\n". " \n". " \n". " \n". " \n". "
\n". "
\n"; } if ($month <= 0){ $month = date( 'm' ); } if ($year <= 0){ $year = date( 'Y' ); } if ($day <= 0){ $day = date( 'd' ); } $calself=basename($PHP_SELF); displayPageHeader($color, 'None'); //load calendar menu calendar_header(); echo "". "". '
'. 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!"); } ?>