%PDF- %PDF-
Direktori : /var/www/html/buggydubrovnik.com/buggy-booking/ |
Current File : /var/www/html/buggydubrovnik.com/buggy-booking/bookizletpregledV3.php |
<?php 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 if(!(isset($_POST["picktime"])&&isset($_POST["CustomerEmail"]))) {exit;} $servername = "localhost"; $username="buggydubrovnik_app_production"; $password="appr-17"; $db="buggydubrovnik_app_production"; // Create connection $conn = mysqli_connect($servername, $username, $password, $db); mysqli_query($conn,"set names 'utf8'"); $title = mysqli_real_escape_string($conn, $_POST["title"]); $CustomerFirstname =mysqli_real_escape_string($conn, $_POST["CustomerFirstname"]); $CustomerSurname =mysqli_real_escape_string($conn, $_POST["CustomerSurname"]); $CustomerAddress =mysqli_real_escape_string($conn, $_POST["CustomerAddress"]); $CustomerCity =mysqli_real_escape_string($conn, $_POST["CustomerCity"]); $CustomerZIP = mysqli_real_escape_string($conn, $_POST["CustomerZIP"]); $CustomerCountry =mysqli_real_escape_string($conn, $_POST["CustomerCountry"]); $CustomerPhone =mysqli_real_escape_string($conn, "+".$_POST["CustomerCode"]."-".$_POST["CustomerPhone"]); $CustomerEmail =mysqli_real_escape_string($conn, $_POST["CustomerEmail"]); $promo =mysqli_real_escape_string($conn, $_POST["promo"]); $promo_id =mysqli_real_escape_string($conn, $_POST["promo_id"]); $odrasli =mysqli_real_escape_string($conn, $_POST["odrasli"]); $djeca =mysqli_real_escape_string($conn, $_POST["djeca"]); if ($djeca == '') $djeca = 0; $djeca0 =mysqli_real_escape_string($conn, $_POST["djeca0"]); if ($djeca0 == '') $djeca0 = 0; $komentar =mysqli_real_escape_string($conn, $_POST["komentar"]); $picktime =mysqli_real_escape_string($conn, $_POST["picktime"]); $mjeseci =mysqli_real_escape_string($conn, $_POST["mjeseci"]); $dani =mysqli_real_escape_string($conn, $_POST["dani"]); $TotalAmount=0.0; $djecau=intval($djeca)+intval($djeca0); $today = getdate(); $odkad = $today["year"].'-'.$mjeseci.'-'.$dani; $odkadprikaz =$dani.'.'.$mjeseci.'.'.$today["year"] ; $ShopId=20002857; $SecretKey="d2)HS!cw6-Vi:X1GzG0M@Y_drU~QS*y2"; //ovo dolje nisam dirao // forma treba bacati na testni sustav : https://pgwtest.ht.hr/services/payment/api/authorize-form // uvijek mozes poci na https://pgwtest.ht.hr i logirati se preko user: buggy777 password: Buggy-412 //na index stranici omoguciti da vremena pocetka budu do: /*3.4. - do 17 h 6.,7.,8. - do 19 h 5.,9. - do 18h 10. - do 17 h*/ //terms and conditions na index stranici cu ja napisati //promo kodovi su: /* Direct Booker - BUdb2 In Your Pocket - BUiP3*/ //za voucher Petar ima html kod $ukupnaCijena=$TotalAmount1; $TotalAmount= formatMoney($TotalAmount1,2);; // $hash = genRandomString(); //echo $dani; $upit="CALL proc_TempRezervacijaInsert(@idtemprezervacija".",".upisBaza($idizlet).",'".upisBaza($naziv)."'".",'".upisBaza($title)."'".",'".upisBaza($CustomerFirstname)."'".",'".upisBaza($CustomerSurname)."'".",'".upisBaza($CustomerAddress)."'".",'".upisBaza($CustomerCity)."'".",'".upisBaza($CustomerZIP)."'".",'".upisBaza($CustomerCountry)."'".",'".upisBaza($CustomerPhone)."'".",'".upisBaza($CustomerEmail)."'".",'".upisBaza($odkad)."'".",".upisBaza($odrasli).",".upisBaza($djecau).",".upisBaza($cijenaodrasli).",".upisBaza($cijenadjeca).",".upisBaza($lokacijaid).",'".upisBaza($lokacija)."'".",'".upisBaza($picktime)."'".",'".upisBaza($komentar)."'".",'".upisBaza($hash)."'".",0,0,0,'','');"; $result = mysql_query($upit); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } $upit= 'SELECT @idtemprezervacija'; $result = mysql_query($upit); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } $row = mysql_fetch_row($result); $idtemprezervacija = $row[0]; // echo $idtemprezervacija; //setcookie("idkosarica", $idtemprezervacija,time() + (3600)); //setcookie("TestCookie", $hash,time() + (3600)); //echo $_COOKIE['TestCookie']; echo "ovdje"; $TotalAmountV2=str_replace('.','',$TotalAmount); $TotalAmountV2=str_replace(',','.',$TotalAmountV2); $TotalAmountV2=$TotalAmountV2*100; ///$ShopId=20000339; $ShoppingCartId=$idtemprezervacija; $Signature=""; //$SecretKey="bcb3@UHS3CfXvLJ~kR-z0OuI9rIp9"; $ShopId=10000800; $SecretKey="tib.com789"; //$Signature=openssl_digest("authorize-form".$SecretKey.$ShopId.$SecretKey.$ShoppingCartId.$SecretKey.$TotalAmountV2.$SecretKey."1".$SecretKey."en".$SecretKey."GET".$SecretKey."http://www.adriatic-explore.com/booking/thankyouv3.php?idtemprezervacija=".$idtemprezervacija.$SecretKey."http://www.adriatic-explore.com".$SecretKey,"SHA512"); $Signature = openssl_digest("authorize-form".$SecretKey.$ShopId.$SecretKey.$ShoppingCartId.$SecretKey.$TotalAmountV2.$SecretKey."1".$SecretKey."en".$SecretKey."GET".$SecretKey."https://www.adriatic-explore.com/booking/thankyouizlet.php".$SecretKey."https://www.adriatic-explore.com/".$SecretKey.$CustomerFirstname.$SecretKey.$CustomerSurname.$SecretKey.$CustomerAddress.$SecretKey.$CustomerCity.$SecretKey.$CustomerZIP.$SecretKey.$CustomerCountry.$SecretKey.$CustomerPhone.$SecretKey.$CustomerEmail.$SecretKey."1".$SecretKey, "SHA512"); //.$naziv." (".$odrasli." + ".$djecau." people)".$SecretKey. ?> <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>BOOKING Preview| 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> </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 PREVIEW | Buggy Safari Dubrovnik</h1> </div> </div> <div class="section group" style="width:97%"> <img style="width:100%;" src="../images/booking2.jpg" alt="buggy safari Dubrovnik" /> </div> <div class="section group" style="margin-bottom:25px; margin-top:5px; background-color:#003; height:2px;"></div> <div class="section group" style="margin-bottom:25px;"> <b>PLEASE CHECK SUBMITTED DATA ONE MORE TIME:</b></div> <form name="f1" id="forma" style="font-weight:normal; text-align:left" action="https://pgw.ht.hr/services/payment/api/authorize-form" method=POST> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4">Excursion: </div><div class="col span_3_of_4"><input readonly style="width:300px" class="inputtekst" name="nazivizlet" type="text" value="<?php echo $naziv; ?>" /></div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4">Price per person:</div><div class="col span_3_of_4"><b><?php echo formatMoney($cijena,2); ?></b> HRK (<b><?php echo formatMoney($cijena/$tecajDanas,2) ?> </b>EUR) <?php if($idizlet!=102 && $idizlet!=103 && $idizlet!=104 && $idizlet!=82 && $idizlet!=105 && $idizlet!=106 && $idizlet!=107 && $idizlet!=108 && $idizlet!=109 && $idizlet!=110 && $idizlet!=111){ echo '- <b>10%</b> = <b style="color:#F72A5D; font-size:1.2em;">'; echo formatMoney($cijena/1.1111111,2); echo '</b> HRK (<b style="color:#F72A5D; font-size:1.2em;">'; echo formatMoney($cijena/1.1111111/$tecajDanas,2).'</b> EUR)'; }?> </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:5px;"> <img src="../images/infoicon.png" alt="info" style="vertical-align:middle" /><strong> PERSONAL DATA</strong> </div> <div class="section group" style="margin-bottom:15px; 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"> <input class="inputtekst" name="title" type="text" readonly style="width:300px;" value="<?php echo $title; ?>"/> </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 class="inputtekst" name="pgw_first_name" type="text" readonly style="width:300px;" value="<?php echo $CustomerFirstname; ?>" /></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 class="inputtekst" name="pgw_last_name" type="text" readonly style="width:300px;" value="<?php echo $CustomerSurname ; ?>" /></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 class="inputtekst" name="pgw_street" type="text" readonly style="width:300px;" value="<?php echo $CustomerAddress; ?>" /></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 class="inputtekst" name="pgw_city" type="text" readonly style="width:300px;" value="<?php echo $CustomerCity; ?>" /></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 class="inputtekst" name="pgw_post_code" type="text" readonly style="width:300px;" value="<?php echo $CustomerZIP; ?>" /></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 class="inputtekst" name="pgw_country" type="text" readonly style="width:300px;" value="<?php echo $CustomerCountry; ?>" /></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 class="inputtekst" name="pgw_telephone" type="text" readonly style="width:300px;" value="<?php echo $CustomerPhone; ?>" /></div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> E-mail : </div><div class="col span_3_of_4"><input class="inputtekst" name="pgw_email" type="text" readonly style="width:300px;"value="<?php echo $CustomerEmail; ?>" /></div></div> <input type="hidden" name="pgw_failure_url" value="https://www.adriatic-explore.com/"> <input type="hidden" name="pgw_success_url" value="https://www.adriatic-explore.com/booking/thankyouizlet.php"> <input type="hidden" name="pgw_shop_id" value="<?php echo $ShopId ?>"> <input type="hidden" name="pgw_order_id" value="<?php echo $ShoppingCartId ?>"> <input type="hidden" name="pgw_amount" value="<?php echo $TotalAmountV2 ?>"> <input type="hidden" name="pgw_authorization_type" value="1"> <input type="hidden" name="pgw_language" value="en"> <input type="hidden" name="pgw_return_method" value="GET"> <input type="hidden" name="pgw_signature" value="<?php echo $Signature ?>"> <input type="hidden" name="pgw_disable_installments" value="1"> <input type="hidden" name="DebugMode" value="on"> <!-- <input type="hidden" name="pgw_order_info" value="<?php echo $naziv.' ('.$odrasli.' + '.$djecau.' people)'; ?>"> --> <div class="section group" style="margin-bottom:5px; margin-top:15px; background-color:#003; height:2px;"></div> <div class="section group" style="margin-bottom:5px;"> <img src="../images/excursion.png" alt="excursion" style="vertical-align:middle" /><strong> Excursion data</strong> </div> <div class="section group" style="margin-bottom:15px; margin-top:5px; background-color:#003; height:2px;"></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> Day & Date :</div> <div class="col span_3_of_4"> <input class="inputtekst" style="width:300px;" name="odkad" type="text" readonly value="<?php echo $odkadprikaz; ?>"/> </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 class="inputtekst" name="odrasli" type="text" readonly style="width:300px;" value="<?php echo $odrasli; ?>" /> </div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> <?php if ($idizlet==102){ echo ' Children 2-13:'; } else { echo ' Children 6-12:';} ?></div><div class="col span_3_of_4"> <input class="inputtekst" name="djeca" type="text" readonly style="width:300px;"value="<?php echo $djeca; ?>" /> </div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> <?php if ($idizlet==102){ echo ' Children 0-2:'; } else { echo ' Children 0-6:';} ?></div><div class="col span_3_of_4"> <input class="inputtekst" name="djeca0" type="text" readonly style="width:300px;"value="<?php echo $djeca0; ?>" /> </div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> Pick up location: </div><div class="col span_3_of_4"> <input class="inputtekst" name="lokacija" type="text" readonly style="width:300px;" value="<?php echo $lokacija; ?>" /> </div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> Pick-up time: </div><div class="col span_3_of_4"> <input class="inputtekst" name="picktime" type="text" readonly style="width:300px;" value="<?php echo $picktime; ?>" /> </div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> Comment:</div><div class="col span_3_of_4"> <textarea class="inputtekst" style="width:300px; font-family:Arial, Helvetica, sans-serif; min-height:100px; text-align:left;" name="komentar"><?php echo $komentar; ?></textarea> </div></div> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> <b>TOTAL AMOUNT<?php if($idizlet!=102 && $idizlet!=103 && $idizlet!=104 && $idizlet!=82 && $idizlet!=105 && $idizlet!=106 && $idizlet!=107 && $idizlet!=108 && $idizlet!=109 && $idizlet!=110 && $idizlet!=111) { echo ' WITHOUT DISCOUNT';} ?> </b></div><div class="col span_3_of_4"> <input class="inputtekst" type="text" readonly style="width:300px; text-align:left; font-weight:bold;" name="iznostotal" value="<?php echo formatMoney($ukupnaCijena,2); ?> HRK (<?php echo formatMoney($ukupnaCijena/$tecajDanas,2) ?> EUR)" /> </div></div> <?php if($idizlet==102 || $idizlet==103 || $idizlet==104 || $idizlet==82 || $idizlet==105 || $idizlet==106 || $idizlet==107 || $idizlet==108 || $idizlet==109 || $idizlet==110 || $idizlet==111) { echo '<!--';} ?> <div class="section group" style="margin-bottom:5px;"> <div class="col span_1_of_4"> <b>TOTAL AMOUNT (WITH DISCOUNT) </b></div><div class="col span_3_of_4"> <input class="inputtekst" type="text" readonly style="width:300px; text-align:left; color:#F72A5D; font-weight:bold;" name="iznostotal" value="<?php echo formatMoney($TotalAmount1,2); ?> HRK (<?php echo formatMoney($TotalAmount1/$tecajDanas,2) ?> EUR)" /> </div></div> <?php if($idizlet==102 || $idizlet==103 || $idizlet==104 || $idizlet==82 || $idizlet==105 || $idizlet==106 || $idizlet==107 || $idizlet==108 || $idizlet==109 || $idizlet==110 || $idizlet==111 ) { echo '-->';} ?> <div class="section group" style="margin-bottom:5px;"> <br /> <img src="../images/backicon.png" style="border:none; cursor:pointer;vertical-align:middle " onclick="history.go(-1)" /><a style="color:black; font-size:1.2em;" href="history.go(-1)">GO BACK AND CHANGE DETAILS</a><br /><br /></div> <div class="section group" style="margin-bottom:5px;"><b>NOTE</b>:<br /> We recommend booking and paying online - Your place is then guaranteed!<br /> Due to restricted number of people on each tour/excursion it's best to reserve Your place as soon as possible.</div> <div class="section group" style="margin-bottom:5px; margin-top:15px; "> <input class="button" type="submit" value="CONTINUE TO SECURE PAY ONLINE" onclick="return true;" style="font-size:0.9em; cursor:pointer; padding-top:10px; padding-bottom:10px; height:50px;" /> </div> <div class="section group" style="margin-bottom:5px; text-align:center; margin-top:5px;"><br /><img src="../images/trust.png" /> <img src="../images/karticebig.png" /> <img src="../images/trcom.png" /></div> </form> </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 src="booking.js" ></script> <script type="text/javascript">function Provjeri(){ var selectedIndex = document.getElementById('lokacija').selectedIndex; if(document.rezizlet.ch_full_name.value == "" || document.rezizlet.ch_address.value == "" || document.rezizlet.ch_city.value == "" || document.rezizlet.ch_zip.value == "" || document.rezizlet.ch_country.value == "" || document.rezizlet.ch_email.value == "" || document.rezizlet.od.value == "" || !isNumber(document.rezizlet.odrasli.value) || selectedIndex<2 ){ return false; } return true; } function isNumber(n) { return !isNaN(parseFloat(n)) && isFinite(n); } </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>