2 /*******************************************************************************\
3 * Copyright (C) 2014 Joe Slam (joe@produnis.de) *
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. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, *
17 * see <http://opensource.org/licenses/gpl-license.php> *
18 ********************************************************************************
20 * @author Joe Slam <joe@produnis.de>
21 * @link http://www.open-emr.org
25 //SANITIZE ALL ESCAPES
26 $sanitize_all_escapes=true;
29 //STOP FAKE REGISTER GLOBALS
30 $fake_register_globals=false;
33 require_once("../../globals.php");
36 <div id
='labdata' style
='margin-top: 3px; margin-left: 10px; margin-right: 10px'><!--outer div
-->
40 $spell = "SELECT form_name, MAX(form_track_anything_results.track_timestamp) as maxdate, form_id " .
42 "JOIN form_track_anything_results ON forms.form_id = form_track_anything_results.track_anything_id " .
43 "WHERE forms.pid = ? " .
45 "GROUP BY form_name " .
46 "ORDER BY maxdate DESC ";
47 $result = sqlQuery($spell, array($pid, 'track_anything'));
48 if ( !$result ) //If there are no disclosures recorded
50 <span
class='text'> <?php
echo htmlspecialchars(xl("No tracks have been documented."),ENT_NOQUOTES
);
54 } else { // We have some tracks here...
55 echo "<span class='text'>";
56 echo xlt('Available Tracks') . ":";
59 $result=sqlStatement($spell, array($pid, 'track_anything') );
60 while($myrow = sqlFetchArray($result)){
61 $formname = $myrow['form_name'];
62 $thedate = $myrow['maxdate'];
63 $formid = $myrow['form_id'];
64 echo "<li><a href='../../forms/track_anything/history.php?formid=" . attr($formid) . "'>" . text($formname) . "</a></li> (" . text($thedate) . ")</li>";