Пример #1
0
         // if ($value == '.total') { // Total Positives
         //   genNumCell($totalsvcs, $cnum++);
         // }
         if ($value == '.tneg') {
             // Total Negatives
             genNumCell($areport[$key]['.neg'], $cnum++);
         } else {
             if ($value == '.age') {
                 // Age
                 for ($i = 0; $i < 9; ++$i) {
                     genNumCell($areport[$key]['.age'][$i], $cnum++);
                 }
             } else {
                 if (!empty($arr_titles[$value])) {
                     foreach ($arr_titles[$value] as $title => $dummy) {
                         genNumCell($areport[$key][$value][$title], $cnum++);
                     }
                 }
             }
         }
     }
     // Write the Total column data.
     if ($form_output != 3) {
         $atotals[$cnum] += $totalsvcs;
         genAnyCell($totalsvcs, true, 'dehead');
     }
     genEndRow();
 }
 // end foreach
 if ($form_output != 3) {
     // Generate the line of totals.
Пример #2
0
 genHeadCell(xl('Preg Test'), true);
 genHeadCell(xl('Dr Check'), true);
 genHeadCell(xl('Dr Visit'), true);
 genHeadCell(xl('Advice'), true);
 genHeadCell(xl('Couns by Method'), true);
 genHeadCell(xl('Infert Couns'), true);
 genHeadCell(xl('STD/AIDS Couns'), true);
 genEndRow();
 $encount = 0;
 foreach ($areport as $key => $varr) {
     $bgcolor = ++$encount & 1 ? "#ddddff" : "#ffdddd";
     genStartRow("bgcolor='{$bgcolor}'");
     genAnyCell($varr[0], false, 'detail');
     // Generate data and accumulate totals for this row.
     for ($cnum = 0; $cnum < $report_col_count; ++$cnum) {
         genNumCell($varr[$cnum + 1], $cnum);
     }
     genEndRow();
 }
 // end foreach
 if ($form_output != 3) {
     // Generate the line of totals.
     genStartRow("bgcolor='#dddddd'");
     genHeadCell(xl('Totals'));
     for ($cnum = 0; $cnum < $report_col_count; ++$cnum) {
         genHeadCell($atotals[$cnum], true);
     }
     genEndRow();
     // End of table.
     echo "</table>\n";
 }