</tr> <tr> <td style="padding:5px;" ><?php echo $_L['RM_roomno']; ?> <font color="#FF0000">*</font></td> <td> <!-- <option value=0> </option>--> <?php if ($restarget == 2) { echo '<select name="roomid" id="roomid" class="plainDropDown" onchange="fixroomtype();document.forms[0].submit();">'; echo '<option value="0" > </option>'; $room = array(); if (isset($_POST['roomtypeid']) && !empty($_POST['roomtypeid'])) { get_roombyroomtype(get_roomtype($_POST['roomtypeid']), $room); foreach ($room as $rm) { if (isset($bookings['roomid']) && $bookings['roomid'] == $rm['roomid']) { print "<option value='" . $rm['roomid'] . "' "; print " selected='selected'"; print ">"; print $rm['roomno']; print "</option>"; } else { if ($rm['status'] == VACANT) { print "<option value='" . $rm['roomid'] . "'>"; print $rm['roomno']; print "</option>"; } } }
<td colspan="2"> <div id="Requests" style="overflow:auto; height:368px;"> <table border="1" cellspacing="0" cellpadding="3" width="100%" height="50px"> <tr> <?php $i = strtotime($fromdate); echo "<th bgcolor='#CCCCCC'>" . date('Y/m/d', $i) . "</th>\n"; ?> </tr> <?php if ($errstr) { print "<tr><td>" . $errstr . "</td></tr>"; } foreach ($roomtype as $rmtype => $val) { echo "<tr><td><input class='button' type='button' onclick='showrooms(" . $rmtype . ");' value='Show' />" . get_roomtype($rmtype) . "</td></tr>"; echo "<tr id='" . $rmtype . "' style='display: none;' ><td><table width='100%' cellspacing='0'>"; echo "<tr><th width='10%' style='border-bottom:thin solid; border-left:thin solid; border-top:thin solid;' >" . $_L['INV_room'] . "</th><th width='23%' style='border-bottom:thin solid; border-right:thin solid; border-top:thin solid;'>" . $_L['RSV_status'] . "</th><th width='10%' style='border-bottom:thin solid; border-left:thin solid; border-top:thin solid;' >" . $_L['INV_room'] . "</th><th width='23%' style='border-bottom:thin solid; border-right:thin solid; border-top:thin solid;'>" . $_L['RSV_status'] . "</th><th width='10%' style='border-bottom:thin solid; border-left:thin solid; border-top:thin solid;'>" . $_L['INV_room'] . "</th><th width='24%' style='border-bottom:thin solid; border-right:thin solid; border-top:thin solid;'>" . $_L['RSV_status'] . "</th></tr>"; $rowcount = 0; echo "<tr height='60px'>"; foreach ($roomtype[$rmtype] as $rmid => $val) { $rowcount++; $i = strtotime($fromdate); $dt = date('Y/m/d', $i); if ($result[$rmid][$dt]['status'] == LOCKED) { $bgcolor = "lightgrey"; $res = "<a href='index.php?menu=roomsview&date=" . $fromdate . "&unlock=" . $rmid . "'> <img src='images/locked.jpg' title='Click to unlock' height='50px' width='50px' /></a><br/>" . $_L['RM_locked']; if ($result[$rmid][$dt]['bookid']) { $res .= "<br/><a href='" . $path . "/index.php?menu=booking&id=" . $result[$rmid][$dt]['bookid'] . "'>" . $_L['INV_booking'] . "</a>"; } if ($result[$rmid][$dt]['resid']) {
/** * 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); }