X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=index.php;h=d6469e5149f088b7f26fc6a2a3970a8d85ca65a7;hb=ee2e74152b83654cd26c2e913555f147e6fa19e2;hp=9da2fab2b99256a6859599184569f4265e4f3e4b;hpb=1f7c4407d84c9b784228ccfbffb690f2d6c14580;p=mirrors%2FSokoMan.git
diff --git a/index.php b/index.php
index 9da2fab..d6469e5 100755
--- a/index.php
+++ b/index.php
@@ -1,7 +1,7 @@
";
- $tr="
";
- $html.=$tr;
+ $html.="
";
$td = $type == 'thead' ? 'th' : 'td';
foreach($row as $id => $var) {
$tdclass = " class='cell_$id'";
if(trim($var) == '') $var = ' ';
$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;
+ $html.="<$td$rs$cs$tdclass title='$id'>$var$td>";
+ if(in_array($id,$break_after,true)) $html.=''."";
}
$html.='
';
if($type) $html.="$type>";
return $html;
}
- function table(&$table,$colspan=array(),$rowspan=array(),$break_after=array(),$parity_class=array('tr_odd','tr_even'),$params='border=1',$row_classes_field='_row_classes') {
+ function table(&$table,$colspan=array(),$rowspan=array(),$break_after=array(),$orderby=false,$parity_class=array('tr_odd','tr_even'),$params='border=1',$row_classes_field='_row_classes') {
$html="";
$header=true;
$even=false;
@@ -63,8 +64,13 @@ class HTML {
$params = isset($row[$row_classes_field]) ? $row[$row_classes_field] : '';
unset($row[$row_classes_field]);
if($header) {
- $keys = array(); foreach($row as $key => $val) $keys[$key]=$key;
- $html.=$this->row(T($keys),'thead',false,'',$colspan,$rowspan,$break_after);
+ $keys = array(); foreach($row as $key => $val) {
+ $order= $orderby ? ' '.
+ $this->link('↑', $orderby."[$key]=ASC").
+ $this->link('↓', $orderby."[$key]=DESC") : '';
+ $keys[$key]=T($key).$order;
+ }
+ $html.=$this->row($keys,'thead',false,'',$colspan,$rowspan,$break_after);
$header=false;
}
$class = $parity_class ? $parity_class[$even] : false;
@@ -82,6 +88,7 @@ class HTML {
}
function img($src='#void', $title='img', $options='height=64') {
+ if(isset($_GET['noimgs'])) return "".basename($src).'';
$options = $options ? " $options" : '';
return "";
}
@@ -101,6 +108,8 @@ class HTML {
function input($name=false, $value=false, $type='text', $placeholder=false, $options=false, $prefix='') {
if($type == 'textarea') return $this->textarea($name, $value, $placeholder, $options, $prefix);
+ if($type == 'select') return $this->select($name, $placeholder, $value, $prefix);
+ //select(vendor, $selectbox ,false, prefix:);
$html = T($prefix)."'); print_r($selectbox);
- $html = "