示例#1
0
				  	</div>
				  	<div class="form-group">
					    <label class="col-sm-2 col-xs-4 control-label">Cost</label>
					    <div class="col-sm-10 col-xs-8">
					      	<p class="form-control-static"><?php 
    echo $menuItem->cost;
    ?>
</p>
					    </div>
				  	</div>
				  	<div class="form-group">
					    <label class="col-sm-2 col-xs-4 control-label">Item Category</label>
					    <div class="col-sm-10 col-xs-8">
					      	<p class="form-control-static">
					      	<?php 
    $cat = MenuItemCategory::select(array('id' => $menuItem->category_id));
    echo ucwords($cat->name);
    ?>
					      	</p>
					    </div>
				  	</div>
					<div class="well">
						<p>Deleting the item will also delete all the orders of this item. Do you wish to continue?</p>
						<div class="form-group">
							<input type="submit" value="Yes" name="delete" class="btn btn-danger" />
							<input type="submit" value="No" name="delete" class="btn btn-primary" />
						</div>
					</div>
				</form>
			</div>
		</div>
示例#2
0
}
if (isset($_GET['success']) && $_GET['success'] == 'edit') {
    $alert['success'] = "The menu item was successfully updated.";
}
?>
<div class="row" style="margin-right: 0">
	<div class="col-md-6 col-md-offset-3 page-wrapper">
		<h2>View Menu Item(s)</h2>
		<hr>
		<form action="menu.view.php" method="post">
		<h3>Today's Menu<a class="btn btn-default btn-sm pull-right" onclick="toggleAll('today-menu',this)">Expand All</a></h3>
		
		<hr>
		<?php 
bootstrap_alert($alert);
$all_categories = MenuItemCategory::select();
if (is_object($all_categories)) {
    $all_categories = array($all_categories);
}
if ($all_categories) {
    foreach ($all_categories as $category) {
        $menu_items = MenuItem::select(array('category_id' => $category->id, 'available' => '1'));
        if (is_object($menu_items)) {
            $menu_items = array($menu_items);
        }
        ?>
			  	<div class="panel panel-primary">
			      	<div class="panel-heading" role="tab" id="collapseDivHead-<?php 
        echo $category->id;
        ?>
">
示例#3
0
    ?>
">
				</div>
				<div class="form-group col-md-6">
					<label for="txtCost">Cost:</label>
					<input type="number" class="form-control" id="txtCost" name="cost" placeholder="E.g. 80" tabindex="1" min="0" step="0.01" required value="<?php 
    echo $menu_item->cost;
    ?>
">
				</div>
			</div>
			<div class="form-group">
			    <label for="selectCategory">Menu Item Category</label>
			    <select class="form-control" id="selectCategory" name="category_id" tabindex="4" required>
					<?php 
    $allMenuCat = MenuItemCategory::select();
    if (is_object($allMenuCat)) {
        $allMenuCat = array($allMenuCat);
    }
    foreach ($allMenuCat as $menuCat) {
        echo "<option value='{$menuCat->id}'>" . ucwords($menuCat->name) . "</option>";
    }
    ?>
				</select>
			</div>
			<div class="form-group hidden" id="newCatDiv">
				<label for="txtCategory">Category Name</label>
				<input type="text" class="form-control" id="txtCategory" name="menuCategory" placeholder="Enter the new category" tabindex="5">
			</div>
			<div class="checkbox">
				<label>