/**
* day.php
*
- * Copyright (c) 2002 The SquirrelMail Project Team
+ * Copyright (c) 2002-2003 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Originally contrubuted by Michal Szczotka <michal@tuxy.org>
* Displays the day page (day view).
*
* $Id$
+ * @package plugins
+ * @subpackage calendar
*/
-require_once('calendar_data.php');
-require_once('functions.php');
+/** @ignore */
+define('SM_PATH','../../');
-chdir('..');
-define('SM_PATH','../');
+/* Calender plugin required files. */
+require_once(SM_PATH . 'plugins/calendar/calendar_data.php');
+require_once(SM_PATH . 'plugins/calendar/functions.php');
/* SquirrelMail required files. */
require_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/date.php');
require_once(SM_PATH . 'config/config.php');
require_once(SM_PATH . 'functions/page_header.php');
-require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'include/load_prefs.php');
require_once(SM_PATH . 'functions/html.php');
+/* get globals */
+if (isset($_GET['year'])) {
+ $year = $_GET['year'];
+}
+elseif (isset($_POST['year'])) {
+ $year = $_POST['year'];
+}
+if (isset($_GET['month'])) {
+ $month = $_GET['month'];
+}
+elseif (isset($_POST['month'])) {
+ $month = $_POST['month'];
+}
+if (isset($_GET['day'])) {
+ $day = $_GET['day'];
+}
+elseif (isset($_POST['day'])) {
+ $day = $_POST['day'];
+}
+
+/* got 'em */
+
//displays head of day calendar view
function day_header() {
global $color, $month, $day, $year, $prev_year, $prev_month, $prev_day,
html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n" .
html_tag( 'tr',
html_tag( 'th',
- "<a href=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">< ".
+ "<a href=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">< ".
date_intl('D',$prev_date)."</a>",
'left' ) .
html_tag( 'th', date_intl( _("l, F j Y"), mktime(0, 0, 0, $month, $day, $year)) ,
'', '', 'width="75%"' ) .
html_tag( 'th',
- "<a href=\"day.php?year=$next_year&month=$next_month&day=$next_day\">".
+ "<a href=\"day.php?year=$next_year&month=$next_month&day=$next_day\">".
date_intl('D',$next_date)." ></a>" ,
'right' )
);
html_tag( 'td', $ehour . ':' . $eminute, 'left' ) .
html_tag( 'td', ' ', 'left' ) .
html_tag( 'td',
- "<font size=\"-1\"><a href=\"event_create.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."\">".
+ "<font size=\"-1\"><a href=\"event_create.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."\">".
_("ADD") . "</a></font>" ,
'center' ) ,
'', $color[$eo]);
echo"] $calbar[message] " .
html_tag( 'td',
"<font size=\"-1\"><nobr>\n" .
- "<a href=\"event_edit.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."&minute=".substr($calfoo['key'],2,2)."\">".
+ "<a href=\"event_edit.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."&minute=".substr($calfoo['key'],2,2)."\">".
_("EDIT") . "</a> | \n" .
- "<a href=\"event_delete.php?dyear=$year&dmonth=$month&dday=$day&dhour=".substr($calfoo['key'],0,2)."&dminute=".substr($calfoo['key'],2,2)."&year=$year&month=$month&day=$day\">" .
+ "<a href=\"event_delete.php?dyear=$year&dmonth=$month&dday=$day&dhour=".substr($calfoo['key'],0,2)."&dminute=".substr($calfoo['key'],2,2)."&year=$year&month=$month&day=$day\">" .
_("DEL") . '</a>' .
"</nobr></font>\n" ,
'center' );