<?php
$servername = "techcellent.ipagemysql.com";
$username = "showbooking";
$password = "Good_@&^&#)54";
$db="showbooking";
$con = new mysqli($servername, $username, $password,$db);// Create connection
echo $getid= $_GET['id'];
$sql = "select * from bookings where id ='$getid'";
$res = mysqli_query($con, $sql);
$row = mysqli_fetch_assoc($res);
$name =$row['name'];
$email =$row['email'];
$phone =$row['phone'];
$amount =$row['budget'];
$showname =$row['showname'];
$showdate = $row['showdate'];
$player_adult = $row['player_adult'];
$player_child_15 = $row['player_child_15'];
$player_child_10 = $row['player_child_10'];
$showtime = $row['showtimestr'];
$msg = $row['message'];
$showdate = date('d-m-Y ', strtotime($showdate));
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Payment</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="images/icons/favicon.ico"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/animsition/css/animsition.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/daterangepicker/daterangepicker.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
<style>
.razorpay-payment-button {
background: #6c5ce7;
color: whitesmoke;
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 1;
display: block;
width: 15vw;
height: 8vh;
border: none;
padding: 0.3rem 0.3rem;
margin: 50px 50px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container-contact100">
<div class="wrap-contact100">
<form id="bookingform" method="POST" class="contact100-form validate-form" action="processData.php">
<span class="contact100-form-title" style="color : green;">
Payment Confirm
</span>
<div class="wrap-input100 validate-input" data-validate="Name is required">
<span class="label-input100">Show Name</span>
<input class="input100" type="text" name="name" readonly value ="<?php echo $showname; ?>" required>
<span class="focus-input100"></span>
</div>
<div class="wrap-input100 validate-input" data-validate = "Valid email is required: ex@abc.xyz">
<span class="label-input100">Show Date</span>
<input class="input100" type="text" name="email" readonly value ="<?php echo $showdate; ?>" required>
<span class="focus-input100"></span>
</div>
<div class="wrap-input100 validate-input" data-validate = "Valid email is required: ex@abc.xyz">
<span class="label-input100">Show Time</span>
<input class="input100" type="text" name="email" readonly value ="<?php echo $showtime; ?>" required>
<span class="focus-input100"></span>
</div>
<div class="wrap-input100 validate-input" data-validate = "Valid email is required: ex@abc.xyz">
<span class="label-input100">Budget</span>
<input class="input100" type="text" readonly value ="<?php echo "Rs ". $amount; ?>" required>
<span class="focus-input100"></span>
</div>
</form>
<!-- data-amount="<?php echo $amount*100; ?>" -->
<form action="sucess.php" method="post" style="text-align:center;">
<script
src="https://checkout.razorpay.com/v1/checkout.js"
data-key="rzp_live_IAlD4Y4zSRmXSc"
data-amount="<?php echo $amount*100;; ?>"
data-currency="INR"
data-captured="1"
data-payment_captured="1"
data-buttontext="Pay Now"
data-name="<?php echo $name; ?>"
data-description="Scape Box"
data-image="http://scapebox.co.in/assets/img/logo.png"
data-prefill.name="<?php echo $name; ?>"
data-prefill.email="<?php echo $email; ?>"
data-prefill.contact="<?php echo $phone; ?>"
data-theme.color="#F37254"
></script>
<input type="hidden" custom="Hidden Element" name="user_id" value="<?php echo $getid; ?>">
<input type="hidden" custom="Hidden Element" name="showdate" value="<?php echo $showdate; ?>">
<input type="hidden" custom="Hidden Element" name="showname" value="<?php echo $showname; ?>">
<input type="hidden" custom="Hidden Element" name="showtime" value="<?php echo $showtime; ?>">
<input type="hidden" custom="Hidden Element" name="amount" value="<?php echo $amount; ?>">
<input type="hidden" custom="Hidden Element" name="id" value="<?php echo "order_".$getid; ?>">
<input type="hidden" custom="Hidden Element" name="email" value="<?php echo $email; ?>">
<input type="hidden" custom="Hidden Element" name="name" value="<?php echo $name; ?>">
<input type="hidden" custom="Hidden Element" name="phone" value="<?php echo $phone; ?>">
<input type="hidden" custom="Hidden Element" name="msg" value="<?php echo $msg; ?>">
<input type="hidden" custom="Hidden Element" name="player_adult" value="<?php echo $player_adult; ?>">
<input type="hidden" custom="Hidden Element" name="player_child_15" value="<?php echo $player_child_15; ?>">
<input type="hidden" custom="Hidden Element" name="player_child_10" value="<?php echo $player_child_10; ?>">
</form>
</div>
</div>
</body>
</html>