X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=index.php;h=525c272194317093b5c48285ae19e62a2777fd76;hb=HEAD;hp=69b3505185f7a8befffc50fdf272124b0b242dde;hpb=60ec0b752f81a4a55a45a467176132e9a0c7b7a3;p=mirrors%2FSokoMan.git
diff --git a/index.php b/index.php
index 69b3505..525c272 100755
--- a/index.php
+++ b/index.php
@@ -1,7 +1,7 @@
$var$td>";
+ $html.="<$td$rs$cs$tdclass title='$id'>$var$td>";
if(in_array($id,$break_after,true)) $html.=''."
";
}
$html.=' ';
@@ -55,7 +56,7 @@ class HTML {
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 = "";
+ $html = T($prefix)."";
if(!is_bool($default)) {
$value=$default; $title=$selectbox[$value];
@@ -184,7 +193,7 @@ class HTML {
* @author Tomas Mudrunka
*/
class Sklad_HTML extends HTML { //TODO: Split into few more methods
- function header($title='', $user=array()) {
+ function header($title='', $user=array(), $headerhtml) {
$home = URL_HOME;
$script = $_SERVER['SCRIPT_NAME'];
$search = htmlspecialchars(@trim($_GET['q']));
@@ -207,18 +216,24 @@ class Sklad_HTML extends HTML { //TODO: Split into few more methods