PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Egorov Stanislav  >  Ministry_Calendar  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: testing main class
Class: Ministry_Calendar
Output month calendars in HTML
Author: By
Last change: Added new function test.
Date: 18 years ago
Size: 1,179 bytes
 

Contents

Class file image Download
<!--at first we include CSS to know how our calendar looks-->
<link rel=stylesheet type=text/css href=style.css>
<?php
require_once "calendar.class.php";
require_once
"timer.class.php";
$timer=new timer(); //start timer (this just for fun)

if(!isset($m) || !isset($y))//if the year or month not defined
{
$today = time();//define current time
$m = date("n", time());//gotta month;
$y = date( "Y", time());//gotta year;
}
// Russian month names & daynames
/*
$ru1 = array("&#710; ", "", "", "", "", "",
             "", "", "", "", "", "", "");
$ru2 = array("", "", "", "", "", "", "");
*/

$c = new xuev_Calendar;

//$c->setMonthNames($ru1);
//$c->setDayNames($ru2);

//2 variants of jumpMenu (IMHO second much better)
echo "<b>which one better? (any suggestions?)</b><br><br><br>";
echo
"JumpMenu first variant<br>".$c->jumpMenu1();
echo
"JumpMenu second variant<br>".$c->jumpMenu2();

echo
"Calendar<br><br>".$c->getMonthHtml($m, $y);//showing calendar for $m month and $m year

//echo $c->getYearHtml(2004);

$timer->elapsed();// showing elapsed time
?>