PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Kimmo Lankila   xCalendar   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Example script
Class: xCalendar
Output an HTML calendar for a given month
Author: By
Last change:
Date: 19 years ago
Size: 1,064 bytes


Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="class.xCalendar.css">
  <body style="text-align: center;">
// Add class to script.
// Create new calendar object.
$calendar = new xCalendar();
// Set name of months for finnish people.
$calendar->setMonthNames(array('Tammikuu', 'Helmikuu', 'Maaliskuu',
'Huhtikuu', 'Toukokuu', 'Kes&auml;kuu',
'Hein&auml;kuu', 'Elokuu', 'Syyskuu',
'Lokakuu', 'Marraskuu', 'Joulukuu'));
// Set name of days for finnish people.
$calendar->setDayNames(array('Ma', 'Ti', 'Ke', 'To', 'Pe', 'La', 'Su'));
// View calendar table.
echo $calendar->getMonthTable();