No Description

members.php 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. body {
  6. margin:0px;
  7. }
  8. table, th, td {
  9. border: 1px solid black;
  10. border-collapse: collapse;
  11. }
  12. th, td {
  13. padding: 5px;
  14. }
  15. th {
  16. text-align: left;
  17. }
  18. .container {
  19. height:100%;
  20. width:100%;
  21. position: fixed;
  22. z-index: -1
  23. }
  24. .members {
  25. margin-top: 8px;
  26. margin-left: 1em;
  27. margin-right: 1em;
  28. }
  29. /* Add a black background color to the top navigation */
  30. .topnav {
  31. background-color: #ED7D31;
  32. overflow: hidden;
  33. box-shadow: 0 4px 2px 0px gray;
  34. }
  35. /* Style the links inside the navigation bar */
  36. .topnav a {
  37. float: left;
  38. color: black;
  39. text-align: center;
  40. padding: 14px 16px;
  41. text-decoration: none;
  42. font-size: 23px;
  43. }
  44. .topnav a:hover {
  45. background-color: #BA6127;
  46. }
  47. .logo {
  48. padding: 0px 0px ! important;
  49. }
  50. .logo img {
  51. float: left;
  52. height: 54px;
  53. }
  54. </style>
  55. </head>
  56. <body>
  57. <div class="topnav">
  58. <a class="logo" href="/members.php"><img src="logo.png"></a>
  59. <a href="/members.php">Tabla de Miembros</a>
  60. </div>
  61. <div class="container">
  62. <div class="members">
  63. <?php
  64. if ($_SERVER["REQUEST_METHOD"] == "GET") {
  65. include 'db.php';
  66. # Select username row
  67. $sql = "SELECT username, nombre, organizacion, puesto, urbanizacion, calle, pueblo, cpostal, telefono, correo, membresia, vigencia FROM login NATURAL JOIN miembros;";
  68. if($result = $conn->query($sql)){
  69. // username nombre organizacion puesto urbanizacion calle pueblo cpostal telefono correo membresia vigencia
  70. echo "<table style=\"width:100%\"><tr><th>Username</th><th>Nombre</th><th>Organizacion</th><th>Puesto</th><th>Urbanizacion</th>
  71. <th>Calle</th><th>Pueblo</th><th>Codigo Posta</th><th>Telefono</th><th>Correo</th><th>Membresia</th><th>Vigencia</th></tr>";
  72. while($row = $result->fetch_assoc()){
  73. echo "<tr><td>".$row["username"]."</td><td>".$row["nombre"]."</td><td>".$row["organizacion"]."</td><td>".$row["puesto"]."</td><td>".
  74. $row["urbanizacion"]."</td><td>".$row["calle"]."</td><td>".$row["pueblo"]."</td><td>".$row["cpostal"]."</td><td>".$row["telefono"]."</td><td>"
  75. .$row["correo"]."</td><td>".$row["membresia"]."</td><td>".$row["vigencia"]."</tr>";
  76. }
  77. echo "</table>";
  78. } else {
  79. echo "Could not get rows";
  80. }
  81. # Closes databde
  82. $conn->close();
  83. } else {
  84. header('Content-type: application/json');
  85. header($_SERVER["SERVER_PROTOCOL"]." 405 Method Not Allowed", true, 405);
  86. exit();
  87. }
  88. ?>
  89. </div>
  90. </div>
  91. </body>
  92. </html>