<?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;
    }

    .section{
        display:flex;
        justify-content:space-between;
        align-items:flex-start;
        margin-bottom:15px;
        border-bottom:2px solid #000;
        padding-bottom:10px;
    }

    .logo img{
        max-height:80px;
    }

    table{
        width:100%;
        border-collapse:collapse;
        margin-top:10px;
    }

    th, td{
        border:1px solid #000;
        padding:6px;
        text-align:center;
    }

    th{
        background:#f0f0f0;
        font-weight:bold;
    }

    .print-btn{
        margin-bottom:10px;
    }

    /* -------- PRINT SETTINGS -------- */
    @media print{
        .print-btn{ display:none; }
        a{ text-decoration:none; color:#000; }
        body{ margin:10mm; }
    }
</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'";

	
						?>

<div class="section">
    <div class="logo">
        <img src="images/wlogo.png" alt="Hotel Logo">
    </div>

    <div>
        <strong>ARNIM RESORT - COX'S BAZAR</strong><br>
        <strong>Address :</strong> 92, Marine Drive Road, Kolatoli, Cox's Bazar.<br>
        <strong>Phone :</strong> 01758-383938, 01866-000640, 0197-2288-526<br>
        <strong>E-mail :</strong> rsv@arnimresort.com |
        <strong>Web :</strong> arnimresort.com
    </div>
</div>
<h3>
              Breakfast list <?php echo dtformat($dsn);?> to <?php echo dtformat($den);?></h3>
<table>
<tr>
    <th width="10%">Date</th>
    <th width="10%">RSV No</th>
    <th width="10%">Room No</th>
    <th width="10%">Complimentary Breakfast</th>
    <th width="10%">Without Breakfast</th>
    <th width="10%">Parata</th>
    <th width="10%">Ruti</th>
    <th width="10%">Person</th>
    <th width="10%">Extra</th>
</tr>
<?php 
	
		  $dresult=mysql_query("SELECT * FROM bookings WHERE id!='' $d  and status!='Check-out'  order by check_in, room_no asc ");
          $drow=mysql_fetch_array($dresult);
		  $total=0;
		  do{
		  ?>
 

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

echo $nextDate; // 2026-01-11

			 
			?></td>
    <td><?php echo $drow[bill_id]; ?></td>
    <td><?php 
 
			 echo $drow[room_no];
			 
			?></td>
    <td><?php 
 if($drow[additional_ser] == "Complimentary Breakfast"){	

	 echo number_format($drow[addi_pax]);

$due=$due+$drow[addi_pax];
	  }
			?></td>
    <td><?php 
 if($drow[additional_ser]!="Complimentary Breakfast"){	

	 echo number_format($drow[addi_pax]);

$due2=$due2+$drow[addi_pax];
	  }
			?></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
</tr>
<?php 
		  }while($drow=mysql_fetch_array($dresult));
		 
		  ?>
<tr>
    <td colspan="2"></td>
    <td style="text-align:right;"><strong>Total :</strong></td>
    <td><strong><?php echo $due; ?></strong></td>
    <td><strong><?php echo $due2; ?></strong></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
</tr>
</table>

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