X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fcalendar%2Fday.php;h=983a33174075e812502c2b71be33a61664c75786;hp=40e4a4dfcc776e366cd2082cf64fec32f6e36c4b;hb=77a1e3d10b0fe8a81bd645e3797d425839592954;hpb=876fdb605dcb48b44b5c0a3a6f2f106c941e5c20 diff --git a/plugins/calendar/day.php b/plugins/calendar/day.php index 40e4a4df..983a3317 100644 --- a/plugins/calendar/day.php +++ b/plugins/calendar/day.php @@ -3,7 +3,7 @@ /** * Displays the day page (day view). * - * @copyright © 2002-2007 The SquirrelMail Project Team + * @copyright 2002-2022 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins @@ -80,8 +80,8 @@ function initialize_events() { $cdate = $month . $day . $year; if (isset($calendardata[$cdate])){ - while ( $calfoo = each($calendardata[$cdate])){ - $daily_events["$calfoo[key]"] = $calendardata[$cdate][$calfoo['key']]; + foreach ($calendardata[$cdate] as $key => $value){ + $daily_events[$key] = $calendardata[$cdate][$key]; } } } @@ -96,28 +96,28 @@ function display_events() { ksort($daily_events,SORT_STRING); $eo=0; - while ($calfoo = each($daily_events)){ + foreach ($daily_events as $key => $value) { if ($eo==0){ $eo=4; } else { $eo=0; } - $ehour = substr($calfoo['key'],0,2); - $eminute = substr($calfoo['key'],2,2); - if (!is_array($calfoo['value'])){ + $ehour = substr($key,0,2); + $eminute = substr($key,2,2); + if (!is_array($value)){ echo html_tag( 'tr', html_tag( 'td', $ehour . ':' . $eminute, 'left' ) . html_tag( 'td', ' ', 'left' ) . html_tag( 'td', "". + .substr($key,0,2)."\">". _("ADD") . "" , 'center' ) , '', $color[$eo]); } else { - $calbar=$calfoo['value']; + $calbar=$value; if ($calbar['length']!=0){ $elength = '-'.date_intl(_("H:i"),mktime($ehour,$eminute+$calbar['length'],0,1,1,0)); } else { @@ -127,16 +127,16 @@ function display_events() { html_tag( 'td', date_intl(_("H:i"),mktime($ehour,$eminute,0,1,1,0)) . $elength, 'left' ) . html_tag( 'td', '', 'left' ) . '['; echo ($calbar['priority']==1) ? - "".htmlspecialchars($calbar['title']).'' : - htmlspecialchars($calbar['title']); - echo']
'.nl2br(htmlspecialchars($calbar['message'])).'
' . + "".sm_encode_html_special_chars($calbar['title']).'' : + sm_encode_html_special_chars($calbar['title']); + echo']
'.nl2br(sm_encode_html_special_chars($calbar['message'])).'
' . html_tag( 'td', "\n" . "". + substr($key,0,2)."&minute=".substr($key,2,2)."\">". _("EDIT") . " | \n" . "" . _("DEL") . '' . "\n" ,