Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.27 KB | None | 0 0
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ include file="enTetePage.html"%>
  3. <script type="text/javascript" src="./js/playListJs.jsp"></script>
  4. <%@ page import="commerce.catalogue.service.CatalogueManager"%>
  5. <%@ page import="commerce.catalogue.domaine.modele.Article"%>
  6. <%@ page import="commerce.catalogue.domaine.modele.Livre"%>
  7. <%@ page import="commerce.catalogue.domaine.modele.Musique"%>
  8. <%@ page import="commerce.catalogue.domaine.modele.Piste"%>
  9. <%@ page import="java.util.Iterator"%>
  10. <%
  11.  
  12. %>
  13. <nav id="navigation" class="col-full" role="navigation">
  14. <ul id="main-nav" class="nav fl">
  15. <li id="menu-item-290"
  16. class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item">
  17. <a href="<%=response.encodeURL("./index.jsp")%>">Tous les articles</a>
  18. </li>
  19. <li id="menu-item-290"
  20. class="menu-item menu-item-type-custom menu-item-object-custom">
  21. <a href="<%=response.encodeURL("./controlePanier.jsp")%>">Panier</a>
  22. </li>
  23. </ul>
  24. </nav>
  25. <div id="content" class="col-full">
  26. <div id="main-sidebar-container">
  27. <div class="woocommerce">
  28. <section id="main" class="col-left">
  29.  
  30. <div id="searchForm">
  31. <form action="index.jsp" method="get">
  32. <input type="text" class="searchInput" name="search" placeholder="Entrer un titre..." />
  33. </form>
  34. <a href="#" class="goSearch"><i class="fa fa-search" aria-hidden="true"></i></a>
  35. </div>
  36. <%
  37.  
  38. CatalogueManager catalogueManager = (CatalogueManager)application.getAttribute("catalogueManager");
  39. if(request.getParameter("search") != null) {
  40. String recherche = request.getParameter("search");
  41. Iterator<Article> list = catalogueManager.chercherArticleParTitre(recherche).iterator();
  42. Livre livre = null;
  43. Musique musique = null;
  44. Article article;
  45. %>
  46. <h1 class="page-title">Résultat recherche</h1>
  47. <ul class="products">
  48. <%
  49. while (list.hasNext()) {
  50. article = (Article)list.next();
  51. %>
  52. <li class="product type-product"><a
  53. href="<%=response.encodeURL("./article.jsp?ref="
  54. + article.getRefArticle())%>"> <img
  55. src="<% if (article.getImage().startsWith("http"))
  56. out.print(article.getImage()) ;
  57. else
  58. out.print("./images/"+article.getImage()) ; %>"
  59. class="attachment-shop_catalog wp-post-image" alt="poster_2_up"
  60. height="325" width="325"/>
  61. <h3><%=article.getTitre()%></h3> <span class="price"><ins>
  62. <span class="amount"><%=article.getPrix()%> €</span>
  63. </ins></span>
  64.  
  65. </a> <a
  66. href="<%=response.encodeURL("./controlePanier.jsp?refArticle="
  67. + article.getRefArticle()
  68. + "&amp;commande=ajouterLigne")%>"
  69. class="button add_to_cart_button product_type_simple">Mettre
  70. dans le panier</a>
  71. <a
  72. href="<%=response.encodeURL("./article.jsp?ref="
  73. + article.getRefArticle())%>"
  74. class="button add_to_cart_button product_type_simple">Voir l'article</a>
  75. <%
  76. if (article instanceof Musique) {
  77. musique = (Musique) article;
  78. if (musique.getPistes().size() > 0) {
  79. %>
  80. <div id="jquery_jplayer_<%=article.getRefArticle()%>" class="jp-jplayer" style="margin-top:10px"></div>
  81. <div id="jp_container_<%=article.getRefArticle()%>" class="jp-audio" role="application">
  82. <div class="jp-type-playlist">
  83. <div class="jp-gui jp-interface">
  84. <div class="jp-controls-holder">
  85. <div class="jp-controls">
  86. <button class="jp-previous" role="button" tabindex="0">previous</button>
  87. <button class="jp-play" role="button" tabindex="0">play</button>
  88. <button class="jp-stop" role="button" tabindex="0">stop</button>
  89. <button class="jp-next" role="button" tabindex="0">next</button>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="jp-playlist">
  94. <ul>
  95. <li>&nbsp;</li>
  96. </ul>
  97. </div>
  98. <div class="jp-no-solution">
  99. <span>Update Required</span> To play the media you will need to
  100. either update your browser to a recent version or update your <a
  101. href="http://get.adobe.com/flashplayer/" target="_blank">Flash
  102. plugin</a>.
  103. </div>
  104. </div>
  105. </div>
  106. <%
  107. }
  108. }
  109. }
  110. %>
  111. </ul>
  112. <%
  113. }else{
  114. %>
  115.  
  116. <h1 class="page-title">Articles</h1>
  117. <ul class="products">
  118. <%
  119. Iterator<Article> listeDesArticles = catalogueManager
  120. .getArticles().iterator();
  121. Livre livre = null;
  122. Musique musique = null;
  123. Article article;
  124. while (listeDesArticles.hasNext()) {
  125. article = (Article) listeDesArticles.next();
  126. %>
  127. <li class="product type-product"><a
  128. href="<%=response.encodeURL("./article.jsp?ref="
  129. + article.getRefArticle())%>"> <img
  130. src="<% if (article.getImage().startsWith("http"))
  131. out.print(article.getImage()) ;
  132. else
  133. out.print("./images/"+article.getImage()) ; %>"
  134. class="attachment-shop_catalog wp-post-image" alt="poster_2_up"
  135. height="325" width="325"/>
  136. <h3><%=article.getTitre()%></h3> <span class="price"><ins>
  137. <span class="amount"><%=article.getPrix()%> €</span>
  138. </ins></span>
  139.  
  140. </a> <a
  141. href="<%=response.encodeURL("./controlePanier.jsp?refArticle="
  142. + article.getRefArticle()
  143. + "&amp;commande=ajouterLigne")%>"
  144. class="button add_to_cart_button product_type_simple">Mettre
  145. dans le panier</a>
  146. <a
  147. href="<%=response.encodeURL("./article.jsp?ref="
  148. + article.getRefArticle())%>"
  149. class="button add_to_cart_button product_type_simple">Voir l'article</a>
  150. <%
  151. if (article instanceof Musique) {
  152. musique = (Musique) article;
  153. if (musique.getPistes().size() > 0) {
  154. %>
  155. <div id="jquery_jplayer_<%=article.getRefArticle()%>" class="jp-jplayer" style="margin-top:10px"></div>
  156. <div id="jp_container_<%=article.getRefArticle()%>" class="jp-audio" role="application">
  157. <div class="jp-type-playlist">
  158. <div class="jp-gui jp-interface">
  159. <div class="jp-controls-holder">
  160. <div class="jp-controls">
  161. <button class="jp-previous" role="button" tabindex="0">previous</button>
  162. <button class="jp-play" role="button" tabindex="0">play</button>
  163. <button class="jp-stop" role="button" tabindex="0">stop</button>
  164. <button class="jp-next" role="button" tabindex="0">next</button>
  165. </div>
  166. </div>
  167. </div>
  168. <div class="jp-playlist">
  169. <ul>
  170. <li>&nbsp;</li>
  171. </ul>
  172. </div>
  173. <div class="jp-no-solution">
  174. <span>Update Required</span> To play the media you will need to
  175. either update your browser to a recent version or update your <a
  176. href="http://get.adobe.com/flashplayer/" target="_blank">Flash
  177. plugin</a>.
  178. </div>
  179. </div>
  180. </div>
  181. <%
  182. }
  183. }
  184. }
  185. %>
  186. </ul>
  187. <%
  188. }
  189. %>
  190. </section>
  191. </div>
  192. </div>
  193. </div>
  194. <%@ include file="piedDePage.html"%>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement