From: Thomas Mudrunka Date: Fri, 21 Oct 2011 13:46:02 +0000 (+0200) Subject: Pridana abstrakce pro generovani obrazkovych linku X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=6f7943a08cc115d137c5777408259009433ea8ca;p=mirrors%2FSokoMan.git Pridana abstrakce pro generovani obrazkovych linku --- diff --git a/index.php b/index.php index c1d3660..b37ab51 100755 --- a/index.php +++ b/index.php @@ -73,6 +73,10 @@ class HTML { return "$title"; } + function img_link($src, $link='#void', $title='img_link', $internal=true, $translate=true, $options='width=64') { + return $this->link($this->img($src,$title,$options),$link,$internal,$translate); + } + function input($name=false, $value=false, $type='text', $placeholder=false, $options=false, $prefix='') { $html = T($prefix)."img($src, $table[$id][$column]); + $table[$id][$type.'_image']=$this->img_link($src, $src, $table[$id][$column], false, false); } } } function render_barcode($barcode,$opts=false) { - return $this->link($this->img($this->internal_url("barcode/$barcode"),$barcode,$opts),"barcode/$barcode",true,false); + return $this->img_link($this->internal_url("barcode/$barcode"),$this->internal_url("barcode/$barcode"),$barcode,false,false,$opts); } function table_add_barcodes(&$table) {