?>
"  class="form-control" placeholder="Menu Name" required="required">
                                            </div> 
                                        </td>
                                    </tr>
                                    <tr>
                                        <td ><label class="control-label" for="selectError">Menu Category</label> </td>

                                        <td>
                                            <div class="input-group" style="width: 50%">
                                                <span class="input-group-addon"></span>
                                                <select required="" name="category_id" class="form-control">
                                                    <option value="">--Select Category--</option>
                                                    <?php 
$menuObj = new MenuCategory();
$rows = $menuObj->getAll();
foreach ($rows as $row) {
    $selected = "";
    if ($row['id'] == $category_id) {
        $selected = 'selected="selected"';
    }
    ?>
                                                        <option value="<?php 
    echo $row['id'];
    ?>
" <?php 
    echo $selected;
    ?>
><?php 
    echo $row['name'];
    ?>
예제 #2
0
                <i class="glyphicon glyphicon-edit icon-white"></i>
                Add 
            </a><br/><br/>
    <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
    <thead>
    <tr>
        <th>Id</th>
        <th>Category Name </th>
        <th>Status</th>
        <th>Actions</th>
    </tr>
    </thead>
    <tbody>
       <?php 
$countryObj = new MenuCategory();
$rows = $countryObj->getAll();
foreach ($rows as $row) {
    ?>
    <tr>
                                    <td><?php 
    echo $row['id'];
    ?>
</td>
                                    <td class="center"><?php 
    echo $row['name'];
    ?>
</td>
                                    <td class="center">
                                        <span class="label-success label label-default"><?php 
    if ($row['active'] == 1) {
        echo "Active";