OpenEMR is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
 // Copyright (C) 2011 Cassian LUP <cassi.lup@gmail.com>
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License
 // as published by the Free Software Foundation; either version 2
 // of the License, or (at your option) any later version.

        require_once("verify_session.php");

    $sql = "SELECT * FROM lists WHERE pid = ? AND type = 'medical_problem' ORDER BY begdate";

    $res = sqlStatement($sql, array($pid) );

      if(sqlNumRows($res)>0)
      {
          ?>
          <table class="class1">
              <tr class="header">
                  <th><?php echo htmlspecialchars( xl('Title'),ENT_NOQUOTES);?></th>
                  <th><?php echo htmlspecialchars( xl('Reported Date'),ENT_NOQUOTES);?></th>
                  <th><?php echo htmlspecialchars( xl('Start Date'),ENT_NOQUOTES);?></th>
                  <th><?php echo htmlspecialchars( xl('End Date'),ENT_NOQUOTES);?></th>
              </tr>
          <?php
          $even=false;
          while ($row = sqlFetchArray($res)) {
              if ($even) {
                  $class="class1_even";
                  $even=false;
              } else {
                  $class="class1_odd";
                  $even=true;
              }
              echo "<tr class='".$class."'>";
              echo "<td>".htmlspecialchars($row['title'],ENT_NOQUOTES)."</td>";
              echo "<td>".htmlspecialchars($row['date'],ENT_NOQUOTES)."</td>";
              echo "<td>".htmlspecialchars($row['begdate'],ENT_NOQUOTES)."</td>";
              echo "<td>".htmlspecialchars($row['enddate'],ENT_NOQUOTES)."</td>";
              echo "</tr>";
          }
        echo "</table>";
      }
    else
    {
        echo htmlspecialchars( xl("No Results"),ENT_NOQUOTES);
    }
?>
Ajax-loader Loading, please wait...