<?php /** * Inclusions * [1] Language file * Option is detected from a simple config. file */ $conf = parse_ini_file("conf.ini.php"); $lang = $conf['lang'];
if(file_exists("$lang.php")){ include_once("$lang.php"); } else { die("NO LANGUAGE FILE FOUND!"); }
/** * Inclusions * [2] Month-day names arrays * IMPORTANT: This File MUST be included before RCalendar.class.php * Note: You could directly include the file before the class definition in the class file */ include_once("names_arrays.php");
/** * Inclusions * [3] Class */ include_once("RCalendar.class.php");
/** * Objects */ $cal = new RCalendar(1, 2007, true, true, "onclick='alert(\"Hello!\");'", "yellow"); $cal_two = new RCalendar(4, 1980, false, true, "onclick='alert(\"I was born on 23th :)!\");'"); $cal_three = new RCalendar(1, 2007, true, false, "onmouseover='alert(\" My ID: \" + this.id);'", "#ff0000");
?>
<html> <head> <title>RCalendar Example Page</title> <?php $cal->printStyleSheet("style.css"); ?> </head> <body> <h2>RCALENDAR CLASS</h2> <h3 style='text-align:center;'>Example page</h3> <?php echo "Example [1] :: Current day hilighted (Yellow) || WeekEnds Hilighted || onclick=\"alert('Hello');\"<br /><br />"; $cal->displayCal(); echo "<br /><br /><br />"; echo "Example [2] :: WeekEnds Hilighted || onclick=\"alert('I was born on 23th :)');\"<br /><br />"; $cal_two->displayCal(); echo "<br /><br /><br />"; echo "Example [3] :: Current day hilighted (Red) || onmouseover='alert(\" My ID: \" + this.id);'<br /><br />"; $cal_three->displayCal(); echo "<br /><br /><br />"; ?> </body> </html>
|