Change formatting of initial comment block.
[openemr.git] / contrib / forms / sports_fitness / report.php
blob88818f9bf84441a1ba01301835215773415bbe6e
1 <?php
2 // Copyright (C) 2005 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 include_once("../../globals.php");
10 include_once($GLOBALS["srcdir"] . "/api.inc");
12 function sports_fitness_report($pid, $encounter, $cols, $id) {
13 $count = 0;
14 $data = sqlQuery("SELECT * " .
15 "FROM form_sports_fitness WHERE " .
16 "id = '$id' AND activity = '1'");
17 if ($data) {
18 print "<table cellpadding='0' cellspacing='0'>\n<tr>\n";
19 foreach($data as $key => $value) {
20 if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" ||
21 $key == "authorized" || $key == "activity" || $key == "date" ||
22 $value == "" || $value == "0" || $value == "0.00") {
23 continue;
25 if ($value == "on") {
26 $value = "yes";
28 $key=ucwords(str_replace("_"," ",$key));
29 print "<td valign='top'><span class='bold'>$key: </span><span class='text'>$value &nbsp;</span></td>\n";
30 $count++;
31 if ($count == $cols) {
32 $count = 0;
33 print "</tr>\n<tr>\n";
36 print "</tr>\n</table>\n";
39 ?>