<?php session_start(); ob_start(); ?>

<?php  include 'header.php'; ?>

<?php
	ini_set('display_errors', 0);
if(empty($_SESSION['LOGINID']) && empty($_SESSION['LOGINNM']) ){

	header("Location:index.php");
}


include("user.php");
	$year = $_POST["check_list"];
	$type= $_POST["type"];
	if($type=="booking_value"){$type_n="Booking Value";}
	if($type=="event_value"){$type_n="Event Value";}
	if($type=="booking_no"){$type_n="Booking Number";}
	$myArray = $year;
	$yrs=implode(',',$myArray);
?>


						  
	<?php
												  

$settingsSQL = mysqli_query($connection, "SELECT * FROM `settings` where name='address' ");
$settingsSQL = mysqli_fetch_object($settingsSQL);
									
$address = $settingsSQL->value;

$settingsSQL = mysqli_query($connection, "SELECT * FROM `settings` where name='mobile' ");
$settingsSQL = mysqli_fetch_object($settingsSQL);
									
$our_mobile = $settingsSQL->value;

$settingsSQL = mysqli_query($connection, "SELECT * FROM `settings` where name='email' ");
$settingsSQL = mysqli_fetch_object($settingsSQL);
									
$our_email = $settingsSQL->value;
								   
?>	

<html>

<style>
body {
  background: rgb(204,204,204); 
}
page {
  background: white;
  display: block;
  padding-top: 2cm;
  padding-left: 2cm;
  padding-right: 2cm;
  margin: auto;
  margin-bottom: 2.0cm;
}
page[size="A4"] {  
  width: 21cm;
  height: 29.7cm; 
}
page[size="A4"][layout="landscape"] {
  width: 29.7cm;
  height: 21cm;  
}

@media print {
  body, page {
    margin: 0;
    box-shadow: 0;
  }
}



</style>

  <head>
    <title>Booking Print</title>
	<meta http-equiv='content-type' content='text/html;charset=utf-8' />
  </head>
  
  <page size="A4">
  
  <body>
<center>
<table style="width:100%;border: 0px solid black;" cellpadding='0' height='' cellspacing='0'  >
 
  <tr align="center" >
    <td  style="width:100%; "  > <img src="assets/images/logo_wd.png" width="150" /> </br>
<?php echo "$address"; ?> </br>
<?php echo "$our_email"; ?> </br>
<?php echo "$our_mobile"; ?>  </br>

<b> Yearly Side by Side Comparision </b> </br>



For The Year : <?php echo "$yrs"; ?>  

	</td>
  
  </tr>
</table>

</br></br>
 </center> 

<b> Yearly <?php echo "$type_n"; ?> Report: </b> </br>

<center>
<table style="width:100%" cellpadding='' height='' cellspacing='0' border='1' align='center' valign= 'top' >
	<tr align="left" >
	  <td style="width: 100px" > 
	   &nbsp;&nbsp; <b>Month </b>
      </td> 
	  <?php foreach ($myArray as $yr){ ?>
		  <td style="width: 10%" > 
	   <b><?php echo $yr; ?></b>
      </td> 
	  <?php } ?>
	  
	  
	</tr> 
	
</table>	
	
	 
	
<table style="width:100%" cellpadding='' height='' cellspacing='0' border='0' align='center' valign= 'top' >
	<tr align="left" >
	  <td style="border-bottom: 1px solid black; width: 100px" > 
	   
	   <table style="width:100%" cellpadding='' height='' cellspacing='0' border='0' align='center' valign= 'top' >
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Jan
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Feb
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Mar
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; April
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; May
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Jun
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Jul
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Aug
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Sep
	   </td>
	   </tr>
	   
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Oct
	   </td>
	   </tr>
	   
	   
	   <tr align="left" >
	   <td style="border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" > &nbsp;&nbsp; Nov
	   </td>
	   </tr>
	   
	   <tr align="left" >
	   <td style="border-left: 1px solid black;border-right: 1px solid black;"> &nbsp;&nbsp; Dec
	   </td>
	   </tr>
	   </table>
	   
      </td> 
	  <?php foreach ($myArray as $yr){ ?>
		 
		 <td style="width: 10%;" > 
		 
		 
	  <?php include("inc/rp_helper.php"); ?>
	   
	   
      </td> 
	  <?php } ?>
	  
	  
	</tr> 
	
</table>
	
	
	
	
	
							 

</br></br>




 
 
 
 
 
 
 
 
 </center> 
 
 
  </body>
  
  </page>
  
</html>