Example #1
0
                }
                writelog("EDIT status=ok user="******" uid=" . $info[$valor]["uid"][0] . " o=" . $info[$valor]["o"][0] . " host=" . $info[$valor]["host"][0]);
                echo "<center>Registro atualizado!</center>";
                echo "<br><input type=\"button\" value=\"Fechar\" onclick=\"self.close(); window.opener.location.reload();\">";
            } else {
                echo "<center>O registro nгo foi atualizado! Problema desconhecido</center>";
                echo "<br><input type=\"button\" value=\"Fechar\" onclick=\"self.close(); window.opener.location.reload();\">";
            }
        } else {
            echo "<br><font color=\"red\"><center><b>As senhas nгo conferem!</b></center></font>";
            echo "<br><a href=\"editar.php?valor=" . $valor . "&tipo=" . $tipo . "&busca=" . $busca . "\"><img src=\"../figuras/volta.png\" border=\"0\" align=\"middle\"> Volta</a>";
        }
    }
} else {
    $gruposenha = $info[$valor]["description"][1];
    if (!verifica($permissoes, $gruposenha, "rw")) {
        echo "<br><font color=\"red\"><b>Vocк nгo tem permissгo para editar esta senha!</b></font><br>";
        echo "<br><input type=\"button\" value=\"Fechar\" onclick=\"self.close(); window.opener.location.reload();\">";
    } else {
        $senhade = decripta($info[$valor]["userpassword"][1], $key, $iv);
        $grupos = grupos($permissoes);
        ?>
					<table>
					<form name="formulario" method="post" action="<?php 
        echo $PHP_SELF;
        ?>
">
					<tr><td align="right"><b>Cliente:</b></td><td><?php 
        if (isset($info[$valor]["o"][0])) {
            echo $info[$valor]["o"][0];
        }
<?php

include "autenticazione.php";
session_start();
$errore = false;
if (isset($_POST["user"]) && isset($_POST["password"]) && $_POST["user"] != "" && $_POST["password"] != "") {
    if (verifica($_POST["user"], $_POST["password"])) {
        $_SESSION["login_user"] = $_POST["user"];
    } else {
        $errore = true;
    }
}
if (isLogged()) {
    header("location:/html_css/PHP/paginaprivata.php");
}
?>


<html>
<body>
    <?php 
if (isLogged()) {
    ?>
           Buongiorno
    <?php 
} else {
    ?>

 				<form  method="post"  style="background-color:104EFF;
                                    border:2px solid red; 
																		width:470px;height:400px; 
Example #3
0
?>
</p>
        <p><?php 
echo verifica($senha1, $senha1_hash);
?>
</p>
        <br />
        <p>A senha2 é: <?php 
echo $senha2;
?>
</p>
        <p>Codificada é: <?php 
echo $senha2_hash;
?>
</p>
        <p><?php 
echo verifica($senha2, $senha2_hash);
?>
</p>
        
        <p>Mostrando assim que se deve usar a dupla:
            <strong>password_hash</strong> juntamente com
            <strong>password_verify</strong>, pois
            a cada verificação é gerado um código
            diferente para a mesma senha.
        </p>
        
        
    </body>
</html>
Example #4
0
<?php

function verifica($data)
{
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
function aggiornaFile($nome_file, $valore)
{
    $file_dati = fopen($nome_file, "w");
    fwrite($file_dati, $valore);
    fclose($file_dati);
}
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["temperatura"])) {
    $temperatura = verifica($_POST["temperatura"]);
    aggiornaFile("temperatura.txt", $temperatura);
    echo "OK";
} else {
    echo "Mi spiace, ci hai provato!";
}
<?php

verifica($_POST['email'], $_POST['senha']);
function verifica($email, $senha)
{
    //ver o extends
    include "../dao/conexao.php";
    $link = new conexao();
    $conexao = $link->conecta();
    $sql = "SELECT id, tipo FROM pessoa WHERE email = '" . $email . "' AND senha = '" . $senha . "'";
    $query = $conexao->prepare($sql);
    $query->execute();
    $retorno = $query->fetchAll(PDO::FETCH_ASSOC);
    session_start();
    if (isset($retorno[0])) {
        $_SESSION["email"] = $email;
        $_SESSION["tipo"] = $retorno[0]['tipo'];
        header("Location: ../view/dash.php");
    } else {
        header("Location: ../view/index.php?email=" . $email);
    }
    $conexao = $link->desconecta($conexao);
}
Example #6
0
<?php

function verifica($data)
{
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
function aggiornaFile($nome_file, $valore)
{
    $file_dati = fopen($nome_file, "w");
    fwrite($file_dati, $valore);
    fclose($file_dati);
}
if ($_SERVER["REQUEST_METHOD"] == "GET" && isset($_GET["temperatura"])) {
    $temperatura = verifica($_GET["temperatura"]);
    aggiornaFile("temperatura.txt", $temperatura);
    echo "OK";
}
Example #7
0
        if (!isset($iniciar)) {
            $iniciar = 0;
        }
        foreach ($arqs["arquivos"] as $arq) {
            if ($conta >= $iniciar && $conta < $iniciar + 10) {
                //arquivos php so sao validos se estiverem em i3geo/temas
                verifica($arq, $solegenda);
            }
            $conta++;
        }
        echo "<hr><br><br><a href='testamapfile.php?map=todos&iniciar=" . ($iniciar + 10) . "' >Próximos mapas</a>";
    } else {
        if (empty($cache)) {
            $cache = "sim";
        }
        verifica($map, $solegenda, $tabela, $cache);
    }
}
echo "</div>";
?>
<div id=logajax style="display: block"></div>
<script>
	if(screen.availWidth > 900){
		document.getElementById("divGeral").style.width = "900px";
	};
	cabecalhoGeral("cabecalhoPrincipal","menus","admin/html/");
	inicia = function() {
		$i("divGeral").style.display = "block";
	};
	i3GEO.login.recarrega = true;
	i3GEO.login.verificaOperacao("admin/html/menus",i3GEO.configura.locaplic, inicia, "sessao", i3GEO.login.dialogo.abreLogin);
 <?php 
require_once "navegacao.php";
function verifica($pagina)
{
    $_pages = array("home", "servicos", "produtos", "empresa", "contato");
    if (in_array($pagina, $_pages)) {
        require_once $pagina . '.php';
    } else {
        require_once "404.php";
    }
}
if (isset($_GET['p'])) {
    $pagina = $_GET['p'];
} else {
    $pagina = "home";
}
verifica($pagina);
require_once "footer.php";
Example #9
0
<?php

verifica($_POST['matricula'], $_POST['senha']);
function verifica($matricula, $senha)
{
    //ver o extends
    include "../dao/conexao.php";
    $link = new conexao();
    $conexao = $link->conecta();
    $sql = "SELECT id, tipo FROM pessoa WHERE matricula = '" . $matricula . "' AND senha = '" . $senha . "'";
    $query = $conexao->prepare($sql);
    $query->execute();
    $retorno = $query->fetchAll(PDO::FETCH_ASSOC);
    session_start();
    if (isset($retorno[0])) {
        $_SESSION["matricula"] = $matricula;
        $_SESSION["id_pessoa"] = $retorno[0]['id'];
        $_SESSION["tipo"] = $retorno[0]['tipo'];
        header("Location: ../view/dash.php");
    } else {
        header("Location: ../view/index.php?matricula=" . $matricula);
    }
    $conexao = $link->desconecta($conexao);
}
Example #10
0
$query = execute_query($sql_genero, $id_conn);
verifica($query, $sql_genero);
$genero = fetch_array($query, $id_conn);
unset($query);
unset($sql_genero);
/*
    OBTENDO A QUANTIDADE DE REGISTROS DE ESPÉCIES CADASTRADAS.
*/
$sql_especie = "SELECT ";
$sql_especie .= "COUNT(especie_id) ";
$sql_especie .= "FROM ";
$sql_especie .= "tb_especie ";
$sql_especie .= "WHERE ";
$sql_especie .= "especie_ativo = '1' ";
$query = execute_query($sql_especie, $id_conn);
verifica($query, $sql_especie);
$especie = fetch_array($query, $id_conn);
unset($query);
unset($sql_especie);
/*
    OBTENDO A QUANTIDADE DE REGISTROS DA TABELA DA COLEÇÃO DE ESPÉCIMES.
*/
$sqlCmufla = 'SELECT COUNT(cmufla_id) from tb_cmufla WHERE cmufla_ativo = \'1\'';
$query = execute_query($sqlCmufla, $id_conn);
$cmufla = fetch_array($query, $id_conn);
unset($query);
unset($sqlCmufla);
/*
    OBTENDO A QUANTIDADE DE REGISTROS DA TABELA DE PROJETOS
*/
$sqlProjeto = 'SELECT COUNT(projeto_id) from tb_projeto WHERE projeto_ativo = \'1\'';
Example #11
0
 * O método irá verificar a aasinatura digital, o protocolo e o digest fornecido pela SEFAZ
 * através de uma consulta ao SEFAZ do estado do emissor
 */
function e($number, $msg, $file, $line, $vars)
{
    print_r(debug_backtrace());
    die;
}
set_error_handler('e');
function verifica($arquivo)
{
    echo "---INICIANDO VERIFICACAO DE [{$arquivo}]\n";
    $nfe = new ToolsNFePHP();
    $result = $nfe->verifyNFe($arquivo);
    echo "--FUNCAO EXECUTADA: [{$result}]\n";
    if (!$result) {
        echo "ERROR: [" . trim($nfe->errMsg) . "]\n";
    } else {
        echo "NFe APROVADA e VÁLIDA";
    }
    $nfe->errMsg = "";
    echo "---FIM DA VERIFICACAO DE [{$arquivo}]\n";
}
header('Content-type: text/html; charset=UTF-8');
require_once '../libs/ToolsNFePHP.class.php';
//path para o arquivo da NFe recebida de terceiros que se quer verificar a validade
verifica("xml/nao_existe.xml");
verifica("xml/assinatura_invalida.xml");
verifica("xml/digest_invalido.xml");
verifica("xml/11101284613439000180550010000004881093997017-nfe.xml");
echo "FIM\n";
    public function indexAction()
    {
        $this->_helper->layout->disableLayout();
        // desabilita o Zend_Layout
        function verifica($var)
        {
            if ($var or $var == 1) {
                return "Sim";
            } else {
                return "Não";
            }
        }
        function data($data)
        {
            if (!empty($data)) {
                $dataF = new data($data);
                return $dataF->dataBrasileira($dataF->tratarDataZend($data, "americano"));
            }
        }
        function tratatexto($valor)
        {
            $valor = str_replace('<br>', '|br|', $valor);
            $valor = str_replace('</p>', '|br|', $valor);
            $valor = strip_tags($valor);
            $valor = str_replace('|br|', '<br>', $valor);
            return $valor;
        }
        $id_projeto = $_REQUEST['idPreProjeto'];
        //$consultaDadosProjeto = GerarImprimirpdfDAO::ConsultaDadosProjeto($id_projeto);//busca dados do preprojeto na tabela PreProjeto
        $tblPreProjeto = new PreProjeto();
        $consultaDadosProjeto = $tblPreProjeto->buscaCompleta(array("idPreProjeto = ?" => $id_projeto))->current()->toArray();
        if ($consultaDadosProjeto['Mecanismo'] == "1" and ($consultaDadosProjeto['idEdital'] == NULL or $consultaDadosProjeto['idEdital'] == "0")) {
            $mecanismo = 'Incentivo Fiscal';
        } else {
            $mecanismo = 'FNC';
        }
        //xd($consultaDadosProjeto);
        $texto = '<html>
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Leitor PDF</title>
        <style>
        body {
                font:12px "Trebuchet MS", Georgia, "Times New Roman", Times, serif;
                color:#666;
                line-height:14pt;
                margin:30px;
            }
            h2{
                margin:0px;
                margin-top:50px;
                border-bottom:1px #36963f solid;
                font-size:13pt;
            }

            p{
                padding:15px;
            }
        </style>
        </head>

        <body style="paddig:20px">
        <center><h1>Proposta Cultural</h1></center>
        <br>
        <h2>Identifica&ccedil;&atilde;o </h2>
        <table>
            <tr>
                <td width="300px">
                    N. da Proposta: <br><b>' . $id_projeto . '</b>
                </td>
                <td>
                    Nome da Proposta: <br><b>' . $consultaDadosProjeto['NomeProjeto'] . '</b>
                </td>
             </tr>
           <tr>
                <td width="300px">
                    Proponente: <br><b>' . $consultaDadosProjeto['CNPJCPF'] . ' - ' . $consultaDadosProjeto['NomeAgente'] . '</b>
                </td>
                <td>
                    Mecanismo: <br>
                    <b>' . $mecanismo . '</b>

                </td>
            </tr>
        </table>
        <br /><br />
        <h2>Resumo da Proposta Cultural </h2>
        
        <p class="MsoNormal">' . $consultaDadosProjeto['ResumoDoProjeto'] . '</p>
        <br /><br />
        <h2>Abrangência geográfica da proposta cultural</h2>
    <br>
        <p>
            <table cellpadding="3" style="width:100%">
            <tr>
                <th>País</th>
                <th>UF</th>
                <th>Cidade</th>
                <th>Dt.Início de Execuçãoo</th>
                <th>Dt.Final de Execução</th>
            </tr>
                ';
        foreach (GerarImprimirpdfDAO::AbrangenciaGeografica($id_projeto) as $Abrangencia) {
            $texto .= '<tr bgcolor="#EEEEEE"><td">' . $Abrangencia->Pais . '</td>';
            $texto .= '<td>' . $Abrangencia->UF . '</td>';
            $texto .= '<td>' . $Abrangencia->Cidade . '</td>';
            $texto .= '<td>' . data($Abrangencia->DtInicioDeExecucao) . '</td>';
            $texto .= '<td>' . data($Abrangencia->DtFinalDeExecucao) . '</td></tr>';
        }
        $texto .= '
          </table>
        </p>';
        if ($mecanismo == 'Incentivo Fiscal') {
            ///DADOS APENAS PARA O INCENTIVO FISCAL
            $texto .= '<h2>Informações Complementares</h2>
        <table style="width:100%" cellpadding="13" border="0">
            <tr>
                <td>Mecanismo: ' . $mecanismo . '</td>
                <td><nobr>Data Fixa: ' . verifica($consultaDadosProjeto['stDataFixa']) . '</nobr></td>
                <td>Plano Anual: ' . verifica($consultaDadosProjeto['stPlanoAnual']) . '</td>
                <td>Ag.Bancária: ' . $consultaDadosProjeto['AgenciaBancaria'] . '</td>
                <td>Proposta Audiovisual: ' . verifica($consultaDadosProjeto['AreaAbrangencia']) . '</td>
            </tr>
        </table>
        <br>
        <table style="width:100%; margin-top:50px">
            <tr>
                <td style="padding-right:10px">
                    <h2>Período de Realização</h2>
                    <p>
                    Data Início: ' . data($consultaDadosProjeto['DtInicioDeExecucao']) . '<br />
                    Data Final: ' . data($consultaDadosProjeto['DtFinalDeExecucao']) . '
                    </p>
                </td>
                <td style="padding-left:10px">
                    <h2>Bem Tombado</h2>
                    <p>';
            if ($consultaDadosProjeto['EsferaTombamento'] > 0) {
                $texto .= 'N. do Ato: ' . $consultaDadosProjeto['NrAtoTombamento'] . '
                                 Data do Ato: ' . data($consultaDadosProjeto['DtAtoTombamento']) . '
                                 Esfera do Ato: ' . $consultaDadosProjeto['EsferaTombamento'];
            } else {
                $texto .= 'Bem não tombado';
            }
            $texto .= '</p></td>
            </tr>
        </table>
        <h2>Objetivos do Projeto</h2>
        <p>' . tratatexto($consultaDadosProjeto['Objetivos']) . '</p>
        <h2>Justificativa do Projeto</h2>
        <p>' . tratatexto($consultaDadosProjeto['Justificativa']) . '</p>
        <h2>Acessibilidade</h2>
        <p>' . tratatexto($consultaDadosProjeto['Acessibilidade']) . '</p>
        <h2>Democratização de Acesso</h2>
        <p>' . tratatexto($consultaDadosProjeto['DemocratizacaoDeAcesso']) . '</p>
        <h2>Fases do Projeto</h2>
        <p>' . tratatexto($consultaDadosProjeto['EtapaDeTrabalho']) . '</p>
        <h2>Ficha Técnica</h2>
        <p>' . tratatexto($consultaDadosProjeto['FichaTecnica']) . '</p>
        <h2>Sinopse da obra</h2>
        <p>' . tratatexto($consultaDadosProjeto['Sinopse']) . '</p>
        <h2>Impacto Ambiental</h2>
        <p>' . tratatexto($consultaDadosProjeto['ImpactoAmbiental']) . '</p>
        <h2>Especificações técnicas do produto</h2>
        <p>' . tratatexto($consultaDadosProjeto['EspecificacaoTecnica']) . '</p>
        <h2>Plano básico de Divulgação</h2>
        <p>
            <table cellpadding="3" style="width:100%">
                ';
            foreach (GerarImprimirpdfDAO::ConsultaDadosDivulgacao($id_projeto) as $DadosDivulgacao) {
                $texto .= '<tr bgcolor="#EEEEEE"><td width="80%">' . $DadosDivulgacao->Peca . '</td>';
                $texto .= '<td>' . $DadosDivulgacao->Veiculo . '</td></tr>';
            }
            $texto .= '
            </table>
        </p>
        <br><br>
      <h2>Plano de distribuição de produtos culturais</h2>
      <p>
        <table cellpadding="3" style="width:100%">
        <tr>
            <td style="font-size:8pt" valin="bottom"><b>Nome do Evento/Produto</b></td>
            <td style="font-size:8pt"><b>Qtde.Divulgação</b></td>
            <td style="font-size:8pt"><b>Qtde.Patrocinador</b></td>
            <td style="font-size:8pt"><b>Distribuíção Gratuíta</b></td>
            <td style="font-size:8pt"><b>Total Venda</b></td>
            <td style="font-size:8pt"><b>Total Venda Promocional</b></td>
            <td style="font-size:8pt"><b>Qtde Total</b></td>
            <td style="font-size:8pt"><b>Preco Uni. Promocional</b></td>
            <td style="font-size:8pt"><b>Preco Uni. Normal</b></td>
            <td style="font-size:8pt"><b>Receita Prev. Normal</b></td>
            <td style="font-size:8pt"><b>Receita Prev. Promocional</b></td>
        </tr>
        ';
            $Total = 0;
            $QtdeOutrosTotal = 0;
            $QtdeVendaNormalTotal = 0;
            $QtdeVendaPromocionalTotal = 0;
            $QtdeProduzidaTotal = 0;
            $PrecoUnitarioPromocionalTotal = 0;
            $PrecoUnitarioNormalTotal = 0;
            $ReceitaNormalTotal = 0;
            $ReceitaProTotal = 0;
            foreach (GerarImprimirpdfDAO::DistribuicaodeProduto($id_projeto) as $DadosDistribuicao) {
                $QtdeOutrosTotal = $QtdeOutrosTotal + $DadosDistribuicao->QtdeOutros;
                $QtdeVendaNormalTotal = $QtdeVendaNormalTotal + $DadosDistribuicao->QtdeVendaNormal;
                $QtdeVendaPromocionalTotal = $QtdeVendaPromocionalTotal + $DadosDistribuicao->QtdeVendaPromocional;
                $QtdeProduzidaTotal = $QtdeProduzidaTotal + $DadosDistribuicao->QtdeProduzida;
                $PrecoUnitarioPromocionalTotal = $PrecoUnitarioPromocionalTotal + $DadosDistribuicao->PrecoUnitarioPromocional;
                $PrecoUnitarioNormalTotal = $PrecoUnitarioNormalTotal + $DadosDistribuicao->PrecoUnitarioNormal;
                $ReceitaNormalTotal = $ReceitaNormalTotal + $DadosDistribuicao->ReceitaNormal;
                $ReceitaProTotal = $ReceitaProTotal + $DadosDistribuicao->ReceitaPro;
                $Total++;
                $texto .= '<tr bgcolor="#EEEEEE">';
                $texto .= '<td>' . $DadosDistribuicao->Produto . '</td>';
                $texto .= '<td>' . $DadosDistribuicao->QtdeProponente . '</td>';
                $texto .= '<td>' . $DadosDistribuicao->QtdePatrocinador . '</td>';
                $texto .= '<td>' . $DadosDistribuicao->QtdeOutros . '</td>';
                $texto .= '<td>' . $DadosDistribuicao->QtdeVendaNormal . '</td>';
                $texto .= '<td>' . $DadosDistribuicao->QtdeVendaPromocional . '</td>';
                $texto .= '<td>' . $DadosDistribuicao->QtdeProduzida . '</td>';
                $texto .= '<td>' . number_format($DadosDistribuicao->PrecoUnitarioPromocional, "2", ",", ".") . '</td>';
                $texto .= '<td>' . number_format($DadosDistribuicao->PrecoUnitarioNormal, "2", ",", ".") . '</td>';
                $texto .= '<td>' . number_format($DadosDistribuicao->ReceitaNormal, "2", ",", ".") . '</td>';
                $texto .= '<td>' . number_format($DadosDistribuicao->ReceitaPro, "2", ",", ".") . '</td>';
                $texto .= '</tr>';
            }
            $texto .= '
        <tr>
            <th colspan="3" align="left">Total Geral (' . $Total . ')</th>
            <th align="left">' . $QtdeOutrosTotal . '</th>
            <th align="left">' . $QtdeVendaNormalTotal . '</th>
            <th align="left">' . $QtdeVendaPromocionalTotal . '</th>
            <th align="left">' . $QtdeProduzidaTotal . '</th>
            <th align="left">' . number_format($PrecoUnitarioPromocionalTotal, "2", ",", ".") . '</th>
            <th align="left">' . number_format($PrecoUnitarioNormalTotal, "2", ",", ".") . '</th>
            <th align="left">' . number_format($ReceitaNormalTotal, "2", ",", ".") . '</th>
            <th align="left">' . number_format($ReceitaProTotal, "2", ",", ".") . '</th>
        </tr>
        </table>
      </p>';
            $texto .= '<h2>Planilha Orçamentária</h2>';
            $etapa = -1;
            $Produto = -1;
            $TotalProduto = 0;
            $TotalEtapa = 0;
            $TotalOrcamento = 0;
            foreach (GerarImprimirpdfDAO::Orcamento($id_projeto) as $Orcamento) {
                if (($Produto != $Orcamento->idProduto or $etapa != $Orcamento->idEtapa) and $Produto != -1) {
                    $texto .= '<tr>
                                <th colspan="9" align="left" style="font-size:9pt;">Total Produto: ' . number_format($TotalProduto, 2, ',', '.') . '</th>
                           </tr>';
                    $TotalEtapa = $TotalEtapa + $TotalProduto;
                    $TotalProduto = 0;
                }
                if ($etapa != $Orcamento->idEtapa and $etapa != -1) {
                    $texto .= '<tr>
                                <th colspan="9" align="left" style="font-size:11pt;">Total Etapa: ' . number_format($TotalEtapa, 2, ',', '.') . '</th>
                           </tr>
                           ';
                    //</table>
                    $TotalOrcamento = $TotalOrcamento + $TotalEtapa;
                    $TotalEtapa = 0;
                }
                if ($etapa != $Orcamento->idEtapa or $Produto != $Orcamento->idProduto) {
                    $texto .= '
                <table border=0 cellpading="5" width="100%" style="font-size:6pt; margin-top:20px">
                <tr>
                    <th colspan="11" align="left" style="font-size:12pt;">Etapa: ' . $Orcamento->Etapa . '</th>
                </tr>
                <tr>
                   <th colspan="11" align="left" style="font-size:12pt;">Produto: ' . $Orcamento->ProdutoF . ' </th>
                </tr>
                <tr>
                    <td bgcolor="#EEEEEE" align="center"><b>Item</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Unid.</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Quant.</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Ocorr</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Valor Unid.</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Total</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Dias</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Fonte de Recurso</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>UF</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Município</b></td>
                    <td bgcolor="#EEEEEE" align="center"><b>Justificativa</b></td>
                </tr>';
                }
                $TotalProduto = $TotalProduto + $Orcamento->Quantidade * $Orcamento->Ocorrencia * $Orcamento->ValorUnitario;
                $etapa = $Orcamento->idEtapa;
                $Produto = $Orcamento->idProduto;
                $texto .= '<tr>';
                $texto .= '<td>' . $Orcamento->Item . '</td>';
                $texto .= '<td>' . $Orcamento->UnidadeF . '</td>';
                $texto .= '<td>' . (int) $Orcamento->Quantidade . '</td>';
                $texto .= '<td>' . (int) $Orcamento->Ocorrencia . '</td>';
                $texto .= '<td>' . number_format($Orcamento->ValorUnitario, 2, ',', '.') . '</td>';
                $texto .= '<td>' . number_format($Orcamento->Quantidade * $Orcamento->Ocorrencia * $Orcamento->ValorUnitario, 2, ',', '.') . '</td>';
                $texto .= '<td>' . $Orcamento->QtdeDias . '</td>';
                $texto .= '<td>' . $Orcamento->FonteRecursoF . '</td>';
                $texto .= '<td>' . $Orcamento->UfDespesaF . '</td>';
                $texto .= '<td>' . $Orcamento->MunicipioDespesaF . '</td>';
                $texto .= '<td>' . $Orcamento->dsJustificativa . '</td>';
                $texto .= '</tr>
                           <tr>
                                <td bgcolor="#EEEEEE"  colspan="11" style="height:1px"></td>
                           </tr>
                ';
            }
            $TotalOrcamento = $TotalOrcamento + $TotalProduto;
            $texto .= '
                
                       <table border=0 cellpading="5" width="100%" style="font-size:6pt;">
                           <tr>
                                <th colspan="9" align="left" style="font-size:9pt;">Total Produto: ' . number_format($TotalProduto, 2, ',', '.') . '</th>
                           </tr>
                           <tr>
                                <th colspan="9" align="left" style="font-size:11pt;">Total Etapa: ' . number_format($TotalEtapa + $TotalProduto, 2, ',', '.') . '</th>
                           </tr>
                           <tr>
                                <th colspan="9" align="left" bgcolor="#EEEEEE" style="font-size:11pt; padding-top:10px;">Orçamento Total: ' . number_format($TotalOrcamento, 2, ',', '.') . '</th>
                           </tr>
                        </table>';
            //FIM DOS DADOS POR ENCENTIVO FISCAL
        }
        //Fim do IF para, este if exibe o conteudo apenas quando a proposta é por encentivo fiscal
        $texto .= '</div>
        </body>
        </html>';
        //xd("para");
        $pdf = new PDF($texto, 'pdf');
        $pdf->gerarRelatorio();
    }