From 9d3336922723030694ff03943bf6877f74079c18 Mon Sep 17 00:00:00 2001 From: cfapress Date: Fri, 6 Feb 2009 16:41:13 +0000 Subject: [PATCH] tidied up code --- interface/forms/note/report.php | 63 +++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/interface/forms/note/report.php b/interface/forms/note/report.php index 56a85bcfb..65a1f6db2 100644 --- a/interface/forms/note/report.php +++ b/interface/forms/note/report.php @@ -19,36 +19,37 @@ include_once("../../globals.php"); include_once($GLOBALS["srcdir"]."/api.inc"); function note_report( $pid, $encounter, $cols, $id) { -$count = 0; -$data = formFetch("form_note", $id); -if ($data) { -//printf("

Company Name

"); -//printf("

Company Address

"); -//printf("

Company Address

"); -//printf("

Phone: (XXX) 999-9999

"); -//printf("

Fax: (XXX) 999-9999

"); -//printf("

www.company.com

"); - -print ""; -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("\n"); -print("\n"); -print ""; -$count++; -if ($count == $cols) { -$count = 0; -print "\n"; -} -} -} -print "
$key: $value
"; + $count = 0; + $data = formFetch("form_note", $id); + if ($data) { + print ""; + 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("\n"); + print("\n"); + print ""; + $count++; + if ($count == $cols) { + $count = 0; + print "\n"; + } + } + } + print "
$key: $value
"; } ?> -- 2.11.4.GIT