Login   Register  
PHP Classes
elePHPant
Icontem

File: historicdate_demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ihor Khomyn  >  Historic Date  >  historicdate_demo.php  >  Download  
File: historicdate_demo.php
Role: Example script
Content type: text/plain
Description: php usage demo
Class: Historic Date
Convert dates within the billions of years range
Author: By
Last change: edited to use the class
Date: 2012-08-09 11:47
Size: 1,511 bytes
 

Contents

Class file image Download
<html>
<head>
<title>Historic Date v.0.1</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="expires" content="0">
<meta name="description" content="Historic Date component by Ihor Khomyn (c) 2012">
<meta name="keywords" content="historic, date">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js"></script>
<script type="text/javascript" src="historicdate.js"></script>
</head>
<body>

<?php

require 'historicdate.php';

$dates = array('-197207200',
               
'190000000',
               
'197700002',
               
'197207252',
               
'197207002',
               
'-3011222000000',
               
'-11222200000',
               
'-30011222000',
               
'-300112220000',
               
'-3001122200000',
               
'-30011222000000',
               
'-330011222000000',
               
'-3000011222000000',
               
'-30000011222000000',
               
'22111210',
               
'201104140');
$h = new HistoricDate();
print 
'<table width=100% border=1 cellpadding=3>';
print 
'<tr><td align=center>Date Value</td><td align=center>Date Itself</td><td align=center>JS-driven Edit</td></tr>';
foreach (
$dates as $key => $value) {
    print 
'<tr><td align=right>'.$value.'</td>
           <td>'
.$h->Transform($value).'</td>
           <td><input type=text name="e'
.$key.'" value="'.$value.'" rel=historicpopup></td></tr>'."\n";
}
print 
'</table>'
 
?>

</body>
</html>