Login   Register  
PHP Classes
elePHPant
Icontem

File: cal.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dan Walker  >  Date Picker  >  cal.php  >  Download  
File: cal.php
Role: Example script
Content type: text/plain
Description: Calendar test or include file
Class: Date Picker
Generate an HTML calendar to pick dates
Author: By
Last change:
Date: 10 years ago
Size: 803 bytes
 

Contents

Class file image Download
<?PHP
// Date picker - original by Samuel Aiala Ferreira, fixed by Dan Walker. 
// dan.j.walker@lycos.co.uk
// Didn't used to scroll from 1 year to the other properly without
// incorrectly building table. Every link then sent you one year forward!!
// Also links were incorrectly built. Made compatable with PHP4.
// To make compatable with PHP5, change the var declarations in
// calendar.inc.php to public. Var is depreciated in PHP5.
include("calendar.inc.php");
if (isset(
$_GET["day"])) {
    
$day $_GET["day"]; } else {
    
$day date("d");             }
    
if (isset(
$_GET["mon"])) {
    
$mon $_GET["mon"]; } else {
    
$mon date("m");             }

if (isset(
$_GET["yr"])) {
    
$yr $_GET["yr"]; } else {
    
$yr date("Y");             }
    
$cal = new calendar($day,$mon,$yr);
$cal->func_Show();
?>