Added the Persian language
[openemr.git] / interface / reports / players_report_ajax.php
blob5c335f169231f4e1ca49b3de12bbddf722272d0e
1 <?php
2 // Copyright (C) 2009, 2012 Rod Roark <rod@sunsetsystems.com>
3 //
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 require_once("../globals.php");
10 require_once("$srcdir/lists.inc");
12 $plid = $_GET['plid'] + 0; // pid
13 $s = '';
15 if (isset($_GET['date'])) {
16 $date = $_GET['date'];
17 $date = substr($date,0,4) . '-' . substr($date,4,2) . '-' . substr($date,6,2);
18 // get patient notes
19 $res = sqlStatement("SELECT title, body FROM pnotes WHERE " .
20 "pid = '$plid' AND LEFT(date,10) = '$date' AND " .
21 "title LIKE 'Roster' AND deleted = 0 ORDER BY date LIMIT 1");
22 while ($row = sqlFetchArray($res)) {
23 $s .= nl2br(htmlentities($row['body'],ENT_QUOTES)) . "<br />";
25 if ($s === '') $s = xl('No notes') . '<br />';
26 $s .= xl('Click here to add new injury change status and edit daily activity');
28 else {
29 // get issues
30 $res = sqlStatement("SELECT type, title FROM lists WHERE pid = '$plid' " .
31 "AND activity = 1 ORDER BY type, begdate");
32 while ($row = sqlFetchArray($res)) {
33 $s .= $ISSUE_TYPES[$row['type']][1] . ": " .
34 htmlentities($row['title'],ENT_QUOTES) . "<br />";
36 if ($s === '') $s = "No issues";
39 // $s = str_replace("\r", "", $s);
40 // $s = str_replace("\n", "", $s);
41 // echo "ttCallback('$s');\n";
43 echo $s;