From: Thomas Mudrunka Date: Wed, 24 Aug 2011 00:47:43 +0000 (+0200) Subject: Byla zlepsena vizualni stranka vykreslovani barcodu X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=5469411711b7ac51190a64bf252aecb6a3f43f89;p=mirrors%2FSokoMan.git Byla zlepsena vizualni stranka vykreslovani barcodu --- diff --git a/index.php b/index.php index a2423df..6f7392c 100755 --- a/index.php +++ b/index.php @@ -650,9 +650,9 @@ class Sklad_UI { $html.= '-'; $html.= $this->html->link('>>', "$class/$id_next/"); $html.= '
'; + $html.=''.$this->html->render_barcode(BARCODE_PREFIX.strtoupper("$class/$id")).''; $html.= $this->html->link('edit', "$class/$id/edit/"); if($this->db->contains_history($class)) $html.= ' ][ '.$this->html->link('history', "$class/$id/history/"); - $html.='
'.$this->html->render_barcode(BARCODE_PREFIX.strtoupper("$class/$id")); return $html; } @@ -842,4 +842,4 @@ class Sklad_UI { $sklad = new Sklad_UI(); $sklad->process_http_request(); -echo("
"); +echo('

'); diff --git a/lib/Barcode.class.php b/lib/Barcode.class.php index 7292825..b4231e6 100755 --- a/lib/Barcode.class.php +++ b/lib/Barcode.class.php @@ -37,7 +37,7 @@ class Barcode { static function generate_barcode($string='EXAMPLE', $convert='png', $enctype='code128b') { $string = escapeshellarg($string); $enctype = escapeshellarg($enctype); - $convert = $convert ? " | convert -colorspace gray -background white - $convert:-" : ''; + $convert = $convert ? " | convert - -crop 0x60+0+30\\! -background white -flatten $convert:-" : ''; return shell_exec("barcode -e $enctype -E -b $string$convert"); }