Calendar rg=0
[squirrelmail.git] / plugins / calendar / day.php
index 53db266..4f43637 100644 (file)
  * 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() {