X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fcalendar%2Ffunctions.php;h=6dba751f467e5213c55b21318a741e11ca685d29;hp=be12a0d7290e1f797fa529d448ed2f17c7135690;hb=fb579f0b1b63d52620b2af745de7864513004b4b;hpb=b01b21d00c21c47620a86a8412918b287676eca7 diff --git a/plugins/calendar/functions.php b/plugins/calendar/functions.php index be12a0d7..6dba751f 100644 --- a/plugins/calendar/functions.php +++ b/plugins/calendar/functions.php @@ -1,16 +1,23 @@ - * Licensed under the GNU GPL. For full terms see the file COPYING. + * Originally contrubuted by Michal Szczotka * - * miscelenous functions. + * miscelenous functions. * * $Id$ + * @package plugins + * @subpackage calendar */ - +/** + * @return void + */ function calendar_header() { //Add Second layer ofCalendar links to upper menu global $color,$year,$day,$month; @@ -20,11 +27,11 @@ function calendar_header() { html_tag( 'td', '', 'left', '', 'width="100%"' ); displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right"); - echo "  \n"; + echo "  \n"; displayInternalLink("plugins/calendar/day.php?year=$year&month=$month&day=$day",_("Day View"),"right"); - echo "  \n"; + echo "  \n"; // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right"); - // echo "  \n"; + // echo "  \n"; echo ''; } @@ -32,51 +39,51 @@ function calendar_header() { function select_option_length($selected) { $eventlength = array( - "0" => _("0 min."), - "15" => _("15 min."), - "30" => _("35 min."), - "45" => _("45 min."), - "60" => _("1 hr."), - "90" => _("1.5 hr."), - "120" => _("2 hr."), - "150" => _("2.5 hr."), - "180" => _("3 hr."), - "210" => _("3.5 hr."), - "240" => _("4 hr."), - "300" => _("5 hr."), - "360" => _("6 hr.") + '0' => _("0 min."), + '15' => _("15 min."), + '30' => _("30 min."), + '45' => _("45 min."), + '60' => _("1 hr."), + '90' => _("1.5 hr."), + '120' => _("2 hr."), + '150' => _("2.5 hr."), + '180' => _("3 hr."), + '210' => _("3.5 hr."), + '240' => _("4 hr."), + '300' => _("5 hr."), + '360' => _("6 hr.") ); while( $bar = each($eventlength)) { - if($selected==$bar[key]){ - echo " \n"; + if($selected==$bar['key']){ + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } function select_option_minute($selected) { $eventminute = array( - "00"=>"00", - "05"=>"05", - "10"=>"10", - "15"=>"15", - "20"=>"20", - "25"=>"25", - "30"=>"30", - "35"=>"35", - "40"=>"40", - "45"=>"45", - "50"=>"50", - "55"=>"55" + '00'=>'00', + '05'=>'05', + '10'=>'10', + '15'=>'15', + '20'=>'20', + '25'=>'25', + '30'=>'30', + '35'=>'35', + '40'=>'40', + '45'=>'45', + '50'=>'50', + '55'=>'55' ); while ( $bar = each($eventminute)) { - if ($selected==$bar[key]){ - echo " \n"; + if ($selected==$bar['key']){ + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } @@ -95,15 +102,15 @@ function select_option_hour($selected) { function select_option_priority($selected) { $eventpriority = array( - "0" => _("Normal"), - "1" => _("High"), + '0' => _("Normal"), + '1' => _("High"), ); while( $bar = each($eventpriority)) { - if($selected==$bar[key]){ - echo " \n"; + if($selected==$bar['key']){ + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } @@ -123,7 +130,7 @@ function select_option_month($selected) { for ($i=1;$i<13;$i++){ $im=date('m',mktime(0,0,0,$i,1,1)); - $is = substr( _( date('F',mktime(0,0,0,$i,1,1)) ), 0, 3 ); + $is = getMonthAbrv( date('m',mktime(0,0,0,$i,1,1)) ); if ($im==$selected){ echo " \n"; } else { @@ -144,4 +151,4 @@ function select_option_day($selected) { } } -?> \ No newline at end of file +?>