Advertisement
Guest User

JSP

a guest
Jun 9th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.83 KB | None | 0 0
  1. <%@ page import="java.sql.*" %>
  2. <%ResultSet resultset =null;%>
  3. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  4.  
  5. <HTML>
  6. <HEAD>
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8.  
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  10.  
  11. <link rel="stylesheet" href="Dizajn.css">
  12. <TITLE>Select element drop down box</TITLE>
  13.  
  14. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  15.  
  16. <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script>
  17. <script type="text/javascript">
  18. $(document).ready(function() {
  19. $('#slectboxid option').click(function(){
  20. $('#textboxid').val($(this).val());
  21. });
  22. });
  23. </script>
  24.  
  25. <style>
  26. .button {
  27. background-color: #4CAF50;
  28. border-radius: 100%;
  29. border-color: white;
  30. color: white;
  31. padding: 3px 8px;
  32. text-align: center;
  33. text-decoration: none;
  34. display: inline-block;
  35. font-size: 16px;
  36. margin: 4px 2px;
  37. cursor: pointer;
  38. }
  39. </style>
  40.  
  41. </HEAD>
  42.  
  43. <BODY>
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. <%
  51. try{
  52. //Class.forName("com.mysql.jdbc.Driver").newInstance();
  53. Class.forName("com.mysql.jdbc.Driver");
  54. Connection connection =
  55. DriverManager.getConnection
  56. ("jdbc:mysql://svizec2.informatika.uni-mb.si:3306/s3p1_delavnica","s3p1_delavnica","28iblg");
  57.  
  58. Statement statement = connection.createStatement() ;
  59.  
  60. resultset =statement.executeQuery("select * from tip_dela") ;
  61.  
  62.  
  63. %>
  64. <h1> MojaDelavnica</h1>
  65. <form form action="NewServlet" form action="NewServlet2" method="post" >
  66.  
  67. <i class="w3-xxmedium fa fa-calendar"></i>
  68.  
  69. <input type="text" name="datum" placeholder="Datum / DD.MM.LLLL" >
  70.  
  71.  
  72. <br>
  73.  
  74.  
  75. <br>
  76.  
  77.  
  78. <i class="w3-xxmedium fa fa-pencil"></i>
  79. <input type="text" name="opis" placeholder="Opis">
  80. <br><br>
  81. <i class="w3-xxmedium fa fa-user"></i>
  82. <input type="text" name="ime" placeholder="Ime stranke">
  83. <br><br>
  84. <i class="w3-xxmedium fa fa-user"></i>
  85. <input type="text" name="priimek" placeholder="Priimek stranke">
  86. <br><br>
  87. <i class="w3-xxmedium fa fa-home"></i>
  88. <input id="blabla" type="text" name="ime" placeholder="Naslov stranke">
  89. <br><br>
  90. <form id="asd">
  91. <hr></hr>
  92. <p id = "delo" style ="display: none;">Delo:</p>
  93. <i id = "tip_dela" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  94. <select id='selected' name="Delo" style="display: none;">
  95. <% while(resultset.next()){ %>
  96. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  97. <% } %>
  98. </select>
  99. <%
  100.  
  101.  
  102. Statement statement2 = connection.createStatement() ;
  103.  
  104. resultset =statement2.executeQuery("select * from material") ;
  105.  
  106.  
  107. %>
  108. <i id = "material" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  109.  
  110. <select id='selected2' name="Days" style="display: none;" >
  111. <% while(resultset.next()){ %>
  112. <option><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  113.  
  114. <% } %>
  115. </select>
  116.  
  117.  
  118. <i id = "kolicina_materiala" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  119. <input style="display: none;" type="text" id="kolicina" placeholder="Količina materiala" name = "kolicina" value="0" >
  120.  
  121. <i id = "st_ure" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  122. <input id = "ure" type="text" name="ure" placeholder="Število ur" style="display: none;" value="0" >
  123.  
  124.  
  125. <input id = "plus" class = "button" type="button" onclick="demoShow(1);" value="+" style ="display: block;">
  126.  
  127.  
  128. <script type="text/javascript">
  129. function demoShow(a){
  130. if(a==1) {
  131. {document.getElementById("selected").style.display="block";}
  132. {document.getElementById("selected2").style.display="block";}
  133. {document.getElementById("kolicina").style.display="block";}
  134. {document.getElementById("material").style.display="block";}
  135. {document.getElementById("kolicina_materiala").style.display="block";}
  136. {document.getElementById("tip_dela").style.display="block";}
  137. {document.getElementById("ure").style.display="block";}
  138. {document.getElementById("st_ure").style.display="block";}
  139. {document.getElementById("plus").style.display="none";}
  140. {document.getElementById("plus2").style.display="block";}
  141. {document.getElementById("delo").style.display="block";}
  142.  
  143.  
  144. }
  145.  
  146. }
  147. </script>
  148.  
  149.  
  150.  
  151. <script>
  152. function myFunction(){
  153. var kolicina_ur= document.getElementById("ure").value;
  154. var kolicina_mat = document.getElementById("kolicina").value;
  155.  
  156.  
  157.  
  158. }
  159.  
  160.  
  161. </script>
  162.  
  163.  
  164. <%
  165. //**!!!!!!!!!!!!!! DELO 2!!!!!!! **
  166. %>
  167. <%
  168.  
  169.  
  170. Statement statement4 = connection.createStatement() ;
  171.  
  172. resultset =statement4.executeQuery("select * from tip_dela") ;
  173.  
  174.  
  175. %>
  176.  
  177.  
  178. <hr id = "crta" style = "display: none;"></hr>
  179. <p id = "delo2" style = "display: none;" >Delo 2:</p>
  180. <i id = "tip_dela2" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  181. <select id="selected2_1" name="Delo2" style="display: none;" value = "1" >
  182. <% while(resultset.next()){ %>
  183. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  184. <% } %>
  185. </select>
  186. <%
  187.  
  188.  
  189. Statement statement3 = connection.createStatement() ;
  190.  
  191. resultset =statement3.executeQuery("select * from material") ;
  192.  
  193.  
  194. %>
  195. <i id = "material2" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  196.  
  197. <select id='selected3' name="Days2" style="display: none;" value = "1" >
  198. <% while(resultset.next()){ %>
  199. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  200.  
  201. <% } %>
  202.  
  203. </select>
  204.  
  205.  
  206. <i id = "kolicina_materiala2" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  207. <input style="display: none;" type="text" id="kolicina2" placeholder="Količina materiala" name = "kolicina2" value="0" />
  208.  
  209. <i id = "st_ure2" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  210. <input id = "ure2" type="text" name="ure2" placeholder="Število ur" style="display: none;" value="0"/>
  211.  
  212.  
  213. <input id = "plus2" class = "button" type="button" onclick="demoShow2(1);" value="+" style="display: none;">
  214.  
  215.  
  216. <script type="text/javascript">
  217. function demoShow2(a){
  218. if(a==1) {
  219. {document.getElementById("selected2_1").style.display="block";}
  220. {document.getElementById("selected3").style.display="block";}
  221. {document.getElementById("kolicina2").style.display="block";}
  222. {document.getElementById("material2").style.display="block";}
  223. {document.getElementById("kolicina_materiala2").style.display="block";}
  224. {document.getElementById("tip_dela2").style.display="block";}
  225. {document.getElementById("ure2").style.display="block";}
  226. {document.getElementById("st_ure2").style.display="block";}
  227. {document.getElementById("plus3").style.display="block";}
  228. {document.getElementById("delo2").style.display="block";}
  229. {document.getElementById("plus2").style.display="none";}
  230. {document.getElementById("crta").style.display="block";}
  231.  
  232.  
  233.  
  234. }
  235. out.println("Matic je car");
  236. }
  237. </script>
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247. <script>
  248. function myFunction(){
  249. var kolicina_ur= document.getElementById("ure").value;
  250. var kolicina_mat = document.getElementById("kolicina").value;
  251.  
  252.  
  253. }
  254.  
  255.  
  256. </script>
  257.  
  258.  
  259.  
  260.  
  261.  
  262. <%
  263. //**!!!!!!!!!!!!!! KONC DELA 2!!!!!!! **
  264. %>
  265.  
  266.  
  267.  
  268.  
  269. <%
  270.  
  271. //**!!!!!!!!!!!!!! DELO 3!!!!!!! **
  272. %>
  273. <%
  274.  
  275.  
  276. Statement statement5 = connection.createStatement() ;
  277.  
  278. resultset =statement5.executeQuery("select * from tip_dela") ;
  279.  
  280.  
  281. %>
  282.  
  283.  
  284. <hr id = "crta2" style = "display: none;"></hr>
  285. <p id = "delo3" style = "display: none;" >Delo 3:</p>
  286. <i id = "tip_dela3" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  287. <select id="selected2_2" name="Delo3" style="display: none;"value = "1" >
  288. <% while(resultset.next()){ %>
  289. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  290. <% } %>
  291. </select>
  292. <%
  293.  
  294.  
  295. Statement statement6 = connection.createStatement() ;
  296.  
  297. resultset =statement6.executeQuery("select * from material") ;
  298.  
  299.  
  300. %>
  301. <i id = "material3" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  302.  
  303. <select id='selected4' name="Days3" style="display: none;"value = "1" >
  304. <% while(resultset.next()){ %>
  305. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  306.  
  307. <% } %>
  308.  
  309. </select>
  310.  
  311.  
  312. <i id = "kolicina_materiala3" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  313. <input style="display: none;" type="text" id="kolicina3" placeholder="Količina materiala" name = "kolicina3" value="0" >
  314.  
  315. <i id = "st_ure3" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  316. <input id = "ure3" type="text" name="ure3" placeholder="Število ur" style="display: none;" value="0">
  317.  
  318.  
  319. <input id = "plus3" class = "button" type="button" onclick="demoShow3(1);" style="display: none;" value="+" />
  320.  
  321.  
  322. <script type="text/javascript">
  323. function demoShow3(a){
  324. if(a==1) {
  325. {document.getElementById("selected2_2").style.display="block";}
  326. {document.getElementById("selected4").style.display="block";}
  327. {document.getElementById("kolicina3").style.display="block";}
  328. {document.getElementById("material3").style.display="block";}
  329. {document.getElementById("kolicina_materiala3").style.display="block";}
  330. {document.getElementById("tip_dela3").style.display="block";}
  331. {document.getElementById("ure3").style.display="block";}
  332. {document.getElementById("st_ure3").style.display="block";}
  333. {document.getElementById("plus3").style.display="none";}
  334. {document.getElementById("delo3").style.display="block";}
  335. {document.getElementById("crta2").style.display="block";}
  336. {document.getElementById("plus4").style.display="block";}
  337. }
  338. }
  339. </script>
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350. <%
  351. //**!!!!!!!!!!!!!! KONC DELA 3!!!!!!! **
  352. %>
  353.  
  354.  
  355. <%
  356. //**!!!!!!!!!!!!!! DELO 4!!!!!!! **
  357. %>
  358. <%
  359.  
  360.  
  361. Statement statement7 = connection.createStatement() ;
  362.  
  363. resultset =statement7.executeQuery("select * from tip_dela") ;
  364.  
  365.  
  366. %>
  367.  
  368. <hr id = "crta3" style = "display: none;"></hr>
  369. <p id = "delo4" style = "display: none;" >Delo 4:</p>
  370. <i id = "tip_dela4" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  371. <select id="selected2_3" name="Delo4" style="display: none;" value = "1" >
  372. <% while(resultset.next()){ %>
  373. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  374. <% } %>
  375. </select>
  376. <%
  377.  
  378.  
  379. Statement statement8 = connection.createStatement() ;
  380.  
  381. resultset =statement8.executeQuery("select * from material") ;
  382.  
  383.  
  384. %>
  385. <i id = "material4" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  386.  
  387. <select id='selected5' name="Days4" style="display: none;" value = "1" >
  388. <% while(resultset.next()){ %>
  389. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  390.  
  391. <% } %>
  392.  
  393. </select>
  394.  
  395.  
  396. <i id = "kolicina_materiala4" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  397. <input style="display: none;" type="text" id="kolicina4" placeholder="Količina materiala" name = "kolicina4" value="0" >
  398.  
  399. <i id = "st_ure4" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  400. <input id = "ure4" type="text" name="ure4" placeholder="Število ur" style="display: none;"value="0">
  401.  
  402.  
  403. <input id = "plus4" class = "button" type="button" onclick="demoShow4(1);" style="display: none;" value="+" />
  404.  
  405.  
  406. <script type="text/javascript">
  407. function demoShow4(a){
  408. if(a==1) {
  409. {document.getElementById("selected2_3").style.display="block";}
  410. {document.getElementById("selected5").style.display="block";}
  411. {document.getElementById("kolicina4").style.display="block";}
  412. {document.getElementById("material4").style.display="block";}
  413. {document.getElementById("kolicina_materiala4").style.display="block";}
  414. {document.getElementById("tip_dela4").style.display="block";}
  415. {document.getElementById("ure4").style.display="block";}
  416. {document.getElementById("st_ure4").style.display="block";}
  417. {document.getElementById("plus4").style.display="none";}
  418. {document.getElementById("delo4").style.display="block";}
  419. {document.getElementById("crta3").style.display="block";}
  420. {document.getElementById("plus5").style.display="block";}
  421. }
  422. }
  423. </script>
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433. <%
  434. //**!!!!!!!!!!!!!! KONC DELA 4!!!!!!! **
  435. %>
  436.  
  437.  
  438. <%
  439. //**!!!!!!!!!!!!!! DELO 5!!!!!!! **
  440. %>
  441. <%
  442.  
  443.  
  444. Statement statement10 = connection.createStatement() ;
  445.  
  446. resultset =statement10.executeQuery("select * from tip_dela") ;
  447.  
  448.  
  449. %>
  450.  
  451.  
  452. <hr id = "crta4" style = "display: none;"></hr>
  453. <p id = "delo5" style = "display: none;" >Delo 5:</p>
  454. <i id = "tip_dela5" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  455. <select id="selected2_4" name="Delo5" style="display: none;" value = "1" >
  456. <% while(resultset.next()){ %>
  457. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  458. <% } %>
  459. </select>
  460. <%
  461.  
  462.  
  463. Statement statement9 = connection.createStatement() ;
  464.  
  465. resultset =statement9.executeQuery("select * from material") ;
  466.  
  467.  
  468. %>
  469. <i id = "material5" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  470.  
  471. <select id='selected6' name="Days5" style="display: none;" value = "1" >
  472. <% while(resultset.next()){ %>
  473. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  474.  
  475. <% } %>
  476.  
  477. </select>
  478.  
  479.  
  480. <i id = "kolicina_materiala5" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  481. <input style="display: none;" type="text" id="kolicina5" placeholder="Količina materiala" name = "kolicina5" value="0">
  482.  
  483. <i id = "st_ure5" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  484. <input id = "ure5" type="text" name="ure5" placeholder="Število ur" style="display: none;"value="0">
  485.  
  486.  
  487. <input id = "plus5" class = "button" type="button" onclick="demoShow5(1);" style="display: none;" value="+" />
  488.  
  489.  
  490. <script type="text/javascript">
  491. function demoShow5(a){
  492. if(a==1) {
  493. {document.getElementById("selected2_4").style.display="block";}
  494. {document.getElementById("selected6").style.display="block";}
  495. {document.getElementById("kolicina5").style.display="block";}
  496. {document.getElementById("material5").style.display="block";}
  497. {document.getElementById("kolicina_materiala5").style.display="block";}
  498. {document.getElementById("tip_dela5").style.display="block";}
  499. {document.getElementById("ure5").style.display="block";}
  500. {document.getElementById("st_ure5").style.display="block";}
  501. {document.getElementById("plus5").style.display="none";}
  502.  
  503. {document.getElementById("delo5").style.display="block";}
  504. {document.getElementById("crta4").style.display="block";}
  505. {document.getElementById("plus6").style.display="block";}
  506. }
  507. }
  508. </script>
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515. <%
  516. //**!!!!!!!!!!!!!! KONC DELA 5!!!!!!! **
  517. %>
  518.  
  519.  
  520. <%
  521. //**!!!!!!!!!!!!!! DELO 6!!!!!!! **
  522. %>
  523. <%
  524.  
  525.  
  526. Statement statement11 = connection.createStatement() ;
  527.  
  528. resultset =statement11.executeQuery("select * from tip_dela") ;
  529.  
  530.  
  531. %>
  532.  
  533.  
  534. <hr id = "crta5" style = "display: none;"></hr>
  535. <p id = "delo6" style = "display: none;" >Delo 6:</p>
  536. <i id = "tip_dela6" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  537. <select id="selected2_5" name="Delo6" style="display: none;" value = "1" >
  538. <% while(resultset.next()){ %>
  539. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  540. <% } %>
  541. </select>
  542. <%
  543.  
  544.  
  545. Statement statement12 = connection.createStatement() ;
  546.  
  547. resultset =statement12.executeQuery("select * from material") ;
  548.  
  549.  
  550. %>
  551. <i id = "material6" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  552.  
  553. <select id='selected7' name="Days6" style="display: none;" value = "1" >
  554. <% while(resultset.next()){ %>
  555. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  556.  
  557. <% } %>
  558.  
  559. </select>
  560.  
  561.  
  562. <i id = "kolicina_materiala6" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  563. <input style="display: none;" type="text" id="kolicina6" placeholder="Količina materiala" name = "kolicina6" value="0">
  564.  
  565. <i id = "st_ure6" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  566. <input id = "ure6" type="text" name="ure6" placeholder="Število ur" style="display: none;"value="0">
  567.  
  568.  
  569. <input id = "plus6" class = "button" type="button" onclick="demoShow6(1);" style="display: none;" value="+" />
  570.  
  571.  
  572. <script type="text/javascript">
  573. function demoShow6(a){
  574. if(a==1) {
  575. {document.getElementById("selected2_5").style.display="block";}
  576. {document.getElementById("selected7").style.display="block";}
  577. {document.getElementById("kolicina6").style.display="block";}
  578. {document.getElementById("material6").style.display="block";}
  579. {document.getElementById("kolicina_materiala6").style.display="block";}
  580. {document.getElementById("tip_dela6").style.display="block";}
  581. {document.getElementById("ure6").style.display="block";}
  582. {document.getElementById("st_ure6").style.display="block";}
  583. {document.getElementById("plus6").style.display="none";}
  584.  
  585. {document.getElementById("delo6").style.display="block";}
  586. {document.getElementById("crta5").style.display="block";}
  587. {document.getElementById("plus7").style.display="block";}
  588. }
  589. }
  590. </script>
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600. <%
  601. //**!!!!!!!!!!!!!! KONC DELA 6!!!!!!! **
  602. %>
  603.  
  604.  
  605.  
  606. <%
  607. //**!!!!!!!!!!!!!! DELO 7!!!!!!! **
  608. %>
  609. <%
  610.  
  611.  
  612. Statement statement13 = connection.createStatement() ;
  613.  
  614. resultset =statement13.executeQuery("select * from tip_dela") ;
  615.  
  616.  
  617. %>
  618.  
  619. <hr id = "crta6" style = "display: none;"></hr>
  620. <p id = "delo7" style = "display: none;" >Delo 7:</p>
  621. <i id = "tip_dela7" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  622. <select id="selected2_6" name="Delo7" style="display: none;" value = "1" >
  623. <% while(resultset.next()){ %>
  624. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  625. <% } %>
  626. </select>
  627. <%
  628.  
  629.  
  630. Statement statement14 = connection.createStatement() ;
  631.  
  632. resultset =statement14.executeQuery("select * from material") ;
  633.  
  634.  
  635. %>
  636. <i id = "material7" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  637.  
  638. <select id='selected8' name="Days7" style="display: none;" value = "1" >
  639. <% while(resultset.next()){ %>
  640. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  641.  
  642. <% } %>
  643.  
  644. </select>
  645.  
  646.  
  647. <i id = "kolicina_materiala7" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  648. <input style="display: none;" type="text" id="kolicina7" placeholder="Količina materiala" name = "kolicina7" value="0" >
  649.  
  650. <i id = "st_ure7" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  651. <input id = "ure7" type="text" name="ure7" placeholder="Število ur" style="display: none;" value="0">
  652.  
  653.  
  654. <input id = "plus7" class = "button" type="button" onclick="demoShow7(1);" style="display: none;" value="+" />
  655.  
  656.  
  657. <script type="text/javascript">
  658. function demoShow7(a){
  659. if(a==1) {
  660. {document.getElementById("selected2_6").style.display="block";}
  661. {document.getElementById("selected8").style.display="block";}
  662. {document.getElementById("kolicina7").style.display="block";}
  663. {document.getElementById("material7").style.display="block";}
  664. {document.getElementById("kolicina_materiala7").style.display="block";}
  665. {document.getElementById("tip_dela7").style.display="block";}
  666. {document.getElementById("ure7").style.display="block";}
  667. {document.getElementById("st_ure7").style.display="block";}
  668. {document.getElementById("plus7").style.display="none";}
  669.  
  670. {document.getElementById("delo7").style.display="block";}
  671. {document.getElementById("crta6").style.display="block";}
  672. {document.getElementById("plus8").style.display="block";}
  673. }
  674. }
  675. </script>
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684. <%
  685. //**!!!!!!!!!!!!!! KONC DELA 7!!!!!!! **
  686. %>
  687.  
  688.  
  689. <%
  690. //**!!!!!!!!!!!!!! DELO 8!!!!!!! **
  691. %>
  692. <%
  693.  
  694.  
  695. Statement statement15 = connection.createStatement() ;
  696.  
  697. resultset =statement15.executeQuery("select * from tip_dela") ;
  698.  
  699.  
  700. %>
  701.  
  702.  
  703. <hr id = "crta8" style = "display: none;"></hr>
  704. <p id = "delo8" style = "display: none;" >Delo 8:</p>
  705. <i id = "tip_dela8" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  706. <select id="selected2_7" name="Delo8" style="display: none;" value = "1" >
  707. <% while(resultset.next()){ %>
  708. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  709. <% } %>
  710. </select>
  711. <%
  712.  
  713.  
  714. Statement statement16 = connection.createStatement() ;
  715.  
  716. resultset =statement16.executeQuery("select * from material") ;
  717.  
  718.  
  719. %>
  720. <i id = "material8" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  721.  
  722. <select id='selected9' name="Days8" style="display: none;" value = "1" >
  723. <% while(resultset.next()){ %>
  724. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  725.  
  726. <% } %>
  727.  
  728. </select>
  729.  
  730.  
  731. <i id = "kolicina_materiala8" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  732. <input style="display: none;" type="text" id="kolicina8" placeholder="Količina materiala" name = "kolicina8" value="0" >
  733.  
  734. <i id = "st_ure8" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  735. <input id = "ure8" type="text" name="ure8" placeholder="Število ur" style="display: none;" value="0">
  736.  
  737.  
  738. <input id = "plus8" class = "button" type="button" onclick="demoShow8(1);" style="display: none;" value="+" />
  739.  
  740.  
  741. <script type="text/javascript">
  742. function demoShow8(a){
  743. if(a==1) {
  744. {document.getElementById("selected2_7").style.display="block";}
  745. {document.getElementById("selected9").style.display="block";}
  746. {document.getElementById("kolicina8").style.display="block";}
  747. {document.getElementById("material8").style.display="block";}
  748. {document.getElementById("kolicina_materiala8").style.display="block";}
  749. {document.getElementById("tip_dela8").style.display="block";}
  750. {document.getElementById("ure8").style.display="block";}
  751. {document.getElementById("st_ure8").style.display="block";}
  752. {document.getElementById("plus8").style.display="none";}
  753.  
  754. {document.getElementById("delo8").style.display="block";}
  755. {document.getElementById("crta8").style.display="block";}
  756. {document.getElementById("plus9").style.display="block";}
  757. }
  758. }
  759. </script>
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769. <%
  770. //**!!!!!!!!!!!!!! KONC DELA 8!!!!!!! **
  771. %>
  772.  
  773.  
  774.  
  775.  
  776. <%
  777. //**!!!!!!!!!!!!!! DELO 9!!!!!!! **
  778. %>
  779. <%
  780.  
  781.  
  782. Statement statement17 = connection.createStatement() ;
  783.  
  784. resultset =statement17.executeQuery("select * from tip_dela") ;
  785.  
  786.  
  787. %>
  788.  
  789.  
  790. <hr id = "crta8" style = "display: none;"></hr>
  791. <p id = "delo9" style = "display: none;" >Delo 9:</p>
  792. <i id = "tip_dela9" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  793. <select id="selected2_8" name="Delo9" style="display: none;" value = "1" >
  794. <% while(resultset.next()){ %>
  795. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  796. <% } %>
  797. </select>
  798. <%
  799.  
  800.  
  801. Statement statement18 = connection.createStatement() ;
  802.  
  803. resultset =statement18.executeQuery("select * from material") ;
  804.  
  805.  
  806. %>
  807. <i id = "material9" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  808.  
  809. <select id='selected10' name="Days9" style="display: none;" value = "1" >
  810. <% while(resultset.next()){ %>
  811. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  812.  
  813. <% } %>
  814.  
  815. </select>
  816.  
  817.  
  818. <i id = "kolicina_materiala9" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  819. <input style="display: none;" type="text" id="kolicina9" placeholder="Količina materiala" name = "kolicina9" value="0">
  820.  
  821. <i id = "st_ure9" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  822. <input id = "ure9" type="text" name="ure9" placeholder="Število ur" style="display: none;" value="0">
  823.  
  824.  
  825. <input id = "plus9" class = "button" type="button" onclick="demoShow9(1);" style="display: none;" value="+" />
  826.  
  827.  
  828. <script type="text/javascript">
  829. function demoShow9(a){
  830. if(a==1) {
  831. {document.getElementById("selected2_8").style.display="block";}
  832. {document.getElementById("selected10").style.display="block";}
  833. {document.getElementById("kolicina9").style.display="block";}
  834. {document.getElementById("material9").style.display="block";}
  835. {document.getElementById("kolicina_materiala9").style.display="block";}
  836. {document.getElementById("tip_dela9").style.display="block";}
  837. {document.getElementById("ure9").style.display="block";}
  838. {document.getElementById("st_ure9").style.display="block";}
  839. {document.getElementById("plus9").style.display="none";}
  840.  
  841. {document.getElementById("delo9").style.display="block";}
  842. {document.getElementById("crta9").style.display="block";}
  843. {document.getElementById("plus10").style.display="block";}
  844. }
  845. }
  846. </script>
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856. <%
  857. //**!!!!!!!!!!!!!! KONC DELA 9!!!!!!! **
  858. %>
  859.  
  860.  
  861.  
  862.  
  863.  
  864. <%
  865. //**!!!!!!!!!!!!!! DELO 10!!!!!!! **
  866. %>
  867. <%
  868.  
  869.  
  870. Statement statement19 = connection.createStatement() ;
  871.  
  872. resultset =statement19.executeQuery("select * from tip_dela") ;
  873.  
  874.  
  875. %>
  876.  
  877.  
  878. <hr id = "crta9" style = "display: none;"></hr>
  879. <p id = "delo10" style = "display: none;" >Delo 10:</p>
  880. <i id = "tip_dela10" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
  881. <select id="selected2_9" name="Delo10" style="display: none;" value = "1" >
  882. <% while(resultset.next()){ %>
  883. <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
  884. <% } %>
  885. </select>
  886. <%
  887.  
  888.  
  889. Statement statement20 = connection.createStatement() ;
  890.  
  891. resultset =statement20.executeQuery("select * from material") ;
  892.  
  893.  
  894. %>
  895. <i id = "material10" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
  896.  
  897. <select id='selected11' name="Days10" style="display: none;" value = "1" >
  898. <% while(resultset.next()){ %>
  899. <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
  900.  
  901. <% } %>
  902.  
  903. </select>
  904.  
  905.  
  906. <i id = "kolicina_materiala10" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
  907. <input style="display: none;" type="text" id="kolicina10" placeholder="Količina materiala" name = "kolicina10" value="0" >
  908.  
  909. <i id = "st_ure10" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
  910. <input id = "ure10" type="text" name="ure10" placeholder="Število ur" style="display: none;" value="0">
  911.  
  912.  
  913. <input id = "plus10" class = "button" type="button" onclick="demoShow10(1);" style="display: none;" value="+" />
  914.  
  915.  
  916. <script type="text/javascript">
  917. function demoShow10(a){
  918. if(a==1) {
  919. {document.getElementById("selected2_9").style.display="block";}
  920. {document.getElementById("selected11").style.display="block";}
  921. {document.getElementById("kolicina10").style.display="block";}
  922. {document.getElementById("material10").style.display="block";}
  923. {document.getElementById("kolicina_materiala10").style.display="block";}
  924. {document.getElementById("tip_dela10").style.display="block";}
  925. {document.getElementById("ure10").style.display="block";}
  926. {document.getElementById("st_ure10").style.display="block";}
  927. {document.getElementById("plus10").style.display="none";}
  928.  
  929. {document.getElementById("delo10").style.display="block";}
  930. {document.getElementById("crta10").style.display="block";}
  931. }
  932. }
  933. </script>
  934.  
  935.  
  936.  
  937.  
  938.  
  939. <input type="submit" value="Izračun cene" onclick="myFunction()">
  940.  
  941.  
  942.  
  943.  
  944.  
  945. <%
  946. //**!!!!!!!!!!!!!! KONC DELA 10!!!!!!! **
  947. %>
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955. <%
  956.  
  957.  
  958. Object material1 = request.getAttribute("material1");
  959. Object cena_materiala = request.getAttribute("cena_materiala");
  960. Object urna_postavka = request.getAttribute("urna_postavka");
  961. Object cena2 = request.getAttribute("cena2");
  962. Object cena_materiala2 = request.getAttribute("cena_materiala2");
  963. Object urna_postavka2 = request.getAttribute("urna_postavka2");
  964. Object cena3 = request.getAttribute("cena3");
  965.  
  966.  
  967. Object cena_materiala3 = request.getAttribute("cena_materiala3");
  968. Object urna_postavka3 = request.getAttribute("urna_postavka3");
  969. Object cena4 = request.getAttribute("cena4");
  970.  
  971.  
  972. Object cena_materiala4 = request.getAttribute("cena_materiala4");
  973. Object urna_postavka4 = request.getAttribute("urna_postavka4");
  974. Object cena5 = request.getAttribute("cena5");
  975. Object cena_materiala5 = request.getAttribute("cena_materiala5");
  976. Object urna_postavka5 = request.getAttribute("urna_postavka5");
  977. Object cena6 = request.getAttribute("cena6");
  978. Object cena_materiala6 = request.getAttribute("cena_materiala6");
  979. Object urna_postavka6 = request.getAttribute("urna_postavka6");
  980. Object cena7 = request.getAttribute("cena7");
  981. Object cena_materiala7 = request.getAttribute("cena_materiala7");
  982. Object urna_postavka7 = request.getAttribute("urna_postavka7");
  983. Object cena8 = request.getAttribute("cena8");
  984. Object cena_materiala8 = request.getAttribute("cena_materiala8");
  985. Object urna_postavka8 = request.getAttribute("urna_postavka8");
  986. Object cena9 = request.getAttribute("cena9");
  987.  
  988. Object cena_materiala9 = request.getAttribute("cena_materiala9");
  989. Object urna_postavka9 = request.getAttribute("urna_postavka9");
  990. Object cena10 = request.getAttribute("cena10");
  991. Object cena_materiala10 = request.getAttribute("cena_materiala10");
  992. Object urna_postavka10 = request.getAttribute("urna_postavka10");
  993. Object cena11 = request.getAttribute("cena11");
  994.  
  995. Object koncna_cena = request.getAttribute("koncna_cena");
  996.  
  997. if(cena_materiala != null){
  998. String c = cena_materiala.toString();
  999. String u = urna_postavka.toString();
  1000. String material1_1 = material1.toString();
  1001. int cena =Integer.parseInt( cena2.toString() );
  1002. out.println("Končna cena znaša: " + material1_1 + "€");
  1003.  
  1004. }
  1005. if(cena_materiala2 != null){
  1006. String c2 = cena_materiala2.toString();
  1007. String u2 = urna_postavka2.toString();
  1008. int cena3_1 =Integer.parseInt( cena3.toString() );
  1009.  
  1010. }
  1011.  
  1012. if(cena_materiala3 != null){
  1013. String c3 = cena_materiala3.toString();
  1014. String u3 = urna_postavka3.toString();
  1015. int cena3_2 =Integer.parseInt( cena4.toString() );
  1016.  
  1017. }
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024. if(cena_materiala4 != null){
  1025. String c4 = cena_materiala4.toString();
  1026. String u4 = urna_postavka4.toString();
  1027. int cena3_4 =Integer.parseInt( cena5.toString() );
  1028.  
  1029. }
  1030.  
  1031. if(cena_materiala5 != null){
  1032. String c5 = cena_materiala5.toString();
  1033. String u5 = urna_postavka5.toString();
  1034. int cena3_5 =Integer.parseInt( cena6.toString() );
  1035.  
  1036. }
  1037. if(cena_materiala6 != null){
  1038. String c6 = cena_materiala6.toString();
  1039. String u6 = urna_postavka6.toString();
  1040. int cena3_6 =Integer.parseInt( cena7.toString() );
  1041.  
  1042.  
  1043. if(cena_materiala7 != null){
  1044. String c7 = cena_materiala7.toString();
  1045. String u7 = urna_postavka7.toString();
  1046. int cena3_7 =Integer.parseInt( cena8.toString() );
  1047.  
  1048. }
  1049. if(cena_materiala8 != null){
  1050. String c8 = cena_materiala8.toString();
  1051. String u8 = urna_postavka8.toString();
  1052. int cena3_8 =Integer.parseInt( cena9.toString() );
  1053.  
  1054. }
  1055.  
  1056. if(cena_materiala9 != null){
  1057. String c9 = cena_materiala9.toString();
  1058. String u9 = urna_postavka9.toString();
  1059. int cena3_9 =Integer.parseInt( cena10.toString() );
  1060.  
  1061. }
  1062. if(cena_materiala10 != null){
  1063. String c10 = cena_materiala10.toString();
  1064. String u10 = urna_postavka10.toString();
  1065. int cena3_10 =Integer.parseInt( cena11.toString() );
  1066.  
  1067. }
  1068. if(koncna_cena != null){
  1069.  
  1070. int cena_koncna =Integer.parseInt( koncna_cena.toString() );
  1071. out.println("Končna cena znaša: " + cena_koncna + "€");
  1072.  
  1073. }
  1074. }}
  1075. finally
  1076. {
  1077. System.out.println("Matic");
  1078. }
  1079.  
  1080. %>
  1081.  
  1082. </form>
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088. </BODY>
  1089. </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement