Code type module improvements:
[openemr.git] / interface / patient_file / transaction / transactions_full.php
blobc877a05e78432774c8eedb88412c9ee20d035187
1 <?php
3 //SANITIZE ALL ESCAPES
4 $sanitize_all_escapes=true;
5 //
7 //STOP FAKE REGISTER GLOBALS
8 $fake_register_globals=false;
9 //
11 include_once("../../globals.php");
12 include_once("$srcdir/transactions.inc");
13 require_once("$srcdir/options.inc.php");
16 <html>
17 <head>
18 <?php html_header_show();?>
19 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
20 <script language="javascript">
21 // Called by the deleteme.php window on a successful delete.
22 function imdeleted() {
23 top.restoreSession();
24 location.href = 'transaction/transactions.php';
26 </script>
27 </head>
28 <body class="body_top">
30 <br>
31 <table class="showborder" cellspacing="0px" cellpadding="2px">
33 <?php
35 if ($result = getTransByPid($pid)) {
37 // Print Heading .. to have better Understanding of the Listed Transactions -- starts here Dec 07,09
38 print "<tr class='showborder_head'><th style='width=10px;'>&nbsp;</th><th style='width=10px;'>&nbsp;</th><th style='width=10px;'>&nbsp;</th>";
39 print "<th style='width:140px;'>".htmlspecialchars( xl('Type'), ENT_NOQUOTES)."</th>" .
40 "<th style='width:150px;'>".htmlspecialchars( xl('Date'), ENT_NOQUOTES)."</th>" .
41 "<th style='width:60px;'>".htmlspecialchars( xl('User'), ENT_NOQUOTES)."</th>" .
42 "<th style='width:180px;'>".htmlspecialchars( xl('Details'), ENT_NOQUOTES)."</th></tr>\n";
43 // Print Heading .. to have better Understanding of the Listed Transactions -- ends here
45 foreach ($result as $iter) {
46 if (getdate() == strtotime($iter{"date"})) {
47 $date_string = "Today, " . date( "D F dS" ,strtotime($iter{"date"}));
48 } else {
49 $date_string = date( "D F dS" ,strtotime($iter{"date"}));
51 echo "<tr height='25'><td>";
52 if ($iter{"title"} == "Referral") {
53 //show the print button for referral forms only
54 echo "<a href='print_referral.php?transid=".
55 htmlspecialchars( $iter{"id"}, ENT_NOQUOTES).
56 "' onclick='top.restoreSession()' class='css_button_small'><span>".
57 htmlspecialchars( xl('Print'), ENT_NOQUOTES)."</span></a>";
59 else {
60 echo "&nbsp;";
62 echo "</td><td>";
63 print "<a href='add_transaction.php?transid=".htmlspecialchars( $iter{"id"}, ENT_NOQUOTES).
64 "&title=".htmlspecialchars( $iter{"title"}, ENT_QUOTES).
65 "&inmode=edit' onclick='top.restoreSession()' class='css_button_small'><span>".
66 htmlspecialchars( xl('Edit'), ENT_NOQUOTES)."</span></a>";
67 echo "</td><td>";
68 if (acl_check('admin', 'super')) {
69 echo "<a href='../deleter.php?transaction=".
70 htmlspecialchars( $iter{"id"}, ENT_QUOTES).
71 "' onclick='top.restoreSession()' class='css_button_small'><span>".
72 htmlspecialchars( xl('Delete'), ENT_NOQUOTES)."</span></a>";
74 else {
75 echo "&nbsp;";
77 echo "</td>";
78 echo "<td><b>&nbsp;" .
79 generate_display_field(array('data_type'=>'1','list_id'=>'transactions'), $iter{"title"}) .
80 "</b></td><td>" . htmlspecialchars( $date_string, ENT_NOQUOTES) . "</td><td>(" .
81 htmlspecialchars( $iter{"user"}, ENT_NOQUOTES). ")&nbsp;</td><td>" .
82 htmlspecialchars( ($iter{"body"}), ENT_NOQUOTES) . "&nbsp;</td></tr>\n";
83 $notes_count++;
90 </table>
92 </body>
93 </html>