[-*Smarty*-] [-include file="$TPL_NAME/views/header.html"-] [-* we want to include our stylesheet for this view*-] [-*Load the Language Definitions*-] [-config_load file="lang.$USER_LANG"-]

[-xlt t='Searching for appointments'-]

  [-php-] echo ""; [-/php-] [-xlt t='Return to calendar'-]
[-xlt t='In'-]:
[-if $USE_TOPICS-]
[-/if-]

[-xlt t='Searching...'-]
[-if isset($SEARCH_PERFORMED)-]
[-xlt t='Date'-]-[-xlt t='Time'-] [-xlt t='Provider'-] [-xlt t='Category'-] [-xlt t='Patient'-]
[-php-] /* I've given up on playing nice with the Smarty tag crap, it's pointlessly used * in the original search. I mean, there's no clean separation between the code * and HTML so we may as well just go full-bore PHP here -- JRM March 2008 */ $eventCount = 0; foreach ($this->get_template_vars('A_EVENTS') as $eDate => $date_events) { $eventdate = substr($eDate, 0, 4) . substr($eDate, 5, 2) . substr($eDate, 8, 2); foreach ($date_events as $event) { // pick up some demographic info about the provider $provquery = "SELECT * FROM users WHERE id=?"; $res = sqlStatement($provquery, [$event['aid']]); $provinfo = sqlFetchArray($res); $eData = $event['eid']."~".$eventdate; $trTitle = xl('Click to edit this event'); echo ""; // date and time $eDatetime = strtotime($eDate." ".$event['startTime']); echo ""; // provider echo ""; // category echo ""; // patient echo ""; /* echo ""; */ echo "\n"; $eventCount++; } } /* the A_EVENTS array holds an array of dates, which in turn hold the array of events * so it will always be non-zero, so we need to count the events as they are * displayed and if the count is zero, then we have no search results */ if ($eventCount == 0) { echo ""; } [-/php-]
"; echo text(date("Y-m-d h:i a", $eDatetime)); echo "" . text($event['provider_name']); $imgtitle = $provinfo['fname'] . " " . xl('contact info') . ":\n"; $imgtitle .= $provinfo['phonew1']."\n".$provinfo['street']."\n".$provinfo['city']." ".$provinfo['state']; echo " "; echo ""; echo text($event['catname']); echo " "; echo text($event['patient_name']); echo ""; echo text(print_r($event, true)); echo "
" . xlt('No Results') . "
[-/if-] [-*end of SEARCH_PERFORMED*-]
[-*include file="$TPL_NAME/views/footer.html"*-]