Support for optional logging of print actions.
[openemr.git] / interface / main / calendar / modules / PostCalendar / pntemplates / default / views / day_print / outlook_ajax_template.html
blobe68133ba745951fadef07cc94a29c133339fd210
1 [-*Smarty*-]
2 [-*****************************************************************************-]
3 [-* Copyright (C) 2005-2006 Rod Roark <rod@sunsetsystems.com> and others *-]
4 [-* *-]
5 [-* This program is free software; you can redistribute it and/or *-]
6 [-* modify it under the terms of the GNU General Public License *-]
7 [-* as published by the Free Software Foundation; either version 2 *-]
8 [-* of the License, or (at your option) any later version. *-]
9 [-*****************************************************************************-]
10 [-config_load file="default.conf"-]
11 [-*Load the Language Definitions*-]
12 [-config_load file="lang.$USER_LANG"-]
13 [-* DO NOT INCLUDE the default header,
14 * which includes a stylesheet to screw up
15 * our styles below *-]
16 [-*include file="$TPL_NAME/views/header.html"*-]
18 [-*Values used in setting timeslot and event heights*-]
19 [-php-]$timeslotHeightVal=20; $timeslotHeightUnit="px";[-/php-]
21 <html>
22 <head>
24 <style>
25 a {
26 text-decoration:none;
28 td {
29 font-family: Arial, Helvetica, sans-serif;
31 div.tiny { width:1px; height:1px; font-size:1px; }
33 #bigCalHeader {
34 height: 20%;
35 font-family: Arial, Helvetica, sans-serif;
37 #bigCalText {
38 float: left;
40 #provname {
41 font-size: 2em;
43 #daterange {
44 font-size: 1.8em;
45 font-weight: bold;
48 #bigCal {
49 height: 80%;
51 #bigCal table {
52 border-collapse: collapse;
55 /* these are for the small datepicker DIV */
56 #datePicker {
57 float: right;
58 display: inline;
59 padding: 5px;
60 text-align: center;
61 background-color: lightblue;
63 #datePicker td {
64 font-family: Arial, Helvetica, sans-serif;
65 font-size: 0.7em;
66 /* font-size: 9pt; */
68 #datePicker table {
69 border-collapse: collapse;
71 #datePicker .tdDOW-small {
72 font-family: Arial, Helvetica, sans-serif;
73 font-size: 10px;
74 vertical-align: top;
75 background-color: lightblue;
76 text-align: center;
77 border: none;
78 padding: 2px 3px 2px 3px;
80 #datePicker .tdDatePicker {
81 cursor: pointer;
82 cursor: hand;
84 #datePicker .tdWeekend-small {
85 font-family: Arial, Helvetica, sans-serif;
86 font-size: 10px;
87 vertical-align: top;
88 border: none;
89 padding: 2px 3px 2px 3px;
90 background-color: #dddddd;
91 color: #999999;
94 #datePicker .tdOtherMonthDay-small {
95 font-family: Arial, Helvetica, sans-serif;
96 font-size: 10px;
97 vertical-align: top;
98 border: none;
99 padding: 2px 3px 2px 3px;
100 background-color: #ffffff;
101 color: #999999;
104 #datePicker .tdMonthName-small {
105 text-align: center;
106 font-family: Arial, Helvetica, sans-serif;
107 font-size: 12px;
108 font-style: normal
111 #datePicker .tdMonthDay-small {
112 font-family: Arial, Helvetica, sans-serif;
113 font-size: 10px;
114 vertical-align: top;
115 border: none;
116 padding: 2px 3px 2px 3px;
117 background-color: #ffffff;
119 #datePicker .currentWeek {
120 border-top: 1px solid blue;
121 border-bottom: 1px solid blue;
122 background-color: lightblue;
124 #datePicker .currentDate {
125 border: 1px solid blue;
126 background-color: blue;
127 color: lightblue;
130 /* the DIV of times */
131 #times {
132 border-right: 1px solid #999;
134 #times table {
135 border-collapse: collapse;
136 width: 100%;
137 margin: 0px;
138 padding: 0px;
140 #times table td {
141 border: 0px;
142 border-top: 1px solid #999;
143 margin: 0px;
144 padding: 0px;
145 font-size: 10pt;
147 .timeslot {
148 height: [-php-]echo $timeslotHeightVal.$timeslotHeightUnit;[-/php-];
149 margin: 0px;
150 padding: 0px;
152 .schedule {
153 background-color: pink;
154 vertical-align: top;
155 padding: 0px;
156 margin: 0px;
157 border-right: 1px solid black;
159 /* types of events */
160 .event_in {
161 position: absolute;
162 background-color: white;
163 width: 100%;
164 font-size: 0.8em;
165 color: #ddd;
166 border-top: 1px dashed #ddd;
168 .event_out {
169 position: absolute;
170 background-color: lightgray;
171 width: 100%;
172 font-size: 0.8em;
173 color: #ddd;
174 border-top: 1px dashed #ddd;
176 .event_appointment {
177 position: absolute;
178 background-color: white;
179 overflow: hidden;
180 border: 1px solid blue;
181 width: 100%;
182 font-size: 0.8em;
184 .event_noshow {
185 position: absolute;
186 background-color: pink;
187 overflow: hidden;
188 border: 1px solid blue;
189 width: 100%;
190 font-size: 0.8em;
192 .event_reserved {
193 position: absolute;
194 background-color: pink;
195 overflow: hidden;
196 border: 1px solid blue;
197 width: 100%;
198 font-size: 0.8em;
200 </style>
202 <script type="text/javascript" src="../../../library/textformat.js"></script>
204 </head>
205 <body>
207 [-php-]
209 // build a day-of-week (DOW) list so we may properly build the calendars later in this code
210 $DOWlist = array();
211 $tmpDOW = pnModGetVar(__POSTCALENDAR__, 'pcFirstDayOfWeek');
212 // bound check and auto-correction
213 if ($tmpDOW <0 || $tmpDOW >6) {
214 pnModSetVar(__POSTCALENDAR__, 'pcFirstDayOfWeek', '0');
215 $tmpDOW = 0;
217 while (count($DOWlist) < 7) {
218 array_push($DOWlist, $tmpDOW);
219 $tmpDOW++;
220 if ($tmpDOW > 6) $tmpDOW = 0;
223 // A_CATEGORY is an ordered array of associative-array categories.
224 // Keys of interest are: id, name, color, desc, event_duration.
227 $A_CATEGORY =& $this->_tpl_vars['A_CATEGORY'];
229 // [-if $PRINT_VIEW != 1-]
230 // [-*Main Navigation*-]
231 // [-include file="$TPL_NAME/views/global/navigation.html"-]
232 // [-/if-]
234 $A_EVENTS =& $this->_tpl_vars['A_EVENTS'];
235 // $S_EVENTS =& $this->_tpl_vars['S_EVENTS']; // Deleted by Rod
236 $providers =& $this->_tpl_vars['providers'];
237 $times =& $this->_tpl_vars['times'];
238 $interval = $this->_tpl_vars['interval'];
239 $viewtype = $this->_tpl_vars['VIEW_TYPE'];
240 $PREV_WEEK_URL = $this->_tpl_vars['PREV_WEEK_URL'];
241 $NEXT_WEEK_URL = $this->_tpl_vars['NEXT_WEEK_URL'];
242 $PREV_DAY_URL = $this->_tpl_vars['PREV_DAY_URL'];
243 $NEXT_DAY_URL = $this->_tpl_vars['NEXT_DAY_URL'];
245 $Date = postcalendar_getDate();
246 if (!isset($y)) $y = substr($Date, 0, 4);
247 if (!isset($m)) $m = substr($Date, 4, 2);
248 if (!isset($d)) $d = substr($Date, 6, 2);
250 [-/php-]
252 [-php-]
253 echo "<div id='bigCalHeader'>";
255 echo "<div id='bigCalText'>";
256 // output the date range
257 echo "<span id='daterange'>";
258 $atmp = array_keys($A_EVENTS);
259 echo date('d F Y', strtotime($atmp[0]));
260 echo "<br><span style='font-size:0.8em;font-weight:normal'>".xl(date('l', strtotime($atmp[0])))."</span>";
261 echo "</span>";
262 echo "</div>";
264 // output a calendar for the subsequent month
265 list($nyear, $nmonth, $nday) = explode(" ", date("Y m d", strtotime($atmp[0])));
266 $nmonth++;
267 if ($nmonth > 12) { $nyear++; $nmonth=1; }
268 echo "<div id='datePicker'>";
269 PrintDatePicker(strtotime($nyear."-".$nmonth."-1"), $DOWlist, $this->_tpl_vars['A_SHORT_DAY_NAMES']);
270 echo "</div>";
272 // output a small calendar for the chosen month
273 echo "<div id='datePicker'>";
274 PrintDatePicker(strtotime($atmp[0]), $DOWlist, $this->_tpl_vars['A_SHORT_DAY_NAMES']);
275 echo "</div>";
277 echo "</div>"; // end the bigCalHeader
278 [-/php-]
280 [-assign var="dayname" value=$DATE|date_format:"%w"-]
281 [-assign var="day" value=$DATE|date_format:"%d"|string_format:"%1d"-]
282 [-assign var="month" value=$DATE|date_format:"%m"|string_format:"%1d"-]
283 [-assign var="year" value=$DATE|date_format:"%Y"|string_format:"%4d"-]
285 [-pc_sort_events var="S_EVENTS" sort="time" order="asc" value=$A_EVENTS-]
287 <div id="bigCal">
288 [-php-]
290 echo "<table border='0' cellpadding='1' cellspacing='0' width='100%'>\n";
292 // output the TD with the times DIV
293 echo "<tr>";
294 echo "<td id='times' style='width:2em;'><div><table>\n";
295 echo "<td class='timeslot' style='text-align: center; background-color:#ddd;'>&nbsp;</td>";
296 foreach ($times as $slottime) {
297 $startampm = ($slottime['mer']) == "pm" ? 2 : 1;
298 $starttimeh = $slottime['hour'];
299 $disptimeh = ($starttimeh > 12) ? ($starttimeh - 12) : $starttimeh;
300 $starttimem = $slottime['minute'];
301 $slotendmins = $starttimeh * 60 + $starttimem + $interval;
303 echo "<tr><td class='timeslot'>";
304 if ($starttimem == "00") { echo "<b>$disptimeh:$starttimem</b>"; }
305 else { echo "$disptimeh:$starttimem"; }
306 echo "</td></tr>\n";
308 echo "</table></div></td>";
311 // This loops once for each provider to be displayed.
313 foreach ($providers as $provider) {
314 $providerid = $provider['id'];
316 // to specially handle the IN/OUT events I'm doing something new here
317 // for each IN event it will have a duration lasting until the next
318 // OUT event or until the end of the day
319 $tmpTime = $times[0];
320 $calStartMin = ($tmpTime['hour'] * 60) + $tmpTime['minute'];
321 $tmpTime = $times[count($times)-1];
322 $calEndMin = ($tmpTime['hour'] * 60) + $tmpTime['minute'];
324 // having a 'title' for the TD makes the date appear by the mouse pointer
325 // this is nice when all you see are times on the left side and no head
326 // row with the dates or day-of-week (DOW)
327 echo "<td class='schedule' style='border: 1px solid #999;' title='".$provider['fname']." ".$provider['lname']."'>";
328 echo "<div class='timeslot' style='font-size: 0.8em; text-align: center; background-color:#ddd; width: 100%; overflow: hidden; border-bottom: 1px solid lightgray;'>";
329 echo $provider['fname']." ".$provider['lname']."</div>";
330 echo "<div style='position: relative; height: 100%; width: 100%;'>\n";
332 // For each event...
333 // output a TD with an inner containing DIV positioned 'relative'
334 // within that DIV we place our event DIVs using 'absolute' positioning
335 foreach ($A_EVENTS as $date => $events) {
336 $eventdate = substr($date, 0, 4) . substr($date, 5, 2) . substr($date, 8, 2);
338 // determine if events overlap and adjust their width and left position as needed
339 // 26 Feb 2008 - This needs fine tuning or total replacement
340 // - it doesn't work as well as I'd like - JRM
341 $eventPositions = array();
342 foreach ($times as $slottime) {
343 $starttimeh = $slottime['hour'];
344 $starttimem = $slottime['minute'];
346 $slotstartmins = $starttimeh * 60 + $starttimem;
347 $slotendmins = $starttimeh * 60 + $starttimem + $interval;
349 $events_in_timeslot = array();
350 foreach ($events as $e1) {
351 // ignore IN and OUT events
352 if (($e1['catid'] == 2) || ($e1['catid'] == 3)) { continue; }
353 // skip events without an ID (why they are in the loop, I have no idea)
354 if ($e1['eid'] == "") { continue; }
355 // skip events for other providers
356 if ($providerid != $e1['aid']) { continue; }
358 // specially handle all-day events
359 if ($e1['alldayevent'] == 1) {
360 $tmpTime = $times[0];
361 if (strlen($tmpTime['hour']) < 2) { $tmpTime['hour'] = "0".$tmpTime['hour']; }
362 if (strlen($tmpTime['minute']) < 2) { $tmpTime['minute'] = "0".$tmpTime['minute']; }
363 $e1['startTime'] = $tmpTime['hour'].":".$tmpTime['minute'].":00";
364 $e1['duration'] = ($calEndMin - $calStartMin) * 60; // measured in seconds
367 // create a numeric start and end for comparison
368 $starth = substr($e1['startTime'], 0, 2);
369 $startm = substr($e1['startTime'], 3, 2);
370 $e1Start = ($starth * 60) + $startm;
371 $e1End = $e1Start + $e1['duration']/60;
373 // three ways to overlap:
374 // start-in, end-in, span
375 if ((($e1Start >= $slotstartmins) && ($e1Start < $slotendmins)) // start-in
376 || (($e1End > $slotstartmins) && ($e1End <= $slotendmins)) // end-in
377 || (($e1Start < $slotstartmins) && ($e1End > $slotendmins))) // span
379 array_push($events_in_timeslot, $e1['eid']);
383 $leftpos = 0;
384 $width = 100 / count($events_in_timeslot);
386 // loop over the events in this timeslot and adjust their width
387 foreach ($events_in_timeslot as $eid) {
388 // set the width if not already set or if the current width is smaller
389 // than was was previously set
390 if (! isset($eventPositions[$eid]->width)) { $eventPositions[$eid]->width = $width; }
391 else if ($eventPositions[$eid]->width > $width) { $eventPositions[$eid]->width = $width; }
393 // set the left position if not already set or if the current left is
394 // greater than what was previously set
395 if (! isset($eventPositions[$eid]->leftpos)) { $eventPositions[$eid]->leftpos = $leftpos; }
396 else if ($eventPositions[$eid]->leftpos < $leftpos) { $eventPositions[$eid]->leftpos = $leftpos; }
398 // increment the leftpos by the width
399 $leftpos += $width;
401 } // end overlap detection
403 // now loop over the events for the day and output their DIVs
404 foreach ($events as $event) {
405 // skip events for other providers
406 // yeah, we've got that sort of overhead here... it ain't perfect
407 if ($providerid != $event['aid']) { continue; }
409 // skip events without an ID (why they are in the loop, I have no idea)
410 if ($event['eid'] == "") { continue; }
412 // specially handle all-day events
413 if ($event['alldayevent'] == 1) {
414 $tmpTime = $times[0];
415 if (strlen($tmpTime['hour']) < 2) { $tmpTime['hour'] = "0".$tmpTime['hour']; }
416 if (strlen($tmpTime['minute']) < 2) { $tmpTime['minute'] = "0".$tmpTime['minute']; }
417 $event['startTime'] = $tmpTime['hour'].":".$tmpTime['minute'].":00";
418 $event['duration'] = ($calEndMin - $calStartMin) * 60; // measured in seconds
421 // figure the start time and minutes (from midnight)
422 $starth = substr($event['startTime'], 0, 2);
423 $startm = substr($event['startTime'], 3, 2);
424 $eStartMin = $starth * 60 + $startm;
425 $dispstarth = ($starth > 12) ? ($starth - 12) : $starth;
427 // determine the class for the event DIV based on the event category
428 $evtClass = "event_appointment";
429 switch ($event['catid']) {
430 case 1: // NO-SHOW appt
431 $evtClass = "event_noshow";
432 break;
433 case 2: // IN office
434 $evtClass = "event_in";
435 break;
436 case 3: // OUT of office
437 $evtClass = "event_out";
438 break;
439 case 4: // VACATION
440 case 8: // LUNCH
441 case 11: // RESERVED
442 $evtClass = "event_reserved";
443 break;
444 default: // some appointment
445 $evtClass = "event_appointment";
446 break;
449 // if this is an IN or OUT event then we have some extra special
450 // processing to be done
451 // the IN event creates a DIV until the OUT event
452 // or, without an OUT DIV matching the IN event
453 // then the IN event runs until the end of the day
454 if ($event['catid'] == 2) {
455 // locate a matching OUT for this specific IN
456 $found = false;
457 $outMins = 0;
458 foreach ($events as $outevent) {
459 // skip events for other providers
460 if ($providerid != $outevent['aid']) { continue; }
461 // skip events with blank IDs
462 if ($outevent['eid'] == "") { continue; }
464 if ($outevent['eid'] == $event['eid']) { $found = true; continue; }
465 if (($found == true) && ($outevent['catid'] == 3)) {
466 // calculate the duration from this event to the outevent
467 $outH = substr($outevent['startTime'], 0, 2);
468 $outM = substr($outevent['startTime'], 3, 2);
469 $outMins = ($outH * 60) + $outM;
470 $event['duration'] = ($outMins - $eStartMin) * 60; // duration is in seconds
471 $found = 2;
472 break;
475 if ($outMins == 0) {
476 // no OUT was found so this event's duration goes
477 // until the end of the day
478 $event['duration'] = ($calEndMin - $eStartMin) * 60; // duration is in seconds
482 // calculate the TOP value for the event DIV
483 // diff between event start and schedule start
484 $eMinDiff = $eStartMin - $calStartMin;
485 // diff divided by the time interval of the schedule
486 $eStartInterval = $eMinDiff / $interval;
487 // times the interval height
488 $eStartPos = $eStartInterval * $timeslotHeightVal;
489 $evtTop = $eStartPos.$timeslotHeightUnit;
491 // calculate the HEIGHT value for the event DIV
492 // diff between end and start of event
493 $eEndMin = $eStartMin + ($event['duration']/60);
494 $eMinDiff = $eEndMin - $eStartMin;
495 // diff divided by the time interval of the schedule
496 $eEndInterval = $eMinDiff / $interval;
497 // times the interval height
498 $eHeight = $eEndInterval * $timeslotHeightVal;
499 $evtHeight = $eHeight.$timeslotHeightUnit;
501 // determine the DIV width based on any overlapping events
502 // see further above for the overlapping calculation code
503 $divWidth = "";
504 $divLeft = "";
505 if (isset($eventPositions[$event['eid']])) {
506 $divWidth = "width: ".$eventPositions[$event['eid']]->width."%";
507 $divLeft = "left: ".$eventPositions[$event['eid']]->leftpos."%";
510 $eventid = $event['eid'];
511 $patientid = $event['pid'];
512 $commapos = strpos($event['patient_name'], ",");
513 $lname = substr($event['patient_name'], 0, $commapos);
514 $fname = substr($event['patient_name'], $commapos + 2);
515 $patient_dob = $event['patient_dob'];
516 $patient_age = $event['patient_age'];
517 $catid = $event['catid'];
518 $comment = addslashes($event['hometext']);
519 $catname = $event['catname'];
520 $title = "Age $patient_age ($patient_dob)";
522 $content = "";
524 if ($comment && $GLOBALS['calendar_appt_style'] < 4) $title .= " " . $comment;
526 if ($catid == 2 || $catid == 3 || $catid == 4 || $catid == 8 || $catid == 11) {
527 if ($catid == 2) $catname = xl("IN");
528 else if ($catid == 3) $catname = xl("OUT");
529 else if ($catid == 4) $catname = xl("VACATION");
530 else if ($catid == 8) $catname = xl("LUNCH");
531 else if ($catid == 11) $catname = xl("RESERVED");
533 $atitle = $catname;
534 if ($event['recurrtype'] == 1) $content .= "<img src='$TPL_IMAGE_PATH/repeating8.png' border='0' style='margin:0px 2px 0px 2px;' title='Repeating event' alt='Repeating event'>";
535 if ($comment) $atitle .= " $comment";
536 $content .= $catname;
537 if ($comment) $content .= " $comment";
539 else {
540 // some sort of patient appointment
541 $content .= "<span class='appointment".$apptToggle."'>";
542 $content .= $dispstarth . ':' . $startm;
543 if ($event['recurrtype'] == 1) $content .= "<img src='$TPL_IMAGE_PATH/repeating8.png' border='0' style='margin:0px 2px 0px 2px;' title='Repeating event' alt='Repeating event'>";
544 $content .= htmlspecialchars($event['apptstatus']);
546 if ($patientid) {
547 if ($catid == 1) $content .= "<strike>";
548 $content .= htmlspecialchars($lname);
549 if ($GLOBALS['calendar_appt_style'] != 1) {
550 $content .= "," . htmlspecialchars($fname);
551 if ($event['title'] && $GLOBALS['calendar_appt_style'] >= 3) {
552 $content .= "(" . $event['title'];
553 if ($event['hometext'] && $GLOBALS['calendar_appt_style'] >= 4)
554 $content .= ": <font color='green'>" . htmlspecialchars(trim($event['hometext'])) . "</font>";
555 $content .= ")";
558 if ($catid == 1) $content .= "</strike>";
560 else {
561 // no patient id, just output the category name
562 $content .= $catname;
564 $content .= "</span>";
567 $divTitle .= "\n(double click to edit)";
569 // a special case for the 'IN' event so it doesn't overlap another
570 // event DIV and include the time
571 if ($event['catid'] == 2) {
572 $inTop = ($eStartPos - $timeslotHeightVal).$timeslotHeightUnit;
573 echo "<div class='".$evtClass." event' style='top:".$inTop.
574 "; height:".$timeslotHeightVal.$timeslotHeightUnit.
575 "; $divWidth".
576 "; $divLeft".
577 "; background:transparent".
578 "; border: none".
579 "'".
580 ">";
581 $content = $dispstarth . ':' . $startm . " " . $content;
582 echo $content;
583 echo "</div>\n";
586 // output the DIV and content
587 echo "<div class='".$evtClass." event' style='top:".$evtTop."; height:".$evtHeight.
588 "; background-color:".$event["catcolor"].
589 "; $divWidth".
590 "; $divLeft".
591 "'".
592 " id='".$eventdate."-".$eventid."'".
593 ">";
594 // second part for the special IN event
595 if ($event['catid'] != 2) { echo $content; }
596 echo "</div>\n";
597 } // end EVENT loop
599 echo "</div>";
601 } // end date
603 echo "</td>\n";
605 } // end provider loop
607 echo " </tr>\n";
608 echo "</table>\n";
609 echo "<P>";
611 // [-*footer*-]
612 // [-include file="$TPL_NAME/views/global/footer.html"-]
613 // [-include file="$TPL_NAME/views/footer.html"-]
616 /* output a small calendar, based on the date-picker code from the normal calendar */
617 function PrintDatePicker($caldate, $DOWlist, $daynames) {
619 $cMonth = date("m", $caldate);
620 $cYear = date("Y", $caldate);
621 $cDay = date("d", $caldate);
623 echo '<table>';
624 echo '<tr>';
625 echo '<td colspan="7" class="tdMonthName-small">';
626 echo date('F Y', $caldate);
627 echo '</td>';
628 echo '</tr>';
629 echo '<tr>';
630 foreach ($DOWlist as $dow) {
631 echo "<td class='tdDOW-small'>".$daynames[$dow]."</td>";
633 echo '</tr>';
635 // to make a complete week row we need to compute the real
636 // start and end dates for the view
637 list ($year, $month, $day) = explode(" ", date('Y m d', $caldate));
638 $startdate = strtotime($year.$month."01");
639 while (date('w', $startdate) != $DOWlist[0]) { $startdate -= 60*60*24; }
641 $enddate = strtotime($year.$month.date("t", $month));
642 while (date('w', $enddate) != $DOWlist[6]) { $enddate += 60*60*24; }
644 $currdate = $startdate;
645 while ($currdate <= $enddate) {
646 if (date('w', $currdate) == $DOWlist[0]) {
647 echo "<tr>";
650 // we skip outputting some days
651 $skipit = false;
653 // set the TD class
654 $tdClass = "tdMonthDay-small";
655 if (date('m', $currdate) != $month) {
656 $tdClass = "tdOtherMonthDay-small";
657 $skipit = true;
659 if ((date('w', $currdate) == 0) || (date('w', $currdate) == 6)) {
660 $tdClass = "tdWeekend-small";
663 if (date('Ymd',$currdate) == $Date) {
664 // $Date is defined near the top of this file
665 // and is equal to whatever date the user has clicked
666 $tdClass .= " currentDate";
669 // add a class so that jQuery can grab these days for the 'click' event
670 $tdClass .= " tdDatePicker";
672 // output the TD
673 $td = "<td ";
674 $td .= "class=\"".$tdClass."\" ";
675 //$td .= "id=\"".date("Ymd", $currdate)."\" ";
676 $td .= "id=\"".date("Ymd", $currdate)."\" ";
677 $td .= "title=\"Go to week of ".date('M d, Y', $currdate)."\" ";
678 $td .= "> ".date('d', $currdate)."</td>\n";
679 if ($skipit == true) { echo "<td></td>"; }
680 else { echo $td; }
682 // end of week row
683 if (date('w', $currdate) == $DOWlist[6]) echo "</tr>\n";
685 // time correction = plus 1000 seconds, for some unknown reason
686 $currdate += (60*60*24)+1000;
688 echo "</table>";
691 [-/php-]
692 </div> <!-- end bigCal DIV -->
694 </body>
696 <script type="text/javascript" src="[-php-] echo $GLOBALS['webroot'] [-/php-]/library/js/jquery-1.2.2.min.js"></script>
697 <script>
698 $(document).ready(function(){
699 var win = top.printLogPrint ? top : opener.top;
700 win.printLogPrint(window);
701 window.close();
703 </script>
705 </html>