X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fcalendar%2Fevent_delete.php;h=fa94d3804ced1f7f3eaacd7dcfc7d4ceb3a2953d;hb=5f75494fd15729f94af3122e10802686656418ed;hp=92a1099f2b78956e40159b9c3fc3524d35387d83;hpb=95dcee50e4d7ffe1d0b686377042ff3b735bc81c;p=squirrelmail.git diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index 92a1099f..fa94d380 100644 --- a/plugins/calendar/event_delete.php +++ b/plugins/calendar/event_delete.php @@ -3,7 +3,7 @@ /** * event_delete.php * - * Copyright (c) 2002 The SquirrelMail Project Team + * Copyright (c) 2002-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * Originally contrubuted by Michal Szczotka @@ -11,6 +11,12 @@ * Functions to delete a event. * * $Id$ + * @package plugins + * @subpackage calendar + */ + +/** + * @ignore */ define('SM_PATH','../../'); @@ -27,52 +33,52 @@ require_once(SM_PATH . 'functions/page_header.php'); require_once(SM_PATH . 'include/load_prefs.php'); require_once(SM_PATH . 'functions/html.php'); /* get globals */ -if (isset($_GET['month'])) { +if (isset($_GET['month']) && is_numeric($_GET['month'])) { $month = $_GET['month']; } -elseif (isset($_POST['month'])) { +elseif (isset($_POST['month']) && is_numeric($_GET['month'])) { $month = $_POST['month']; } -if (isset($_GET['year'])) { +if (isset($_GET['year']) && is_numeric($_GET['year'])) { $year = $_GET['year']; } -elseif (isset($_POST['year'])) { +elseif (isset($_POST['year']) && is_numeric($_POST['year'])) { $year = $_POST['year']; } -if (isset($_GET['day'])) { +if (isset($_GET['day']) && is_numeric($_GET['day'])) { $day = $_GET['day']; } -elseif (isset($_POST['day'])) { +elseif (isset($_POST['day']) && is_numeric($_POST['day'])) { $day = $_POST['day']; } -if (isset($_GET['dyear'])) { +if (isset($_GET['dyear']) && is_numeric($_GET['dyear'])) { $dyear = $_GET['dyear']; } -elseif (isset($_POST['dyear'])) { +elseif (isset($_POST['dyear']) && is_numeric($_POST['dyear'])) { $dyear = $_POST['dyear']; } -if (isset($_GET['dmonth'])) { +if (isset($_GET['dmonth']) && is_numeric($_GET['dmonth'])) { $dmonth = $_GET['dmonth']; } -elseif (isset($_POST['dmonth'])) { +elseif (isset($_POST['dmonth']) && is_numeric($_POST['dmonth'])) { $dmonth = $_POST['dmonth']; } -if (isset($_GET['dday'])) { +if (isset($_GET['dday']) && is_numeric($_GET['dday'])) { $dday = $_GET['dday']; } -elseif (isset($_POST['dday'])) { +elseif (isset($_POST['dday']) && is_numeric($_POST['dday'])) { $dday = $_POST['dday']; } -if (isset($_GET['dhour'])) { +if (isset($_GET['dhour']) && is_numeric($_GET['dhour'])) { $dhour = $_GET['dhour']; } -elseif (isset($_POST['dhour'])) { +elseif (isset($_POST['dhour']) && is_numeric($_POST['dhour'])) { $dhour = $_POST['dhour']; } -if (isset($_GET['dminute'])) { +if (isset($_GET['dminute']) && is_numeric($_GET['dminute'])) { $dminute = $_GET['dminute']; } -elseif (isset($_POST['dminute'])) { +elseif (isset($_POST['dminute']) && is_numeric($_POST['dminute'])) { $dminute = $_POST['dminute']; } if (isset($_POST['confirmed'])) { @@ -88,7 +94,7 @@ function confirm_deletion() echo html_tag( 'table', html_tag( 'tr', - html_tag( 'th', _("Do you really want to delete this event?") . '
', '', $color[4], 'colspan="2"' ) + html_tag( 'th', _("Do you really want to delete this event?") . '
', '', $color[4], 'colspan="2"' ) ) . html_tag( 'tr', html_tag( 'td', _("Date:"), 'right', $color[4] ) . @@ -100,34 +106,34 @@ function confirm_deletion() ) . html_tag( 'tr', html_tag( 'td', _("Title:"), 'right', $color[4] ) . - html_tag( 'td', $tmparray[title], 'left', $color[4] ) + html_tag( 'td', $tmparray['title'], 'left', $color[4] ) ) . html_tag( 'tr', html_tag( 'td', _("Message:"), 'right', $color[4] ) . - html_tag( 'td', $tmparray[message], 'left', $color[4] ) + html_tag( 'td', $tmparray['message'], 'left', $color[4] ) ) . html_tag( 'tr', html_tag( 'td', - "
\n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - ' \n". - "
\n" , + "
\n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + ' \n". + "
\n" , 'right', $color[4] ) . html_tag( 'td', - "
\n". - " \n". - " \n". - " \n". - ' \n". - "
\n" , + "
\n". + " \n". + " \n". + " \n". + ' \n". + "
\n" , 'left', $color[4] ) ) , '', $color[0], 'border="0" cellpadding="2" cellspacing="1"' ); @@ -158,15 +164,15 @@ echo html_tag( 'tr', '', '', $color[0] ) . 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 "" . + echo '

' . _("Event deleted!") . "
\n"; + echo "
" . _("Day View") . "\n"; } else { readcalendardata(); confirm_deletion(); } } else { - echo '
' . _("Nothing to delete!"); + echo '
' . _("Nothing to delete!"); } ?>