6 font-family: Arial, Helvetica, sans-serif;
10 background-color:#e8eef7;
15 background-color:#f6c6c6;
20 background-color:#ffffff;
24 background-color:#ebebeb;
33 border-bottom-width:
0px;
38 border-bottom-width:
0px;
42 div.tiny { width:
1px; height:
1px; font-size:
1px; }
46 .selectors_container {
55 background-color: #B0C4DE;
56 border-top: solid
2px #E8EEF7;
57 border-left: solid
2px #E8EEF7;
58 border-bottom: solid
2px #
000000;
59 border-right: solid
2px #
000000;
62 .selectors_lists_container {
67 .selectors_cal_container {
94 border: #
000000 solid
1px;
101 font-family: Verdana, Arial, Helvetica, sans-serif;
105 margin:
0px
2px
0px
2px;
109 font-family: Verdana, Arial, Helvetica, sans-serif;
112 border-left: solid
1px #
000000;
116 font-family: Verdana, Arial, Helvetica, sans-serif;
119 border-right: solid
1px #
000000;
131 <style type=
"text/css">@import url
(../../../library/dynarch_calendar.css);</style>
132 <script type=
"text/javascript" src=
"../../../library/dialog.js"></script>
133 <script type=
"text/javascript" src=
"../../../library/textformat.js"></script>
134 <script type=
"text/javascript" src=
"../../../library/dynarch_calendar.js"></script>
135 [-php-] include_once(
"{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); [-/php-]
136 <script type=
"text/javascript" src=
"../../../library/dynarch_calendar_setup.js"></script>
138 <script language='JavaScript'
>
140 var mypcc
= '[-php-] echo $GLOBALS['phone_country_code
'] [-/php-]';
142 // This is called from the event editor popup.
143 function refreshme() {
144 top
.restoreSession();
145 document
.forms
[0].submit();
148 function newEvt(startampm
, starttimeh
, starttimem
, eventdate
, providerid
, catid
) {
149 dlgopen('add_edit_event.php?startampm=' + startampm
+
150 '&starttimeh=' + starttimeh
+ '&starttimem=' + starttimem
+
151 '&date=' + eventdate
+ '&userid=' + providerid
+ '&catid=' + catid
,
155 function oldEvt(eventdate
, eventid
) {
156 dlgopen('add_edit_event.php?date='+eventdate
+'&eid=' + eventid
, '_blank', 775, 375);
159 function goPid(pid
) {
160 top
.restoreSession();
162 echo
" top.RTop.location = '../../patient_file/summary/demographics.php' " .
163 "+ '?set_pid=' + pid;\n";
167 function GoToToday(theForm
){
168 var todays_date
= new Date();
169 var theMonth
= todays_date
.getMonth() + 1;
170 theMonth
= theMonth
< 10 ? "0" + theMonth
: theMonth
;
171 theForm
.jumpdate
.value
= todays_date
.getFullYear() + "-" + theMonth
+ "-" + todays_date
.getDate();
172 top
.restoreSession();
177 function ShowFacility() {
178 var sel
= document
.getElementById('all_users');
179 if (sel
) {sel
.value
= '__PC_ALL__';} //Show all the users in the facility when switching facilities
180 document
.getElementById('cal_navigator').submit();
183 function ChangeViewType(viewtype
) {
184 document
.getElementById('viewtype').value
= viewtype
;
185 document
.getElementById('cal_navigator').submit();
191 <!-- Required for the popup date selectors -->
192 <div id=
"overDiv" style=
"position:absolute; visibility:hidden; z-index:1;"> </div>
196 // A_CATEGORY is an ordered array of associative-array categories.
197 // Keys of interest are: id, name, color, desc, event_duration.
199 // echo
"<!-- A_CATEGORY = "; print_r($this-
>_tpl_vars['A_CATEGORY']); echo
" -->\n"; // debugging
200 // echo
"<!-- A_EVENTS = "; print_r($this-
>_tpl_vars['A_EVENTS']); echo
" -->\n"; // debugging
202 $A_CATEGORY =& $this-
>_tpl_vars['A_CATEGORY'];
204 $A_EVENTS =& $this-
>_tpl_vars['A_EVENTS'];
205 // $S_EVENTS =& $this-
>_tpl_vars['S_EVENTS']; // Deleted by Rod
206 $providers =& $this-
>_tpl_vars['providers'];
207 $times =& $this-
>_tpl_vars['times'];
208 $interval = $this-
>_tpl_vars['interval'];
209 $viewtype = $this-
>_tpl_vars['VIEW_TYPE'];
210 $PREV_WEEK_URL = $this-
>_tpl_vars['PREV_WEEK_URL'];
211 $NEXT_WEEK_URL = $this-
>_tpl_vars['NEXT_WEEK_URL'];
212 $PREV_DAY_URL = $this-
>_tpl_vars['PREV_DAY_URL'];
213 $NEXT_DAY_URL = $this-
>_tpl_vars['NEXT_DAY_URL'];
215 $Date = postcalendar_getDate();
216 if (!isset($y)) $y = substr($Date,
0,
4);
217 if (!isset($m)) $m = substr($Date,
4,
2);
218 if (!isset($d)) $d = substr($Date,
6,
2);
220 // echo
"<!-- There are " . count($A_EVENTS) .
" A_EVENTS days -->\n";
222 // $MULTIDAY = count($A_EVENTS)
> 1; // (CHEMED) not needed after week_view template changes
224 $provinfo = getProviderInfo('%', true, $_SESSION['pc_facility']); //(CHEMED)
228 <form name='theform' id='cal_navigator' action='index.php?module=PostCalendar&func=view&tplview=default&pc_category=&pc_topic='
229 method='post' onsubmit='return top.restoreSession()'
>
231 <div class='selector_buttons'
>
233 <img src='../../pic/show_calendar.gif' id='img_jumpdate' align='absbottom'
234 width='
24' height='
22' border='
0' alt='[?]' style='cursor:pointer'
235 title='[-php-] echo xl (
"Click here to choose a date");[-/php-]'
>
237 <input type='text' size='
10' name='jumpdate' id='jumpdate'
238 value='[-php-] echo
"$y-$m-$d";[-/php-]' title='yyyy-mm-dd date to go to'
239 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
/>
241 <input type='submit' name='bnsubmit' value='[-php-] echo xl(
"Go"); [-/php-]'
/>
243 <input type='submit' name='bnsubmit' value='[-php-] echo xl(
"Today"); [-/php-]' onClick='GoToToday(theform);'
/>
247 <div class='navigation_buttons'
>
248 <input name='viewtype' id='viewtype' type='hidden' value='[-php-] echo $viewtype[-/php-]'
/>
250 foreach ( array ('day' =
> xl(
"Day"), 'week' =
> xl(
"Week"), 'month' =
> xl(
"Month"), 'year' =
> xl(
"Year"))
252 echo
" <input type='button' onClick='javascript:ChangeViewType(\"$key\
");' class='viewtype' value='$value' />";
257 <div class='service_buttons'
>
258 <input type='button' value='[-php-] echo xl(
"Add"); [-/php-]' onclick='newEvt(
1,
9,
00, [-php-] echo $Date;[-/php-],
0,
0)'
/>
259 <input type='button' value='[-php-] echo xl(
"Search"); [-/php-]' onclick='top.restoreSession();
location=
"index.php?module=PostCalendar&func=search"'
/>
261 <a href=
"[-pc_url action=$VIEW_TYPE print="true
"-]">[-php-] echo xlt(
"View Printable Version"); [-/php-]
</a>
265 <div class='selectors_container' id='selectors_container'
>
266 <div class='selectors_cal_container' id='selectors_cal_container'
>
269 <div class='selectors_lists_container'
>
270 <input type='hidden' name='all_users' id='all_users' value=''
/>
271 <select multiple size='
10' name='pc_username[]'
>
272 <option value='__PC_ALL__'
>[-php-] echo xl (
"All Users"); [-/php-]
</option>
274 foreach ($provinfo as $doc) {
275 $username = $doc['username'];
276 echo
" <option value='$username'";
277 foreach ($providers as $provider)
278 if ($provider['username'] == $username) echo
" selected";
279 echo
">" . $doc['fname'] .
" " . $doc['lname'] .
"</option>\n";
285 // ==============================
286 // FACILITY FILTERING (lemonsoftware)(CHEMED)
287 // $facilities = getFacilities(); // (CHEMED) commented this out
288 // We only want to see facilities that are a 'service location',
289 // as 'billing location' facilities should not have any patient appointments
290 // TODO: Is the above statement true?
291 $facilities = getServiceFacilities();
294 <select name='pc_facility' size='
10' onchange='ShowFacility()'
>
296 if ( !$_SESSION['pc_facility'] ) $selected =
"selected='selected'";
297 echo
" <option value='0' $selected>" .xl('All Facilities').
"</option>\n";
298 foreach ($facilities as $fa) {
299 $selected = ( $_SESSION['pc_facility'] == $fa['id']) ?
"selected='selected'" :
"" ;
300 echo
" <option value='" .$fa['id'].
"' $selected>" .$fa['name'].
"</option>\n";
311 <p align=
"center" class='cal_date_range'
>
313 // Show the date/range and its previous- and next-day/week selectors.
314 $atmp = array_keys($A_EVENTS);
317 echo
"<a href='$PREV_WEEK_URL' onclick='top.restoreSession()'><<</a> \n";
318 echo dateformat(strtotime($atmp[
0]));
320 echo dateformat(strtotime($atmp[count($atmp)-
1]));
321 echo
" <a href='$NEXT_WEEK_URL' onclick='top.restoreSession()'>>></a>\n";
323 echo
"<a href='$PREV_DAY_URL' onclick='top.restoreSession()'><<</a> \n";
324 echo dateformat(strtotime($atmp[
0]), true);
325 echo
" <a href='$NEXT_DAY_URL' onclick='top.restoreSession()'>>></a>\n";
331 <script language='JavaScript'
>
333 //(CHEMED) popup calendar
334 function dateChanged(calendar
) {
335 // Beware that this function is called even if the end-user only
336 // changed the month/year. In order to determine if a date was
337 // clicked you can use the dateClicked property of the calendar:
338 if (calendar
.dateClicked
) {
339 // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
340 var y
= calendar
.date
.getFullYear();
341 var m
= calendar
.date
.getMonth() + 1; // integer, 1..12
342 if (m
< 10) {m
= '0'+m
;}
343 var d
= calendar
.date
.getDate(); // integer, 1..31
344 if (d
< 10) {d
= '0'+d
;}
346 document
.getElementById("jumpdate").value
= y
+ "-" + m
+ "-" + d
;
350 var cal
= Calendar
.setup({flat
: "selectors_cal_container", flatCallback
: dateChanged
});
351 var trig
= document
.getElementById("img_jumpdate");
352 document
.getElementById("selectors_container").style
.visibility
= 'hidden';
354 trig
.onmouseover = function() {
355 if (document
.getElementById("selectors_container").style
.visibility
== 'hidden') {
357 document
.getElementById("selectors_container").style
.visibility
= 'visible';
359 document
.getElementById("selectors_container").style
.visibility
= 'hidden';