Advertisement
Guest User

Rafa-Paste

a guest
Jun 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.00 KB | None | 0 0
  1. <?php
  2.  
  3. $filtroevento=$_POST=['ffiltroeventos'];
  4.  
  5. if (!empty($filtroevento))
  6.   {
  7.  
  8. ?>
  9.  
  10. <!DOCTYPE html>
  11.   <html>
  12.     <head>
  13.       <meta charset="utf-8">
  14.       <title>im3ma</title>
  15.       <link rel="stylesheet" type="text/css" href="estilo2.css">
  16.       <link rel="icon" type="image/png" href="Imagens/ID.png">
  17.       <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
  18.     </head>
  19.  
  20.  
  21.     <body background="Imagens/Jesus.jpg">
  22.  
  23.             <div class="BlocoPrincipal">
  24.  
  25.             </div>
  26.  
  27.  
  28.         <div class="RetânguloBotões">
  29.    
  30.           <button class="BotãoHome"><a style="text-decoration: none;color: black;" href="eventos.html">Eventos</a></button>
  31.    
  32.           <button class="BotãoCadastro"><a style="text-decoration: none;color: black;" href="pessoas.html">Pessoas</a></button>
  33.  
  34.           <button class="BotãoInscrições"><a style="text-decoration: none;color: black;" href="inscrições.html">Inscrições</a></button>
  35.  
  36.           <button class="BotãoConsulta"><a style="text-decoration: none;color: black;" href="consulta.html">Consulta</a></button>
  37.  
  38.         </div>
  39.  
  40.        <form>
  41.           <div class="BlocoCadastro">
  42.             <h1 style="text-align: center;font-family: arial black;font-size: 27px;"></h1>
  43.             <hr></hr> <br> <br>
  44.             <div style="width: 1200px; height: 200px;overflow: auto;">
  45.             <table border="2" style="background-color: red;margin:0 auto;">
  46.               <tr>
  47.                 <th>RG</th>
  48.                 <th>Nome</th>
  49.                 <th>Descendência</th>
  50.                 <th>Pastores</th>
  51.                 <th>Contato</th>
  52.                 <th>Sexo</th>
  53.                 <th>Tipo de Inscrição</th>
  54.                 <th>Valor em Azul</th>
  55.                 <th>Valor em Vermelho</th>
  56.                 <th>Editar</th>
  57.                 <th>Excluir</th>
  58.               </tr>
  59.               <?php
  60.                 include_once("conexao.php");
  61.                 $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
  62.                  FROM cad_pessoas INNER JOIN inscricoes_pessoas ON cad_pessoas.rg = inscricoes_pessoas.rg
  63.                  INNER JOIN eventos ON inscricoes_pessoas.cod_evento = eventos.cod_evento
  64.                  WHERE eventos.cod_evento =$filtroevento";
  65.                 $resultado= mysqli_query($conn,$sql) or die ("Erro ao retornar dados!");
  66.  
  67.                 while ($linha = mysqli_fetch_array($resultado))
  68.                   {
  69.                     ?>
  70.                     <tr>
  71.                       <td style="background-color: white;"><?php echo $linha['rg'];?></td>
  72.                       <td style="background-color: white;"><?php echo $linha['nome'];?></td>
  73.                       <td style="background-color: white;"><?php echo $linha['descendencia'];?></td>
  74.                       <td style="background-color: white;"><?php echo $linha['pastores'];?></td>
  75.                       <td style="background-color: white;"><?php echo $linha['telefone'];?></td>
  76.                       <td style="background-color: white;"><?php echo $linha['sexo'];?></td>
  77.                       <td style="background-color: white;"><?php echo $linha['tipo_inscricao'] ;?></td>
  78.                       <td style="background-color: blue;">
  79.                         <?php
  80.                         if ($linha['tipo_inscricao']="Avulso")
  81.                         {
  82.                         echo $linha['valor_avulso'] - $linha['valor'];
  83.                         }
  84.                         else
  85.                         {
  86.                           echo $linha['valor_total'] - $linha['valor'];
  87.                         }
  88.                         ;?>
  89.                          
  90.                         </td>
  91.  
  92.                       <td style="background-color: red;">
  93.                         <?php
  94.                         if ($linha['tipo_inscricao']="Avulso"){
  95.                         echo $linha['valor_avulso'] - $linha['valor'];
  96.                         }
  97.                         else
  98.                         {
  99.                           echo $linha['valor_total'] - $linha['valor'];
  100.                         }
  101.                         ;?>
  102.                          
  103.                         </td>
  104.                       <td style="background-color: white;"><a href="" title="Alterar dados da pessoa"><i class="fas fa-edit"></i></a></td>
  105.                       <td style="background-color: white;"><a href="" title="Excluir pessoa"><i class="fas fa-trash-alt"></i></a></td>
  106.                     </tr>
  107.                 <?php }
  108.  
  109.                   mysqli_close($conn);
  110.                 ?>
  111.              
  112.             </table>
  113.             </div>
  114.           </div>
  115.       </form>
  116.     </body>
  117.   </html>
  118.  
  119.   <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement