%PDF- %PDF-
Direktori : /proc/self/root/var/www/html/buggydubrovnik.com/prodaja/ |
Current File : //proc/self/root/var/www/html/buggydubrovnik.com/prodaja/unvozaca.php |
<?php if (session_id() == ""){ session_cache_expire(30); session_start(); } if(!isset($_SESSION['userx']) && !isset($_SESSION['user'])) {header( 'Location: auth.php' ) ; exit;} ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="glyphicons.css" rel="stylesheet" type="text/css"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="jquery.js"></script> <script> $(document).ready(function(){ var sidemenu=$("#izborniklijevo") $("#toggleMenuButton").on("click", function(){ if(sidemenu.hasClass("active")) { sidemenu.removeClass("active") $(this).removeClass("active") } else { sidemenu.addClass("active") $(this).addClass("active") } }) }) </script> <style> #rabatdiv div, #rabatdivcij div { float:none!important; width: auto!important; } #desno { float:none; position:absolute; top:10px; background: none!important; display: block; right: 0; } .checkbox label { width: 15%; } .checkbox input { width: auto; } .button-smaller { font-weight: 400; padding: 0.2em; font-size: 1.1em; } label { display: inline-block; width: 25%; text-align: left; } select { font-size: 1.3em; } input { width: 60%; font-size: 1.5em; } .bigger-glyphicon { margin-left: 5px; font-size: 1.5em; font-weight: 700; } .align-left { text-align: left; } #sPartneri { font-size: 1.4em!important; } #tijelo { background: none; } div { margin-top: 0.5em; } .padded { padding: 1em; } @media (max-width: 768px) { #desno { float: none!important; position: relative; } #tijelo { margin-top: 100px!important; float: none!important; } input { width: 90%; } label { display: block; width: 100%; } } </style> <link href="style.css" rel="stylesheet" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>EXCURSIONS-VOZAČI</title> <script language="JavaScript" type="text/javascript" src="businesslayer.js"></script> <script type="text/javascript"> var vari = ""; var podaci=new Array(); function ParsirajSve(value) { value = value.split("##"); for (var i = 0; i < value.length; i++) { var tmp = value[i].split("=="); value[tmp[0]] = tmp[1]; } return value; } function pausecomp(millis) { var date = new Date(); var curDate = null; do { curDate = new Date(); } while(curDate-date < millis); } //PRIKAZ PADAJUĆEG IZBORNIKA S DESNE STRANE function Prikazi() { document.getElementById('bunesi').style.display="inline"; document.getElementById('bpromijeni').style.display="none"; //OČISTI SVE PODATKE var formObj = document.forms['partner']; formObj.sPartneri.options.length = 0; document.unos.ime.value = ""; document.unos.prezime.value =""; document.unos.telefon.value=""; document.unos.id.value=""; MakeRequestLoadAllZaposlenik(); //alert (vari); podaci = ParsirajSve(vari); var opt = document.createElement("option");document.getElementById("sPartneri").options.add(opt); opt.text = "ODABERITE VOZAČA"; opt.value = "-1"; var opt = document.createElement("option");document.getElementById("sPartneri").options.add(opt); opt.text = "----------------------------------------"; opt.value = "-1"; for(i=0;i<podaci['brojac'];i++) { var opt = document.createElement("option"); document.getElementById("sPartneri").options.add(opt); opt.text = podaci['ime'+i]+' '+podaci['prezime'+i]; opt.value = i; } } //PRIKAZ PODATAKA function PrikaziJednog() { document.getElementById('bunesi').style.display="none"; document.getElementById('bpromijeni').style.display="inline"; //DOHVAT REDNOG BROJA ELEMENTA U DROPDOWNU var selectElement1 = document.getElementById('sPartneri'); var selectedValue1 = selectElement1[selectElement1.selectedIndex].value; rbr=selectedValue1; if(rbr!=-1) { document.unos.ime.value = podaci['ime'+rbr]; document.unos.prezime.value =podaci['prezime'+rbr]; document.unos.telefon.value=podaci['kontakt'+rbr]; document.unos.id.value=podaci['idzaposlenik'+rbr]; } } function brisivozaca() { MakeRequestDeleteZaposlenik(document.unos.id.value);Prikazi(); } function unesi() { if(confirm("Unijeti vozača u bazu? ")) { MakeRequestInsertZaposlenik( 0, document.unos.ime.value, document.unos.prezime.value, document.unos.telefon.value, "", 1, "", 0); alert("Vozač uspješno unesen !"); Prikazi(); } } function promijeni() { if(confirm("Potvrditi promjene? ")){ Id=document.unos.id.value; MakeRequestUpdateZaposlenik( Id, document.unos.ime.value, document.unos.prezime.value, document.unos.telefon.value, "", 1, "", 0); alert("Promjena je uspješno izvršena !"); Prikazi();} } </script> </head> <body onload="Prikazi();" style=" margin:0 auto;"> <div id="gornjatraka"> <span id="toggleMenuButton"></span> <div style="float:right; margin-right:5px;padding-top:55px;">Prijavljeni ste kao <b><?php if (isset($_SESSION['user'])){ echo $_SESSION['user'];} else{ echo $_SESSION['userx'];}?></b></div> </div> <div id="main"> <div id="izborniklijevo"> <div class="izbornik"><span class="glyphicon glyphicon-home"></span> <a href="start.php"> Glavni izbornik</a> </div> <div class="izbornik"><span class="glyphicon glyphicon-map-marker"></span> <a href="excursions.php"> Izleti početna</a> </div> <div class="izbornik"><span class="glyphicon glyphicon-pencil"></span> <a href="krizlet.php"> Kreiraj izlet</a> </div> <div class="izbornik"><span class="glyphicon glyphicon-flag"></span> <a href="unmjkuplj.php"> Mjesta kupljenja</a> </div> <div class="izbornik"><span class="glyphicon glyphicon-briefcase"></span> <a href="unpart.php"> Unos partnera</a> </div> <div class="izbornik"><span class="glyphicon glyphicon-plane"></span> <a href="unvozila.php"> Unos vozila</a> </div> <div class="izbornik"><span class="glyphicon glyphicon-user"></span><a href="unvodica.php"> Unos vodiča</a> </div> <div class="izbornik"><span class="glyphicon glyphicon-road"></span> <a href="unvozaca.php"> Unos vozača</a> </div> </div> <div id="desno"> <br /><button onclick="javascript:location.reload(true);" class="button" >UNOS NOVOG</button> </div> <div id="tijelo"> <h1 class="title">UNOS VOZAČA</h1> <br /> <form name="partner"><select id="sPartneri" onchange="PrikaziJednog();"></select><a href="javascript:brisivozaca();"><span class="glyphicon glyphicon-remove-circle orange bigger-glyphicon"></span></a></form> <div id="dropdown"> <form name="unos" action=""> <div><label>Ime:</label><input name="ime" type="text" /></div> <div><label>Prezime:</label><input name="prezime" type="text" /></div> <div><label>Kontakt telefon :</label><input name="telefon" type="text" /></div> <input name="id" type="hidden" /> <div></div> <div><div id="bpromijeni"><button class="button" onclick="javascript:promijeni();" >SPREMI</button></div> <div id="bunesi"><button class="button" onclick="javascript:unesi();" >UNESI</button></div> </table> </form> </div> <div id="skriveni" style="visibility:hidden"></div> </div> </div> </body> </html>