Pri generovani tabulek se nyni pouziva <thead>, vylepseni CSS - nepodtrzene linky...
authorThomas Mudrunka <tomas@mudrunka.cz>
Wed, 24 Aug 2011 00:57:01 +0000 (02:57 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Wed, 24 Aug 2011 01:24:19 +0000 (03:24 +0200)
index.php

index 6f7392ce1b30b04443e55acec61947f3359f6715..5c54331a1e53f5144f62b6da2eb544a8047c613b 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -34,13 +34,17 @@ require_once('Barcode.class.php');
 * @author   Tomas Mudrunka
 */
 class HTML {
-       function row($row) {
-               $html='<tr>';
+       function row($row,$type=false) {
+               $html = '';
+               if($type) $html.="<$type>";
+               $html.='<tr>';
+               $td = $type == 'thead' ? 'th' : 'td';
                foreach($row as $var) {
                        if(trim($var) == '') $var = '&nbsp;';
-                       $html.="<td>$var</td>";
+                       $html.="<$td>$var</$td>";
                }
                $html.='</tr>';
+               if($type) $html.="</$type>";
                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
 
 <style type="text/css">
 * { font-family: arial; }
+td,body { background-color: white; }
+table { background-color: orange; border: orange; }
+a { text-decoration:none; color: darkblue; }
+li a, a:hover { text-decoration:underline; }
 
 .menu li {
        float: left;
This page took 0.153556 seconds and 4 git commands to generate.