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: 16 years ago
Size: 690 bytes
 

Contents

Class file image Download
<?php
include('make_time.lib.php');
//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.
*/

$t->y_delay[0]=10;
$t->y_delay[1]=10;
//if you want a time corection:
$t->cor["H"]=8;

//load the main script
$t->mk_time();

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

$time=null;
echo
$t->display_form($time);

?>