function barcode_print($code, $encoding = "ANY", $scale = 2, $mode = "png", $total_y = 0) { $bars = barcode_encode($code, $encoding); if (!$bars) { return; } if (!$mode) { $mode = "png"; } if (eregi($mode, "^(text|txt|plain)\$")) { print barcode_outtext($bars['text'], $bars['bars']); } elseif (eregi($mode, "^(html|htm)\$")) { print barcode_outhtml($bars['text'], $bars['bars'], $scale, 0, 0); } else { barcode_outimage($bars['text'], $bars['bars'], $scale, $mode, $total_y); } return $bars; }
function barcode_print($code, $encoding = "ANY", $scale = 2, $mode = "png") { $bars = barcode_encode($code, $encoding); if (!$bars) { return; } if (!$mode) { $mode = "png"; } if (preg_match("#^(text|txt|plain)\$#i", $mode)) { print barcode_outtext($bars['text'], $bars['bars']); } elseif (preg_match("#^(html|htm)\$#i", $mode)) { print barcode_outhtml($bars['text'], $bars['bars'], $scale, 0, 0); } else { barcode_outimage($bars['text'], $bars['bars'], $scale, $mode); } return $bars; }
function barcode_print($code, $encoding = "ANY", $scale = 2, $mode = "png", $gen_file = false, $files_name = 'barcode', $files_path = './') { $files_path = empty($files_path) ? './' : $files_path; $files_name .= isset($mode) && $mode != '' ? '.' . $mode : '.png'; $files_path .= $files_name; $total_y = 0; $space = ''; $bars = barcode_encode($code, $encoding); if (!$bars) { return; } if (!$mode) { $mode = "png"; } if (preg_match("#^(text|txt|plain)\$#i", $mode)) { print barcode_outtext($bars['text'], $bars['bars']); } elseif (preg_match("#^(html|htm)\$#i", $mode)) { print barcode_outhtml($bars['text'], $bars['bars'], $scale, 0, 0); } else { return barcode_outimage($bars['text'], $bars['bars'], $scale, $mode, $total_y, $space, $gen_file, $files_name, $files_path); } return $bars; }
function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png" ){ $bars=barcode_encode($code,$encoding); if (!$bars) return; if (!$mode) $mode="png"; if (eregi($mode,"^(text|txt|plain)$")) print barcode_outtext($bars['text'],$bars['bars']); elseif (eregi($mode,"^(html|htm)$")) print barcode_outhtml($bars['text'],$bars['bars'], $scale,0, 0); else barcode_outimage($bars['text'],$bars['bars'],$scale, $mode); return $bars; }
function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png" ){ // DOLCHANGE LDR Add log dol_syslog("php-barcode.php:barcode_print $code $encoding $scale $mode"); $bars=barcode_encode($code,$encoding); if (!$bars) { // DOLCHANGE LDR Return error message instead of array $error='Bad Value '.$code.' for encoding '.$encoding; dol_syslog('php-barcode.php:barcode_print '.$error, LOG_ERR); return $error; } if (!$mode) $mode="png"; if (preg_match("/^(text|txt|plain)$/i",$mode)) print barcode_outtext($bars['text'],$bars['bars']); elseif (preg_match("/^(html|htm)$/i",$mode)) print barcode_outhtml($bars['text'],$bars['bars'], $scale,0, 0); else barcode_outimage($bars['text'],$bars['bars'],$scale, $mode); return $bars; }