Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $filtroevento=$_POST=['ffiltroeventos'];
- if (!empty($filtroevento))
- {
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>im3ma</title>
- <link rel="stylesheet" type="text/css" href="estilo2.css">
- <link rel="icon" type="image/png" href="Imagens/ID.png">
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
- </head>
- <body background="Imagens/Jesus.jpg">
- <div class="BlocoPrincipal">
- </div>
- <div class="RetânguloBotões">
- <button class="BotãoHome"><a style="text-decoration: none;color: black;" href="eventos.html">Eventos</a></button>
- <button class="BotãoCadastro"><a style="text-decoration: none;color: black;" href="pessoas.html">Pessoas</a></button>
- <button class="BotãoInscrições"><a style="text-decoration: none;color: black;" href="inscrições.html">Inscrições</a></button>
- <button class="BotãoConsulta"><a style="text-decoration: none;color: black;" href="consulta.html">Consulta</a></button>
- </div>
- <form>
- <div class="BlocoCadastro">
- <h1 style="text-align: center;font-family: arial black;font-size: 27px;"></h1>
- <hr></hr> <br> <br>
- <div style="width: 1200px; height: 200px;overflow: auto;">
- <table border="2" style="background-color: red;margin:0 auto;">
- <tr>
- <th>RG</th>
- <th>Nome</th>
- <th>Descendência</th>
- <th>Pastores</th>
- <th>Contato</th>
- <th>Sexo</th>
- <th>Tipo de Inscrição</th>
- <th>Valor em Azul</th>
- <th>Valor em Vermelho</th>
- <th>Editar</th>
- <th>Excluir</th>
- </tr>
- <?php
- include_once("conexao.php");
- $sql="SELECT cad_pessoas.rg,cad_pessoas.nome,cad_pessoas.descendencia,cad_pessoas.pastores,cad_pessoas.telefone, cad_pessoas.sexo,inscricoes_pessoas.tipo_inscricao,inscricoes_pessoas.valor,eventos.valor_total,eventos.valor_avulso
- FROM cad_pessoas INNER JOIN inscricoes_pessoas ON cad_pessoas.rg = inscricoes_pessoas.rg
- INNER JOIN eventos ON inscricoes_pessoas.cod_evento = eventos.cod_evento
- WHERE eventos.cod_evento =$filtroevento";
- $resultado= mysqli_query($conn,$sql) or die ("Erro ao retornar dados!");
- while ($linha = mysqli_fetch_array($resultado))
- {
- ?>
- <tr>
- <td style="background-color: white;"><?php echo $linha['rg'];?></td>
- <td style="background-color: white;"><?php echo $linha['nome'];?></td>
- <td style="background-color: white;"><?php echo $linha['descendencia'];?></td>
- <td style="background-color: white;"><?php echo $linha['pastores'];?></td>
- <td style="background-color: white;"><?php echo $linha['telefone'];?></td>
- <td style="background-color: white;"><?php echo $linha['sexo'];?></td>
- <td style="background-color: white;"><?php echo $linha['tipo_inscricao'] ;?></td>
- <td style="background-color: blue;">
- <?php
- if ($linha['tipo_inscricao']="Avulso")
- {
- echo $linha['valor_avulso'] - $linha['valor'];
- }
- else
- {
- echo $linha['valor_total'] - $linha['valor'];
- }
- ;?>
- </td>
- <td style="background-color: red;">
- <?php
- if ($linha['tipo_inscricao']="Avulso"){
- echo $linha['valor_avulso'] - $linha['valor'];
- }
- else
- {
- echo $linha['valor_total'] - $linha['valor'];
- }
- ;?>
- </td>
- <td style="background-color: white;"><a href="" title="Alterar dados da pessoa"><i class="fas fa-edit"></i></a></td>
- <td style="background-color: white;"><a href="" title="Excluir pessoa"><i class="fas fa-trash-alt"></i></a></td>
- </tr>
- <?php }
- mysqli_close($conn);
- ?>
- </table>
- </div>
- </div>
- </form>
- </body>
- </html>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement