Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page import="java.sql.*" %>
- <%ResultSet resultset =null;%>
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <HTML>
- <HEAD>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <link rel="stylesheet" href="Dizajn.css">
- <TITLE>Select element drop down box</TITLE>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $('#slectboxid option').click(function(){
- $('#textboxid').val($(this).val());
- });
- });
- </script>
- <style>
- .button {
- background-color: #4CAF50;
- border-radius: 100%;
- border-color: white;
- color: white;
- padding: 3px 8px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 16px;
- margin: 4px 2px;
- cursor: pointer;
- }
- </style>
- </HEAD>
- <BODY>
- <%
- try{
- //Class.forName("com.mysql.jdbc.Driver").newInstance();
- Class.forName("com.mysql.jdbc.Driver");
- Connection connection =
- DriverManager.getConnection
- ("jdbc:mysql://svizec2.informatika.uni-mb.si:3306/s3p1_delavnica","s3p1_delavnica","28iblg");
- Statement statement = connection.createStatement() ;
- resultset =statement.executeQuery("select * from tip_dela") ;
- %>
- <h1> MojaDelavnica</h1>
- <form form action="NewServlet" form action="NewServlet2" method="post" >
- <i class="w3-xxmedium fa fa-calendar"></i>
- <input type="text" name="datum" placeholder="Datum / DD.MM.LLLL" >
- <br>
- <br>
- <i class="w3-xxmedium fa fa-pencil"></i>
- <input type="text" name="opis" placeholder="Opis">
- <br><br>
- <i class="w3-xxmedium fa fa-user"></i>
- <input type="text" name="ime" placeholder="Ime stranke">
- <br><br>
- <i class="w3-xxmedium fa fa-user"></i>
- <input type="text" name="priimek" placeholder="Priimek stranke">
- <br><br>
- <i class="w3-xxmedium fa fa-home"></i>
- <input id="blabla" type="text" name="ime" placeholder="Naslov stranke">
- <br><br>
- <form id="asd">
- <hr></hr>
- <p id = "delo" style ="display: none;">Delo:</p>
- <i id = "tip_dela" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id='selected' name="Delo" style="display: none;">
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement2 = connection.createStatement() ;
- resultset =statement2.executeQuery("select * from material") ;
- %>
- <i id = "material" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected2' name="Days" style="display: none;" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina" placeholder="Količina materiala" name = "kolicina" value="0" >
- <i id = "st_ure" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure" type="text" name="ure" placeholder="Število ur" style="display: none;" value="0" >
- <input id = "plus" class = "button" type="button" onclick="demoShow(1);" value="+" style ="display: block;">
- <script type="text/javascript">
- function demoShow(a){
- if(a==1) {
- {document.getElementById("selected").style.display="block";}
- {document.getElementById("selected2").style.display="block";}
- {document.getElementById("kolicina").style.display="block";}
- {document.getElementById("material").style.display="block";}
- {document.getElementById("kolicina_materiala").style.display="block";}
- {document.getElementById("tip_dela").style.display="block";}
- {document.getElementById("ure").style.display="block";}
- {document.getElementById("st_ure").style.display="block";}
- {document.getElementById("plus").style.display="none";}
- {document.getElementById("plus2").style.display="block";}
- {document.getElementById("delo").style.display="block";}
- }
- }
- </script>
- <script>
- function myFunction(){
- var kolicina_ur= document.getElementById("ure").value;
- var kolicina_mat = document.getElementById("kolicina").value;
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! DELO 2!!!!!!! **
- %>
- <%
- Statement statement4 = connection.createStatement() ;
- resultset =statement4.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta" style = "display: none;"></hr>
- <p id = "delo2" style = "display: none;" >Delo 2:</p>
- <i id = "tip_dela2" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_1" name="Delo2" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement3 = connection.createStatement() ;
- resultset =statement3.executeQuery("select * from material") ;
- %>
- <i id = "material2" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected3' name="Days2" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala2" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina2" placeholder="Količina materiala" name = "kolicina2" value="0" />
- <i id = "st_ure2" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure2" type="text" name="ure2" placeholder="Število ur" style="display: none;" value="0"/>
- <input id = "plus2" class = "button" type="button" onclick="demoShow2(1);" value="+" style="display: none;">
- <script type="text/javascript">
- function demoShow2(a){
- if(a==1) {
- {document.getElementById("selected2_1").style.display="block";}
- {document.getElementById("selected3").style.display="block";}
- {document.getElementById("kolicina2").style.display="block";}
- {document.getElementById("material2").style.display="block";}
- {document.getElementById("kolicina_materiala2").style.display="block";}
- {document.getElementById("tip_dela2").style.display="block";}
- {document.getElementById("ure2").style.display="block";}
- {document.getElementById("st_ure2").style.display="block";}
- {document.getElementById("plus3").style.display="block";}
- {document.getElementById("delo2").style.display="block";}
- {document.getElementById("plus2").style.display="none";}
- {document.getElementById("crta").style.display="block";}
- }
- out.println("Matic je car");
- }
- </script>
- <script>
- function myFunction(){
- var kolicina_ur= document.getElementById("ure").value;
- var kolicina_mat = document.getElementById("kolicina").value;
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! KONC DELA 2!!!!!!! **
- %>
- <%
- //**!!!!!!!!!!!!!! DELO 3!!!!!!! **
- %>
- <%
- Statement statement5 = connection.createStatement() ;
- resultset =statement5.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta2" style = "display: none;"></hr>
- <p id = "delo3" style = "display: none;" >Delo 3:</p>
- <i id = "tip_dela3" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_2" name="Delo3" style="display: none;"value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement6 = connection.createStatement() ;
- resultset =statement6.executeQuery("select * from material") ;
- %>
- <i id = "material3" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected4' name="Days3" style="display: none;"value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala3" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina3" placeholder="Količina materiala" name = "kolicina3" value="0" >
- <i id = "st_ure3" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure3" type="text" name="ure3" placeholder="Število ur" style="display: none;" value="0">
- <input id = "plus3" class = "button" type="button" onclick="demoShow3(1);" style="display: none;" value="+" />
- <script type="text/javascript">
- function demoShow3(a){
- if(a==1) {
- {document.getElementById("selected2_2").style.display="block";}
- {document.getElementById("selected4").style.display="block";}
- {document.getElementById("kolicina3").style.display="block";}
- {document.getElementById("material3").style.display="block";}
- {document.getElementById("kolicina_materiala3").style.display="block";}
- {document.getElementById("tip_dela3").style.display="block";}
- {document.getElementById("ure3").style.display="block";}
- {document.getElementById("st_ure3").style.display="block";}
- {document.getElementById("plus3").style.display="none";}
- {document.getElementById("delo3").style.display="block";}
- {document.getElementById("crta2").style.display="block";}
- {document.getElementById("plus4").style.display="block";}
- }
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! KONC DELA 3!!!!!!! **
- %>
- <%
- //**!!!!!!!!!!!!!! DELO 4!!!!!!! **
- %>
- <%
- Statement statement7 = connection.createStatement() ;
- resultset =statement7.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta3" style = "display: none;"></hr>
- <p id = "delo4" style = "display: none;" >Delo 4:</p>
- <i id = "tip_dela4" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_3" name="Delo4" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement8 = connection.createStatement() ;
- resultset =statement8.executeQuery("select * from material") ;
- %>
- <i id = "material4" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected5' name="Days4" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala4" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina4" placeholder="Količina materiala" name = "kolicina4" value="0" >
- <i id = "st_ure4" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure4" type="text" name="ure4" placeholder="Število ur" style="display: none;"value="0">
- <input id = "plus4" class = "button" type="button" onclick="demoShow4(1);" style="display: none;" value="+" />
- <script type="text/javascript">
- function demoShow4(a){
- if(a==1) {
- {document.getElementById("selected2_3").style.display="block";}
- {document.getElementById("selected5").style.display="block";}
- {document.getElementById("kolicina4").style.display="block";}
- {document.getElementById("material4").style.display="block";}
- {document.getElementById("kolicina_materiala4").style.display="block";}
- {document.getElementById("tip_dela4").style.display="block";}
- {document.getElementById("ure4").style.display="block";}
- {document.getElementById("st_ure4").style.display="block";}
- {document.getElementById("plus4").style.display="none";}
- {document.getElementById("delo4").style.display="block";}
- {document.getElementById("crta3").style.display="block";}
- {document.getElementById("plus5").style.display="block";}
- }
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! KONC DELA 4!!!!!!! **
- %>
- <%
- //**!!!!!!!!!!!!!! DELO 5!!!!!!! **
- %>
- <%
- Statement statement10 = connection.createStatement() ;
- resultset =statement10.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta4" style = "display: none;"></hr>
- <p id = "delo5" style = "display: none;" >Delo 5:</p>
- <i id = "tip_dela5" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_4" name="Delo5" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement9 = connection.createStatement() ;
- resultset =statement9.executeQuery("select * from material") ;
- %>
- <i id = "material5" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected6' name="Days5" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala5" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina5" placeholder="Količina materiala" name = "kolicina5" value="0">
- <i id = "st_ure5" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure5" type="text" name="ure5" placeholder="Število ur" style="display: none;"value="0">
- <input id = "plus5" class = "button" type="button" onclick="demoShow5(1);" style="display: none;" value="+" />
- <script type="text/javascript">
- function demoShow5(a){
- if(a==1) {
- {document.getElementById("selected2_4").style.display="block";}
- {document.getElementById("selected6").style.display="block";}
- {document.getElementById("kolicina5").style.display="block";}
- {document.getElementById("material5").style.display="block";}
- {document.getElementById("kolicina_materiala5").style.display="block";}
- {document.getElementById("tip_dela5").style.display="block";}
- {document.getElementById("ure5").style.display="block";}
- {document.getElementById("st_ure5").style.display="block";}
- {document.getElementById("plus5").style.display="none";}
- {document.getElementById("delo5").style.display="block";}
- {document.getElementById("crta4").style.display="block";}
- {document.getElementById("plus6").style.display="block";}
- }
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! KONC DELA 5!!!!!!! **
- %>
- <%
- //**!!!!!!!!!!!!!! DELO 6!!!!!!! **
- %>
- <%
- Statement statement11 = connection.createStatement() ;
- resultset =statement11.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta5" style = "display: none;"></hr>
- <p id = "delo6" style = "display: none;" >Delo 6:</p>
- <i id = "tip_dela6" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_5" name="Delo6" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement12 = connection.createStatement() ;
- resultset =statement12.executeQuery("select * from material") ;
- %>
- <i id = "material6" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected7' name="Days6" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala6" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina6" placeholder="Količina materiala" name = "kolicina6" value="0">
- <i id = "st_ure6" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure6" type="text" name="ure6" placeholder="Število ur" style="display: none;"value="0">
- <input id = "plus6" class = "button" type="button" onclick="demoShow6(1);" style="display: none;" value="+" />
- <script type="text/javascript">
- function demoShow6(a){
- if(a==1) {
- {document.getElementById("selected2_5").style.display="block";}
- {document.getElementById("selected7").style.display="block";}
- {document.getElementById("kolicina6").style.display="block";}
- {document.getElementById("material6").style.display="block";}
- {document.getElementById("kolicina_materiala6").style.display="block";}
- {document.getElementById("tip_dela6").style.display="block";}
- {document.getElementById("ure6").style.display="block";}
- {document.getElementById("st_ure6").style.display="block";}
- {document.getElementById("plus6").style.display="none";}
- {document.getElementById("delo6").style.display="block";}
- {document.getElementById("crta5").style.display="block";}
- {document.getElementById("plus7").style.display="block";}
- }
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! KONC DELA 6!!!!!!! **
- %>
- <%
- //**!!!!!!!!!!!!!! DELO 7!!!!!!! **
- %>
- <%
- Statement statement13 = connection.createStatement() ;
- resultset =statement13.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta6" style = "display: none;"></hr>
- <p id = "delo7" style = "display: none;" >Delo 7:</p>
- <i id = "tip_dela7" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_6" name="Delo7" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement14 = connection.createStatement() ;
- resultset =statement14.executeQuery("select * from material") ;
- %>
- <i id = "material7" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected8' name="Days7" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala7" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina7" placeholder="Količina materiala" name = "kolicina7" value="0" >
- <i id = "st_ure7" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure7" type="text" name="ure7" placeholder="Število ur" style="display: none;" value="0">
- <input id = "plus7" class = "button" type="button" onclick="demoShow7(1);" style="display: none;" value="+" />
- <script type="text/javascript">
- function demoShow7(a){
- if(a==1) {
- {document.getElementById("selected2_6").style.display="block";}
- {document.getElementById("selected8").style.display="block";}
- {document.getElementById("kolicina7").style.display="block";}
- {document.getElementById("material7").style.display="block";}
- {document.getElementById("kolicina_materiala7").style.display="block";}
- {document.getElementById("tip_dela7").style.display="block";}
- {document.getElementById("ure7").style.display="block";}
- {document.getElementById("st_ure7").style.display="block";}
- {document.getElementById("plus7").style.display="none";}
- {document.getElementById("delo7").style.display="block";}
- {document.getElementById("crta6").style.display="block";}
- {document.getElementById("plus8").style.display="block";}
- }
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! KONC DELA 7!!!!!!! **
- %>
- <%
- //**!!!!!!!!!!!!!! DELO 8!!!!!!! **
- %>
- <%
- Statement statement15 = connection.createStatement() ;
- resultset =statement15.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta8" style = "display: none;"></hr>
- <p id = "delo8" style = "display: none;" >Delo 8:</p>
- <i id = "tip_dela8" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_7" name="Delo8" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement16 = connection.createStatement() ;
- resultset =statement16.executeQuery("select * from material") ;
- %>
- <i id = "material8" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected9' name="Days8" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala8" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina8" placeholder="Količina materiala" name = "kolicina8" value="0" >
- <i id = "st_ure8" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure8" type="text" name="ure8" placeholder="Število ur" style="display: none;" value="0">
- <input id = "plus8" class = "button" type="button" onclick="demoShow8(1);" style="display: none;" value="+" />
- <script type="text/javascript">
- function demoShow8(a){
- if(a==1) {
- {document.getElementById("selected2_7").style.display="block";}
- {document.getElementById("selected9").style.display="block";}
- {document.getElementById("kolicina8").style.display="block";}
- {document.getElementById("material8").style.display="block";}
- {document.getElementById("kolicina_materiala8").style.display="block";}
- {document.getElementById("tip_dela8").style.display="block";}
- {document.getElementById("ure8").style.display="block";}
- {document.getElementById("st_ure8").style.display="block";}
- {document.getElementById("plus8").style.display="none";}
- {document.getElementById("delo8").style.display="block";}
- {document.getElementById("crta8").style.display="block";}
- {document.getElementById("plus9").style.display="block";}
- }
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! KONC DELA 8!!!!!!! **
- %>
- <%
- //**!!!!!!!!!!!!!! DELO 9!!!!!!! **
- %>
- <%
- Statement statement17 = connection.createStatement() ;
- resultset =statement17.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta8" style = "display: none;"></hr>
- <p id = "delo9" style = "display: none;" >Delo 9:</p>
- <i id = "tip_dela9" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_8" name="Delo9" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement18 = connection.createStatement() ;
- resultset =statement18.executeQuery("select * from material") ;
- %>
- <i id = "material9" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected10' name="Days9" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala9" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina9" placeholder="Količina materiala" name = "kolicina9" value="0">
- <i id = "st_ure9" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure9" type="text" name="ure9" placeholder="Število ur" style="display: none;" value="0">
- <input id = "plus9" class = "button" type="button" onclick="demoShow9(1);" style="display: none;" value="+" />
- <script type="text/javascript">
- function demoShow9(a){
- if(a==1) {
- {document.getElementById("selected2_8").style.display="block";}
- {document.getElementById("selected10").style.display="block";}
- {document.getElementById("kolicina9").style.display="block";}
- {document.getElementById("material9").style.display="block";}
- {document.getElementById("kolicina_materiala9").style.display="block";}
- {document.getElementById("tip_dela9").style.display="block";}
- {document.getElementById("ure9").style.display="block";}
- {document.getElementById("st_ure9").style.display="block";}
- {document.getElementById("plus9").style.display="none";}
- {document.getElementById("delo9").style.display="block";}
- {document.getElementById("crta9").style.display="block";}
- {document.getElementById("plus10").style.display="block";}
- }
- }
- </script>
- <%
- //**!!!!!!!!!!!!!! KONC DELA 9!!!!!!! **
- %>
- <%
- //**!!!!!!!!!!!!!! DELO 10!!!!!!! **
- %>
- <%
- Statement statement19 = connection.createStatement() ;
- resultset =statement19.executeQuery("select * from tip_dela") ;
- %>
- <hr id = "crta9" style = "display: none;"></hr>
- <p id = "delo10" style = "display: none;" >Delo 10:</p>
- <i id = "tip_dela10" style ="display: none;" class="w3-xxmedium fa fa-wrench"></i>
- <select id="selected2_9" name="Delo10" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option><%= resultset.getString(2)%>, <%= resultset.getString(3)%> €</option>
- <% } %>
- </select>
- <%
- Statement statement20 = connection.createStatement() ;
- resultset =statement20.executeQuery("select * from material") ;
- %>
- <i id = "material10" style ="display: none;" class="w3-xxmedium fa fa-shopping-cart" ></i>
- <select id='selected11' name="Days10" style="display: none;" value = "1" >
- <% while(resultset.next()){ %>
- <option ><%= resultset.getString(2) %>, <%= resultset.getInt(3) %>€</option>
- <% } %>
- </select>
- <i id = "kolicina_materiala10" style ="display: none;" class="w3-xxmedium fa fa-shopping-basket"></i>
- <input style="display: none;" type="text" id="kolicina10" placeholder="Količina materiala" name = "kolicina10" value="0" >
- <i id = "st_ure10" style ="display: none;" class="w3-xxmedium fa fa-clock-o"></i>
- <input id = "ure10" type="text" name="ure10" placeholder="Število ur" style="display: none;" value="0">
- <input id = "plus10" class = "button" type="button" onclick="demoShow10(1);" style="display: none;" value="+" />
- <script type="text/javascript">
- function demoShow10(a){
- if(a==1) {
- {document.getElementById("selected2_9").style.display="block";}
- {document.getElementById("selected11").style.display="block";}
- {document.getElementById("kolicina10").style.display="block";}
- {document.getElementById("material10").style.display="block";}
- {document.getElementById("kolicina_materiala10").style.display="block";}
- {document.getElementById("tip_dela10").style.display="block";}
- {document.getElementById("ure10").style.display="block";}
- {document.getElementById("st_ure10").style.display="block";}
- {document.getElementById("plus10").style.display="none";}
- {document.getElementById("delo10").style.display="block";}
- {document.getElementById("crta10").style.display="block";}
- }
- }
- </script>
- <input type="submit" value="Izračun cene" onclick="myFunction()">
- <%
- //**!!!!!!!!!!!!!! KONC DELA 10!!!!!!! **
- %>
- <%
- Object material1 = request.getAttribute("material1");
- Object cena_materiala = request.getAttribute("cena_materiala");
- Object urna_postavka = request.getAttribute("urna_postavka");
- Object cena2 = request.getAttribute("cena2");
- Object cena_materiala2 = request.getAttribute("cena_materiala2");
- Object urna_postavka2 = request.getAttribute("urna_postavka2");
- Object cena3 = request.getAttribute("cena3");
- Object cena_materiala3 = request.getAttribute("cena_materiala3");
- Object urna_postavka3 = request.getAttribute("urna_postavka3");
- Object cena4 = request.getAttribute("cena4");
- Object cena_materiala4 = request.getAttribute("cena_materiala4");
- Object urna_postavka4 = request.getAttribute("urna_postavka4");
- Object cena5 = request.getAttribute("cena5");
- Object cena_materiala5 = request.getAttribute("cena_materiala5");
- Object urna_postavka5 = request.getAttribute("urna_postavka5");
- Object cena6 = request.getAttribute("cena6");
- Object cena_materiala6 = request.getAttribute("cena_materiala6");
- Object urna_postavka6 = request.getAttribute("urna_postavka6");
- Object cena7 = request.getAttribute("cena7");
- Object cena_materiala7 = request.getAttribute("cena_materiala7");
- Object urna_postavka7 = request.getAttribute("urna_postavka7");
- Object cena8 = request.getAttribute("cena8");
- Object cena_materiala8 = request.getAttribute("cena_materiala8");
- Object urna_postavka8 = request.getAttribute("urna_postavka8");
- Object cena9 = request.getAttribute("cena9");
- Object cena_materiala9 = request.getAttribute("cena_materiala9");
- Object urna_postavka9 = request.getAttribute("urna_postavka9");
- Object cena10 = request.getAttribute("cena10");
- Object cena_materiala10 = request.getAttribute("cena_materiala10");
- Object urna_postavka10 = request.getAttribute("urna_postavka10");
- Object cena11 = request.getAttribute("cena11");
- Object koncna_cena = request.getAttribute("koncna_cena");
- if(cena_materiala != null){
- String c = cena_materiala.toString();
- String u = urna_postavka.toString();
- String material1_1 = material1.toString();
- int cena =Integer.parseInt( cena2.toString() );
- out.println("Končna cena znaša: " + material1_1 + "€");
- }
- if(cena_materiala2 != null){
- String c2 = cena_materiala2.toString();
- String u2 = urna_postavka2.toString();
- int cena3_1 =Integer.parseInt( cena3.toString() );
- }
- if(cena_materiala3 != null){
- String c3 = cena_materiala3.toString();
- String u3 = urna_postavka3.toString();
- int cena3_2 =Integer.parseInt( cena4.toString() );
- }
- if(cena_materiala4 != null){
- String c4 = cena_materiala4.toString();
- String u4 = urna_postavka4.toString();
- int cena3_4 =Integer.parseInt( cena5.toString() );
- }
- if(cena_materiala5 != null){
- String c5 = cena_materiala5.toString();
- String u5 = urna_postavka5.toString();
- int cena3_5 =Integer.parseInt( cena6.toString() );
- }
- if(cena_materiala6 != null){
- String c6 = cena_materiala6.toString();
- String u6 = urna_postavka6.toString();
- int cena3_6 =Integer.parseInt( cena7.toString() );
- if(cena_materiala7 != null){
- String c7 = cena_materiala7.toString();
- String u7 = urna_postavka7.toString();
- int cena3_7 =Integer.parseInt( cena8.toString() );
- }
- if(cena_materiala8 != null){
- String c8 = cena_materiala8.toString();
- String u8 = urna_postavka8.toString();
- int cena3_8 =Integer.parseInt( cena9.toString() );
- }
- if(cena_materiala9 != null){
- String c9 = cena_materiala9.toString();
- String u9 = urna_postavka9.toString();
- int cena3_9 =Integer.parseInt( cena10.toString() );
- }
- if(cena_materiala10 != null){
- String c10 = cena_materiala10.toString();
- String u10 = urna_postavka10.toString();
- int cena3_10 =Integer.parseInt( cena11.toString() );
- }
- if(koncna_cena != null){
- int cena_koncna =Integer.parseInt( koncna_cena.toString() );
- out.println("Končna cena znaša: " + cena_koncna + "€");
- }
- }}
- finally
- {
- System.out.println("Matic");
- }
- %>
- </form>
- </BODY>
- </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement