2 // Copyright (C) 2005 Rod Roark <rod@sunsetsystems.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 // This report simply lists all players/patients who are members
10 // of a squad. It is applicable only for sports teams.
12 include_once("../globals.php");
13 include_once("../../library/patient.inc");
25 'Restricted Training',
36 $alertmsg = ''; // not used yet but maybe later
38 $query = "SELECT * FROM patient_data " .
39 "ORDER BY squad, lname, fname";
40 $res = sqlStatement($query);
44 <link rel
=stylesheet href
="<?echo $css_header;?>" type
="text/css">
46 <script language
="JavaScript">
49 opener
.top
.location
= '../patient_file/patient_file.php?set_pid=' + pid
;
55 <title
>Team Roster
</title
>
58 <body leftmargin
='0' topmargin
='0' marginwidth
='0' marginheight
='0'>
61 <form method
='post' action
='players_report.php'>
63 <table border
='0' cellpadding
='5' cellspacing
='0' width
='98%'>
66 <td height
="1" colspan
="2">
70 <tr bgcolor
='#ddddff'>
75 <b
><?
echo date('l, F j, Y') ?
></b
>
80 <td height
="1" colspan
="2">
86 <table border
='0' cellpadding
='1' cellspacing
='2' width
='98%'>
88 <tr bgcolor
="#dddddd">
105 while ($row = sqlFetchArray($res)) {
106 $patient_id = $row['pid'];
107 $squad = $squads[$row['squad']];
108 $fitness = $row['fitness'];
109 if (! $fitness) $fitness = 1;
110 $query = "SELECT date, reason " .
111 "FROM form_encounter WHERE " .
112 "pid = '$patient_id' " .
113 "ORDER BY date DESC LIMIT 1";
114 $erow = sqlQuery($query);
116 <tr bgcolor
="<? echo $fitcolors[$fitness-1] ?>">
118  
;<?
echo ($squad == $lastsquad) ?
"" : $squad ?
>
121  
;<a href
='javascript:gopid(<? echo $patient_id ?>)'><?
echo $row['lname'] . ", " . $row['fname'] ?
></a
>
124 <?
echo $fitnesses[$fitness-1] ?
> 
;
127  
;<?
echo substr($erow['date'], 0, 10) . ' ' . $erow['reason'] ?
> 
;
143 echo " alert('$alertmsg');\n";