X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fcalendar%2Fday.php;h=a1816c61ccf3269c6157156646b9ec7913e5a2dd;hb=607428ac12cc15ad782738b2fcb4a1e366a1f5e9;hp=bb5f39a3f3506b7179d6f59297c727ce885a5fd3;hpb=9fe56672a80e36598aa84d21a26bfd52b09e47cd;p=squirrelmail.git diff --git a/plugins/calendar/day.php b/plugins/calendar/day.php index bb5f39a3..a1816c61 100644 --- a/plugins/calendar/day.php +++ b/plugins/calendar/day.php @@ -3,16 +3,18 @@ /** * day.php * - * Copyright (c) 2002 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * * Originally contrubuted by Michal Szczotka * * Displays the day page (day view). * - * $Id$ + * @copyright © 2002-2005 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage calendar */ +/** @ignore */ define('SM_PATH','../../'); /* Calender plugin required files. */ @@ -29,22 +31,28 @@ require_once(SM_PATH . 'include/load_prefs.php'); require_once(SM_PATH . 'functions/html.php'); /* get globals */ -if (isset($_GET['year'])) { + +// undo rg = on effects +if (isset($month)) unset($month); +if (isset($year)) unset($year); +if (isset($day)) unset($day); + +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['month'])) { +if (isset($_GET['month']) && is_numeric($_GET['month'])) { $month = $_GET['month']; } -elseif (isset($_POST['month'])) { +elseif (isset($_POST['month']) && is_numeric($_POST['month'])) { $month = $_POST['month']; } -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']; } @@ -58,15 +66,15 @@ function day_header() { echo html_tag( 'tr', '', '', $color[0] ) . "\n". html_tag( 'td', '', 'left' ) . html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n" . - html_tag( 'tr', + html_tag( 'tr', html_tag( 'th', - "< ". + "< ". date_intl('D',$prev_date)."", 'left' ) . html_tag( 'th', date_intl( _("l, F j Y"), mktime(0, 0, 0, $month, $day, $year)) , '', '', 'width="75%"' ) . html_tag( 'th', - "". + "". date_intl('D',$next_date)." >" , 'right' ) ); @@ -114,7 +122,7 @@ function display_events() { html_tag( 'td', $ehour . ':' . $eminute, 'left' ) . html_tag( 'td', ' ', 'left' ) . html_tag( 'td', - "". + "". _("ADD") . "" , 'center' ) , '', $color[$eo]); @@ -130,12 +138,12 @@ function display_events() { html_tag( 'td', $ehour . ':' . $eminute . $elength, 'left' ) . html_tag( 'td', '', 'left' ) . '['; echo ($calbar['priority']==1) ? "$calbar[title]" : "$calbar[title]"; - echo"] $calbar[message] " . + echo']
'.nl2br($calbar['message']).'
' . html_tag( 'td', "\n" . - "". + "". _("EDIT") . " | \n" . - "" . + "" . _("DEL") . '' . "\n" , 'center' ); @@ -176,4 +184,4 @@ initialize_events(); display_events(); ?> - + \ No newline at end of file