Eliminated all eveil chdir statements.
[squirrelmail.git] / plugins / calendar / calendar.php
index b5acf74e9eedaa90f000471f137f483e0185b6e9..524b9dd289cea2368c25d862a97e16b7a9232f26 100644 (file)
@@ -1,25 +1,31 @@
 <?php
-/*
+
+/**
+ * calendar.php
  *
- *  calendar.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 main calendar page (month view).
+ * Displays the main calendar page (month view).
  *
  * $Id$
  */
+define('SM_PATH','../../');
+
+/* Calender plugin required files. */
+require_once(SM_PATH . 'plugins/calendar/calendar_data.php');
+require_once(SM_PATH . 'plugins/calendar/functions.php');
 
-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');
+/* 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');
 
 //display upper part of month calendar view
 function startcalendar() {
@@ -149,4 +155,4 @@ drawmonthview();
 endcalendar();
 
 ?>
-</body></html>
\ No newline at end of file
+</body></html>