Easily Simple Calendar
© 2001 Panhandle Paradise Internet Services
Latest Version: 2.16 - November 30, 2001

INSTRUCTIONS:

To use this script, simply upload it to your server and type in its' 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.

NOTE: To view the default calendar for the current month with the current day hightlighted, you do not need to use any of the command line variables below.

COMMAND LINE VARIABLES:

There are two ways to use command-line variables:

The first way is used when loading the ESC script directly in a web browser or via the PHP include function. After the full 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 definied by the function or set them as global within the script.

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

Many of these options can be set in the script itself or called via the command line. See the script for more information.

mo
MONTH TO DISPLAY
mo=mm
Default: Current month if not specified

yr
YEAR TO DISPLAY
yr=yyyy
Default: Current year if not specified

nt
DO NOT MARK TODAYS DATE
nt=1
Default: Mark todays date

ny
DO NOT DISPLAY THE YEAR
ny=1
Deafult: Display the year

mrks
START DATE OF DATE MARKING
mrks=yyyy-mm-dd

Default: None

mrke
END DATE OF DATE MARKING
mrke=yyyy-mm-dd
Default: None

***
To send multiple start and end dates, separate 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.

New in version 2.16 - The date can be sent in most any format as long as the month appears before the day. For example, to mark December 19, 2001 you can use "2001-12-19", "12-19-2001","Dec 19, 2001","December 19 2001", and more. If you want to mark a date regardless of the year, just omit the year like "12-19", or "Dec 19".

***

calstyle
STYLE OF CALENDAR
calstyle=x
Default: 1
Setting '$calstyle' to 1 will mark calendar dates using table background colors [Style 1 is the only option 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.

daystart
DAY CALENDAR BEGINS
daystart=x
Default: 0
Valid options are 0=Sunday; 1=Monday; 2=Tuesday; 3=Wednesday; 4=Thursday; 5=Friday; 6=Saturday

ctime
HOURS TO OFFSET TIME +/-
ctime=x
Defult: 0
To add hours, enter a positive value. To subtract hours, enter a "-" negative value

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
DATE NUMBER ALIGNMENT
align=x

Default: 0
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 site contains live data. 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.