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'];
19 $apptNum2 = abs($apptNum);
24 $events = fetchNextXAppts($current_date2, $pid, $apptNum2);
29 foreach ($events as $row) {
31 $dayname = xl(date("l", strtotime($row['pc_eventDate'])));
33 $disphour = substr($row['pc_startTime'], 0, 2) +
0;
34 $dispmin = substr($row['pc_startTime'], 3, 2);
35 if ($disphour >= 12) {
42 if ($row['pc_hometext'] != "") {
43 $etitle = 'Comments'.": ".$row['pc_hometext']."\r\n";
48 if ($GLOBALS['portal_onsite_appt_modify']) {
49 echo "<a href='add_edit_event_user.php?date=" . htmlspecialchars(preg_replace("/-/", "", $row['pc_eventDate']), ENT_QUOTES
) .
50 "&eid=" . htmlspecialchars($row['pc_eid'], ENT_QUOTES
) .
51 "' class='edit_event iframe' title='" . htmlspecialchars($etitle, ENT_QUOTES
) . "'>";
54 echo "<b>" . htmlspecialchars($row['pc_eventDate'] . " (" . $dayname . ")", ENT_NOQUOTES
) . "</b><br>";
55 echo htmlspecialchars("$disphour:$dispmin " . $dispampm . " " . $row['pc_catname'], ENT_NOQUOTES
) . "<br>\n";
56 echo htmlspecialchars($row['ufname'] . " " . $row['ulname'], ENT_NOQUOTES
);
57 if ($GLOBALS['portal_onsite_appt_modify']) {
66 echo " " . htmlspecialchars('No Appointments', ENT_NOQUOTES
);