X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fcalendar%2Ffunctions.php;h=ab3fa8171ac4c3ea71568a309396f336330116e7;hp=e9986a44b5c03463f388dbf2ace0e3a4f24ef5cc;hb=353d074afac6827c90f4bb03e846c5e453d3b5b1;hpb=2c85de8f66702a488ea0c371f2576963c593d64d diff --git a/plugins/calendar/functions.php b/plugins/calendar/functions.php index e9986a44..ab3fa817 100644 --- a/plugins/calendar/functions.php +++ b/plugins/calendar/functions.php @@ -1,146 +1,207 @@ - * Licensed under the GNU GPL. For full terms see the file COPYING. - * - * miscelenous functions. + +/** + * Other calendar plugin functions. * - * $Id$ + * @copyright 2002-2018 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage calendar */ +/** + * Add link to menu at top of content pane + * + * @return void + * + */ +function calendar_do() { + + global $oTemplate, $nbsp; + $output = makeInternalLink('plugins/calendar/calendar.php',_("Calendar"),'right') + . $nbsp . $nbsp; + return array('menuline' => $output); +} + +/** + * Adds second layer of calendar links to upper menu + * @return void + */ function calendar_header() { - //Add Second layer ofCalendar links to upper menu global $color,$year,$day,$month; - echo "
"; +// FIXME: Don't echo HTML from core. This whole function should probably be moved into a template file + echo html_tag( 'table', '', '', $color[0], 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'left', '', 'width="100%"' ); - displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right"); - echo "  \n"; - displayInternalLink("plugins/calendar/day.php?year=$year&month=$month&day=$day",_("Day View"),"right"); - echo "  \n"; - // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right"); - // echo "  \n"; - echo ' |