Purchase the Pro script for your website!
The EasyPhpEventCalendar PHP script is XHTML 1.0 strict compliant! ![]() Getting started: 1. Download the class, unzip it and upload it to your webserver 2. Open the example page located in the directory 'example/example.php' The most simple script would be: <?php
include_once('easyphpeventcalendar.class.php');
$calendar = new easyphpeventcalendar;
$calendar -> Gfxurl = '../gfx';
$calendar -> Events[] = array('20091225','Christmasday 2009');
$calendar -> CreateEventCalendar();
?>This would create the event calendar with only one event on December the 25th 2009. You can add as many events as you would like. You can use full html markup to enhance the appearance of the events. You can add events manually as shown above, read events from files as shown in the example below or read them from a database. How you manage your events is up to you, the class is designed to display them only. <?php
$eventslocation='events';
if ($dir=@opendir($eventslocation)) {
while ($file=@readdir($dir)) {
if (@strtolower(substr($file,-3))=='txt') {
if ($fp=@fopen("$eventslocation/".$file,'r+')) {
$text=fread($fp,filesize("$eventslocation/".$file));
@fclose($fp);
$calendar -> Events[] = array(substr($file,0,8),$text);
}
}
}
}
?>The above example expects a text file for each event to be located in a directory called 'events'. The filenames of the events are in the format: 'YYYYMMDD.txt'. API reference: Initialize the class: include_once('easyphpeventcalendar.class.php');
$calendar = new easyphpeventcalendar; Options: $calendar -> Gfxurl = (string) // Path to the class gfx directory $calendar -> Days = (array) // Days of the week in other langauge
[0]: (string) Sunday
[1]: (string) Monday
[2]: (string) Tuesday
[3]: (string) Wednesday
[4]: (string) Thursday
[5]: (string) Friday
[6]: (string) Saturday
$calendar -> Months = (array) // Months of the year in other language
[0]: (string) January
[1]: (string) February
[2]: (string) March
[3]: (string) April
[4]: (string) May
[5]: (string) June
[6]: (string) July
[7]: (string) August
[8]: (string) September
[9]: (string) October
[10]: (string) November
[11]: (string) December
$calendar -> Events[] = (array) // Add new events
[0]: (array) [0](string)
Date of event in format YYYYMMDD
[1] (string)
Event description as text/html
[x]: (array) [0] (string)
Date of event in format YYYYMMDD
[1] (string)
Event description as text/html
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

