<?php session_start();
if($_SESSION){
?>

<?php
error_reporting(0);
 $_GET['id'];

?>

<html>
<head>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
   
      <link rel="stylesheet" type="text/css" href="styles.css">
  <style type="text/css">
    p
    {
      text-align: justify;
      font-family: Corbel;
      font-size: 19px;
      font-color:gold;
      color:black
    }
    #looo{
text-align: center;
color: #FDFEFE      ;
background-color:#1F618D;
font-family:Monotype Corsiva;
font-size: 20px;"
 }
  </style>
</head>
<body>
   <?php include 'adminheader.php';?><br><br><br><br><br>

   <?php
  error_reporting(0);
     $conn = new mysqli("localhost","root","","event");
   $CID=  $_GET['id'];
   //$CID2= $_SESSION['user_details']['id'];
     //$query=" SELECT * FROM book join SELECT id FROM signup";
      //$query="select * from signup where  id= $CID2 ";
      $query="select * from book where booking_id= $CID";
      //$query1="select * from signup where id='19' ";
    // $query="select * from signup join book on signup.id=book.user_id  ";
     $data=mysqli_query($conn,$query);
  $total =mysqli_fetch_assoc($data);
      $data1=mysqli_query($conn,$query1);
  $total1 =mysqli_fetch_assoc($data1);
     
     
      ?>
      <div class="container">
  <center>
<table style=" border-radius: 10px;size: 2px; background-color:  white  "  ><tr><td>
      <h3 class="text-red" style="text-align: center;color: #8B0000      ;font-family:Monotype Corsiva;font-size: 45px;"><b>Event Management Report </b></h3><br>
        
        <h3 class="text-red" ><b> Booking Receipt</b></h3>
 
        <table class="table table-striped table-hover" id="myTable">
    



      <tbody>
      <tr>
      
      <tbody>
  <tr>  
          <td><b>Customer Name:</b></td> <td><?php echo $total['customer_name']?>
      </td> <td ><b>Customer ID:</b></td> <td><?php echo $total['user_id']?>
         </tr>
           <!--<tr>  
          <td><b>Address:</b></td> <td><?php echo $total1['address']." ".$total1['lname']?>
      </td> <td ><b>City:</b></td> <td><?php echo $total1['city']?></td> <td><b>Country:</b></td> <td><?php echo $total1['country']?></td>
         </tr>-->
      <tr>  
          <td><b>Event Name:</b></td> <td><?php echo $total['name']?>
      </td> <td ><b>Booking Date:</b></td> <td><?php echo $total['date_']?></td>
         </tr>
        <tr>  
          <td><b>Event Eqi1:</b></td> <td><?php echo $total['eqi1']?>
      </td> <td><b> Place:</b></td> <td><?php echo "<img style='height:100px;width:100px' src='".$total['place']."'>"?></td>
    </tr>
      <tr>
      <td><b>Event Eqi2:</b></td> <td><?php echo $total['eqi2']?>
      <td></td><td></td>

      </td></tr>
      <tr>
       <td ><b>Guests:</b></td> <td><?php echo $total['guests']?></td> 
       <td></td><td></td>
         </tr>

          <tr>  
            <td></td> <td></td> 
          <td ><b>Total:</b></td> <td><?php echo $total['rs']?>
      </td>
      
         </tr>
       

    </tbody>

</table>

     
     

</div>

</div>
<center>
 <button onclick="print_receipt()" style="margin-top:100px;outline: none; border:none;background:teal;color:white; border-radius: 6px; padding: 12px 6px; "> Print Receipt</button>  
       
   </center>
<script>
function print_receipt(){
 var retVal = confirm("Do you want to print Booking Receipt?");  
 if(retVal==true){
    window.print();
    return true;
}
else{
    return false;
}
}
</script> 
</body>
</html>
<?php
  }
  else{
    echo "<script>
   alert('You have to  login first...!');
   window.location.href='event2.php';
   </script>";
  }
  
?>