// Desenvolvido pelo Sgt Walter
Function barcode($texto, $tam=1,$path="imgbarra/"){
if ($texto){
$w = 86 / $tam;
$h = 200 / $tam;
$e = 6 / $tam;
if (file_exists($path."ini.png") && file_exists($path."esp.png")){
echo "";
echo "";
$texto = strtolower($texto);
for ($i=0;$i<=strlen($texto)-1;$i++){
$var = substr($texto,$i,1);
if ($var == "/" && file_exists($path."bar.png")){
echo "";
$var = "";
}
if ($var == "*" && file_exists($path."ast.png")){
echo "";
$var = "";
}
if ($var == "%" && file_exists($path."per.png")){
echo "";
$var = "";
}
if ($var == "." && file_exists($path."pnt.png")){
echo "";
$var = "";
}
if ((!($var=="")) && (file_exists($path."$var.png"))){
echo "";
}
echo "";
}
echo "";
}else{
echo "BarCode erro: Faltam figuras do ini.png ou esp.png!";
}
}
}
?>