%PDF- %PDF-
Direktori : /var/www/html/buggydubrovnik.com/buggy-booking/ |
Current File : /var/www/html/buggydubrovnik.com/buggy-booking/index.php |
<?php $cijena=250; function formatMoney($number, $cents = 1) { // cents: 0=never, 1=if needed, 2=always if (is_numeric($number)) { // a number if (!$number) { // zero $money = ($cents == 2 ? '0.00' : '0'); // output zero } else { // value if (floor($number) == $number) { // whole number $money = number_format($number, ($cents == 2 ? 2 : 0)); // format } else { // cents $money = number_format(round($number, 2), ($cents == 0 ? 0 : 2)); // format } // integer or decimal } // value $money = str_replace(",","[]", $money); $money = str_replace(".",",", $money); $money = str_replace("[]",".", $money); return $money; } // numeric } // formatMoney function spremitecaj (){ $fajl = "http://www.pbz.hr/Downloads/PBZteclist.xml"; $doc = new DOMDocument; $doc->Load($fajl); $xpath = new DOMXPath($doc); $valute = '//ExchRates/ExchRate/Currency/Name'; $prodajni = '//ExchRates/ExchRate/Currency/MeanRate'; $jedinica = '//ExchRates/ExchRate/Currency/Unit'; $valute_zapisi= $xpath->query($valute); $prodajni_zapisi = $xpath->query($prodajni); $jedinica_zapisi = $xpath->query($jedinica); $listaRezultata = array(); for($i=0;$i<$valute_zapisi->length;$i++) { $listaRezultata[$i] = array( 'valuta' => $valute_zapisi->item($i)->nodeValue , 'jedinica' => $jedinica_zapisi->item($i)->nodeValue, 'srednji' => $prodajni_zapisi->item($i)->nodeValue ); } $username ="adriatic_adrieco"; $password ="Po-Sl-123"; $hostname = "localhost"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to mysql"); $selected = mysql_select_db("adriatic_poslovanje",$dbh) or die("Could not select database"); foreach($listaRezultata as $key_val) { if ($key_val['valuta']=='EUR') { $upit = "update valute set tecaj = ".str_replace(',','.',$key_val['srednji'])." where IDValute= 1"; $result = mysql_query($upit); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } } }} ?> <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>BOOKING | Buggy Safari Dubrovnik</title> <meta content="Buggy safari dubrovnik tour. Book online and get discount!" name="description"> <meta name="viewport" content="width = device-width, initial-scale = 1.0" /> <meta name="author" content="Mint Media"> <link rel="apple-touch-icon" href="../images/logopuni.jpg"/> <link rel="icon" type="image/gif" href="../images/favicon.gif"> <link rel="stylesheet" href="css/responsivegridsystem.css" media="all"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script src="gen_validatorv4.js" type="text/javascript"></script> <script type="text/javascript"> function promijenivrijeme(){ var x=document.getElementById("lokacija") document.rezizlet.picktime.value=(x.options[x.selectedIndex].title); } function animirajIzbornik(idizb){ document.getElementById("izb"+idizb).src="../slike/linijamenu1.png"; } function vratiIzbornik(idizb){ document.getElementById("izb"+idizb).src="../slike/linijamenu.png"; } var vari =""; function getXMLHttp() { var xmlHttp try { //Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch(e) { //Internet Exploreret try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert("Your browser does not support AJAX!") return false; } } } return xmlHttp; } function MakeRequestDohvatiDane(ID, vrijednost) { var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { vari = xmlHttp.responseText; } } var parameters="idizlet="+ID+"&mjesec="+vrijednost; xmlHttp.open("POST", "dani.php", false); xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); //xmlHttp.setRequestHeader("Content-length", parameters.length); //xmlHttp.setRequestHeader("Connection", "close"); xmlHttp.send(parameters); } function MakeRequestDohvatiBuggyVremena(ID) { var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { vari = xmlHttp.responseText; } } var parameters="idizlet="+ID; xmlHttp.open("POST", "buggyvremena.php", false); xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); //xmlHttp.setRequestHeader("Content-length", parameters.length); //xmlHttp.setRequestHeader("Connection", "close"); xmlHttp.send(parameters); } 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 OsvjeziDropdown() { selectElement = document.getElementById('mjeseci'); selectedValue = selectElement[selectElement.selectedIndex].value; document.getElementById("dani").options.length = 0; //postavljanje prodajnih mjesta: idprodajnomj, idpartner, naziv, tip, tekst, broj, i=1; brojdana=daysInMonth(selectedValue,<?php echo date('Y');?>); if(parseInt(selectedValue)==parseInt(<?php echo date('m');?>)) { i=parseInt(<?php echo date('d');?>) +1; } for(;i<brojdana;i++) { var opt = document.createElement("option"); document.rezizlet.dani.options.add(opt); opt.text = i; opt.value = i; } for(i=10;i<19;i++) { var opt = document.createElement("option"); document.rezizlet.sati.options.add(opt); opt.text = i+':00'; opt.value = i; } } function daysInMonth(month,year) { return new Date(year, month, 0).getDate(); } /* function promijenivrijemebuggy() { selectElement = document.getElementById('buggyvrijeme'); selectedValue = selectElement[selectElement.selectedIndex].value; document.getElementById("lokacija").options.length = 0; //postavljanje prodajnih mjesta: idprodajnomj, idpartner, naziv, tip, tekst, broj, MakeRequestDohvatiBuggyVremena(selectedValue); pprodmjesta=ParsirajSve(vari); //alert(vari); var opt = document.createElement("option"); document.getElementById("lokacija").options.add(opt); opt.text ="--Choose location--"; for(i=1;i<pprodmjesta['brojac'];i++) { var opt = document.createElement("option"); document.getElementById("lokacija").options.add(opt); opt.title= pprodmjesta['vrijeme'+i]; opt.text = pprodmjesta['tekst'+i]; opt.value = pprodmjesta['value'+i]; } }*/ function theChecker() { if(document.rezizlet.checkb.checked==false) { document.rezizlet.subbtn.disabled=true; } else { document.rezizlet.subbtn.disabled=false; } } </script> </head> <body> <div id="fb-root"></div> <div id="headcontainer"> <header> <div class="group"> <div class="col span_1_of_9" id="logo"> <a href="//www.buggydubrovnik.com/"><img src="/buggy-booking/img/buggy-dubrovnik-logo.png" alt="Buggy Safari Dubrovnik Adventure Tours" /></a> </div> <div style="float: right;"> <div class="col1 span_1_of_9" style="margin-right:0"> <a class="button1" href="//www.buggydubrovnik.com/">HOME</a> </div> <div class="col1 span_1_of_9"> <a class="button1" href="//www.buggydubrovnik.com/about-us/">ABOUT US</a> </div> <div class="col1 span_1_of_9"> <a class="button1" href="//www.buggydubrovnik.com/adventure-tours-dubrovnik/">TOURS</a> </div> <div class="col1 span_1_of_9"> <a class="button1" href="//www.buggydubrovnik.com/travel-blog/">BLOG</a> </div> <div class="col1 span_1_of_9"> <a class="button1" href="//www.buggydubrovnik.com/contact-us/">CONTACT</a> </div> </div> </div> </header> </div> <div id="wrapper"> <div id="maincontentcontainer"> <div id="maincontent"> <div class="section group"> <div id="naslov1"> <h1 style="margin-bottom:25px; text-transform:uppercase">BOOKING | BUGGY SAFARI DUBROVNIK </h1> </div> </div> <div class="section group" style="width:97%"> </div> <div class="section group" style="margin-bottom:25px; margin-top:5px; background-color:#003; height:2px;"></div> <form style="font-weight:normal; text-align:left" name="rezizlet" method="post" action="bookizletpregledV3.php" > <div class="section group" style="margin-bottom:25px;"> </div> <div class="section group" style="margin-bottom:25px;"> <div class="col span_1_of_4"> <B>PRICE PER PERSON:</B></div><div class="col span_3_of_4"><b><?php echo formatMoney($cijena,2); ?> HRK - 5% discount = <b style="color:#F72A5D; font-size:1.2em;"> <?php echo formatMoney($cijena-$cijena*0.05,2).' HRK </b>'; ?> </div> </div> <div class="section group" style="margin-bottom:5px; margin-top:15px; background-color:#003; height:2px;"></div> <div class="section group" style="margin-bottom:0px;"> <strong>PERSONAL DATA</strong> </div> <div class="section group" style="margin-bottom:10px; margin-top:5px; background-color:#003; height:2px;"></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> Title: </div> <div class="col span_3_of_4"> <select id="title" name="title"> <option value="Mr">Mr</option> <option value="Ms">Ms</option> <option value="Mrs">Mrs</option> <option value="Miss">Miss</option> </select> </div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> First name: </div> <div class="col span_3_of_4"> <input name="CustomerFirstname" type="text" style="width:300px;" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> Last name: </div><div class="col span_3_of_4"><input name="CustomerSurname" type="text" style="width:300px;" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> Address: </div><div class="col span_3_of_4"><input name="CustomerAddress" type="text" style="width:300px;" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> City: </div><div class="col span_3_of_4"> <input name="CustomerCity" type="text" style="width:300px;" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> ZIP Code:</div><div class="col span_3_of_4"> <input name="CustomerZIP" type="text" style="width:300px;" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4">Country: </div><div class="col span_3_of_4"><input name="CustomerCountry" type="text" style="width:300px;" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4">Country calling code: </div><div class="col span_3_of_4"><input name="CustomerCode" type="text" style="width:50px;" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4">Telephone: </div><div class="col span_3_of_4"><input name="CustomerPhone" type="text" style="width:300px;" /></div></div> <div class="section group" style="margin-bottom:25px;"><div class="col span_1_of_4"> E-mail: </div><div class="col span_3_of_4"><input name="CustomerEmail" type="text" style="width:300px;" /></div></div> <div class="section group" style="margin-bottom:5px; margin-top:15px; background-color:#003; height:2px;"></div> <div class="section group" style="margin-bottom:0px;"> <strong>EXCURSION DATA</strong> </div> <div class="section group" style="margin-bottom:10px; margin-top:5px; background-color:#003; height:2px;"></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4">Month : </div><div class="col span_3_of_4"> <select id="mjeseci" name="mjeseci" onchange="OsvjeziDropdown();"> <?php for ($i=date('m');$i<11; $i++) { echo '<option title="'.$i.'" value="'.$i.'">'.date( 'F', mktime(0, 0, 0, $i,1,date('Y')) ).'</option>'; } ?> <?php for ($i=2;$i<11; $i++) { echo '<option title="'.$i.'" value="'.$i.'">'.date( 'F', mktime(0, 0, 0, $i,1,(date('Y')+1)) ).'</option>'; } ?> </select> (<?php echo " year : ".date('Y');?>)</div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> Day :</div><div class="col span_3_of_4"> <select id="dani" name="dani"> </select> </div> </div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> Time :</div><div class="col span_3_of_4"> <select id="sati" name="sati"> </select> </div> </div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4">Adults: </div><div class="col span_3_of_4"> <input name="odrasli" type="text" style="width:35px;" onkeyup="postavidjecu();" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> Children 6-12:</div><div class="col span_3_of_4"> <input name="djeca" type="text" style="width:35px;" /></div></div> <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> Children 0-6:</div><div class="col span_3_of_4"> <input name="djeca0" type="text" style="width:35px;" /></div></div> <!-- vidjeti s marinom za kodove za ovaj tu dio. Napraviti animaciju da kada netko upise kod, da mu javi da je ok i da je dobio dogovoreni popust. Popuste hardcodirati, ali u PHP. Ovdje imamo i hidden polje u koje treba upisati vrijednost pridruzenu pojedinom kodu npr 1,2,3,4 itd--> <!-- <div class="section group" style="margin-bottom:5px;"><div class="col span_1_of_4"> Promo code: </div><div class="col span_3_of_4"></div></div> --> <input name="promo" type="hidden" style="width:35px;" /> <input name="promo_id" type="hidden" value="0" /> <div class="section group" style="margin-bottom:25px;"><div class="col span_1_of_4">Comment:</div><div class="col span_3_of_4"> <textarea style="width:250px; min-height:100px;" name="komentar" ></textarea> </div></div> <div class="section group" style="margin-bottom:25px;" ><div class="col span_1_of_4"></div><div class="col span_3_of_4"> <br /> <iframe id="iframeterms" style="width:100%; max-height:150px; overflow:scroll;" src="https://www.adriatic-explore.com/booking/terms.html"></iframe><br /><br /><input value="1" id="checkb" type="checkbox" style="width:1.5em; height:1.5em;" name="terms" /> I agree with <a style="color:black; font-size:1.1em" href="javascript:void(0);" NAME="Terms and conditions" title="Terms and conditions " onClick=window.open("terms.html","Ratting","width=550,height=500,0,status=0,scrollbars=1");><u>terms and conditions</u> </a><br /><br /> This is booking form only! If you want to book, receive 5% discount and pay online click NEXT.<br /> If you want to contact us please do it through our contact form - <a style="color:red; font-size:16px;" href="../contact/">HERE</a> </div> </div> <div class="section group" style="margin-bottom:25px;" ><div class="col span_1_of_4"></div><div class="col span_3_of_4"> <input style="cursor:pointer;" type="submit" border="0" id="subbtn" class="button2" value="NEXT " /></div> </div> </form> <script type="text/javascript"> var frmvalidator = new Validator("rezizlet"); frmvalidator.addValidation("CustomerFirstname","req","Please enter your First Name"); frmvalidator.addValidation("CustomerSurname","req","Please enter your Surname"); frmvalidator.addValidation("CustomerAddress","req","Please enter your Address"); frmvalidator.addValidation("CustomerAddress","req","Please enter your Address"); frmvalidator.addValidation("CustomerCity","req","Please enter your City"); frmvalidator.addValidation("CustomerZIP","req","Please enter your ZIP"); frmvalidator.addValidation("CustomerCountry","req","Please enter your Country"); frmvalidator.addValidation("CustomerCode","req","Please enter your country calling code"); frmvalidator.addValidation("CustomerEmail","req","Please enter your Email"); frmvalidator.addValidation("CustomerEmail","email"); frmvalidator.addValidation("odrasli","req","Please enter number of adults"); frmvalidator.addValidation("odrasli","numeric","Adults must be numeric value"); frmvalidator.addValidation("djeca","numeric","Children must be numeric value"); frmvalidator.addValidation("djeca0","numeric","Children must be numeric value"); // frmvalidator.addValidation("lokacija","dontselect=0_--Choose location--","Please select pick-up location"); frmvalidator.addValidation("terms","shouldselchk=y","Sorry: you have to agree with terms and conditions!"); </script> </div> </div> </div> <div id="footercontainer"> <footer class="group"> <div class="col2 span_1_of_5" id="flogo1"> <a href="//www.adriatic-explore.com"> <img style="border:0px;" src="/buggy-booking/img/buggy-safari-dubrovnik-footer.png" alt="Buggy safari Dubrovnik" /></a> </div> <div class="col2 span_1_of_5" > </div> <div class="col2 span_1_of_5" id="fadresa1"> <h4>CONTACT INFO</h4><br /> <div>Gornji Kono 56E<br /><br /> Mobile: +385 98 166 9730<br /><br /> Email: info@buggydubrovnik.com<br /></div> </div> <div class="col2 span_1_of_5" id="fpodaci1"> <h4>BUGGY D.O.O</h4><br> <h4>OIB: 17998219966 </h4><br> <h4>MB: 04174062</h4> </div> <div class="col2 span_1_of_5" id="fsocial1"> <h4>FOLLOW US</h4> <a target="_blank" href="https://www.facebook.com/buggydubrovnik/"><img src="//www.adriatic-explore.com/images/face.png" alt="Buggy Dubrovnik facebook page" /></a> <br><br><br><br> Recommended by <a href="https://www.godubrovnik.guide/dubrovnikthingstodo/buggy-safari/" target="_blank">Dubrovnik Travel Guide</a> </div> <hr style="float: left;width: 350%;transform: translate(-50%);border-color: #f58220;"> <div style="float:left; width:100%; text-align:center"> © Powered by: <a href="http://www.mint-media.hr" target="_blank">Mint Media</a> - <a href="https://www.godubrovnik.com/" target="_blank">Go Dubrovnik Travel Portal</a> </div> </footer> </div> </div> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script src="gen_validatorv4.js" type="text/javascript"></script> <script type="text/javascript"> OsvjeziDropdown(); </script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-90629328-1', 'auto'); ga('send', 'pageview'); </script> </body> </html>