<?php
session_start();
if ( $_SESSION[ invcox ] == "" ) {
	header( "location:login.php?action=need" );
} else {

	include( "config.php" );
	?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Arnim Holidays Accounting Software</title>

<style>
    body {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        color: #000;
        margin: 1mm;
    }

    .token {
        border: 2px solid #000; /* thicker border for printing */
        text-align: center;
        margin: 5px;
        width: 220px;
        display: inline-block; /* use inline-block instead of float */
        vertical-align: top;
        padding: 10px;
        page-break-inside: avoid; /* prevent token splitting across pages */
    }

    .token .logo img {
        max-height: 70px;
    }

    p {
        margin: 5px 0;
    }

    /* -------- PRINT SETTINGS -------- */
    @media print {
        .print-btn { display: none; }
        a { text-decoration: none; color: #000; }

        .token {
            border: 2px solid #000 !important; /* force border */
            box-sizing: border-box;
        }
		.token .logo img {
        max-height: 60px;
    }
	  .logo img {
        max-height: 60px;
    }
    }
</style>
</head>

<body>

<?php 
if($_POST[ds]!=""){$ds=$_POST[ds];}
if($_POST[de]!=""){$de=$_POST[de];}
if($_GET[ds]!=""){$ds=$_GET[ds];}
if($_GET[de]!=""){$de=$_GET[de];}
if($ds == ""){

$ds=date('d-m-Y');
}
if($de == ""){$de=date("d-m-Y");}
	
		 
		 
 
		 
$dsn = date('Y-m-d', strtotime($ds . ' +1 day'));
$den = date('Y-m-d', strtotime($de . ' +1 day'));

 
		  
		  $d="and  check_in BETWEEN '$ds' AND '$de'";

	
						?>



           

<?php 
		    
	
		  $dresult=mysql_query("SELECT * FROM bookings WHERE id!='' $d and additional_ser='Complimentary Breakfast'  and status!='Check-out'  order by check_in, room_no asc ");
          $drow=mysql_fetch_array($dresult);
		  $total=0;
		  $sr=0;
		  $sr3=0;
		  do{
			 
			 $add=0;
			 do{
			  $sr++;
			  $add++;
			  $sr3++;
		  ?>
 


<div class="token"><?php 
			 
			 
			 $date = $drow[check_in];
$nextDate = date('d-m-Y', strtotime($date . ' +1 day'));

 // 2026-01-11

			 
			?>
      <p><span class="logo"><img src="images/wlogo.png" /></span><br />
     Date: <?php echo $nextDate;?><br />
      Complimentary Breakfast<br />
       Time: 8:00 AM &ndash; 10:00 AM<br />
       <br />
Room No: <?php echo $drow[room_no];?><br /> 

      RSV No :<?php echo $drow[bill_id]; ?>
        <br />
        
     </p>
      <p><strong>TOKEN NO: <?php echo $sr;?></strong></p>
      <p>Valid for 1 Person<br />
    Non-Transferable</p> 
 </div>
<?php 
 

			 }while($add<$drow[addi_pax]);
		  }while($drow=mysql_fetch_array($dresult));
		 
		  ?>  

</body>
</html><?php }?>