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
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="class.xCalendar.css">
  </head>
  <body style="text-align: center;">
     
  <?php
   
// Add class to script.
   
require_once("class.xCalendar.php");
   
   
// 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();
 
?>

  </body>
</html>