function drawTable_top($head) { echo html_table_open('', array('border' => '1', 'cellspacing' => '1', 'cellpadding' => '1')); echo html_thead_open(); echo html_tr_open(); foreach ($head as $h) { if ($h != '') { echo html_th_wrap($h); } } echo html_tr_close(); echo html_thead_close(); echo '<br />' . "\n"; }
function formtable($data, $span = 0) { $s = html_table_open('formtable'); $s .= html_tr_open('formtablerow'); $i = -1; foreach ($data as $disp => $html) { if ($disp[0] == '_') { $s .= $html; } else { if ($html == 'x') { continue; } if ($span > 0) { $i++; if ($i > $span) { $i = 0; $s .= html_tr_close(); $s .= html_tr_open('formtablerow'); } } else { $s .= html_tr_open('formtablerow'); } $s .= html_td_open('formtablecell') . $disp . html_td_close(); $s .= html_td_open('formtablecell') . $html . html_td_close(); if ($span == 0) { $s .= html_tr_close(); } } } $s .= html_tr_close(); $s .= htmlElm_close('table'); return $s; }