<style stype="text/css">
#cal {color:#FFF; background-color:#FFF; border: 1px solid #1a4551;font: 10px Verdana, Arial, Helvetica, sans-serif; }
#cal td { text-align:center; width: 60px;height:30px; background-color: #347a3b;}
tr#days-of-week td { background-color: #aaa;}
#cal thead td {background-color: #16414d; font-size: 12px; font-weight: bold;}
#cal thead a{ color: #FFF;}
#cal a{color: #ff0000; text-decoration:none;}
#cal .cal-prev-month-day, #cal .cal-next-month-day {color: #215f27;}
#cal-current-day {background-color: #1b5421 !important;}
</style>
<?php
// Include calendar class
require_once('calendar.class.php');
// Create calendar object
$cal = new calendar;
// Turn on navigation links
$cal->enableNavigation();
// Add event on current day
$cal->addEvent('example Event', 2007, 12, 1, 'http://www.example-event.com');
$cal->addEvent('example Event 2', 2007, 12, 2, 'http://www.example-event.com');
$cal->addEvent('example Event 3', 2007, 12, 3, 'http://www.example-event.com');
// Set innerborder to 1, this alter tables cellspacing, much easier than using CSS
$cal->setInnerBorder(1);
// Turn on non month days
$cal->enableNonMonthDays();
// Turn on pretty html output
$cal->enablePrettyHTML(TRUE);
// Display year along side month
$cal->enableYear(TRUE);
// Display calendar
$cal->display($_GET['month'], $_GET['year']);
?>
其他代码见顶部下载后测试