<?php require_once("header.php");?>

<?php
$fetch_service = mysqli_fetch_array(mysqli_query($connection,"SELECT * FROM `sc_services` WHERE `service_id` = '".$_REQUEST['hid_service_id']."'"));

if($_REQUEST['chk'] == 'val1')
{
    $total_cost = $fetch_service['material_installation_cost'];
    $grand_total = $fetch_service['material_installation_cost'];
}
if($_REQUEST['chk'] == 'val2')
{
    $total_cost = $fetch_service['installation_cost'];
    $grand_total = $fetch_service['installation_cost'];
}
?>

			<!-- page template area start -->
			<section id="about">
				<div class="container mt-0 pb-0 pt-5">
					<div class="section-content">
						<div class="row">
						    <div class="col-md-12">
						        <h1 class="title mt-0 mb-0" style="text-align:center;">Booking Details</h1>
								<form action="add-cart.php" method="GET">
        						<input type="hidden" name="hid_service_id" id="hid_service_id" value="<?php echo $_GET['hid_service_id'];?>">
        						<input type="hidden" name="chk" id="chk" value="<?php echo $_GET['chk'];?>">
        						<div class="col-lg-12">
        						    <h4 class="title mt-0 mb-5" style="text-align:left;"><?php echo stripslashes($fetch_service['service_name']);?></h4>
        						    <?php if($_REQUEST['chk'] == 'val1') { ?>
        						    <p style="color:#888;">Installation Cost With Material</p>
        						    <p><b>&#8377; <?php echo $fetch_service['material_installation_cost'];?></b></p>
        						    <?php } ?>
        						    <?php if($_REQUEST['chk'] == 'val2') { ?>
                					<p style="color:#888;">Only Installation Cost</p>
        						    <p><b>&#8377; <?php echo $fetch_service['installation_cost'];?></b></p>
        						    <?php } ?>
        						    <p style="color:#888;">Work Time Duration</p>
                					<p><b><?php echo $fetch_service['timing'];?></b></p>
                					<p style="color:#888;">Total Cost</p>
                					<p><b>&#8377; <?php echo $total_cost;?></b></p>
                					<p style="color:#888;">Deduct From Wallet</p>
                					<p><b>&#8377; 0.00</b></p>
                					<p style="color:#888;">Grand Total</p>
                					<p class="mb-10"><b>&#8377; <?php echo $grand_total;?></b></p>
        						    <p><button type="submit" class="btn btn-flat btn-theme-colored border-left-theme-color-2-4px mb-10" style="width:50%;" name="action" value="order">Confirm Booking</button></p>
        						    <p style="color:#ff0000;">After Booking Pay &#8377; <?php echo $visit_charge;?> Online For Site Visit</p>
        						</div>
						        </form>
							</div>
						</div>
					</div>
				</div>
			</section>
			<!-- page template area end -->
  
<?php require_once("footer.php");?>