Gestionale per il centralino della brigata di zona 4
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

94 lines
2.8 KiB

  1. <%@page import="util.Data"%>
  2. <%@page import="service.ContattoService"%>
  3. <%@page import="service.OrdiniService"%>
  4. <%@page import="bean.Contatto"%>
  5. <%@page import="java.util.ArrayList"%>
  6. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  7. pageEncoding="UTF-8"%>
  8. <!DOCTYPE html>
  9. <html>
  10. <head>
  11. <meta charset="UTF-8">
  12. <title>Elenco contatti</title>
  13. <link rel="stylesheet"
  14. href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
  15. integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
  16. crossorigin="anonymous">
  17. <link rel="stylesheet" href="css/stile.css">
  18. </head>
  19. <body>
  20. <jsp:include page="nav.jsp"></jsp:include>
  21. <div style="margin: 25px">
  22. <h4>Elenco contatti</h4>
  23. <%
  24. ArrayList<Contatto> elencoContatti = ContattoService.elenco();
  25. if (elencoContatti.isEmpty()) {
  26. %>
  27. <h4>Non ci sono contatti</h4>
  28. <%
  29. } else {
  30. %>
  31. <table class="table table-dark" style="background-color: #3a3a3a">
  32. <thead>
  33. <tr>
  34. <th>#</th>
  35. <th>Nominativo
  36. <th>Indirizzo</th>
  37. <th>Zona</th>
  38. <th>Telefono</th>
  39. <th>Email</th>
  40. <th>Componenti</th>
  41. <th>Composizione nucleo</th>
  42. <th>Note sacchetto</th>
  43. <th>Ultima consegna</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <%
  48. for (int i = 0; i < elencoContatti.size(); i++) {
  49. Contatto contatto = elencoContatti.get(i);
  50. %>
  51. <tr>
  52. <td><a href="home-contatto.jsp?id=<%=contatto.getTelefono()%>"
  53. style="color: white; font-weight: bold"><%=i + 1%></a></td>
  54. <td><%=contatto.getNome()%> <%=contatto.getCognome()%></td>
  55. <td><%=contatto.getIndirizzo()%></td>
  56. <td><%=contatto.getArea()%></td>
  57. <td><%=contatto.getTelefono()%></td>
  58. <td><%=contatto.getEmail() != null ? contatto.getEmail() : "-"%></td>
  59. <td><%=contatto.getNumero_persone()%></td>
  60. <td><%=contatto.getComposizione_nucleo()%></td>
  61. <td><%=contatto.getNote_sacchetto()%></td>
  62. <td>
  63. <%
  64. if (contatto.getUltima_consegna() == null) {
  65. out.print("-");
  66. } else {
  67. out.print(Data.formatta(contatto.getUltima_consegna()));
  68. }
  69. %>
  70. </td>
  71. </tr>
  72. <%
  73. }
  74. %>
  75. </tbody>
  76. </table>
  77. <%
  78. }
  79. %>
  80. </div>
  81. <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
  82. integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
  83. crossorigin="anonymous"></script>
  84. <script
  85. src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
  86. integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
  87. crossorigin="anonymous"></script>
  88. <script
  89. src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
  90. integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
  91. crossorigin="anonymous"></script>
  92. </body>
  93. </html>