value="<?php echo LOCKED; ?> " onchange="document.forms[0].submit();" /><font color="#000000"><?php echo $_L['RM_locked']; ?> </font> </label> </td> </tr> <tr> <td colspan="2"> <div id="Requests" style="overflow:auto; width:772; height:303;"> <?php $rooms = array(); get_roomslist($rooms, $search, $stype, $status); echo "<table align=\"center\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">"; //get field names to create the column header echo "<tr bgcolor=\"#3593DE\">\n\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_roomno'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_type'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_guest'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_in'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_out'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_nights'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_rateplan'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_adults'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_children'] . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . $_L['RM_status'] . "</th>\n\t\t\t\t\t\t\t\t\t</tr>"; //end of field header //get data from selected table on the selected fields foreach ($rooms as $idx => $val) { //alternate row colour $j++; if ($j % 2 == 1) { echo "<tr bgcolor=\"#CCCCCC\">"; } else { echo "<tr bgcolor=\"#EEEEF8\">"; } echo "<td><a href=\"index.php?menu=roomSetup&search=" . $rooms[$idx]['roomno'] . "\"><img src=\"images/button_view.png\" width=\"16\" height=\"16\" border=\"0\" title=\"view room details\"/></a></td>"; echo "<td>" . $rooms[$idx]['roomno'] . "</td>";
$blist = array(); $book = get_all_bookings($blist, BOOK_CHECKEDIN, "", 0); // Get all of the reservations for the period $rlist = array(); list($rstop, $rest) = preg_split('/ /', $endDate); list($year, $month, $day) = preg_split('/\\//', $rstop); $rstop = $day . "/" . $month . "/" . $year; list($rstart, $rest) = preg_split('/ /', $fromdate); list($day, $month, $year) = preg_split('/\\//', $rstart); $rstart = $year . "/" . $month . "/" . $day; $res = get_all_reservations("", "", "", $rlist, RES_ACTIVE); $errstr = ""; $perr = ""; // Just load the rooms list $roomlist = array(); $rms = get_roomslist($roomlist, 0, 0, 0); // Initialise the result table foreach ($roomlist as $rmid => $val) { $result[$rmid]['roomid'] = $rmid; $result[$rmid]['roomno'] = $roomlist[$rmid]['roomno']; $result[$rmid]['roomtype'] = $roomlist[$rmid]['roomtype']; $result[$rmid]['roomtypeid'] = $roomlist[$rmid]['roomtypeid']; if ($roomlist[$rmid]['status'] == LOCKED) { $rstatus = $roomlist[$rmid]['status']; } else { $rstatus = VACANT; } // Initialise the array of days then set the status for ($i = strtotime($fromdate); $i <= strtotime($endDate); $i += 86400) { $dt = date('Y/m/d', $i); // echo $rmid." ".$result[$rmid]['roomno']." Init ".$dt."<br/>";
</table> </td> </tr> <tr id=roomlists <?php echo $rstyle; ?> > <td height="60px" colspan=2><b><?php echo $_L['RM_roomno']; ?> </b> <div style="width: 270px; height: 50px; overflow:auto; border: 1px solid;" > <?php $rms = array(); get_roomslist($rms, '', '', 0); foreach ($rms as $idx => $val) { print "<input type='checkbox' id='RM" . $idx . "' name='RM" . $idx . "' value='" . $idx . "' "; foreach ($rooms as $i => $v) { if ($v == $idx) { echo "checked"; break; } } print " />" . $rms[$idx]['roomno'] . " - " . $rms[$idx]['roomname'] . "<br/>"; } ?> </div> </td> <td height="60px" colspan=2><b><?php echo $_L['RM_type'];