Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Pierre FAUQUE  >  pHoliday Class  >  test.php  
File: test.php
Role: Example script
Content type: text/plain
Description: test the class
Class: pHoliday Class
Determine the dates of common holidays
 

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>