From 5469411711b7ac51190a64bf252aecb6a3f43f89 Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Wed, 24 Aug 2011 02:47:43 +0200 Subject: [PATCH] Byla zlepsena vizualni stranka vykreslovani barcodu --- index.php | 4 ++-- lib/Barcode.class.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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"); } -- 2.30.2