PHP Classes

File: example.3.php

Recommend this page to a friend!
  Classes of Salettes Rémy   PHPalm Calendar   example.3.php   Download  
File: example.3.php
Role: Example script
Content type: text/plain
Description: 3rd example
Class: PHPalm Calendar
Output month calendars with links day detail pages
Author: By
Last change: * Comments changed so as to fit woth the new feature.

* Show how to disable the new feature (changing the month by clicking on links)
Date: 19 years ago
Size: 991 bytes
 

Contents

Class file image Download
<?php

/* PHPalm - Calendar
 * Example 3 : Display a calendar with specific year and month and with monday as the first day and let you change the month.
 * 02/12/2005
 * Author : Rémy Salettes
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
*/


//We include the class
require_once ("calendar.class.php");

//We create an instance of the class, specifying the date : July 1988
$MyCal = new calendar('07', '1988');

//We indicate to the class we want monday as the first day. Note that we could also speicfy it by writing :
//$MyCal->monday_1st = 'y';
//$MyCal->monday_1st = 'yes';
//$MyCal->monday_1st = 'oui';
$MyCal->monday_1st = '1';

//We call the generate() function, all is in its name
$MyCal->generate();

//We call the draw() function which allow you to display the calendar generated before
$MyCal->draw();

?>