3 include_once("../../globals.php");
4 include_once("../../../library/api.inc");
5 formHeader("Form: CAMOS");
6 $returnurl = $GLOBALS['concurrent_layout'] ?
'encounter_top.php' : 'patient_encounter.php';
11 <link rel
=stylesheet href
="<?echo $css_header;?>" type
="text/css">
12 <script type
="text/javascript">
14 var f
= document
.my_form
;
15 var x
= f
.elements
.length
;
18 if (f
.elements
[i
].type
== 'checkbox') {
19 f
.elements
[i
].checked
= true;
23 function uncheckall(){
24 var f
= document
.my_form
;
25 var x
= f
.elements
.length
;
28 if (f
.elements
[i
].type
== 'checkbox') {
29 f
.elements
[i
].checked
= false;
33 function content_focus() {
35 function content_blur() {
37 function show_edit(t
) {
38 var e
= document
.getElementById(t
);
39 if (e
.style
.display
== 'none') {
40 e
.style
.display
= 'inline';
44 e
.style
.display
= 'none';
48 <?php
html_header_show();?
>
49 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
51 <body
class="body_top">
52 <form method
=post action
="<?php echo $rootdir?>/forms/CAMOS/save.php?mode=delete&id=<?php echo $_GET["id
"];?>" name
="my_form">
53 <h1
> <?php
xl('CAMOS','e'); ?
> </h1
>
54 <input type
="submit" name
="delete" value
="<?php xl('Delete Selected Items','e'); ?>" />
55 <input type
="submit" name
="update" value
="<?php xl('Update Selected Items','e'); ?>" />
57 echo "<a href='".$GLOBALS['webroot'] . "/interface/patient_file/encounter/$returnurl'>[" . xl('do nothing') . "]</a>";
60 <input type
='button' value
='<?php xl('Select All
','e
'); ?>'
62 <input type
='button' value
='<?php xl('Unselect All
','e
'); ?>'
63 onClick
='uncheckall()'>
66 //experimental code start
68 $pid = $GLOBALS['pid'];
69 $encounter = $GLOBALS['encounter'];
71 $query = "select t1.id, t1.content from form_CAMOS as t1 join forms as t2 " .
72 "on (t1.id = t2.form_id) where t2.form_name like 'CAMOS%' " .
73 "and t2.encounter like $encounter and t2.pid = $pid";
75 $statement = sqlStatement($query);
76 while ($result = sqlFetchArray($statement)) {
77 print "<input type=button value='" . xl('Edit') . "' onClick='show_edit(\"id_textarea_".$result['id']."\")'>";
78 print "<input type=checkbox name='ch_".$result['id']."'> ".$result['content']."<br/>\n";
79 print "<div id=id_textarea_".$result['id']." style='display:none'>\n";
80 print "<textarea name=textarea_".$result['id']." cols=$textarea_cols rows= $textarea_rows onFocus='content_focus()' onBlur='content_blur()' >".$result['content']."</textarea><br/>\n";
85 //experimental code end