X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=index.php;h=c7e12e8368c8627bb447642514fc94a15a8ec7e9;hb=80457ef3c29400e0d14524884e3114caf8f926c0;hp=e19792ebd69d22147626cae3721c7175379aa5bc;hpb=3e939604db69dadadd8d7d562c0a120bfbd33f8e;p=mirrors%2FSokoMan.git diff --git a/index.php b/index.php index e19792e..c7e12e8 100755 --- a/index.php +++ b/index.php @@ -24,6 +24,7 @@ require_once('Sklad_Auth.class/common.php'); require_once('HTTP_Auth.class.php'); require_once('Locale.class.php'); require_once('Barcode.class.php'); +require_once('Fortune.php'); /** * Trida poskytuje vseobecne funkce pro generovani HTML kodu @@ -34,11 +35,11 @@ require_once('Barcode.class.php'); * @author Tomas Mudrunka */ class HTML { - function row($row,$type=false,$class=false) { + function row($row,$type=false,$class=false,$parameters='') { $html = ''; $class = $class ? $class=" class='$class' " : ''; if($type) $html.="<$type>"; - $html.=""; + $html.=""; $td = $type == 'thead' ? 'th' : 'td'; foreach($row as $var) { if(trim($var) == '') $var = ' '; @@ -49,17 +50,19 @@ class HTML { return $html; } - function table(&$table, $parity_class=array('tr_odd','tr_even'), $params='border=1') { + function table(&$table, $parity_class=array('tr_odd','tr_even'), $params='border=1', $row_params_field='_row_parameters') { $html=""; $header=true; $even=false; foreach($table as $row) { + $params = isset($row[$row_params_field]) ? $row[$row_params_field] : ''; + unset($row[$row_params_field]); if($header) { $html.=$this->row(array_keys($row),'thead'); $header=false; } $class = $parity_class ? $parity_class[$even] : false; - $html.=$this->row($row,false,$class); + $html.=$this->row($row,false,$class.$params); $even = !$even; } $html.='
'; @@ -81,7 +84,17 @@ class HTML { return $this->link($this->img($src,$title,$options),$link,$internal,$translate); } + function textarea($name=false, $value='', $placeholder=false, $options=false, $prefix='') { + $html = T($prefix)."textarea($name, $value, $placeholder, $options, $prefix); $html = T($prefix)."'); print_r($selectbox); $html = "