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.
 
 
 

146 lines
4.9 KiB

  1. <%@page import="util.Data"%>
  2. <%@page import="bean.Contatto"%>
  3. <%@ page language="java" contentType="text/html; charset=UTF-8"
  4. pageEncoding="ISO-8859-1"%>
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta charset="UTF-8">
  9. <title>Contatto</title>
  10. <link rel="stylesheet"
  11. href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
  12. integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
  13. crossorigin="anonymous">
  14. <link rel="stylesheet" href="css/stile.css">
  15. </head>
  16. <body>
  17. <jsp:include page="nav.jsp"></jsp:include>
  18. <div style="margin: 25px">
  19. <%
  20. Contatto c = (Contatto) request.getAttribute("contatto");
  21. if (c == null) {
  22. out.print("ERRORE");
  23. } else {
  24. %>
  25. <h4><%=c.getNome() + " " + c.getCognome()%>
  26. <%
  27. if (c.getServizio_sociale() != null && !c.getServizio_sociale().equals("-")) {
  28. %>(contatto ottenuto tramite
  29. <%=c.getServizio_sociale()%>)
  30. <%
  31. }
  32. %>
  33. </h4>
  34. Indirizzo:
  35. <%=c.getIndirizzo() + " (zona " + c.getArea() + ")"%><br>
  36. Telefono:
  37. <%=c.getTelefono()%><br>
  38. <%
  39. if (c.getEmail() != null) {
  40. %>
  41. Email:
  42. <%=c.getEmail()%><br>
  43. <%
  44. }
  45. %><br>
  46. <%=c.getNumero_persone()%>
  47. persone (<%=c.getComposizione_nucleo()%>)<br> Note sacchetto:
  48. <%=c.getNote_sacchetto()%><br> <br>
  49. <%
  50. if (c.getUltima_consegna() == null) {
  51. out.print("Non ha ancora ricevuto consegne");
  52. } else {
  53. out.print("Ultimo ordine consegnato il" + Data.formatta(c.getUltima_consegna()));
  54. }
  55. %>
  56. <br> <br>
  57. <form action="ordini-ctrl" method="post">
  58. <input type="hidden" name="azione" value="aggiungi"> <input
  59. type="hidden" name="numero" value="<%=c.getTelefono()%>"> <input
  60. type="submit" value="Aggiungi agli ordini"
  61. class="btn btn-primary btn-sm">
  62. </form>
  63. <br>
  64. <p style="display: inline-block;">
  65. <a class="btn btn-warning btn-sm" data-toggle="collapse"
  66. href="#collapseExample" role="button" aria-expanded="false"
  67. aria-controls="collapseExample"> Aggiorna dati </a>
  68. </p>
  69. <form action="contatti-ctrl" method="post"
  70. style="display: inline-block">
  71. <input type="hidden" name="azione" value="elimina"> <input
  72. type="hidden" name="id" value="<%=c.getTelefono()%>"> <input
  73. type="submit" value="Elimina contatto" class="btn btn-danger btn-sm">
  74. </form>
  75. <div class="collapse" id="collapseExample">
  76. <form action="contatti-ctrl" method="post">
  77. <div class="cinquanta">
  78. <div class="form-group">
  79. <label>Nome*</label> <input type="text" name="nome"
  80. value="<%=c.getNome()%>" class="form-control form-control-sm">
  81. </div>
  82. <div class="form-group">
  83. <label>Cognome*</label> <input type="text" name="cognome"
  84. value="<%=c.getCognome()%>" class="form-control form-control-sm">
  85. </div>
  86. <div class="form-group">
  87. <label>Quartiere*</label> <input type="text" name="area"
  88. value="<%=c.getArea()%>" class="form-control form-control-sm">
  89. </div>
  90. <div class="form-group">
  91. <label>Indirizzo*</label> <input type="text" name="indirizzo"
  92. value="<%=c.getIndirizzo()%>"
  93. class="form-control form-control-sm">
  94. </div>
  95. <div class="form-group">
  96. <label>Numero di telefono*</label> <input type="number"
  97. value="<%=c.getTelefono()%>" name="telefono"
  98. class="form-control form-control-sm">
  99. </div>
  100. <div class="form-group">
  101. <label>Email</label> <input type="email" name="email"
  102. value="<%=c.getEmail()%>" class="form-control form-control-sm">
  103. </div>
  104. </div>
  105. <div class="cinquanta">
  106. <div class="form-group">
  107. <label>Numero persone</label> <input type="number" name="numero"
  108. value="<%=c.getNumero_persone()%>"
  109. class="form-control form-control-sm number">
  110. </div>
  111. <div class="form-group">
  112. <label>Composizione nucleo abitativo</label> <input type="text"
  113. name="composizioneNucleo" value="<%=c.getComposizione_nucleo()%>"
  114. class="form-control form-control-sm">
  115. </div>
  116. <div class="form-group">
  117. <label style="vertical-align: top">Note sacchetto
  118. (allergie, diete, necessità...)</label>
  119. <textarea name="noteSacchetto"
  120. class="form-control form-control-sm"
  121. value="<%=c.getNote_sacchetto()%>"></textarea>
  122. </div>
  123. </div>
  124. <input type="hidden" name="azione" value="modifica"><br>
  125. <button type="submit" class="btn btn-light btn-sm">Modifica</button>
  126. </form>
  127. </div>
  128. <%
  129. }
  130. %>
  131. </div>
  132. <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
  133. integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
  134. crossorigin="anonymous"></script>
  135. <script
  136. src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
  137. integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
  138. crossorigin="anonymous"></script>
  139. <script
  140. src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
  141. integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
  142. crossorigin="anonymous"></script>
  143. </body>
  144. </html>