Advertisement
Guest User

Untitled

a guest
May 2nd, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.78 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  2. pageEncoding="ISO-8859-1"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <link href="styles/fisier.css?v=1" rel="stylesheet"/>
  7. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  8. </head>
  9. <body>
  10.  
  11. <div>
  12.  
  13. <div style="margin-top: 50px;"></div>
  14.  
  15.  
  16. <div id="cadru_pagina">
  17.  
  18.  
  19. <!-- HEADER -->
  20. <div id="header" align="right">
  21. <%!String url; %>
  22. <%url=request.getRequestURL().toString(); %>
  23. <% session.setAttribute("url", url); %>
  24. <%!String p; %>
  25. <%! String s; %>
  26.  
  27. <%
  28.  
  29.  
  30.  
  31. if(session.getAttribute("user")!=null)
  32. {
  33. p="headerlogat.jsp";
  34. s="shoplogat.jsp";
  35. }
  36.  
  37. else
  38. {
  39.  
  40. p="header.jsp";
  41. s="shop.jsp";
  42.  
  43. }
  44. %>
  45. <jsp:include page="<%=p %>"/>
  46. <% %>
  47.  
  48. </div>
  49. <!-- HEADER -->
  50.  
  51.  
  52.  
  53. <!-- MENIU -->
  54. <div id="meniu">
  55. <ul>
  56. <li><a href="index">Acasa</a></li>
  57. <li><a href="despre.jsp" >Despre noi</a>
  58. <li class="meniu_curent"><a href="#" >Biciclete</a>
  59. <ul>
  60. <li class="meniu_curent"><a href="mountain-bike.jsp">Mountain Bike</a></li>
  61. <li><a href="cursiere.jsp">Cursiere</a></li>
  62. <li><a href="copii.jsp">Biciclete Copii</a></li>
  63. <li><a href="downhill.jsp">Downhill</a></li>
  64. <li><a href="electrice.jsp">Electrice</a></li>
  65. </ul>
  66. </li>
  67. <li><a href="#">Piese</a>
  68. <ul>
  69. <li><a href="piese1.jsp">Piese1</a></li>
  70. <li><a href="piese2.jsp">Piese2</a></li>
  71. <li><a href="piese3.jsp">Piese3</a></li>
  72. </ul>
  73. </li>
  74. <li><a href="#">Accesorii</a>
  75. <ul>
  76. <li><a href="acc1.jsp">Accesorii1</a></li>
  77. <li><a href="acc2.jsp">Accesorii2</a></li>
  78. <li><a href="acc3.jsp">Accesorii3</a></li>
  79. </ul>
  80. </li>
  81. <li><a href="echipamente.jsp">Echipamente</a></li>
  82. <li><a href="nutritie.jsp">Nutritie</a></li>
  83. <li><a href="service.jsp">Service biciclete</a></li>
  84. <li><a href="contact">Contact</a>
  85. </ul>
  86. <div style="clear:both;"></div>
  87. </div>
  88. <!-- MENIU -->
  89. <%@ page import ="java.sql.*" %>
  90. <%!String[] categorii=new String[20]; %>
  91. <%!String[] titlucarti=new String[5]; %>
  92. <%!String[] pret=new String[5]; %>
  93. <% String[] producator=new String[5]; %>
  94. <%
  95. Class.forName("com.mysql.jdbc.Driver");
  96. Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/licenta10",
  97. "root", "");
  98. PreparedStatement stm=con.prepareStatement("select * from categorie");
  99. int i=0;
  100. ResultSet rs=stm.executeQuery();
  101. while(rs.next())
  102. {
  103. categorii[i]=rs.getString(2);
  104. i++;
  105.  
  106. }
  107. int j=0;
  108. stm=con.prepareStatement("select produs_nume,pret,producator_id from produse where categorie_id=? ");
  109. stm.setString(1,"1");
  110. rs=stm.executeQuery();
  111. while(rs.next())
  112. {
  113. titlucarti[j]=rs.getString(1);
  114. pret[j]=rs.getString(2);
  115. String idproducator=rs.getString(3);
  116. PreparedStatement stm1=con.prepareStatement("select producator_nume from producator where producator_id=?");
  117. stm1.setString(1, idproducator);
  118. ResultSet rs1=stm1.executeQuery();
  119. if(rs1.next()==true)
  120. {
  121. producator[j]=rs1.getString(1);
  122. }
  123.  
  124. j++;
  125.  
  126. }
  127.  
  128. %>
  129. <br>
  130.  
  131. <!-- CONTINUT PAGINA -->
  132. <div>
  133.  
  134. <table >
  135. <tr>
  136. <td id="continut_stanga">
  137. <!-- COD PARTEA STANGA -->
  138.  
  139. <div>
  140. <h2>Categorii:</h2>
  141. <ul >
  142. <li><a href="mountain-bike.jsp "><%=categorii[0] %></a></li>
  143. <li><a href="sf.jsp "><%=categorii[1] %></a></li>
  144. <li><a href="manual.jsp "><%=categorii[2] %></a></li>
  145. <li><a href="informatica.jsp "><%=categorii[3] %></a></li>
  146. <li><a href="filozofie.jsp "><%=categorii[4] %></a></li>
  147.  
  148. </ul>
  149.  
  150. </div>
  151.  
  152. <!-- COD PARTEA STANGA -->
  153. </td>
  154.  
  155. <td id="continut_dreapta">
  156. <!-- COD PARTEA DREAPTA -->
  157. <div class="box" >
  158. <table>
  159.  
  160.  
  161. <tr>
  162. <%
  163. int k=0;
  164. while(k<j){
  165. %>
  166.  
  167. <td>
  168.  
  169.  
  170.  
  171. <form name="carte1" method="GET">
  172. <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Titlu:</strong>
  173. <%=titlucarti[k] %></font><input type="hidden" name="titlu" value="<%=titlucarti[k] %>">
  174. <img src="images/dictionarfrancez.JPG" height="200px" width="150px">
  175. <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Autor:</strong>
  176. <%=producator[k] %> </font><input type="hidden" name="autor" value="<%=producator[k] %>"></p>
  177. <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Cantitate:<input type="text" size="2" value="1" name="cantitate"></strong></font></p>
  178. <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Pret:</strong>
  179. <%=pret[k] %></font><input type="hidden" name="pret" value="<%=pret[k] %>"></p><input type="hidden" name="action" value="add"><input type="submit" name="addToCart" value="Add To Cart">
  180. </form>
  181.  
  182.  
  183. </td>
  184.  
  185.  
  186. <%
  187. if(k%4==0){
  188. %>
  189.  
  190. </tr><tr>
  191.  
  192. <%
  193. }
  194. k++;
  195. }
  196.  
  197. %>
  198.  
  199. </tr>
  200.  
  201.  
  202.  
  203.  
  204.  
  205. </table>
  206. </div>
  207.  
  208. <!-- COD PARTEA DREAPTA -->
  209. </td>
  210.  
  211. </tr>
  212. </table>
  213. <table>
  214. <tr>
  215. <td id="continut_stanga">
  216. <h3>CONTUL TAU</h3>
  217. <a href="userprofile.jsp"><b>Contul tau</b></a><br><br>
  218. <a href="comenzile-tale.jsp"><b>Comenzile tale</b></a><br><br>
  219. <a href="returnari.jsp"><b>Returnari</b></a><br><br>
  220. <a href="wishlist.jsp"><b>Wishlist</b></a><br><br>
  221.  
  222.  
  223. </td>
  224. <td id="continut_stanga">
  225. <h3>INFORMATII</h3>
  226. <a href="cum-cumpar.jsp"><b>Cum cumpar?</b></a><br><br>
  227. <a href="contact.jsp"><b>Contact</b></a><br><br>
  228. <a href="service.jsp"><b>Service</b></a><br><br>
  229. <a href="despre.jsp"><b>Despre noi</b></a><br><br>
  230. <a href="informatii-livrare.jsp"><b>Informatii livrare</b></a><br><br>
  231. <a href="modalitati-de-plata.jsp"><b>Modalitati de plata</b></a><br><br>
  232. <a href="politica-confidentialitate.jsp"><b>Politica confidentialitate</b></a><br><br>
  233. <a href="program-de-lucru.jsp"><b>Program de lucru</b></a><br><br>
  234. <a href="termeni-conditii.jsp"><b>Termeni si Conditii</b></a><br><br>
  235. </td>
  236. <td id="continut_stanga">
  237. <h3>DE CE SA CUMPERI DE LA NOI?</h3>
  238. <p class="align_center">&#9989; <b>Livrare rapida</b></p>
  239. <p class="align_center">&#9989; <b>Livrare gratuita peste 1500 lei</b></p>
  240. <p class="align_center">&#9989; <b>Gama larga de produs</b>e</p>
  241. <p class="align_center">&#9989; <b>30 de zile posibilitate de returnare</b></p>
  242. <p class="align_center">&#9989; <b>Preturi imbatabile</b></p>
  243. </td>
  244. <td id="continut_stanga">
  245. <h3>Modalitati de plata</h3>
  246. <a href="https://www.paypal.com/webapps/mpp/paypal-popup" title="How PayPal Works" onclick="javascript:window.open('https://www.paypal.com/webapps/mpp/paypal-popup','WIPaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700'); return false;"><img src="https://vinylandwood.cdn.shoprenter.hu/custom/vinylandwood/image/data/paypal.png?v=1499886398" border="0" alt="PayPal Acceptance Mark" height="82" width="140"></a><!-- PayPal Logo -->
  247. <h3>Link-uri utile</h3>
  248. <a href="#" class="fa fa-facebook"></a>
  249. <a href="#" class="fa fa-twitter"></a>
  250. <a href="#" class="fa fa-google"></a>
  251. <a href="#" class="fa fa-linkedin"></a>
  252. <a href="#" class="fa fa-youtube"></a>
  253. <a href="#" class="fa fa-instagram"></a>
  254. </td>
  255.  
  256. </tr>
  257.  
  258. </table>
  259.  
  260.  
  261. </div>
  262. <!-- CONTINUT PAGINA -->
  263.  
  264.  
  265. <!-- FOOTER -->
  266. <div id="footer">
  267. &copy; Mare Razvan Nicoale - UVT Informatica Romana - 2019
  268. </div>
  269. <!-- FOOTER -->
  270.  
  271.  
  272.  
  273. </div>
  274.  
  275. </div>
  276.  
  277. </body>
  278. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement