?> </td> </tr> <tr id=targetroom style="<?php echo $rmstyle; ?> " > <td> <select name=roomid_2 class="plainDropDown" onchange="document.forms[0].submit();"> <option value=0> </option> <?php $selected = ""; if (isset($_POST['roomid_2']) && isset($_POST['add_id']) && $_POST['add_id'] == 0) { $selected = $_POST['roomid_2']; } populate_roomselect($reservation['checkindate'], $reservation['checkoutdate'], $selected); ?> </select> </td> <td><?php $rmid = ""; $selected = ""; $rates = array(); if (isset($_POST['roomid_2']) && isset($_POST['add_id']) && $_POST['add_id'] == 0) { $rmid = $_POST['roomid_2']; } if (isset($_POST['ratesid_2']) && isset($_POST['add_id']) && $_POST['add_id'] == 0) { $selected = $reservation['ratesid']; } get_ratebyroomid($rmid, $rates); ?>
} else { if ($restarget == 0 || $restarget == 1) { echo '<select name="roomid" id="roomid" class="plainDropDown" onchange="document.forms[0].submit();">'; echo '<option value="0" > </option>'; $criteria = "status='" . VACANT . "'"; if (isset($_REQUEST['roomid'])) { $selected = $_REQUEST['roomid']; } else { $selected = $bookings['roomid']; } if ($bookings['roomno']) { print "<option value='" . $bookings['roomid'] . "' selected='selected'>"; print $bookings['roomno']; print "</option>"; } populate_roomselect($bookings['checkindate'], $bookings['checkoutdate'], $selected); //populate_select("rooms","roomid","roomno",$selected, $criteria); } } } ?> </select> </td> <td></td> <td align=left><?php if ($restarget == 2 || $restarget == 1) { $rmid = ""; $selected = 0; $rates = array(); if (isset($bookings['roomid'])) { $rmid = $bookings['roomid'];