Viewing file: boleto_confirm_manual_pagto_conarci.php (13.19 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php ############################################################################# # Nome: contato.php # # System: Irpen # # Criado por: Breno Henrique Vivarelli # # Empresa: Netnigro # # E-mail: breno@netnigro.com.br # # Descrição: Contatos dos associados com o IRPEN # # Histórico: # # . 08/07/2008 - Breno Henrique Vivarelli # # Criação da Página # ############################################################################# // Includes include("../../config/config.php"); include(INCLUDES . "conexaoBD.php"); include(INCLUDES . "sentencas_sql.php"); include(INCLUDES . "funcoes_uteis.php"); include(INCLUDES . "valida_usuario.inc.php"); require_once("boletos_class.php"); $nome = $_SESSION["nome_usuario"]; $email = $_SESSION["email_usuario"]; if ($_POST) { $num_boleto = $_POST['txtNumBoleto']; $data_pagto = $_POST['txtDataPagto']; $valor_pagto = $_POST['txtValorPagto']; $justificativa = $_POST['txtJustificativa'];
$boletos = new Boletos(); if ($boletos->setaPagamento($num_boleto, $data_pagto, $valor_pagto, $justificativa)) $msg = "Pagamento realizado com sucesso!"; else $msg = "Falha ao confirmar o pagamento!"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="Description" content="IRPEN" /> <meta name="Keywords" content="" /> <meta name="resource-type" content="document" /> <meta name="classification" content="Internet" /> <meta name="robots" content="all" /> <meta name="rating" content="General" /> <meta name="Author" content="Ninart! Solucoes para Web." /> <meta name="language" content="pt-br" /> <link rel="shortcut icon" href="imagens/favicon.gif"type="image/gif" /> <link rel="stylesheet" href="<?= HOST;?>css/irpen.css" type="text/css" /> <link rel="stylesheet" media="all" type="text/css" href="<?= HOST;?>css/menu_dropline.css" /> <!--[if IE]> <link rel="stylesheet" media="all" type="text/css" href="css/menu_dropline_ie.css" /> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" media="all" type="text/css" href="css/menu_dropline_ie6.css" /> <![endif]--> <title>IRPEN | Instituto de Registro Civil de Pessoas Naturais do Paraná - 2008</title> <link rel="stylesheet" media="all" type="text/css" href="<?= HOST;?>includes/jquery.datepick/jquery.datepick.css" /> <script type="text/javascript" src="<?= HOST;?>includes/jquery-1.2.6.js"></script> <script type="text/javascript" src="<?= HOST;?>includes/jquery.form.js"></script> <script type="text/javascript" src="<?= HOST;?>includes/jquery.maskMoney.0.2.js"></script> <script type="text/javascript" src="<?= HOST;?>includes/jquery.maskedinput-1.2.2.js"></script> <script type="text/javascript" src="<?= HOST;?>includes/jquery.datepick/jquery.datepick.js"></script> <script type="text/javascript" src="<?= HOST;?>includes/jquery.datepick/jquery.datepick-pt-BR.js"></script> <script type="text/javascript" src="<?= HOST;?>includes/email.js"></script> <script type="text/javascript" src="contato.js"></script> <script type="text/javascript" language="javascript"> function get_valor(conteudo,tag) { var abre_tag = "<"+tag+">"; var fecha_tag = "</"+tag+">"; var inicio = conteudo.indexOf(abre_tag); var fim = conteudo.indexOf(fecha_tag); var tam_tag = tag.length; return conteudo.substr(inicio + tam_tag + 2,fim - inicio - tam_tag - 2); } var ultimo_boleto_verificar = 0; var fazer_submit = 0; var boleto_ok = 0; function verifica_boleto(){ var num_boleto = $('#txtNumBoleto').val(); if (num_boleto != ultimo_boleto_verificar) { $('#tr_dados_boleto').fadeOut('fast'); $.ajax({ type: "POST", url: "boleto_dados_ajax.php", data: "num_boleto=" + num_boleto, success: function(retorno){ if (parseInt(retorno) != 0) { $('#td_oficio').text(get_valor(retorno,'OFI_Descricao')); $('#td_mes_ano_referencia').text(get_valor(retorno,'SRM_MesReferencia') + '/' + get_valor(retorno,'SRM_AnoReferencia')); $('#td_valor').text(get_valor(retorno,'SRM_Valor')); $('#td_cidade_estado').text(get_valor(retorno,'CID_Descricao') + '/' + get_valor(retorno,'OFI_Estado')); if (get_valor(retorno,'SVB_PagoSN')=='S') { $('#td_situacao').text('Pago (' + get_valor(retorno,'SVB_DataPagamento') + ')'); $('#tr_dados_boleto').fadeIn('fast'); boleto_ok = 0; alert('Este boleto já está pago!'); } else { $('#td_situacao').text('Pendente'); $('#tr_dados_boleto').fadeIn('fast'); boleto_ok = 1; } } else { alert("Boleto não encontrado!"); boleto_ok = 0; } } }); ultimo_boleto_verificar = num_boleto; } } $(document).ready(function(){ <?php if ($msg != "") { ?> alert("<?= $msg;?>"); <?php } ?> $('#txtDataPagto').datepick().mask("99/99/9999"); $('#txtValorPagto').maskMoney({symbol:"R$",decimal:",",thousands:"."}); $('#btn_verificar').click(function() { verifica_boleto(); }); $('#txtNumBoleto').blur(function(){ verifica_boleto(); }); $("#formpagto").submit(function(){ if (document.getElementById('txtNumBoleto').value=="") { alert('Favor preencher o número do boleto!'); return false; } if (boleto_ok == 0) { alert('Número do boleto não encontrado ou já esta pago!'); return false; }
if (document.getElementById('txtDataPagto').value=="") { alert('Favor preencher a data de pagamento!'); return false; }
if (document.getElementById('txtValorPagto').value=="") { alert('Favor preencher o valor de pagamento!'); return false; } if (document.getElementById('txtJustificativa').value=="") { alert('Favor preencher a justificativa!'); return false; } var num_boleto = $('#txtNumBoleto').val(); if (num_boleto != ultimo_boleto_verificar) { fazer_submit = 1; verifica_boleto(); return false; } if (confirm("Confirmar o pagamento deste boleto?")) return true; else return false; }); }); </script> <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } --> </style> </head> <body> <div id="wrap"> <?php include "../topo_gestao.php";?>
<!-- content-wrap starts --> <div id="content-wrap"> <table width="100%" border="0"> <tr><!-- <td align="left" valign="top" width="20%"> <?php //Menu do site //include(DIR_ADMIN . "menu_gestao.php"); ?> </td> <td align="left" valign="top" bgcolor="#cccccc"> </td>--> <td align="left" valign="top" bgcolor="#FFFFFF" width="1%"> </td> <td align="left" valign="top"> <table width="100%" border="0" > <tr> <td align="left" valign="top"> <h2>Confirmar pagamento manual</h2> <div id="linha_h2" ></div> <form action="" method="post" id="formpagto"> <table width="98%" border="0" align="center"> <tr> <td width="35%" align="left" valign="top" colspan="2"> </td> </tr> <tr> <td height="20" align="right">Número do boleto:</td> <td width="65%" height="20" align="left"><input name="txtNumBoleto" type="text" id="txtNumBoleto" size="13" /> <input type="button" value="Verificar" id="btn_verificar" /></td> </tr> <tr id="tr_dados_boleto" style="display:none;"> <td colspan="2" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" align="center">Dados do boleto </td> </tr> <tr> <td width="35%" align="right">Ofício:</td> <td width="65%" align="left" id='td_oficio'> </td> </tr> <tr> <td align="right">Mes/Ano de referência: </td> <td align="left" id="td_mes_ano_referencia"> </td> </tr> <tr> <td align="right">Valor:</td> <td align="left" id="td_valor"> </td> </tr> <tr> <td align="right">Cidade/Estado:</td> <td align="left" id="td_cidade_estado"> </td> </tr> <tr> <td align="right">Situação:</td> <td align="left" id="td_situacao"> </td> </tr> </table></td> </tr> <tr> <td align="right">Data de pagamento:</td> <td align="left"><input name="txtDataPagto" type="text" id="txtDataPagto" size="13" maxlength="10" /></td> </tr> <tr> <td align="right">Valor pago:</td> <td align="left"><input name="txtValorPagto" type="text" id="txtValorPagto" size="13" maxlength="10" style="text-align:right;" /></td> </tr> <tr> <td align="right">Justificativa:</td> <td align="left"><textarea name="txtJustificativa" cols="40" rows="4" id="txtJustificativa"></textarea></td> </tr> <tr> <td height="20" colspan="2" align="center"><input name="btnConfirmar" type="submit" id="btnConfirmar" value="Confirmar" /></td> </tr> </table> </form> </td> </tr> </table> <br /> </td> </tr> </table> </div> <div align="center"> <strong><br /> Rua Mal. Deodoro, 51 - Galeria Ritz - 18º Andar | Fone: (41) 3232-9811 | CEP 80.020-905 - Curitiba - Paraná</strong> <!-- content-wrap ends--> </div> <!-- footer starts --> <div id="footer-wrap"> </div> <div id="rodape"> </div> </div> </body> </html>
|