Viewing file: gera_cobranca.php (1.05 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include "load_ipanel.php";
$util = new Util();
$data = new Data();
$id = $_GET['id'];
$cobrancaCtrl = new GenericCtrl('Cobranca');
if($_GET['id']){
$cobranca = $cobrancaCtrl->getObject($id);
}
if($_GET['insId']){
$cobranca = $cobrancaCtrl->getObjectByField("insId", $_GET['insId'], false, 1, false, "id DESC");
$cobranca = $cobranca[0];
$id = $cobranca['id'];
}
ini_set('display_errors',1);
ini_set('display_startup_erros',1);
error_reporting(E_ALL);
if ($cobranca['status'] != 'Q') {
if ($cobranca['url'] != '') {
echo "<script>location.href='".$cobranca['url']."';</script>";
} else { ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<body>
<h1>INSCRIÇÃO FOI GERADA ERRADA!</h1>
</body>
</html>
<? }
} else { ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<body>
<h1>ESTE BOLETO JÁ FOI PAGO!</h1>
</body>
</html>
<?php } ?>
|