$img = ImageCreate($lw * 95 + 30, $hi + 30); $fg = ImageColorAllocate($img, 0, 0, 0); $bg = ImageColorAllocate($img, 255, 255, 255); ImageFilledRectangle($img, 0, 0, $lw * 95 + 30, $hi + 30, $bg); $shift = 10; for ($x = 0; $x < strlen($bars); $x++) { if ($x < 10 || $x >= 45 && $x < 50 || $x >= 85) { $sh = 10; } else { $sh = 0; } if ($bars[$x] == '1') { $color = $fg; } else { $color = $bg; } ImageFilledRectangle($img, $x * $lw + 15, 5, ($x + 1) * $lw + 14, $hi + 5 + $sh, $color); } /* Add the Human Readable Label */ ImageString($img, 4, 5, $hi - 5, $code[0], $fg); for ($x = 0; $x < 5; $x++) { ImageString($img, 5, $lw * (13 + $x * 6) + 15, $hi + 5, $code[$x + 1], $fg); ImageString($img, 5, $lw * (53 + $x * 6) + 15, $hi + 5, $code[$x + 6], $fg); } ImageString($img, 4, $lw * 95 + 17, $hi - 5, $code[11], $fg); /* Output the Header and Content. */ header("Content-Type: image/png"); ImagePNG($img); } CodigoBarras($Codigo);
$img = ImageCreate($lw * 95 + 30, $hi + 30); $fg = ImageColorAllocate($img, 0, 0, 0); $bg = ImageColorAllocate($img, 255, 255, 255); ImageFilledRectangle($img, 0, 0, $lw * 95 + 30, $hi + 30, $bg); $shift = 10; for ($x = 0; $x < strlen($bars); $x++) { if ($x < 10 || $x >= 45 && $x < 50 || $x >= 85) { $sh = 10; } else { $sh = 0; } if ($bars[$x] == '1') { $color = $fg; } else { $color = $bg; } ImageFilledRectangle($img, $x * $lw + 15, 5, ($x + 1) * $lw + 14, $hi + 5 + $sh, $color); } /* Add the Human Readable Label */ ImageString($img, 4, 5, $hi - 5, $code[0], $fg); for ($x = 0; $x < 5; $x++) { ImageString($img, 5, $lw * (13 + $x * 6) + 15, $hi + 5, $code[$x + 1], $fg); ImageString($img, 5, $lw * (53 + $x * 6) + 15, $hi + 5, $code[$x + 6], $fg); } ImageString($img, 4, $lw * 95 + 17, $hi - 5, $code[11], $fg); /* Output the Header and Content. */ header("Content-Type: image/png"); ImagePNG($img); } CodigoBarras('00000000001');
* * Voc� recebeu uma c�pia da Licen�a P�blica Geral GNU, * que est� localizada na ra�z do programa no arquivo COPYING ou COPYING.TXT * junto com este programa. Se n�o, visite o endere�o para maiores informa��es: * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (Ingl�s) * http://www.magnux.org/doc/GPL-pt_BR.txt (Portugu�s - Brasil) * * Em caso de d�vidas quanto ao software ou quanto � licen�a, visite o * endere�o eletr�nico ou envie-nos um e-mail: * * http://www.smileodonto.com.br/gco * smile@smileodonto.com.br * * Ou envie sua carta para o endere�o: * * Smile Odontol�ogia * Rua Laudemira Maria de Jesus, 51 - Lourdes * Arcos - MG - CEP 35588-000 * * */ include "../lib/config.inc.php"; include "../lib/func.inc.php"; include "../lib/classes.inc.php"; require_once '../lang/' . $idioma . '.php'; header("Content-type: text/html; charset=ISO-8859-1", true); if (!checklog()) { die($frase_log); } CodigoBarras($_GET['codigo']);