fbarcode

The WooCommerce Boleto fbarcode function.

Description

fbarcode( $valor ); 

Parameters (1)

0. $valor
The valor.

Usage

  1. if ( !function_exists( 'fbarcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-boleto/includes/banks/bancoob/functions.php'; 
  3.  
  4. // The valor. 
  5. $valor = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = fbarcode($valor); 
  9.  

Defined (12)

The function is defined in the following location(s).

/includes/banks/bancoob/functions.php  
  1. function fbarcode($valor) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for($f1=9;$f1>=0;$f1--) { 
  18. for($f2=9;$f2>=0;$f2--) { 
  19. $f = ($f1 * 10) + $f2 ; 
  20. $texto = "" ; 
  21. for($i=1;$i<6;$i++) { 
  22. $texto .= substr($barcodes[$f1], ($i-1), 1) . substr($barcodes[$f2], ($i-1), 1); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. // Desenho da barra 
  27.  
  28.  
  29. // Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if((strlen($texto) % 2) <> 0) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while (strlen($texto) > 0) { 
  41. $i = round(esquerda($texto, 2)); 
  42. $texto = direita($texto, strlen($texto)-2); 
  43. $f = $barcodes[$i]; 
  44. for($i=1;$i<11;$i+=2) { 
  45. if (substr($f, ($i-1), 1) == "0") { 
  46. $f1 = $fino ; 
  47. }else{ 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if (substr($f, $i, 1) == "0") { 
  53. $f2 = $fino ; 
  54. }else{ 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/bb/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/bradesco/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/cef/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/cef_sigcb/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/cef_sinco/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/hsbc/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/itau/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110"; 
  8. $barcodes[1] = "10001"; 
  9. $barcodes[2] = "01001"; 
  10. $barcodes[3] = "11000"; 
  11. $barcodes[4] = "00101"; 
  12. $barcodes[5] = "10100"; 
  13. $barcodes[6] = "01100"; 
  14. $barcodes[7] = "00011"; 
  15. $barcodes[8] = "10010"; 
  16. $barcodes[9] = "01010"; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/nossacaixa/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/real/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/santander/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php 
/includes/banks/unibanco/functions.php  
  1. function fbarcode( $valor ) { 
  2.  
  3. $fino = 1 ; 
  4. $largo = 3 ; 
  5. $altura = 50 ; 
  6.  
  7. $barcodes[0] = "00110" ; 
  8. $barcodes[1] = "10001" ; 
  9. $barcodes[2] = "01001" ; 
  10. $barcodes[3] = "11000" ; 
  11. $barcodes[4] = "00101" ; 
  12. $barcodes[5] = "10100" ; 
  13. $barcodes[6] = "01100" ; 
  14. $barcodes[7] = "00011" ; 
  15. $barcodes[8] = "10010" ; 
  16. $barcodes[9] = "01010" ; 
  17. for ( $f1=9;$f1>=0;$f1-- ) { 
  18. for ( $f2=9;$f2>=0;$f2-- ) { 
  19. $f = ( $f1 * 10 ) + $f2 ; 
  20. $texto = "" ; 
  21. for ( $i=1;$i<6;$i++ ) { 
  22. $texto .= substr( $barcodes[$f1], ( $i-1 ), 1 ) . substr( $barcodes[$f2], ( $i-1 ), 1 ); 
  23. $barcodes[$f] = $texto; 
  24.  
  25.  
  26. //Desenho da barra 
  27.  
  28.  
  29. //Guarda inicial 
  30. ?><img src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  31. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  32. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  33. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  34. <?php 
  35. $texto = $valor ; 
  36. if ( ( strlen( $texto ) % 2 ) <> 0 ) { 
  37. $texto = "0" . $texto; 
  38.  
  39. // Draw dos dados 
  40. while ( strlen( $texto ) > 0 ) { 
  41. $i = round( esquerda( $texto, 2 ) ); 
  42. $texto = direita( $texto, strlen( $texto )-2 ); 
  43. $f = $barcodes[$i]; 
  44. for ( $i=1;$i<11;$i+=2 ) { 
  45. if ( substr( $f, ( $i-1 ), 1 ) == "0" ) { 
  46. $f1 = $fino ; 
  47. }else { 
  48. $f1 = $largo ; 
  49. ?> 
  50. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $f1?> height=<?php echo $altura?> border=0><img 
  51. <?php 
  52. if ( substr( $f, $i, 1 ) == "0" ) { 
  53. $f2 = $fino ; 
  54. }else { 
  55. $f2 = $largo ; 
  56. ?> 
  57. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $f2?> height=<?php echo $altura?> border=0><img 
  58. <?php 
  59.  
  60. // Draw guarda final 
  61. ?> 
  62. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo $largo?> height=<?php echo $altura?> border=0><img 
  63. src=<?php echo wcboleto_assets_url(); ?>images/b.png width=<?php echo $fino?> height=<?php echo $altura?> border=0><img 
  64. src=<?php echo wcboleto_assets_url(); ?>images/p.png width=<?php echo 1?> height=<?php echo $altura?> border=0> 
  65. <?php