Easily Simple Calendar
© 2001 Panhandle Paradise Internet Services
Latest Version: 2.15 - November 2, 2001

INSTRUCTIONS:

Simply upload this script to your server and type in the address in a web browser. Alternatively, use PHP includes or functions to integrate the ESC script into your web pages. Additionally, you can utilize any of the command-line variables below to completely customize the style, size, color, actions and more of the calendar.

COMMAND LINE VARIABLES:

There are two ways to use command-line variables:

The first way you would use when loading the ESC script directly in a web browser or via the PHP include function; after the URL put a ? (question mark) before the first variable and put an & (ampersand) between each of the other variables you want to set. Do not use any spaces. Note: You must call the full script URL address when sending command line variables via an include function.

Secondly, if using the ESC script as a function, send each variable as needed to the function or set them as global.

See http://www.php.net for help with functions and the include command.

mo
mo=mm CALENDAR MONTH TO DISPLAY
* Defaults to the current month if not specified

yr
yr=yyyy YEAR OF THE CALENDAR TO DISPLAY
* Defaults to current year if not specified

nt
nt=1 DO NOT MARK TODAYS DATE (Defaults to 0)
This option can be set in the script or overridden by the command-line option nt='

ny
ny=1 DO NOT DISPLAY THE YEAR (Defaults to 0)
This option can be set in the script or overridden by the command-line option ny='

mrks
mrks=yyyy-mm-dd START DATE OF MARKING (mySQL date format)

mrke
mrke=yyyy-mm-dd END DATE OF MARKING (mySQL date format)

***
New in version 2.0 --- now you can send multiple start and end dates.
Do this by separating each date by an "x".
An example would be "?mrks=2001-10-05x2001-11-1&mrke=2001-10-12x2001-11-8"
This marks Oct. 5, 2001 -- Oct. 12, 2001 and Nov. 1, 2001 -- Nov. 8, 2001.
***

calstyle
calstyle=1 STYLE OF CALENDAR (Defaults to 1)
Setting '$calstyle' to 1 will mark calendar dates using table background colors [Style 1 is default in any version before 2.0]
Setting this to 2 will mark calendar dates using graphics for background colors. If using Style 2, all 'stat' graphics should be in the same directory as the ESC script. You can edit the 'stat' graphics to meet your needs.
This option can be set in the script or overridden by the command-line option 'calstyle='

daystart
daystart=0 DAY CALENDAR BEGINS (Defaults to 0)
Valid options are 0=Sunday; 1=Monday; 2=Tuesday; 3=Wednesday; 4=Thursday; 5=Friday; 6=Saturday
This option can be set in the script or overridden by the command-line option 'daystart='

ctime
ctime=x HOURS TO OFFSET TIME +/-
To add hours, enter a positive value. To subtract hours, enter a "-" negative value
This option can be set in the script or overridden by the command-line option 'ctime='

tw
ch
tw=x CALENDAR TABLE WIDTH
ch=x CALENDAR CELL HEIGHT
Set $tw to the width of the calendar table (Defaults to 175)
Set $ch to the height of the table cells for dates (Defaults to 0)
These options can be set in the script or overridden by the command-line options 'tw=' and 'ch='

align
align=x DATE NUMBER ALIGNMENT
Set $algn to 0 [default] to align the dates to the middle and center of table cells.
Set $algn to 1 to align the dates to the upper-right corner of table cells.
This option can be set in the script or overridden by the command-line option 'algn='

FONT SIZES AND WEIGHT
These options can be set in the script or overridden by command-line options of the same named variables. The sizes are in pixels.

fsm="x" FONT SIZE MONTH (Defaults to 18)
fsd="x" FONT SIZE DAY NAMES (Defaults to 9)
fsn="x" FONT SIZE NUMBERS (Defaults to 11)

fwm="x" FONT WEIGHT MONTH (Setting this to anything will change the month weight to normal)
fwd="x" FONT WEIGHT DAY NAMES (Setting this to anything will change the day names weight to bold)
fwn="x" FONT WEIGHT NUMBERS (Setting this to anything will change the numbers weight to bold)

EXAMPLE USE OF THIS SCRIPT:
http://www.yourdomain.com/calendardisplay.php?MO=12&yr=2001&mrks=2001-12-18&mrke=2001-12-20
or include ("http://www.yourdomain.com/calendardisplay.php?MO=12&yr=2001&mrks=2001-12-18&mrke=2001-12-20");
Either of these will result in a calendar for December of 2001 with the dates 12-18 through 12-20 marked.

TO SEE THIS SCRIPT IN ACTION:
Go to http://collins.gopapa.com/calendardisplay.php?np=1&ny=1
This is live data on the above website. Try different command-line variables to see their effects on the display. NOTE: You can not send mrks and mrke as these are generated from flat-file databases according to the property you are viewing. The default for the above calendar is Style 2 which was introduced in version 2.0.

You can also try out the interactive calendar at http://calendar.gopapa.com/interactive.php and see how to form command line variables.

If you are familiar with PHP programming, it is generally much faster using this script as a function within it's intended web page.