Source for file calendar.php
Documentation is available at calendar.php
* File: calendar.php | (c) dynarch.com 2004
* Distributed as part of "The Coolest DHTML Calendar"
* -----------------------------------------------------------------
* This file implements a simple PHP wrapper for the calendar. It
* allows you to easily include all the calendar files and setup the
* calendar by instantiating and calling a PHP object.
$theme = 'calendar-win2k-1',
'daFormat' => '%Y/%m/%d');
$code = ( '<link rel="stylesheet" type="text/css" media="all" href="' .
$code .= ( '<script type="text/javascript" src="' .
$code .= ( '<script type="text/javascript" src="' .
$code .= ( '<script type="text/javascript" src="' .
$code = ( '<script type="text/javascript">Calendar.setup({' .
function make_input_field($cal_options = array(), $field_attributes = array()) {
echo '<input ' . $attrstr . '/>';
echo '<a href="#" id="'. $this->_trigger_id($id) . '">' .
'<img align="middle" border="0" src="' . $this->calendar_lib_path . 'img.gif" alt="" /></a>';
function _field_id($id) { return 'f-calendar-field-' . $id; }
function _trigger_id($id) { return 'f-calendar-trigger-' . $id; }
function _gen_id() { static $id = 0; return ++ $id; }
while (list ($key, $val) = each($array)) {
$val = $val ? 'true' : 'false';
$jstr .= '"' . $key . '":' . $val;
while (list ($key, $val) = each($array)) {
$attrstr .= $key . '="' . $val . '" ';
|