PHP Classes

File: cal.php

Recommend this page to a friend!
  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: 18 years ago
Size: 803 bytes


Class file image Download
// Date picker - original by Samuel Aiala Ferreira, fixed by Dan Walker.
// 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
// to public. Var is depreciated in PHP5.
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);