PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Pierre FAUQUE  >  pHoliday Class  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: test the class
Class: pHoliday Class
Determine the dates of common holidays
Author: By
Last change: new presentation
Date: 16 years ago
Size: 1,039 bytes
 

Contents

Class file image Download
<? require("class.pholiday.php"); ?>

<html>

<head>
<title>Test Class pHoliday</title>
</head>

<body>
<pre>
<?
if(!$submit)
{
  
?><form method="post" name="getyear" action="<? echo $PHP_SELF; ?>">
   Type in the year (1900-2099) : <input type="text" name="year" size="5">
   <input type="submit" name="submit" value="OK">
   </form><?
}
else
{
  
$an = new pHoliday($year);
   echo
"<h2>Public Holidays for $year :</h2>\n";
   echo
"Public holidays Dates\n";
   echo
"------------------+-----------\n";
   echo
"Easter............ " . $an->paques() . "\n";
   echo
"Ash............... " . $an->cendres() . "\n";
   echo
"Lent.............. " . $an->careme() . "\n";
   echo
"Ascension......... " . $an->ascension() . "\n";
   echo
"Whitsun........... " . $an->pentecote() . "\n";
   echo
"Trinity........... " . $an->trinite() . "\n";
   echo
"Corpus Christi.... " . $an->fetedieu() . "\n";
   echo
"Sacred Heart...... " . $an->sacrecoeur() . "\n";
}
?>
</pre>
</body>

</html>

For more information send a message to info at phpclasses dot org.