CSS Zprehledneno
[mirrors/SokoMan.git] / index.php
index 9ed67813974e1e65a410f59f77f92598666e51ec..a131b22c886159f6f73e5d543a649793dcb6c4d5 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -37,10 +37,10 @@ require_once('Fortune.php');
 class HTML {
        function row($row,$type=false,$class=false,$parameters='',$colspan=array(),$rowspan=array(),$break_after=array()) {
                $html = '';
-               $class = $class ? $class=" class='$class' " : '';
+               $class_br = $class ? " class='$class' " : '';
+               $class = $class ? " class='$class tr_nobr' " : '';
                if($type) $html.="<$type>";
-               $tr="<tr$class$parameters>";
-               $html.=$tr;
+               $html.="<tr$class$parameters>";
                $td = $type == 'thead' ? 'th' : 'td';
                foreach($row as $id => $var) {
                        $tdclass = " class='cell_$id'";
@@ -48,7 +48,7 @@ class HTML {
                        $rs = isset($rowspan[$id]) ? " rowspan='$rowspan[$id]'" : '';
                        $cs = isset($colspan[$id]) ? " colspan='$colspan[$id]'" : '';
                        $html.="<$td$rs$cs$tdclass>$var</$td>";
-                       if(in_array($id,$break_after,true)) $html.='</tr>'.$tr;
+                       if(in_array($id,$break_after,true)) $html.='</tr>'."<tr$class_br$parameters>";
                }
                $html.='</tr>';
                if($type) $html.="</$type>";
@@ -207,11 +207,14 @@ class Sklad_HTML extends HTML { //TODO: Split into few more methods
 
 <style type="text/css">
 * { font-family: arial; }
-td,body { background-color: white; }
+td,body { background-color: white; border: orange; }
+.tr_nobr td { border-top: 3px solid orange; }
 table { background-color: orange; border: orange; }
 a, a img { text-decoration:none; color: darkblue; border:none; }
 li a, a:hover { text-decoration:underline; }
 .tr_even td { background-color: lemonchiffon; }
+.tr_nobr.tr_even td:first-child { border-left: 5px solid orange; }
+.tr_nobr.tr_odd td:first-child { border-left: 5px solid white; }
 .item_status_stored td { font-weight:bold; }
 .item_status_deleted td { text-decoration:line-through; }
 .item_status_destroyed td { font-style:italic; }
@@ -369,8 +372,8 @@ EOF;
                );
                $relations_conditions=array(
                        'in_stock' => 'return(@$table[$id]["status_name"] == "stored");',
-                       'not_sold' => 'return(@$table[$id]["status_name"] != "saled");',
-                       'not_sold_or_disposed' => 'return(@$table[$id]["status_name"] != "saled" && @$table[$id]["status_name"] != "disposed");'
+                       'not_sold' => 'return(@$table[$id]["status_name"] != "sold");',
+                       'not_sold_or_disposed' => 'return(@$table[$id]["status_name"] != "sold" && @$table[$id]["status_name"] != "disposed");'
                );
                foreach($table as $id => $row) {
                        foreach($row as $column => $value) {
@@ -452,7 +455,7 @@ EOF;
 
                $cellspan = array(
                        'break_after' => array(
-                               'item' => array('model_name'),
+                               'item' => array('category_name'),
                                'model'=> array('model_descript')
                        ),
                        'rowspan' => array(
@@ -460,7 +463,7 @@ EOF;
                                'model'=> array('model_image'=>2)
                        ),
                        'colspan' => array(
-                               'item' => array('model_name'=>'100%'),
+                               'item' => array('model_name'=>6,'category_name'=>'100%'),
                                'model'=> array('model_name'=>4,'model_descript'=>'100%')
                        )
                );
This page took 0.163793 seconds and 4 git commands to generate.