</td> </tr> </tbody> </table> <table cellspacing="0" cellpadding="0" width="666" border="0"> <tr> <td class="ct" width="666"></td> </tr> <tbody> <tr> <td class="ct" width="666"> <div align="right"> <?php _e('Corte na linha pontilhada', 'woocommerce-boleto'); ?> </div> </td> </tr> <tr> <td class="ct" width="666"> <img height="1" src="<?php echo wcboleto_assets_url(); ?> images/6.png" width="665" border="0"> </td> </tr> </tbody> </table> </body> </html>
function fbarcode($valor) { $fino = 1; $largo = 3; $altura = 50; $barcodes[0] = "00110"; $barcodes[1] = "10001"; $barcodes[2] = "01001"; $barcodes[3] = "11000"; $barcodes[4] = "00101"; $barcodes[5] = "10100"; $barcodes[6] = "01100"; $barcodes[7] = "00011"; $barcodes[8] = "10010"; $barcodes[9] = "01010"; for ($f1 = 9; $f1 >= 0; $f1--) { for ($f2 = 9; $f2 >= 0; $f2--) { $f = $f1 * 10 + $f2; $texto = ""; for ($i = 1; $i < 6; $i++) { $texto .= substr($barcodes[$f1], $i - 1, 1) . substr($barcodes[$f2], $i - 1, 1); } $barcodes[$f] = $texto; } } //Desenho da barra //Guarda inicial ?> <img src=<?php echo wcboleto_assets_url(); ?> images/p.png width=<?php echo $fino; ?> height=<?php echo $altura; ?> border=0><img src=<?php echo wcboleto_assets_url(); ?> images/b.png width=<?php echo $fino; ?> height=<?php echo $altura; ?> border=0><img src=<?php echo wcboleto_assets_url(); ?> images/p.png width=<?php echo $fino; ?> height=<?php echo $altura; ?> border=0><img src=<?php echo wcboleto_assets_url(); ?> images/b.png width=<?php echo $fino; ?> height=<?php echo $altura; ?> border=0><img <?php $texto = $valor; if (strlen($texto) % 2 != 0) { $texto = "0" . $texto; } // Draw dos dados while (strlen($texto) > 0) { $i = round(esquerda($texto, 2)); $texto = direita($texto, strlen($texto) - 2); $f = $barcodes[$i]; for ($i = 1; $i < 11; $i += 2) { if (substr($f, $i - 1, 1) == "0") { $f1 = $fino; } else { $f1 = $largo; } ?> src=<?php echo wcboleto_assets_url(); ?> images/p.png width=<?php echo $f1; ?> height=<?php echo $altura; ?> border=0><img <?php if (substr($f, $i, 1) == "0") { $f2 = $fino; } else { $f2 = $largo; } ?> src=<?php echo wcboleto_assets_url(); ?> images/b.png width=<?php echo $f2; ?> height=<?php echo $altura; ?> border=0><img <?php } } // Draw guarda final ?> src=<?php echo wcboleto_assets_url(); ?> images/p.png width=<?php echo $largo; ?> height=<?php echo $altura; ?> border=0><img src=<?php echo wcboleto_assets_url(); ?> images/b.png width=<?php echo $fino; ?> height=<?php echo $altura; ?> border=0><img src=<?php echo wcboleto_assets_url(); ?> images/p.png width=<?php echo 1; ?> height=<?php echo $altura; ?> border=0> <?php }