Advertisement
Guest User

upload.jsp

a guest
Dec 8th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.12 KB | None | 0 0
  1. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  2. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  3. pageEncoding="ISO-8859-1"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <!-- Latest compiled and minified CSS -->
  8. <link rel="stylesheet"
  9. href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  10.  
  11. <!-- jQuery library -->
  12. <script
  13. src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  14.  
  15. <!-- Latest compiled JavaScript -->
  16. <script
  17. src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  18. <link rel="stylesheet" type="text/css" media="screen"
  19. href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/1.3.4/jquery.fancybox-1.3.4.css" />
  20. <style>
  21. a.fancybox img {
  22. border: none;
  23. box-shadow: 0 1px 7px rgba(0, 0, 0, 0.6);
  24. -o-transform: scale(1, 1);
  25. -ms-transform: scale(1, 1);
  26. -moz-transform: scale(1, 1);
  27. -webkit-transform: scale(1, 1);
  28. transform: scale(1, 1);
  29. -o-transition: all 0.2s ease-in-out;
  30. -ms-transition: all 0.2s ease-in-out;
  31. -moz-transition: all 0.2s ease-in-out;
  32. -webkit-transition: all 0.2s ease-in-out;
  33. transition: all 0.2s ease-in-out;
  34. }
  35.  
  36. a.fancybox:hover img {
  37. position: relative;
  38. z-index: 999;
  39. -o-transform: scale(1.03, 1.03);
  40. -ms-transform: scale(1.03, 1.03);
  41. -moz-transform: scale(1.03, 1.03);
  42. -webkit-transform: scale(1.03, 1.03);
  43. transform: scale(1.03, 1.03);
  44. }
  45.  
  46. #thumb {
  47. height: 200px;
  48. widht: 200px;
  49. border: 1px solid #000;
  50. margin: 10px 5px 0 0;
  51. }
  52.  
  53. input[type="text"], input[type="date"], input[type="time"], textarea {
  54. background-color: #F5F5DC !important;
  55. }
  56.  
  57. .aaa {
  58. width: 30%;
  59. padding-left: 20px;
  60. }
  61.  
  62. .bbb {
  63. padding-left: 20px;
  64. }
  65.  
  66. .banner {
  67. padding: 40px 0px;
  68. background-color: #E00049;
  69. }
  70.  
  71. .ccc {
  72. width: 13%;
  73. height: auto;
  74. padding-left: 20px;
  75. }
  76. </style>
  77.  
  78. <!-- <script src="js/bootstrap-datetimepicker.min.js"></script>
  79. <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script>
  80. -->
  81.  
  82. </head>
  83.  
  84.  
  85. <body>
  86. <script type="text/javascript"
  87. src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
  88. <script type="text/javascript"
  89. src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
  90. <script type="text/javascript"
  91. src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/1.3.4/jquery.fancybox-1.3.4.pack.min.js"></script>
  92.  
  93. <div class="banner">
  94. <img class="ccc"
  95. src="https://intranet.ucll.be/sites/all/themes/ucll/images/logos/logoHeader.png">
  96. </div>
  97. <h1 class="bbb">File Upload Form</h1>
  98. <fieldset>
  99. <legend class="bbb">Upload File</legend>
  100. <c:if test="${not empty errors}">
  101. <div class="alert-danger">
  102. <ul>
  103. <c:forEach var="error" items="${errors}">
  104. <li>${error}</li>
  105.  
  106. </c:forEach>
  107. </ul>
  108. </div>
  109. </c:if>
  110.  
  111. <form method="post" action="Controller?action=upload"
  112. enctype="multipart/form-data">
  113. <div class="aaa">
  114. <div class="form-group">
  115. <label for="naam">Naam:</label><input type="text" name="naam"
  116. id="naam" class="form-control"> <label for="content">Content:</label>
  117. <textarea rows="5" cols="20" name="content" id="content"
  118. class="form-control"></textarea>
  119. </div>
  120. </div>
  121. <div class="aaa">
  122. <div class="form-group">
  123. <p>
  124. <i>Datum voorbeeld: yyyy-MM-dd zoals bijvoorbeeld: 2016-02-24</i>
  125. </p>
  126. <label for="startDatum">Begin datum:</label><input type="date"
  127. name="startDatum" id="startDatum" class="form-control">
  128. </div>
  129. </div>
  130.  
  131. <div class="aaa">
  132. <div class="form-group">
  133. <p>
  134. <i>Tijd voorbeeld: 11:34</i>
  135. </p>
  136. <label for="startTijd">Start tijd:</label><input type="time"
  137. name="startTijd" id="startTijd" class="form-control">
  138. </div>
  139. </div>
  140. <div class="aaa">
  141. <div class="form-group">
  142. <p>
  143. <i>Datum voorbeeld: yyyy-MM-dd zoals bijvoorbeeld: 2016-02-24</i>
  144. </p>
  145. <label for="eindDatum">Eind datum:</label><input type="date"
  146. name="eindDatum" id="eindDatum" class="form-control">
  147. </div>
  148. </div>
  149. <div class="aaa">
  150. <div class="form-group">
  151. <label for="eindTijd">Eind tijd:</label><input type="time"
  152. name="eindTijd" id="eindTijd" class="form-control"><br>
  153. </div>
  154. </div>
  155.  
  156.  
  157.  
  158. <!-- <label for="datetime"><input id="datetime" type="datetime-local"/></label>
  159. -->
  160. <!-- <input type="hidden" name="action" value="upload">
  161. -->
  162. <div class="bbb">
  163.  
  164. <div class="form-group">
  165. <label for="fileName">Select File: </label> <input id="fileName"
  166. type="file" name="fileName" size="30" /><br /> <a
  167. href="#myPopup" data-rel="popup" data-position-to="window" onclick="alert"><img
  168. id="thumb" src="#" alt="img" /> </a> <br /> <br /> <input
  169. type="submit" value="Upload" />
  170.  
  171.  
  172. <script>
  173. function readURL(input) {
  174.  
  175. if (input.files && input.files[0]) {
  176. var reader = new FileReader();
  177.  
  178. reader.onload = function(e) {
  179. $('#thumb').attr('src', e.target.result);
  180. }
  181.  
  182. reader.readAsDataURL(input.files[0]);
  183. }
  184. }
  185.  
  186. $("#fileName").change(function() {
  187. readURL(this);
  188. });
  189. </script>
  190. <script type="text/javascript">
  191.  
  192. $(function($) {
  193. var addToAll = true;
  194. var gallery = false;
  195. var titlePosition = 'inside';
  196. $(addToAll ? 'img' : 'img.fancybox')
  197. .each(
  198. function() {
  199. var $this = $(this);
  200. var title = $this.attr('title');
  201. var src = $this
  202. .attr('data-big')
  203. || $this.attr('src');
  204. var a = $(
  205. '<a href="#" class="fancybox"></a>')
  206. .attr('href', src)
  207. .attr('title', title);
  208. $this.wrap(a);
  209. });
  210. if (gallery)
  211. $('a.fancybox').attr('rel', 'fancyboxgallery');
  212. $('a.fancybox').fancybox({
  213. titlePosition : titlePosition
  214. });
  215. });
  216. $.noConflict();
  217. </script>
  218. </div>
  219. </div>
  220.  
  221.  
  222. </form>
  223. </fieldset>
  224. </body>
  225. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement