X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fcalendar%2Ffunctions.php;h=e04c0092a322b6db8ca425e32aec495437e3701b;hp=d6d3087b34af50fbfb61678690388d70e489974a;hb=a564b9e3f94dcd52acd4133c84de9cac3da3cab6;hpb=d61a01d48fa9d58a7fdd5a99e7943b7dcaa94178 diff --git a/plugins/calendar/functions.php b/plugins/calendar/functions.php index d6d3087b..e04c0092 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. * - * 18 Jan 2002 Adapted to official SM rules philippe@squirrelmail.org. + * @copyright 2002-2017 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 ' |