G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php $fdate = $_POST['fdate']; $tdate = $_POST['tdate']; $hotels = $_POST['hotels']; include('config.php'); if($hotels == 'All') { $hname = 'All Hotels'; } else { $result2 = $js->prepare('SELECT * FROM `hotelvendor` WHERE id = :hotels '); $result2->execute(array(':hotels' => $hotels)); while($row2 = $result2->fetch(PDO::FETCH_ASSOC)) { $hname = $row2['hotelname']; $location = $row2['location']; } } ?> <style type="text/css"> @page { size: A4; margin: .6in; size:landscape; } @media print { #table{ max-width: 2480px; width:100%; } #table td{ width: auto; overflow: hidden; word-wrap: break-word; } .noprint {display:none;} } @media print { table { page-break-inside: auto; } tr{ page-break-inside: avoid; page-break-after: auto; } img-container{ page-break-inside: avoid; page-break-after: auto; } /* #sme{display: block; width: 100%; height: 100%;page-break-inside: avoid;} */ } </style> <script> function myFunction() { window.print(); } </script> <div align="center" style="background-color:#FFF"> <img src="images/logodmc.png"><HR style="border-color:#F0743E" /> <h3>Reservation Report of <?php echo $hname?> - <?php echo $location?> From <?php echo date('d-m-Y', strtotime($fdate))?> To <?php echo date('d-m-Y', strtotime($tdate))?></h3> <BR /><table width="1259" class="table table-hover responsive listing" id="example" border="1" style="border-collapse:collapse;"> <thead> <tr> <th width="20">#</th> <th width="119">Guest Name</th> <th width="93">Nationality</th> <?php if($hotels == 'All') { ?> <th width="132">Hotel Name</th> <?php } ?> <th width="90">Check-in</th> <th width="88">Check-out</th> <th width="73">Room Type</th> <th width="83">No of Pax</th> <th width="100">No of Rooms</th> <th width="95">Meal Plan</th> <th width="62">Rate</th> <th width="128">Reservation No</th> <th width="94">Status</th> </tr> </thead> <tbody> <?php $i = 1; if($hotels == 'All') { $result1 = $js->prepare('SELECT * FROM `hotelreservations` WHERE cindate >= :fdate AND cindate <= :tdate ORDER BY `cindate` ASC'); $result1->execute(array(':fdate' => $fdate, ':tdate' => $tdate)); } else { $result1 = $js->prepare('SELECT * FROM `hotelreservations` WHERE hotel = :hotels AND cindate >= :fdate AND cindate <= :tdate ORDER BY `cindate` ASC'); $result1->execute(array(':hotels' => $hotels, ':fdate' => $fdate, ':tdate' => $tdate)); } while($row1 = $result1->fetch(PDO::FETCH_ASSOC)) { $id = $row1['id']; $custid = $row1['custid']; $result = $js->prepare('SELECT * FROM `customer_entry` WHERE `id` = :custid'); $result->execute(array(':custid' => $custid)); while($row = $result->fetch(PDO::FETCH_ASSOC)) { $custname = $row['custname']; $nation = $row['nationality']; $pax = $row['pax']; } $hotel = $row1['hotel']; $result2 = $js->prepare('SELECT * FROM `hotelvendor` WHERE id = :hotel '); $result2->execute(array(':hotel' => $hotel)); while($row2 = $result2->fetch(PDO::FETCH_ASSOC)) { $hotelname = $row2['hotelname']; $location = $row2['location']; $category = $row2['category']; } $roomtype = $row1['roomtype']; $rooms = $row1['norooms']; $ebs = $row1['noebs']; if($ebs == '') { $totalacc = $rooms." Room"; } else { $totalacc = $rooms." Room + ".$ebs." Extra-Bed"; } $roomrate = $row1['roomrate']; $stat = $row1['res_status']; $meals = $row1['meals']; $remarks = $row1['remarks']; $cindate = date('d-m-Y', strtotime($row1['cindate'])); $coutdate = date('d-m-Y', strtotime($row1['coutdate'])); $res_status = $row1['res_status']; echo "<tr>"; echo "<td align='center'>$i</td>"; echo "<td style='padding-left:5px;'>$custname</td>"; echo "<td align='center'>$nation</td>"; if($hotels == 'All') { echo "<td style='padding-left:5px;'>$hotelname <br>$location</td>"; } echo "<td align='center'>$cindate</td>"; echo "<td align='center'>$coutdate</td>"; echo "<td align='center'>$roomtype</td>"; echo "<td align='center'>$pax</td>"; echo "<td align='center'>$totalacc</td>"; echo "<td align='center'>$meals</td>"; echo "<td align='right' style='padding-right:5px;'>$roomrate</td>"; echo "<td style='padding-left:5px;'>$remarks</td>"; echo "<td align='center'>$res_status</td>"; echo "</tr>"; $i++; } ?> </tbody> </table> <div class="noprint"> <p align="center"> <a href="#" onClick="myFunction()" style="border:5px solid; background-color:#093; color:#FFF; padding:8px; text-decoration:none;">PRINT</a> <a href="search_hotelwise.php" style="border:5px solid; background-color:#F00; color:#FFF; padding:8px; text-decoration:none;">CLOSE</a> </p> </div>