2 // Copyright (C) 2011 Cassian LUP <cassi.lup@gmail.com>
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 // Modified to support recurring appointments by Ian Jardine 2016.
11 require_once("verify_session.php");
13 require_once(dirname(__FILE__
)."/../library/appointments.inc.php");
15 $current_date2 = date('Y-m-d');
17 $apptNum = (int)$GLOBALS['patient_portal_appt_display_num'];
18 if($apptNum != 0) $apptNum2 = abs($apptNum);
20 $events = fetchNextXAppts($current_date2, $pid, $apptNum2);
25 foreach($events as $row) {
27 $dayname = xl(date("l", strtotime($row['pc_eventDate'])));
29 $disphour = substr($row['pc_startTime'], 0, 2) +
0;
30 $dispmin = substr($row['pc_startTime'], 3, 2);
31 if ($disphour >= 12) {
33 if ($disphour > 12) $disphour -= 12;
35 if ($row['pc_hometext'] != "") {
36 $etitle = 'Comments'.": ".$row['pc_hometext']."\r\n";
40 if ($GLOBALS['portal_onsite_appt_modify']) {
41 echo "<a href='add_edit_event_user.php?date=" . htmlspecialchars(preg_replace("/-/", "", $row['pc_eventDate']),ENT_QUOTES
) .
42 "&eid=" . htmlspecialchars($row['pc_eid'],ENT_QUOTES
) .
43 "' class='edit_event iframe' title='" . htmlspecialchars($etitle,ENT_QUOTES
) . "'>";
45 echo "<b>" . htmlspecialchars($row['pc_eventDate'] . " (" . $dayname . ")" ,ENT_NOQUOTES
) . "</b><br>";
46 echo htmlspecialchars("$disphour:$dispmin " . $dispampm . " " . $row['pc_catname'],ENT_NOQUOTES
) . "<br>\n";
47 echo htmlspecialchars($row['ufname'] . " " . $row['ulname'],ENT_NOQUOTES
);
48 if ($GLOBALS['portal_onsite_appt_modify']) {
56 if ( $count < 1 ) { echo " " . htmlspecialchars('No Appointments',ENT_NOQUOTES
); }