SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include("cabecalho.php");
  3. include("conecta.php");
  4. include("funcoes.php");
  5. ?>
  6.  
  7. <?php
  8.     if(array_key_exists("removido", $_GET) && $_GET["removido"]=="true"){
  9. ?>
  10. <div class="alert alert-info">
  11.     <strong>Informação!</strong> Cliente removido.
  12. </div>
  13. <?php } ?>
  14.  
  15. <script>
  16.   function exibir(listaCli) {
  17.     $("#conteudo_1").text(listaCli.CodCliente);
  18.     $("#conteudo_2").text(listaCli.nomeCliete);
  19.     $("#myModal").modal('show');
  20.   }
  21. </script>
  22.  
  23. <div class="table-responsive-sm">
  24.     <h1>Lista de Clientes</h1>
  25.     <table class="table table-striped">
  26.         <thead>
  27.             <tr>
  28.                 <th>Cliente</th>
  29.                 <th>Cod Artia</th>
  30.                 <th>Data</th>
  31.                 <th>Alteração</th>
  32.                 <th>Excluir</th>
  33.                 <th>Mostrar</th>
  34.             </tr>
  35.         </thead>
  36.         <?php
  37.         $listaArr = listaClientes($conexao);
  38.         foreach($listaArr as $listaCli){ ?>
  39.         <tr>
  40.             <td><?=$listaCli['nomeCliente']?></td>
  41.             <td><?=$listaCli['CodCliente']?></td>
  42.             <td><?=date('d/m/Y', strtotime($listaCli['data']));?></td>
  43.             <td>
  44.                 <form action="alterar-cliente.php" method="POST">
  45.                     <input type="hidden" name="id" value="<?=$listaCli['id'];?>">
  46.                     <button class="btn btn"><i class='fas fa-pencil-alt'></i></button>
  47.                 </form>
  48.             </td>
  49.             <td>
  50.                 <form action="remover-cliente.php" method="POST">
  51.                     <input type="hidden" name="id" value="<?=$listaCli['id'];?>">
  52.                     <button class="btn btn-danger">X</button>
  53.                 </form>
  54.             <td>
  55.                 <button class="btn btn-info" onclick="exibir('<?=json_encode($listaCli)?>')">Mostrar</button>
  56.             </td>
  57.         </tr>
  58.         <?php } ?>
  59.     </table>
  60. </div>
  61.  
  62. <div class="container">
  63.     <div class="modal fade" id="myModal" role="dialog">
  64.         <div class="modal-dialog">
  65.             <!-- Modal content-->
  66.             <div class="modal-content">
  67.                 <div class="modal-header">
  68.                     <h4 class="modal-title">SCRIPT ATENDIMENTO SQ</h4>
  69.                 </div>
  70.                 <div class="modal-body">
  71.                     <div>
  72.                         Código: <span id="conteudo_1"></span>
  73.                         <br>
  74.                         Nome: <span id="conteudo_2"></span>
  75.                        
  76.                     </div>
  77.                 </div>
  78.                 <div class="modal-footer">
  79.                     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  80.                 </div>
  81.             </div>
  82.         </div>
  83.     </div>
  84. </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top