2 // This program is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU General Public License
4 // as published by the Free Software Foundation; either version 2
5 // of the License, or (at your option) any later version.
7 include_once("../../globals.php");
11 <?php
html_header_show();?
>
12 <link rel
="stylesheet" href
="<?php echo $css_header; ?>" type
="text/css">
14 <script language
="JavaScript">
16 function openNewForm(sel
) {
18 <?php
if ($GLOBALS['concurrent_layout']) { ?
>
19 FormNameValueArray
= sel
.split('formname=');
20 if(FormNameValueArray
[1] == 'newpatient')
22 parent
.location
.href
= sel
26 parent
.Forms
.location
.href
= sel
;
29 top
.frames
['Main'].location
.href
= sel
;
32 function toggleFrame1(fnum
) {
33 top
.frames
['left_nav'].document
.forms
[0].cb_top
.checked
=false;
34 top
.window
.parent
.left_nav
.toggleFrame(fnum
);
37 <style type
="text/css">
45 <script type
="text/javascript" language
="javascript">
50 var oldddmenuitem
= 0;
62 //if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
63 //if(ddmenuitem) ddmenuitem.style.display = 'none';
65 // get new layer and show it
66 oldddmenuitem
= ddmenuitem
;
67 ddmenuitem
= document
.getElementById(id
);
68 if((ddmenuitem
.style
.visibility
== '')||
(ddmenuitem
.style
.visibility
== 'hidden')){
69 if(oldddmenuitem
) oldddmenuitem
.style
.visibility
= 'hidden';
70 if(oldddmenuitem
) oldddmenuitem
.style
.display
= 'none';
71 ddmenuitem
.style
.visibility
= 'visible';
72 ddmenuitem
.style
.display
= 'block';
74 ddmenuitem
.style
.visibility
= 'hidden';
75 ddmenuitem
.style
.display
= 'none';
86 if(ddmenuitem
) ddmenuitem
.style
.visibility
= 'hidden';
87 if(ddmenuitem
) ddmenuitem
.style
.display
= 'none';
90 // close layer when click-out
91 document
.onclick
= mclose
;
92 //=================================================
95 obj
=document
.getElementById(id
);
100 curleft +
= obj
.offsetLeft
;
101 if(!obj
.offsetParent
)
103 obj
= obj
.offsetParent
;
107 PropertyWidth
=document
.getElementById(id
).offsetWidth
;
108 if(PropertyWidth
>curleft
)
110 document
.getElementById(id
).style
.left
=0;
114 function findPosY(obj
)
120 curtop +
= obj
.offsetTop
;
121 if(!obj
.offsetParent
)
123 obj
= obj
.offsetParent
;
132 <body
class="bgcolor2">
134 <?php
//DYNAMIC FORM RETREIVAL
135 include_once("$srcdir/registry.inc");
137 function myGetRegistered($state="1", $limit="unlimited", $offset="0") {
138 $sql = "SELECT category, nickname, name, state, directory, id, sql_run, " .
139 "unpackaged, date FROM registry WHERE " .
140 "state LIKE \"$state\" ORDER BY category, priority, name";
141 if ($limit != "unlimited") $sql .= " limit $limit, $offset";
142 $res = sqlStatement($sql);
144 for($iter=0; $row=sqlFetchArray($res); $iter++
) {
154 $reg = myGetRegistered();
160 $StringEcho= '<ul id="sddm">';
162 $StringEcho.= "<li><a id='enc2' >" . htmlspecialchars( xl('Encounter Summary'),ENT_NOQUOTES
) . "</a></li>";
164 $StringEcho.= "<li><a href='JavaScript:void(0);' id='enc2' onclick=\" return top.window.parent.left_nav.loadFrame2('enc2','RBot','patient_file/encounter/encounter_top.php')\">" . htmlspecialchars( xl('Encounter Summary'),ENT_NOQUOTES
) . "</a></li>";
166 foreach ($reg as $entry) {
167 $new_category = trim($entry['category']);
168 $new_nickname = trim($entry['nickname']);
169 if ($new_category == '') {$new_category = htmlspecialchars(xl('Miscellaneous'),ENT_QUOTES
);}
170 if ($new_nickname != '') {$nickname = $new_nickname;}
171 else {$nickname = $entry['name'];}
172 if ($old_category != $new_category) {
173 $new_category_ = $new_category;
174 $new_category_ = str_replace(' ','_',$new_category_);
175 if ($old_category != '') {$StringEcho.= "</table></div></li>";}
176 $StringEcho.= "<li><a href='JavaScript:void(0);' onClick=\"mopen('$DivId');\" >$new_category</a><div id='$DivId' ><table border='0' cellspacing='0' cellpadding='0'>";
177 $old_category = $new_category;
180 $StringEcho.= "<tr><td style='border-top: 1px solid #000000;padding:0px;'><a onclick=\"openNewForm('" . $rootdir .'/patient_file/encounter/load_form.php?formname=' .urlencode($entry['directory']) .
181 "')\" href='JavaScript:void(0);'>" . xl_form_title($nickname) . "</a></td></tr>";
183 $StringEcho.= '</table></div></li>';
186 $StringEcho2= '<div style="clear:both"></div>';
191 <!--<table style
="border:solid 1px black" cellspacing
="0" cellpadding
="0">
193 <td valign
="top"><?php
//echo $StringEcho; ?></td>
198 // This shows Layout Based Form names just like the above.
200 $lres = sqlStatement("SELECT * FROM list_options " .
201 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
202 if (sqlNumRows($lres)) {
204 $StringEcho= '<ul id="sddm">';
206 $StringEcho.= "<li><a href='JavaScript:void(0);' onClick=\"mopen('lbf');\" >".xl('Layout Based') ."</a><div id='lbf' ><table border='0' cellspacing='0' cellpadding='0'>";
207 while ($lrow = sqlFetchArray($lres)) {
208 $option_id = $lrow['option_id']; // should start with LBF
209 $title = $lrow['title'];
210 $StringEcho.= "<tr><td style='border-top: 1px solid #000000;padding:0px;'><a href='" . $rootdir .'/patient_file/encounter/load_form.php?formname='
211 .urlencode($option_id) ."' >" . xl_form_title($title) . "</a></td></tr>";
215 $StringEcho.= "</table></div></li></ul>".$StringEcho2;
218 <table cellspacing
="0" cellpadding
="0" align
="center">
220 <td valign
="top"><?php
echo $StringEcho; ?
></td
>