2 include_once("../globals.php");
3 include_once("../../library/acl.inc");
4 include_once("../../custom/code_types.inc.php");
6 include_once("$srcdir/patient.inc");
7 include_once("$srcdir/billrep.inc");
8 include_once(dirname(__FILE__
) . "/../../library/classes/OFX.class.php");
9 include_once(dirname(__FILE__
) . "/../../library/classes/X12Partner.class.php");
11 $EXPORT_INC = "$webserver_root/custom/BillingExport.php";
15 if ($_POST['mode'] == 'export') {
16 $sdate = $_POST['from_date'];
17 $edate = $_POST['to_date'];
19 $sql = "SELECT billing.*, concat(pd.fname, ' ', pd.lname) as name from billing "
20 . "join patient_data as pd on pd.pid = billing.pid where billed = '1' and "
21 . "(process_date > '" . mysql_real_escape_string($sdate)
22 . "' or DATE_FORMAT( process_date, '%Y-%m-%d' ) = '" . mysql_real_escape_string($sdate) ."') "
23 . "and (process_date < '" . mysql_real_escape_string($edate)
24 . "'or DATE_FORMAT( process_date, '%Y-%m-%d' ) = '" . mysql_real_escape_string($edate) ."') "
25 . "order by pid,encounter";
27 $results = $db->Execute($sql);
29 if ($results->RecordCount() == 0) {
30 echo xl("No Bills Found to Include in OFX Export<br>");
33 while(!$results->EOF
) {
34 $billings[] = $results->fields
;
37 $ofx = new OFX($billings);
38 header("Pragma: public");
40 header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
41 header("Content-Disposition: attachment; filename=openemr_ofx.ofx");
42 header("Content-Type: text/xml");
48 if ($_POST['mode'] == 'process') {
49 if (exec("ps x | grep 'process_bills[.]php'")) {
50 $alertmsg = xl('Request ignored - claims processing is already running!');
53 exec("cd $webserver_root/library/freeb;" .
54 "php -q process_bills.php bill > process_bills.log 2>&1 &");
55 $alertmsg = xl('Batch processing initiated; this may take a while.');
60 if (!isset($_POST["mode"])) {
61 if (!isset($_POST["from_date"])) {
62 $from_date=date("Y-m-d");
64 $from_date = $_POST["from_date"];
66 if (!isset($_POST["to_date"])) {
67 $to_date = date("Y-m-d");
69 $to_date = $_POST["to_date"];
71 if (!isset($_POST["code_type"])) {
74 $code_type = $_POST["code_type"];
76 if (!isset($_POST["unbilled"])) {
79 $unbilled = $_POST["unbilled"];
81 // if (!isset($_POST["authorized"])) {
82 // $my_authorized = "on";
84 $my_authorized = $_POST["authorized"];
87 $from_date = $_POST["from_date"];
88 $to_date = $_POST["to_date"];
89 $code_type = $_POST["code_type"];
90 $unbilled = $_POST["unbilled"];
91 $my_authorized = $_POST["authorized"];
94 $ofrom_date = $from_date;
96 $ocode_type = $code_type;
97 $ounbilled = $unbilled;
98 $oauthorized = $my_authorized;
104 <link rel
=stylesheet href
="<?php echo $css_header; ?>" type
="text/css">
106 .subbtn
{ margin
-top
:3px
; margin
-bottom
:3px
; margin
-left
:2px
; margin
-right
:2px
}
110 function select_all() {
111 for($i=0;$i < document
.update_form
.length
;$i++
) {
112 $name = document
.update_form
[$i].name
;
113 if ($name.substring(0,7) == "claims[" && $name.substring($name.length
-6) == "[bill]") {
114 document
.update_form
[$i].checked
= true;
120 function set_button_states() {
121 var f
= document
.update_form
;
125 for($i = 0; $i < f
.length
; ++
$i) {
127 if ($name.substring(0, 7) == "claims[" && $name.substring($name.length
-6) == "[bill]" && f
[$i].checked
== true) {
128 if (f
[$i].value
== '0') ++count0
;
129 else if (f
[$i].value
== '1' || f
[$i].value
== '5') ++count1
;
134 var can_generate
= (count0
> 0 || count1
> 0 || count2
> 0);
135 var can_mark
= (count1
== 0 && (count0
> 0 || count2
> 0));
136 var can_bill
= (count0
== 0 && count1
== 0 && count2
> 0);
138 <?php
if (file_exists($EXPORT_INC)) { ?
>
139 f
.bn_external
.disabled
= !can_generate
;
141 f
.bn_hcfa_print
.disabled
= !can_generate
;
142 f
.bn_hcfa
.disabled
= !can_generate
;
143 f
.bn_ub92_print
.disabled
= !can_generate
;
144 f
.bn_ub92
.disabled
= !can_generate
;
145 f
.bn_x12
.disabled
= !can_generate
;
146 f
.bn_electronic_file
.disabled
= !can_bill
;
148 f
.bn_mark
.disabled
= !can_mark
;
151 // Process a click to go to an encounter.
152 function toencounter(pid
, pname
, enc
, datestr
) {
153 <?php
if ($GLOBALS['concurrent_layout']) { ?
>
154 var othername
= (window
.name
== 'RTop') ?
'RBot' : 'RTop';
155 parent
.left_nav
.setPatient(pname
,pid
,'');
156 parent
.left_nav
.setEncounter(datestr
, enc
, othername
);
157 parent
.left_nav
.setRadio(othername
, 'enc');
158 parent
.frames
[othername
].location
.href
=
159 '../patient_file/encounter/encounter_top.php?set_encounter='
160 + enc +
'&pid=' + pid
;
162 location
.href
= '../patient_file/encounter/patient_encounter.php?set_encounter='
163 + enc +
'&pid=' + pid
;
167 // Process a click to go to patient demographics.
168 function topatient(pid
) {
169 <?php
if ($GLOBALS['concurrent_layout']) { ?
>
170 var othername
= (window
.name
== 'RTop') ?
'RBot' : 'RTop';
171 parent
.frames
[othername
].location
.href
=
172 '../patient_file/summary/demographics_full.php?pid=' + pid
;
174 location
.href
= '../patient_file/summary/demographics_full.php?pid=' + pid
;
180 <body
<?php
echo $top_bg_line; ?
> topmargin
=0 rightmargin
=0 leftmargin
=2 bottommargin
=0 marginwidth
=2 marginheight
=0>
182 <p style
='margin-top:5px;margin-bottom:5px;margin-left:5px'>
183 <?php
if ($GLOBALS['concurrent_layout']) { ?
>
184 <font
class='title'><?php
xl('Billing Report','e') ?
></font
>
185 <?php
} else if ($userauthorized) { ?
>
186 <a href
="../main/main.php" target
=Main
><font
class=title
><?php
xl('Billing Report','e') ?
></font
><font
class=more
> <?php
echo $tback; ?
></font
></a
>
188 <a href
="../main/onotes/office_comments.php" target
=Main
><font
class=title
><?php
xl('Billing Report','e') ?
></font
><font
class=more
><?php
echo $tback; ?
></font
></a
>
192 <form name
=the_form method
=post action
=billing_report
.php
>
194 <style type
="text/css">@import
url(../../library
/dynarch_calendar
.css
);</style
>
195 <script type
="text/javascript" src
="../../library/dialog.js"></script
>
196 <script type
="text/javascript" src
="../../library/textformat.js"></script
>
197 <script type
="text/javascript" src
="../../library/dynarch_calendar.js"></script
>
198 <script type
="text/javascript" src
="../../library/dynarch_calendar_en.js"></script
>
199 <script type
="text/javascript" src
="../../library/dynarch_calendar_setup.js"></script
>
200 <script language
='JavaScript'>
204 <input type
=hidden name
=mode value
="change">
205 <table width
=100% border
="1" cellspacing
="0" cellpadding
="0">
210  
;<span
class=text
><?php
xl('From: ','e') ?
></span
>
211 <input type
='text' size
='10' name
='from_date' id
='from_date'
212 value
='<?php echo $from_date; ?>'
213 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc)'
214 title
='yyyy-mm-dd last date of this event' />
215 <img src
='../../interface/pic/show_calendar.gif' align
='absbottom' width
='24' height
='22'
216 id
='img_fromdate' border
='0' alt
='[?]' style
='cursor:pointer'
217 title
='Click here to choose a date'>
219 Calendar
.setup({inputField
:"from_date", ifFormat
:"%Y-%m-%d", button
:"img_fromdate"});
224  
;<span
class=text
><?php
xl('To: ','e') ?
></span
>
225 <input type
='text' size
='10' name
='to_date' id
='to_date'
226 value
='<?php echo $to_date; ?>'
227 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc)'
228 title
='yyyy-mm-dd last date of this event' />
229 <img src
='../../interface/pic/show_calendar.gif' align
='absbottom' width
='24' height
='22'
230 id
='img_todate' border
='0' alt
='[?]' style
='cursor:pointer'
231 title
='Click here to choose a date'>
233 Calendar
.setup({inputField
:"to_date", ifFormat
:"%Y-%m-%d", button
:"img_todate"});
237 <input type
="hidden" name
="code_type" value
="%"></td
>
238 <td nowrap
><input type
=checkbox name
=unbilled
<?php
if ($unbilled == "on") {echo "checked";}; ?
>><span
class=text
><?php
xl('Show Unbilled Only','e') ?
></span
></td
>
239 <td nowrap
><input type
=checkbox name
=authorized
<?php
if ($my_authorized == "on") {echo "checked";}; ?
>><span
class=text
><?php
xl('Show Authorized Only','e') ?
></span
></td
>
240 <td align
='right' width
='10%' nowrap
>
241  
;<span
class=text
><a href
="javascript:document.the_form.mode.value='change';document.the_form.submit()" class=link_submit
><?php
xl('[Change View]','e') ?
></a
>
243 <a href
="javascript:document.the_form.mode.value='export';document.the_form.submit()" class=link_submit
><?php
xl('[Export OFX]','e') ?
></a
></span
> 
;
247 <td nowrap
> 
;<a href
="print_billing_report.php?<?php print "from_date
=".urlencode($ofrom_date)."&to_date
=".urlencode($oto_date)."&code_type
=".urlencode($ocode_type)."&unbilled
=".urlencode($ounbilled)."&authorized
=".urlencode($oauthorized); ?>" class=link_submit target
=new><?php
xl('[View Printable Report]','e') ?
></a
></td
>
251 $acct_config = $GLOBALS['oer_config']['ws_accounting'];
252 if($acct_config['enabled'] == true) {
253 print '<span class=text><a href="javascript:void window.open(\'' . $acct_config['url_path'] . '\')">' . xl("[SQL-Ledger]") . '</a></span>';
254 if (acl_check('acct', 'rep')) {
255 print '<span class=text> <a href="javascript:void window.open(\'sl_receipts_report.php\')">' . xl('[Reports]') . '</a></span>';
257 if (acl_check('acct', 'eob')) {
258 print '<span class=text> <a href="javascript:void window.open(\'sl_eob_search.php\')">' . xl('[EOBs]') . '</a></span>';
263 <td colspan
='2' nowrap
>
265 <?php
if (! file_exists($EXPORT_INC)) { ?
>
266 <a href
="javascript:document.the_form.mode.value='process';document.the_form.submit()" class="link_submit"
267 title
="Process all queued bills to create electronic data (and print if requested)"><?php
xl('[Start Batch Processing]','e') ?
></a
>
268  
; <a href
='../../library/freeb/process_bills.log' target
='_blank' class='link_submit'
269 title
='See messages from the last batch processing run'><?php
xl('[view log]','e') ?
></a
></span
>
272 <td align
='right' nowrap
>
273 <a href
="javascript:select_all()" class="link_submit"><?php
xl('[Select All]','e') ?
></a
> 
;
279 <form name
=update_form method
=post action
=billing_process
.php
>
283 <?php
if (file_exists($EXPORT_INC)) { ?
>
284 <input type
="submit" class="subbtn" name
="bn_external" value
="Export Billing" title
="<?php xl('Export to external billing system','e') ?>">
285 <input type
="submit" class="subbtn" name
="bn_mark" value
="Mark as Cleared" title
="<?php xl('Mark as billed but skip billing','e') ?>">
287 <input type
="submit" class="subbtn" name
="bn_hcfa_print" value
="Queue HCFA & Print" title
="<?php xl('Queue for HCFA batch processing and printing','e') ?>">
288 <input type
="submit" class="subbtn" name
="bn_hcfa" value
="Queue HCFA" title
="<?php xl('Queue for HCFA batch processing','e')?>">
289 <input type
="submit" class="subbtn" name
="bn_ub92_print" value
="Queue UB92 & Print" title
="<?php xl('Queue for UB-92 batch processing and printing','e')?>">
290 <input type
="submit" class="subbtn" name
="bn_ub92" value
="Queue UB92" title
="<?php xl('Queue for UB-92 batch processing','e')?>">
291 <input type
="submit" class="subbtn" name
="bn_x12" value
="Queue X12" title
="<?php xl('Queue for X12 batch processing','e')?>">
292 <input type
="submit" class="subbtn" name
="bn_mark" value
="Mark as Cleared" title
="<?php xl('Post to accounting and mark as billed','e')?>">
293 <input type
="submit" class="subbtn" name
="bn_electronic_file" value
="Make Electronic Batch & Clear" title
="<?php xl('Download billing file, post to accounting and mark as billed','e')?>">
298 <input type
=hidden name
=mode value
="bill">
299 <input type
=hidden name
=authorized value
="<?php echo $my_authorized; ?>">
300 <input type
=hidden name
=unbilled value
="<?php echo $unbilled; ?>">
301 <input type
=hidden name
=code_type value
="%">
302 <input type
=hidden name
=to_date value
="<?php echo $to_date; ?>">
303 <input type
=hidden name
=from_date value
="<?php echo $from_date; ?>">
305 if ($my_authorized == "on" ) {
306 $my_authorized = "1";
308 $my_authorized = "%";
311 if ($unbilled == "on") {
317 <input type
=hidden name
=bill_list value
="<?php
318 $list = getBillsListBetween($from_date,$to_date,$my_authorized,$unbilled,"%
");
321 <!-- new form
for uploading
-->
323 if (!isset($_POST["mode"])) {
324 if (!isset($_POST["from_date"])) {
325 $from_date=date("Y-m-d");
327 $from_date = $_POST["from_date"];
329 if (!isset($_POST["to_date"])) {
330 $to_date = date("Y-m-d");
332 $to_date = $_POST["to_date"];
334 if (!isset($_POST["code_type"])) {
337 $code_type = $_POST["code_type"];
339 if (!isset($_POST["unbilled"])) {
342 $unbilled = $_POST["unbilled"];
344 if (!isset($_POST["authorized"])) {
345 $my_authorized = "on";
347 $my_authorized = $_POST["authorized"];
350 $from_date = $_POST["from_date"];
351 $to_date = $_POST["to_date"];
352 $code_type = $_POST["code_type"];
353 $unbilled = $_POST["unbilled"];
354 $my_authorized = $_POST["authorized"];
356 if ($my_authorized == "on" ) {
357 $my_authorized = "1";
359 $my_authorized = "%";
362 if ($unbilled == "on") {
370 if (isset($_POST["mode"]) && $_POST["mode"] == "bill") {
371 billCodesList($list);
376 <table border
="0" cellspacing
="0" cellpadding
="0" width
="100%">
379 if ($ret = getBillsBetween($from_date,$to_date,$my_authorized,$unbilled,"%")) {
382 $last_encounter_id = "";
390 foreach ($ret as $iter) {
392 // We include encounters here that have never been billed. However
393 // if it had no selected billing items but does have non-selected
394 // billing items, then it is not of interest.
396 $res = sqlQuery("SELECT count(*) AS count FROM billing WHERE " .
397 "encounter = '" . $iter['enc_encounter'] . "' AND " .
398 "pid='" . $iter['enc_pid'] . "' AND " .
400 if ($res['count'] > 0) continue;
403 $this_encounter_id = $iter['enc_pid'] . "-" . $iter['enc_encounter'];
405 // echo "<!-- $this_encounter_id -->\n"; // debugging
407 if ($last_encounter_id != $this_encounter_id) {
409 while ($rcount < $lcount) {
410 $rhtml .= "<tr bgcolor='$bgcolor'><td colspan='7'> </td></tr>";
413 echo "<tr bgcolor='$bgcolor'>\n<td rowspan='$rcount' valign='top'>\n$lhtml</td>$rhtml\n";
414 echo "<tr bgcolor='$bgcolor'><td colspan='8' height='5'></td></tr>\n\n";
420 // If there are ANY unauthorized items in this encounter and this is
421 // the normal case of viewing only authorized billing, then skip the
425 if ($my_authorized == '1') {
426 $res = sqlQuery("select count(*) as count from billing where " .
427 "encounter = '" . $iter['enc_encounter'] . "' and " .
428 "pid='" . $iter['enc_pid'] . "' and " .
429 "activity = 1 and authorized = 0");
430 if ($res['count'] > 0) {
432 $last_encounter_id = $this_encounter_id;
437 $name = getPatientData($iter['enc_pid'], "fname, mname, lname");
439 # Check if patient has primary insurance and a subscriber exists for it.
440 # If not we will highlight their name in red.
441 # TBD: more checking here.
443 $res = sqlQuery("select count(*) as count from insurance_data where " .
444 "pid = " . $iter['enc_pid'] . " and " .
445 "type='primary' and " .
446 "subscriber_lname is not null and " .
447 "subscriber_lname != '' limit 1");
448 $namecolor = ($res['count'] > 0) ?
"black" : "#ff7777";
451 $bgcolor = "#" . (($encount & 1) ?
"ddddff" : "ffdddd");
452 echo "<tr bgcolor='$bgcolor'><td colspan='8' height='5'></td></tr>\n";
457 $ptname = $name['fname'] . " " . $name['lname'];
458 $raw_encounter_date = date("Y-m-d", strtotime($iter['enc_date']));
460 $lhtml .= " <span class=bold><font color='$namecolor'>$ptname" .
461 "</font></span><span class=small> (" . $iter['enc_pid'] . "-" .
462 $iter['enc_encounter'] . ")</span>";
464 // $lhtml .= " <a class=\"link_submit\" href=\"" .
465 // $GLOBALS['form_exit_url'] . "?set_encounter=" .
466 // $iter['encounter'] . "&pid=" . $iter['pid'] . "\">[To Encounter]</a>";
468 $lhtml .= " <a class=\"link_submit\" " .
469 "href=\"javascript:window.toencounter(" . $iter['enc_pid'] .
470 ",'" . addslashes($ptname) . "'," . $iter['enc_encounter'] .
471 ",'$raw_encounter_date')\">[To Encounter]</a>";
473 // $lhtml .= " <a class=\"link_submit\" href=\"" . $GLOBALS['webroot'] .
474 // "/interface/patient_file/summary/demographics_full.php?&pid=" .
475 // $iter['pid'] . "\">[To Demographics]</a>";
477 $lhtml .= " <a class=\"link_submit\" " .
478 "href=\"javascript:window.topatient(" . $iter['enc_pid'] .
479 ")\">[To Demographics]</a>";
483 $lhtml .= "<br />\n";
484 $lhtml .= " <span class=text>Bill: ";
485 $lhtml .= "<select name='claims[" . $this_encounter_id . "][payer]' style='background-color:$bgcolor'>";
486 $query = "SELECT id.provider AS id, id.type, " .
487 "ic.x12_default_partner_id AS ic_x12id, ic.name AS provider " .
488 "FROM insurance_data AS id, insurance_companies AS ic WHERE " .
489 "ic.id = id.provider AND pid = '" . mysql_escape_string($iter['enc_pid']) .
491 $result = sqlStatement($query);
493 $default_x12_partner = $iter['ic_x12id'];
494 while ($row = mysql_fetch_array($result)) {
495 if (strlen($row['provider']) > 0) {
496 // This preserves any existing insurance company selection, which is
497 // important when EOB posting has re-queued for secondary billing.
498 $lhtml .= "<option value=\"" . $row['id'] . "\"";
499 if (($count == 0 && !$iter['payer_id']) ||
$row['id'] == $iter['payer_id']) {
500 $lhtml .= " selected";
501 if (!is_numeric($default_x12_partner)) $default_x12_partner = $row['ic_x12id'];
503 $lhtml .= ">" . $row['type'] . ": " . $row['provider'] . "</option>";
507 $lhtml .= "<option value='-1'>Unassigned</option>\n";
508 $lhtml .= "</select> \n";
509 $lhtml .= "<select name='claims[" . $this_encounter_id . "][partner]' style='background-color:$bgcolor'>";
510 $x = new X12Partner();
511 $partners = $x->_utility_array($x->x12_partner_factory());
512 foreach ($partners as $xid => $xname) {
513 $lhtml .= '<option label="' . $xname . '" value="' . $xid .'"';
514 if ($xid == $default_x12_partner) {
515 $lhtml .= "selected";
517 $lhtml .= '>' . $xname . '</option>';
519 $lhtml .= "</select>";
520 $lhtml .= "<br>\n ".xl("Claim was initiated: ") . $iter['date'];
521 if ($iter['billed'] == 1) {
522 $lhtml .= "<br>\n ".xl("Claim was billed: ") . $iter['bill_date'];
525 if ($iter['bill_process'] == 1) {
526 $lhtml .= "<br>\n ".xl("Claim is queued for processing");
529 if ($iter['bill_process'] == 5) {
530 $lhtml .= "<br>\n ".xl("Claim is queued for printing and processing");
533 if ($iter['bill_process'] == 2) {
534 $lhtml .= "<br>\n ".xl("Claim was processed: ") . $iter['process_date'];
535 $lhtml .= '<br>' . "\n" . ' '.xl("Claim is in file:").' <a href="get_claim_file.php?key=' . $iter['process_file'] .'">' . $iter['process_file'] . '</a> or ';
536 $lhtml .= '<a href="get_claim_file.php?action=print&key=' . $iter['process_file'] .'">Print It</a> or ';
537 $lhtml .= '<a target="_new" href="freebtest.php?format=' . $iter['target'] . '&billkey=' . $iter['enc_pid'] . '-' . $iter['enc_encounter'] . '">'.xl('Run Test').'</a>';
538 $lhtml .= '<input type="hidden" name="claims[' . $this_encounter_id . '][file]" value="' . $iter['process_file'] . '">';
541 if ($iter['bill_process'] == 3) {
542 $lhtml .= "<br>\n ".xl("Claim was processed: ") . $iter['process_date'] . xl(" but there was an error: "). $iter['process_file'];
545 } // end if ($iter['id'])
548 if ($skipping) continue;
552 $rhtml .= "<tr bgcolor='$bgcolor'>\n";
554 $rhtml .= "<td width='50'>";
555 if ($iter['id'] && $oldcode != $iter['code_type']) {
556 $rhtml .= "<span class=text>" . $iter['code_type'] . ": </span>";
558 $oldcode = $iter['code_type'];
561 if ($iter['id'] && $code_types[$iter['code_type']]['just']) {
562 $js = split(":",$iter['justify']);
564 foreach ($js as $j) {
567 $justify .= " (<b>$j</b>)";
577 $rhtml .= "<td><span class=text>" . $iter{"code"}. "</span>" . '<span style="font-size:8pt;">' . $justify . "</span></td>\n";
578 $rhtml .= '<td align="right"><span style="font-size:8pt;"> ';
579 if ($iter['id'] && $iter['fee'] > 0) {
580 $rhtml .= '$' . $iter['fee'];
582 $rhtml .= "</span></td>\n";
583 $rhtml .= '<td><span style="font-size:8pt;"> ';
584 if ($iter['id']) $rhtml .= getProviderName($iter['provider_id']);
585 $rhtml .= "</span></td>\n";
586 $rhtml .= '<td width=100> <span style="font-size:8pt;">';
587 if ($iter['id']) $rhtml .= date("Y-m-d",strtotime($iter{"date"}));
588 $rhtml .= "</span></td>\n";
589 if ($iter['id'] && $iter['authorized'] != 1) {
590 $rhtml .= "<td><span class=alert>".xl("Note: This code was not entered by an authorized user. Only authorized codes may be uploaded to the Open Medical Billing Network for processing. If you wish to upload these codes, please select an authorized user here.")."</span></td>\n";
593 $rhtml .= "<td></td>\n";
595 if ($iter['id'] && $last_encounter_id != $this_encounter_id) {
596 $rhtml .= "<td><input type='checkbox' value='" . $iter['bill_process'] . "$procstatus' name='claims[" . $this_encounter_id . "][bill]' onclick='set_button_states()'> </td>\n";
599 $rhtml .= "<td></td>\n";
602 $last_encounter_id = $this_encounter_id;
606 while ($rcount < $lcount) {
607 $rhtml .= "<tr bgcolor='$bgcolor'><td colspan='7'> </td></tr>";
610 echo "<tr bgcolor='$bgcolor'>\n<td rowspan='$rcount' valign='top'>\n$lhtml</td>$rhtml\n";
611 echo "<tr bgcolor='$bgcolor'><td colspan='8' height='5'></td></tr>\n";
625 echo "alert('$alertmsg');\n";