PHP Classes

File: readmore

Recommend this page to a friend!
  Classes of Suranga Niroshan Fernando   Calendar Display   readmore   Download  
File: readmore
Role: Documentation
Content type: text/plain
Description: Documentation
Class: Calendar Display
Display calendar months with special day marks
Author: By
Last change:
Date: 13 years ago
Size: 2,029 bytes
 

Contents

Class file image Download
This class is created by Suranga Niroshan fernando -- niroshan825 in contem Visit :: http://joomladose.blogspot.com/ for more cool stuffs 1. Files In the package class.calendar.php demo.php basic-demo.php readmore.txt 2. Instalation Include class.calendar.php in the page where you want to display the calendar 1. Create a calendar Object eg: $cal=new calendar(); 2. Set month and year to display ***************** THIS STEP IS MANDOTARY ********************** month should be an integer value between 1-12; 1-Jan ;;; 12-Dec. eg: $cal->setDate(int month, int year); *************************************************************** 3. Set marked Dates ---------THIS IS OPTIONAL ------------- eg : $marked = array( '2011-06-01'=>array('title'=>'firstday','type'=>'reminder'), '2011-06-05'=>array('title'=>'Normal day','type'=>'holiday'), '2011-06-20'=>array('title'=>'Yester day','type'=>'reminder'), '2011-06-21'=>array('title'=>'My day','type'=>'reminder'), '2011-06-08'=>array('title'=>'fun day','type'=>'reminder'), '2011-06-26'=>array('title'=>'hurrrrrray!!! a holiday','type'=>'holiday') ); $cal->setMarkedDates($marked); ---------------------------------------- 4. Display calendar $cal->writeCalander(); 3. Methods 1. $cal->setDate(int month, int year); -- set the month and year to display as the calendar 2. $cal->setMarkedDates(array marked); -- setes marked dates such as reminders holidays 3. $cal->writeCalander(); -- Display calendar 4. $cal->setcurrentDetails() -- Display current month and year sent to calendar; 4. Properties $cal->month -- Sent month to the calendar int between 1-12 $cal->year -- Sent year to the calendar $cal->monthPrefix -- array containing month prefix - 5. Exception $cal->writeCalander(); throws one exception if the month and the year is not set or if those are invalid