X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fcalendar%2Fevent_delete.php;h=bfdfdc8ee06dc3fc28cd24087b95bb4226cfcf71;hp=a683f20088aa692ee6eba313e3f8b546a9a5b426;hb=353d074afac6827c90f4bb03e846c5e453d3b5b1;hpb=d61a01d48fa9d58a7fdd5a99e7943b7dcaa94178 diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index a683f200..bfdfdc8e 100644 --- a/plugins/calendar/event_delete.php +++ b/plugins/calendar/event_delete.php @@ -1,66 +1,110 @@ - * Licensed under the GNU GPL. For full terms see the file COPYING. - * - * Functions to delete a event. + +/** + * Functions to delete a event. * - * 18 Jan 2002 Adapted to official SM rules philippe@squirrelmail.org. + * @copyright 2002-2018 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage calendar */ -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'); +/** + * Include the SquirrelMail initialization file. + */ +require('../../include/init.php'); -function confirm_deletion() -{ - global $calself, $dyear, $dmonth, $dday, $dhour, $dminute, $calendardata, $color, $year, $month, $day; +/* date_intl() */ +include_once(SM_PATH . 'functions/date.php'); - $tmparray = $calendardata["$dmonth$dday$dyear"]["$dhour$dminute"]; +/* Calendar plugin required files. */ +include_once(SM_PATH . 'plugins/calendar/calendar_data.php'); +include_once(SM_PATH . 'plugins/calendar/functions.php'); - 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));
+echo html_tag( 'tr', '', '', $color[0] ) .
+ html_tag( 'td' ) .
+ html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td', '', 'left' ) .
+ date_intl( _("l, F j 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"; + echo ' ' . _("Event deleted!") . " \n"; + echo "" . + _("Day View") . "\n"; } else { readcalendardata(); confirm_deletion(); } } else { - echo ' ' . _("Nothing to delete!"); + echo ' ' . _("Nothing to delete!"); } ?> |