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'";
$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>";
<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; }
);
$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) {
$cellspan = array(
'break_after' => array(
- 'item' => array('model_name'),
+ 'item' => array('category_name'),
'model'=> array('model_descript')
),
'rowspan' => array(
'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%')
)
);