}
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);
?>
								<select id=ratesid_2 name=ratesid_2 class="plainDropDown"  >
								 <?php 
foreach ($rates as $rt) {
    print "<option value='" . $rt['rateid'] . "' ";
    if ($selected) {
        print " selected=" . $selected . ">";
    } else {
        print ">";
    }
    print $rt['ratecode'];
    print "</option>";
}
?>
								</select>
Exemple #2
0
    $selected = 0;
    $rates = array();
    if (isset($bookings['roomid'])) {
        $rmid = $bookings['roomid'];
    }
    if (isset($_REQUEST['roomid'])) {
        $rmid = $_REQUEST['roomid'];
    }
    if (isset($bookings['rates_id'])) {
        $selected = $bookings['rates_id'];
    }
    // post variable overrides booking variable
    if (isset($_POST['ratesid']) && $_POST['ratesid'] > 0) {
        $selected = $_POST['ratesid'];
    }
    get_ratebyroomid($rmid, $rates, $selected);
    ?>
								<select id=ratesid name=ratesid class="plainDropDown"  >
									<option value='0'> </option>
								 <?php 
    foreach ($rates as $rt) {
        print "<option value='" . $rt['rateid'] . "' ";
        if ($selected == $rt['rateid']) {
            print " selected=selected>";
        } else {
            print ">";
        }
        print $rt['ratecode'];
        print "</option>";
    }
    ?>