X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fcalendar%2Fevent_delete.php;h=0736627acecf33e21093599fbb17b566569d8edd;hb=c997cbe6f5a46d432d7733acb207dfcdfd00e49e;hp=b771861733b53ced3457fd2ff55ee3ef5a5e6624;hpb=2c85de8f66702a488ea0c371f2576963c593d64d;p=squirrelmail.git diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index b7718617..0736627a 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. * - * $Id$ + * @copyright 2002-2021 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!"); } ?> |