PHP Classes

File: Xmktime_exemple.php

Recommend this page to a friend!
  Classes of András Zoltán-Gyárfás  >  Extended MKTime  >  Xmktime_exemple.php  >  Download  
File: Xmktime_exemple.php
Role: Example script
Content type: text/plain
Description: a simple exemple
Class: Extended MKTime
Generate form inputs to choose a date and time
Author: By
Last change: Minor changes, documentation
Date: 8 years ago
Size: 690 bytes


Class file image Download
//load the class
$t= new make_time();

if submited the form, and is set the stamp. $t->stamp contains the generated date's timestamp.

if($t->stamp!==null) { echo $t->stamp; }

configure the form - $t->y_delay[0] is the number of years before curent year and $t->y_delay[1] is the number of years after curent.

//if you want a time corection:

//load the main script

display_form will display the form. the $time atribute can be a timestamp. If it is empty, than wil take the curent time.