Guest User

Untitled

a guest
Jul 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8" session ="true"%>
  3. <%@ page session="true" %>
  4. <%String brisaca= "1", frizbi = "1", deznik = "1", obesek = "1"; %>
  5. <html>
  6. <%@ include file="header.jsp" %>
  7. <body>
  8.  
  9. <h1>Spletna trgovina Rio</h1>
  10.  
  11. <table border = "1">
  12. <br/>
  13. <tr>
  14.  
  15. <th>IZDELEK</th>
  16. <th>CENA</th>
  17. <th>KOŠARICA</th>
  18. <th>STANJE</th>
  19. </tr>
  20. <tr>
  21. <td>brisača</td>
  22. <td>4€</td>
  23. <td align="center"><form action="seja_izdelki.jsp"><input type="submit" name="brisaca" value="dodaj"></form>
  24. <form action="seja_izdelki.jsp"><input type="submit" name="brisaca" value="odstrani"></form></td>
  25. <td></td>
  26. </tr>
  27. <tr>
  28. <td>frizbi</td>
  29. <td>3,2€</td>
  30. <td align="center"><form action="seja_izdelki.jsp"><input type="submit" name="frizbi" value="dodaj"></form>
  31. <form action="seja_izdelki.jsp"><input type="submit" name="frizbi" value="odstrani"></form></td>
  32. <td></td>
  33. </tr>
  34. <tr>
  35. <td>dežnik</td>
  36. <td>5,64€</td>
  37. <td align="center"><form action="seja_izdelki.jsp"><input type="submit" name="deznik" value="dodaj"></form>
  38. <form action="seja_izdelki.jsp"><input type="submit" name="deznik" value="odstrani"></form></td>
  39. <td></td>
  40. </tr>
  41. <tr>
  42. <td>obesek</td>
  43. <td>3,2€</td>
  44. <td align="center"><form action="seja_izdelki.jsp"><input type="submit" name="obesek" value="dodaj"></form>
  45. <form action="seja_izdelki.jsp"><input type="submit" name="obesek" value="odstrani"></form></td>
  46. <td></td>
  47. </tr>
  48. </table>
  49.  
  50. Izdelki v košarici: <br />
  51. <% if (session.getAttribute("brisaca") == null ){}
  52. else{
  53. out.println("Brisaca");
  54. }
  55.  
  56. if (session.getAttribute("obesek") == null ){}
  57. else{
  58. out.println("obesek");
  59. }
  60.  
  61. if (session.getAttribute("frizbi") == null ){}
  62. else{
  63. out.println("Frizbi");
  64. }
  65.  
  66. if (session.getAttribute("deznik") == null ){}
  67. else{
  68. out.println("Deznik");
  69. }%>
  70.  
  71.  
  72. </body>
  73.  
  74. </html>
Add Comment
Please, Sign In to add comment