From 933b760a1a2f81a454fd894950a80868b1ebd5de Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Wed, 24 Aug 2011 02:57:01 +0200 Subject: [PATCH] Pri generovani tabulek se nyni pouziva , vylepseni CSS - nepodtrzene linky, etc... --- index.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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