pagina inicial.html


SUBMITTED BY: Lucas312

DATE: Dec. 13, 2016, 12:46 a.m.

FORMAT: HTML

SIZE: 1.8 kB

HITS: 376

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LHSS DIGITAL - Cadastro</title>
  6. </head>
  7. <body>
  8. <h1>LHSS DIGITAL - Cadastro</h1>
  9. <p><a href="form-add.php">Adicionar Usuário</a></p>
  10. <h2>Lista de Usuários</h2>
  11. <p>Total de usuários: <?php echo $total ?></p>
  12. <?php if ($total > 0): ?>
  13. <table width="50%" border="1">
  14. <thead>
  15. <tr>
  16. <th>Nome</th>
  17. <th>Email</th>
  18. <th>Gênero</th>
  19. <th>Data de Nascimento</th>
  20. <th>Idade</th>
  21. <th>Ações</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. <?php while ($user = $stmt->fetch(PDO::FETCH_ASSOC)): ?>
  26. <tr>
  27. <td><?php echo $user['name'] ?></td>
  28. <td><?php echo $user['email'] ?></td>
  29. <td><?php echo ($user['gender'] == 'm') ? 'Masculino' : 'Feminino' ?></td>
  30. <td><?php echo dateConvert($user['birthdate']) ?></td>
  31. <td><?php echo calculateAge($user['birthdate']) ?> anos</td>
  32. <td>
  33. <a href="form-edit.php?id=<?php echo $user['id'] ?>">Editar</a>
  34. <a href="delete.php?id=<?php echo $user['id'] ?>" onclick="return confirm('Tem certeza de que deseja remover?');">Remover</a>
  35. </td>
  36. </tr>
  37. <?php endwhile; ?>
  38. </tbody>
  39. </table>
  40. <?php else: ?>
  41. <p>Nenhum usuário registrado</p>
  42. <?php endif; ?>
  43. </body>
  44. </html>

comments powered by Disqus