Viewing file: RelInscricaoXLS.php (4.42 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//include "../app/config/load.php";
$count = 0;
$eventoCtrl = new EventoCtrl();
$inscricoes = $eventoCtrl->getinscricoes($_POST['eventoId'],
$data->convertDateBRtoDateSQL($_POST['cadastroIni']),
$data->convertDateBRtoDateSQL($_POST['cadastroEnd']),
$data->convertDateBRtoDateSQL($_POST['vencimentoIni']),
$data->convertDateBRtoDateSQL($_POST['vencimentoEnd']),
$data->convertDateBRtoDateSQL($_POST['pagamentoIni']),
$data->convertDateBRtoDateSQL($_POST['pagamentoEnd']),
$_POST['status'], $_POST['vencidas']);
if(!empty($_POST['eventoId'])){
}
// Montagem da tabela de cabeçalho
print "<table border='1' cellspacing='1' cellpadding='1'><tr>";
if(!empty($eventoId)){
$evento = $eventoCtrl->getObject($_POST['eventoId']);
print "<td colspan='15' align='center'><strong>Inscrições: ".$evento['titulo']."</strong></td>";
}
print "</tr><tr><td colspan='15'></td></tr></table>";
// Início da tabela e abertura da linha de cabeçalho da lista de alunos
print "<table border='1' cellspacing='0' cellpadding='0'><tr>
<td></td>
<td><strong>Nome</strong></td>
<td><strong>Cartório</strong></td>
<td><strong>Endereço</strong></td>
<td><strong>Cidade</strong></td>
<td><strong>UF</strong></td>
<td><strong>Cep</strong></td>
<td><strong>Telefone</strong></td>
<td><strong>Fax</strong></td>
<td><strong>Celular</strong></td>
<td><strong>Email</strong></td>
<td><strong>Data de Cadastro</strong></td>
<td><strong>Vencimento</strong></td>
<td><strong>Cód. Cobrança</strong></td>
<td><strong>Status da Cobrança</strong></td>
</tr>";
$nroInscricoesEmAberto = 0;
$nroInscricoesQuitadas = 0;
$nroInscricoesCanceladas = 0;
foreach($inscricoes as $inscricao){
$count++;
if($_POST['status'] != "I"){
if($inscricao['cobranca']['status'] == "A"){
$status = "Aberto";
$nroInscricoesEmAberto++;
}
if($inscricao['cobranca']['status'] == "P"){
$status = "Quitada em ".$data->convertDateSQLtoDateBR($inscricao['cobranca']['dataPagamento']);
$nroInscricoesQuitadas++;
}
if($inscricao['cobranca']['status'] == "C"){
$status = "Cancelada";
$nroInscricoesCanceladas++;
}
}else{
$status = "Isento";
}
print "<tr>
<td>".$count."</td>
<td>".$inscricao['nome']."</td>
<td>".$inscricao['cartorio']."</td>
<td>".$inscricao['endereco']."</td>
<td>".$inscricao['cidade']."</td>
<td>".$inscricao['uf']."</td>
<td>".$inscricao['cep']."</td>
<td>".$inscricao['telefone']."</td>
<td>".$inscricao['fax']."</td>
<td>".$inscricao['celular']."</td>
<td>".$inscricao['email']."</td>
<td>".$data->convertDateSQLtoDateBR($inscricao['cobranca']['dataGeracao'])."</td>
<td>".$data->convertDateSQLtoDateBR($inscricao['cobranca']['dataVencimento'])."</td>
<td>"." ".$inscricao['cobranca']['codigo']."</td>
<td>".$status."</td>
</tr>";
}
print "</table>";
// Fecha a tabela
if(empty($_POST['status'])){
print "<table border='1' cellspacing='1' cellpadding='1'>
<tr>
<td colspan='15'><strong>Inscrições em Aberto: ".$nroInscricoesEmAberto."</strong></td>
</tr>
<tr>
<td colspan='15'><strong>Inscrições Confirmadas: ".$nroInscricoesQuitadas."</strong></td>
</tr>
<tr>
<td colspan='15'><strong>Inscrições Canceladas: ".$nroInscricoesCanceladas."</strong></td>
</tr>
</table>";
}
?>
|