X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=index.php;h=a2423df11502a2f1d3fc6fbe53456338784269e1;hb=089455c423877b487c5a3cab087136bb4a505984;hp=7a8167c6564944d46faa900b43e67fa1d3e7b86f;hpb=5f093236433fcea508d4c023179e525d99e35cb3;p=mirrors%2FSokoMan.git diff --git a/index.php b/index.php index 7a8167c..a2423df 100755 --- a/index.php +++ b/index.php @@ -22,6 +22,8 @@ set_include_path(DIR_LIB.PATH_SEPARATOR.get_include_path()); require_once('Sklad_LMS-fake.class.php'); require_once('HTTP_Auth.class.php'); +require_once('Locale.class.php'); +require_once('Barcode.class.php'); /** * Trida poskytuje vseobecne funkce pro generovani HTML kodu @@ -56,25 +58,40 @@ class HTML { return $html; } - function link($title='n/a', $link='#void', $internal=true) { - if($internal) $link = $this->internal_url($link); - return "$title"; + function link($title='n/a', $link='#void', $internal=true, $translate=true) { + if($internal && (!isset($link[0]) || $link[0] != '#')) $link = $this->internal_url($link); + if($translate) $title = T($title); + return "".$title.""; } - function img($src='#void', $title='img') { - return ""; + function img($src='#void', $title='img', $options='width=64') { + $options = $options ? " $options" : ''; + return ""; } - function input($name=false, $value=false, $type='text', $placeholder=false, $options=false) { - $html = ""; + foreach($inputs as $input) $html .= call_user_func_array(array($this,'input'), $input); + $html .= ""; + return $html; + } + function select($name, $selectbox, $default=false) { //echo('
'); print_r($selectbox); $html = ""; return $html; } + + function ul($items,$tag=ul,$head='',$class=false) { + $class = $class ? " class='$class'" : ''; + $html = "$head<$tag$class>"; + foreach($items as $key => $value) { + $html .= '