Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marcel Bachus  >  Easter Date Calculator  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Easter Date Calculator
Calculate date of Easter and related dates
Author: By
Last change:
Date: 3 years ago
Size: 974 bytes
 

Contents

Class file image Download
<?php
require_once("easterdatecalculator.php");

if (empty(
$_POST['year']))
{
  
$year date("Y");
}
else
{
  
$year $_POST['year'];
}

$day = new easterdatecalculator;

echo 
"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>Contacts</title>
<script language='JavaScript' type='text/javascript'>
/*<![CDATA[*/
  function re_calc()
  {
    document.forms['thisform'].submit();
  }
/*]]>*/
</script>
</head>
<body onload='document.getElementById(\"year\").focus();'>
<form id='thisform' name='thisform' method='post'>

<input type='text' id='year' name='year' value='"
.$year."' size='4' onchange='re_calc();'/><br/>
Easter is on "
.date("Y-m-d"$day->easter($year))."<br/>
Mardi Gras on "
.date("Y-m-d"$day->mardi_grass($year))."<br/>
Assention on "
.date("Y-m-d"$day->assention($year))."<br/>
Pentacost on "
.date("Y-m-d"$day->pentecost($year))."<br/>

</form>

</body>
</html>"
;

?>