Skip to content

Commit

Permalink
preserve line breaks in dictations
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsetsystems committed May 21, 2007
1 parent ce767f8 commit f2aa7af
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions interface/forms/dictation/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,30 @@
include_once("../../globals.php");
include_once($GLOBALS["srcdir"]."/api.inc");
function dictation_report( $pid, $encounter, $cols, $id) {
$count = 0;
$data = formFetch("form_dictation", $id);
if ($data) {
print "<table><tr>";
foreach($data as $key => $value) {
if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
continue;
$count = 0;
$data = formFetch("form_dictation", $id);
if ($data) {
print "<table><tr>";
foreach($data as $key => $value) {
if ($key == "id" || $key == "pid" || $key == "user" ||
$key == "groupname" || $key == "authorized" || $key == "activity" ||
$key == "date" || $value == "" || $value == "0000-00-00 00:00:00")
{
continue;
}
if ($value == "on") {
$value = "yes";
}
$key=ucwords(str_replace("_"," ",$key));
print "<td><span class=bold>$key: </span><span class=text>" .
nl2br($value) . "</span></td>";
$count++;
if ($count == $cols) {
$count = 0;
print "</tr><tr>\n";
}
}
}
print "</tr></table>";
}
if ($value == "on") {
$value = "yes";
}
$key=ucwords(str_replace("_"," ",$key));
print "<td><span class=bold>$key: </span><span class=text>$value</span></td>";
$count++;
if ($count == $cols) {
$count = 0;
print "</tr><tr>\n";
}
}
}
print "</tr></table>";
}
?>
?>

0 comments on commit f2aa7af

Please sign in to comment.