Ejemplo n.º 1
0
 public function index()
 {
     $data['meja'] = crud::baca('tbl_meja');
     $this->load->view('1_atas', $data);
     $this->load->view('2_navbar_no', $data);
     $this->load->view('includes/meja/content', $data);
     // Beranda
     $this->load->view('4_bawah', $data);
 }
    echo form_hidden('id', $_GET['id']);
    ?>
            <div class="panel panel-primary">
                <div class="panel-heading">
                <h2 class="panel-title">Data Menu</h2>
                </div>
                <div class="panel-body">
                    <table class="table table-responsive">
                        <tr>
                            <td>Kategori</td>
                            <td>:</td>
                            <td>
                                <select name="kategori" class="form-control">
                                <option value="">- Pilih -</option>
                                    <?php 
    $kat = crud::baca('tbl_kategori');
    if (!empty($kat)) {
        foreach ($kat as $kat) {
            ?>
                                                <option value="<?php 
            echo $kat->id_kategori;
            ?>
" <?php 
            echo $kat->id_kategori == $menu_list->id_kategori ? 'selected' : '';
            ?>
><?php 
            echo ucwords($kat->kategori);
            ?>
</option>
                                                <?php 
        }