X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=index.php;h=71651ed5584e1d1e4125424cea9ff2ad2ecfba06;hb=5ef6c52f74756cfd5fc08f5af74b970d560b0293;hp=db9e514f7d129b11f98af87188bbe0286dbd8ae1;hpb=81ab8aef27da2a93a06296fd3b80cdba3376d956;p=mirrors%2FSokoMan.git diff --git a/index.php b/index.php index db9e514..71651ed 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); @@ -128,6 +132,14 @@ class HTML { $options = $options ? " $options" : ''; return "$html"; } + + function head($title=false,$charset='UTF-8',$more='') { + $title = $title ? "\n$title" : ''; + $html= ''; + $html.= ''.$title.$more; + $html.= ''; + return $html; + } } /** @@ -146,15 +158,17 @@ class Sklad_HTML extends HTML { //TODO: Split into few more methods $message = strip_tags(@trim($_GET['message']),''); $instance = INSTANCE_ID != '' ? '/'.INSTANCE_ID : ''; //$title = T($title); //TODO - $html = << - - SōkoMan$title - + + $html = $this->head("SōkoMan$title"); + $html .= <<SōkoMan$instance$title