<?php session_start();
  if($_SESSION){
?>
<html>
<head>
	<title> New Booking </title>
<style type="text/css">
	td{
		color: white;
	}
	th{
		color: white;
		font-family:Monotype Corsiva;
		font-size: 30px;
	}
	#myInput {
  background-image: url('/css/searchicon.png');
  background-position: 10px 10px;
  background-repeat: no-repeat;
  width: 100%;
  font-size: 16px;
  padding: 12px 20px 12px 40px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
}
</style>
</head>
<body style="background-color: turquoise;">
 <?php include 'adminheader.php';?><br><br><br><br><br><br>
 <div class="container">
 <h3 id="looo" class="text-red" style="text-align: center;color:black;background-color:gray;font-family:Monotype Corsiva;font-size: 40px;"><b> New Booking </b></h3>
                                                                                        
  <div class="table-responsive">   
  <input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for Booking ID...." title="Type in a name">
       
  <table class="table" id="myTable">
    <thead>
      <tr>
   <h1>Welcome, <?php echo $_SESSION['user_details']['name']?></h1>
        <th>ID</th>
        <th>name</th>
        <th>address</th>
        <th>phone</th>
        <th>capacity</th>
        <th>event</th>
        <th>Rs.</th>
      
      </tr>
    </thead>
    <tbody>
      <tr>
        
        <td><?php echo $_SESSION['user_details']['name']?></td>
        <td><?php echo $_SESSION['user_details']['address']?></td>
        <td><?php echo $_SESSION['user_details']['phone']?></td>
        <td><?php echo $_SESSION['user_details']['capacity']?></td>
        <td><?php echo $_SESSION['user_details']['event']?></td>
        <td><?php echo $_SESSION['user_details']['rs']?></td>
       
  
      </tr>
       

    </tbody>
  </table>
  </div>
</div>


<script type="text/javascript">
	function myFunction() {
  var input, filter, table, tr, td, i, txtValue;
  input = document.getElementById("myInput");
  filter = input.value.toUpperCase();
  table = document.getElementById("myTable");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    td = tr[i].getElementsByTagName("td")[0];
    if (td) {
      txtValue = td.textContent || td.innerText;
      if (txtValue.toUpperCase().indexOf(filter) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }       
  }
}
</script>
<?php
  }
  else{
    echo "<script>
   alert('You have to  login first...!');
   window.location.href='event2.php';
   </script>";
  }
  
?>
</body>
</html>