Location: PHPKode > scripts > ML_Cal > ml_cal/ml_cal_example.php
<?php
include "ml_cal.class";

// Basic and only instructions
// Pass associative array to show_cal function
// First field (array key) is the event date in the format yyyy-mm-dd
// Second field (value) is the event description
// Only the first 150 characters of the description will be displayed on the calendar - no error or warning messages will appear
// All HTML tags are removed from the description
// Example: 
// 	$events = array('2006-12-25' => 'Christmas Day','2007-01-01' => 'New Years Day');
// 	$myC->show_cal($events);

$events = array('2006-08-07' => 'Day this class was written',
	'2006-12-25' => 'Christmas Day');

$myC = new ML_Cal;
$myC->cal_size = "small"; // [ small / large ] Default is large

/*
// EXAMPLE VARIABLES
// All color values can be either hex code or color name
$myC->cal_bgcolor = "green"; // Background color for entrire calendar
$myC->cal_day_bgcolor = "purple"; // Background color for individual days
$myC->cal_text_color = "yellow"; // Text color for calendar
$myC->cal_highlight_bgcolor = "orange"; // Background color for event days
$myC->cal_highlight_text_color = "blue"; // Text color for event days
$myC->cal_header_bgcolor = "yellow"; // Background color for headers (month name, weekday name)
$myC->cal_header_text_color = "brown"; // Text color for headers (month name, weekday name)
*/

$myC->show_cal($events);

?>
Return current item: ML_Cal