echo $guestid; ?> " target='guests' class="button"><?php echo $_L['BTN_details']; ?> </a> <?php } ?> </td> <td><strong><?php echo $_L['INV_room']; ?> </strong></td> <td><input type="text" name="roomno" size="10" readonly="readonly" value="<?php echo get_roomno($book['roomid']); ?> "/> <input type="hidden" name="roomid" value="<?php echo $book['roomid']; ?> "/> </td> </tr> <tr> <td Style="padding:10px;"><strong><?php echo $_L['INV_datein']; ?> </strong></td> <td>
</head> <body> <table style="width:210mm;" border=0 class="fixed"> <?php $pg = 1; // Print the invoice header print_iheader($logofile, $px, $lc); // Print the customer details, name, dates etc // Line 1 echo "<tr><td> " . $_L['INV_guestname'] . "</td>"; echo "<td>" . $book['guestname'] . "</td>"; echo "<td></td>"; echo "<td></td>"; echo "<td></td>"; echo "<td>" . $_L['INV_room'] . "</td>"; echo "<td>" . get_roomno($book['roomid']) . "</td>"; echo "</tr>"; // Line 2 echo "<tr><td>" . $_L['INV_address'] . "</td>"; echo "<td></td>"; echo "<td></td>"; echo "<td></td>"; echo "<td></td>"; echo "<td>" . $_L['INV_arrival'] . "</td>"; echo "<td>" . $book['checkindate']; echo "</td></tr>"; // Line 3 echo "<tr><td colspan=3 rowspan=3>" . $guest['address'] . "</td>"; echo "<td></td>"; echo "<td></td>"; echo "<td>" . $_L['INV_depart'] . "</td>";
/** * Retrieve all the reservation details by reservation id * @param $detailID [in] The reservation details ID * @param $details [in/out] reservation details array * @return 1 on success and 0 on fail */ function reservation_detail_byID($detailID, &$details) { global $conn; if (!$conn) { $conn = connect_Hotel_db(HOST, USER, PASS, DB, PORT); } if (!$conn) { return 0; } if (!$detailID) { return 0; } $details = array(); $sql = "SELECT id,reservation_id,roomid,roomtypeid,ratesid,quantity,`status` \n\t\t\tFROM reservation_details \n\t\t\tWHERE id=" . $detailID; //print $sql."<br/>"; $stmt = $conn->prepare($sql); $results = $stmt->execute(); while ($row = $stmt->fetch()) { $details['id'] = $row['id']; $details['reservation_id'] = $row['reservation_id']; $details['roomid'] = $row['roomid']; $details['ratesid'] = $row['ratesid']; $details['quantity'] = $row['quantity']; $details['roomno'] = get_roomno($row['roomid']); $details['status'] = $row['status']; if ($row['roomid']) { $room = array(); get_room($row['roomid'], $room); $details['roomtypeid'] = $room['roomtypeid']; $details['roomtype'] = get_roomtype($room['roomtypeid']); } else { $details['roomtypeid'] = $row['roomtypeid']; $details['roomtype'] = get_roomtype($row['roomtypeid']); } $details['ratecode'] = get_ratecode($row['ratesid']); } return sizeof($details); }