Calendar rg=0
[squirrelmail.git] / plugins / calendar / day.php
index c2d609c83aa1f8d04991f880d115b93b82b09c48..4f43637b702ba6940f7e15f359b9b956c87cc94f 100644 (file)
@@ -1,25 +1,53 @@
 <?php
-/*
- *  day.php
+
+/**
+ * day.php
+ *
+ * Copyright (c) 2002 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
- *  Copyright (c) 2001 Michal Szczotka <michal@tuxy.org>
- *  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).
+ * Displays the day page (day view).
  *
  * $Id$
- */
-
-require_once('calendar_data.php');
-require_once('functions.php');
-chdir('..');
-require_once('../src/validate.php');
-require_once('../functions/strings.php');
-require_once('../functions/date.php');
-require_once('../config/config.php');
-require_once('../functions/page_header.php');
-require_once('../src/load_prefs.php');
-require_once('../functions/html.php');
+
+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/strings.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 . '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() {