<?php

	echo '<font size="2" face="arial">' . $string_codigo_de_barras . '</font><br>';

	$mailtemplate = "mail/htmlboleto.html";

	$str = array();

        $str = array();

        $str["HTMLFONT"]        =       $htmlfont;

        $str["CDTE"]            =       $cdte;

        $str["AGCOD"]           =       $agcod;

        $str["DDOC"]            =       $ddoc;

        $str["VCTO"]            =       $cvto;

        $str["SACADO"]          =       $sacado;

        $str["NDOC"]            =       $ndoc;

        $str["NNUM"]            =       $nnum;

        $str["VDOC"]            =       $vdoc;

        $str["DEMONS1"]         =       $demons1;

        $str["DEMONS2"]         =       $demons2;

        $str["DEMONS3"]         =       $demons3;

        $str["DEMONS4"]         =       $demons4;

        $str["BANK"]            =       $bank;

        $str["BANKCODE"]        =       $bankcode;

        $str["LINHA"]           =       $linha;

        $str["LP"]              =       $lp;

        $str["DDOC"]            =       $ddoc;

        $str["NDOC"]            =       $ndoc;

        $str["EDOC"]            =       $edoc;

        $str["ACT"]             =       $act;

        $str["DPROC"]           =       $dproc;

        $str["USOBC"]           =       $usobc;

        $str["CART"]            =       $cart;

        $str["ESPMOED"]         =       $espmoed;

        $str["QTDE"]            =       $qtde;

        $str["VDOC"]            =       $vdoc;

        $str["INSTR1"]          =       $instr1;

        $str["INSTR2"]          =       $instr2;

        $str["INSTR3"]          =       $instr3;

        $str["INSTR4"]          =       $instr4;

        $str["INSTR5"]          =       $instr5;

        $str["DESC"]            =       $desc;

        $str["DDC"]             =       $ddc;

        $str["MULTA"]           =       $multa;

        $str["ACRES"]           =       $acres;

        $str["VCOBR"]           =       $vcobr;

        $str["ENDERECO"]        =       $endereco;

        $str["CEP"]             =       $cep;

        $str["BAIRRO"]          =       $bairro;

        $str["ESTADO"]          =       $estado;

        $str["CPF"]             =       $cpf;

        $str["BAR"]             =       $bar;





        if ($os == "windows")

           {

	$fp = @fopen($mailtemplate, "rb");

           }

        else

           {

	$fp = @fopen($mailtemplate, "r");

           }                 





	if ($fp > 0) {

	$buf = fread($fp, filesize($mailtemplate));

	fclose($fp);



	for(reset($str); $key=key($str); next($str))

	{

	$value = pos($str);

	$buf = ereg_replace("<%str$key%>", "$value", $buf);

	}

	}

	$base = "<base href=\"http://$webserver$webdir/images/\">";

	$base .= $buf;

	echo $base;

?>

