コード例 #1
0
				</td>
			</tr>
			<tr>
				<th>Meal Type:</th>
				<td><?php 
        echo $entry->isUpgraded() ? 'Prime Rib Dinner' : 'Turkey or Vegetarian Dinner';
        ?>
</td>
			</tr>
			<?php 
        if (!$entry->isUpgraded()) {
            ?>
				<tr>
					<th>Vegetarian Meals:</th>
					<td><?php 
            echo $entry->getVegetarianQty();
            ?>
</td>
				</tr>
			<?php 
        }
        ?>
			<?php 
        if ($entry->getAmountDue() > 0) {
            ?>
				<tr>
					<th>Amount Due:</th>
					<td>$<?php 
            echo number_format($entry->getAmountDue(), 2);
            ?>
</td>
コード例 #2
0
							</tr>
							<?php 
        if (!$entry->isUpgraded()) {
            ?>
								<tr>
									<th>Vegetarian Meals:</th>
									<td>
										<select name="vegetarian_qty" id="vegetarian_qty">
											<?php 
            for ($q = 0; $q <= ($entry->isSponsor() ? 8 : $entry->getQty()); $q++) {
                ?>
												<option value="<?php 
                echo $q;
                ?>
"<?php 
                if ($q == $entry->getVegetarianQty()) {
                    ?>
 selected<?php 
                }
                ?>
>
													<?php 
                echo $q;
                ?>
												</option>
											<?php 
            }
            ?>
										</select>
									</td>
								</tr>