예제 #1
0
function getBedTypes()
{
    $beds = new Beds();
    $beds->setVillaId($_REQUEST['hotell_id']);
    $beds_list = $beds->getAllBedTypes();
    if (empty($beds_list)) {
        echo "Add Bed Types";
    } else {
        for ($b = 0; $b < count($beds_list); $b++) {
            $beds->extractor($beds_list, $b);
            ?>
                <input type="checkbox" <?php 
            if ($b == 0) {
                echo "id='bed_type'";
            }
            ?>
 name="bed_type" value="<?php 
            echo $beds->id();
            ?>
" class="bed_type send_group send_data"/>
                <?php 
            echo $beds->name();
        }
    }
}