예제 #1
0
" />
						<input type="hidden" name="dr_number" value="<?php 
    echo $dr_number;
    ?>
" />
						<input type="hidden" name="co_start" value="<?php 
    echo $co_start;
    ?>
" />
						<input type="hidden" name="co_end" value="<?php 
    echo $co_end;
    ?>
" />
						<?php 
    foreach ($types as $type) {
        $items = Gear::getAvailableGearWithTypeAndExclusions($type['gear_type_id'], $co_id, $co_start, $co_end);
        if (count($items) > 0) {
            printf("<h4>%s</h4>", $type['type']);
            foreach ($items as $item) {
                $gearObject = new Gear();
                $gearObject->fetch($item['gear_id']);
                $qty = $gearObject->availableQtyExcludingCheckout($co_id, $co_start, $co_end);
                echo "<div class='checkbox'>";
                echo "<label><input type='checkbox' name='gear[]' value='" . $gearObject->getID() . "'";
                //if the gear item is already assigned to checkout, check it by default
                if (isset($simpleGearList) && in_array($gearObject->getID(), $simpleGearList)) {
                    echo "checked > " . $gearObject->getName();
                } else {
                    echo "> " . $gearObject->getName();
                }
                //list quantity next to gear items.