18 define(
'NEWLINE',
"\n");
33 $this->calendar_file =
'calendar_stripped.js';
34 $this->calendar_setup_file =
'calendar-setup_stripped.js';
36 $this->calendar_file =
'calendar.js';
37 $this->calendar_setup_file =
'calendar-setup.js';
39 $this->calendar_lang_file =
'lang/calendar-' .
$lang .
'.js';
40 $this->calendar_theme_file = $theme .
'.css';
42 $this->calendar_options = array(
43 'ifFormat' =>
'%Y/%m/%d',
44 'daFormat' =>
'%Y/%m/%d'
50 $this->calendar_options[$name] =
$value;
60 $code = (
'<link rel="stylesheet" type="text/css" media="all" href="' . $this->calendar_lib_path . $this->calendar_theme_file .
'" />' .
NEWLINE);
61 $code.= (
'<script type="text/javascript" src="' . $this->calendar_lib_path . $this->calendar_file .
'"></script>' .
NEWLINE);
62 $code.= (
'<script type="text/javascript" src="' . $this->calendar_lib_path . $this->calendar_lang_file .
'"></script>' .
NEWLINE);
63 $code.= (
'<script type="text/javascript" src="' . $this->calendar_lib_path . $this->calendar_setup_file .
'"></script>');
69 $js_options = $this->
_make_js_hash(array_merge($this->calendar_options, $other_options));
70 $code = (
'<script type="text/javascript">Calendar.setup({' . $js_options .
'});</script>');
81 echo
'<input ' . $attrstr .
'/>';
82 echo
'<a href="#" id="' . $this->
_trigger_id($id) .
'">' .
'<img align="middle" border="0" src="' . $this->calendar_lib_path .
'img.gif" alt="" /></a>';
84 $options = array_merge($cal_options, array(
93 return 'f-calendar-field-' . $id;
97 return 'f-calendar-trigger-' . $id;
109 foreach ($array as $key => $val) {
110 if (is_bool($val)) $val = $val ?
'true' :
'false';
111 else if (!is_numeric($val)) $val =
'"' . $val .
'"';
112 if ($jstr) $jstr.=
',';
113 $jstr.=
'"' . $key .
'":' . $val;
122 foreach ($array as $key => $val) {
123 $attrstr.= $key .
'="' . $val .
'" ';
_make_calendar($other_options=array())
make_input_field($cal_options=array(), $field_attributes=array())
DHTML_Calendar($calendar_lib_path= '/calendar/', $lang= 'en', $theme= 'calendar-win2k-1', $stripped=true)
set_option($name, $value)
_field_id($id)
PRIVATE SECTION.