From: Thomas Mudrunka Date: Wed, 24 Aug 2011 00:57:01 +0000 (+0200) Subject: Pri generovani tabulek se nyni pouziva , vylepseni CSS - nepodtrzene linky... X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=933b760a1a2f81a454fd894950a80868b1ebd5de;p=mirrors%2FSokoMan.git Pri generovani tabulek se nyni pouziva , vylepseni CSS - nepodtrzene linky, etc... --- diff --git a/index.php b/index.php index 6f7392c..5c54331 100755 --- a/index.php +++ b/index.php @@ -34,13 +34,17 @@ require_once('Barcode.class.php'); * @author Tomas Mudrunka */ class HTML { - function row($row) { - $html=''; + function row($row,$type=false) { + $html = ''; + if($type) $html.="<$type>"; + $html.=''; + $td = $type == 'thead' ? 'th' : 'td'; foreach($row as $var) { if(trim($var) == '') $var = ' '; - $html.="$var"; + $html.="<$td>$var"; } $html.=''; + if($type) $html.=""; return $html; } @@ -49,7 +53,7 @@ class HTML { $header=true; foreach($table as $row) { if($header) { - $html.=$this->row(array_keys($row)); + $html.=$this->row(array_keys($row),'thead'); $header=false; } $html.=$this->row($row); @@ -161,6 +165,10 @@ class Sklad_HTML extends HTML { //TODO: Split into few more methods