Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/laciasmara.com/public_html/shop/application/views/admin/brands/ |
Upload File : |
<div class="row"> <div class="col-sm-12"> <p><a href="<?= base_url('admin/product_index'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Kembali ke Produk</a></p> <h2>Merek Produk</h2> <?= $this->session->flashdata('success'); ?> </div> </div> <div class="row"> <div class="col-sm-12"> <p><?= anchor('admin/brands/edit', '<i class="fa fa-plus" aria-hidden="true"></i> <strong>Buat Merek baru</strong>', array('class' => 'btn btn-primary')); ?></p> </div> </div> <div class="row"> <div class="col-sm-12"> <label for="search">Cari Merek:</label> <input type="text" id="search" oninput="searchBrands()" class="form-control" placeholder="Masukkan nama merek..."> </div> </div> <div class="row"> <div class="col-sm-12"> <table class="table table-striped"> <thead> <tr> <th>Nama Merek</th> <th>Urutan Tampilan</th> <th>Total Tipe Product</th> <!--<th>Supplier</th>--> <th>Aktif?</th> <th>Edit</th> <th>Hapus</th> </tr> </thead> <tbody> <?php if (count($brands)) : ?> <?php foreach ($brands as $brand) : ?> <tr> <td><a href="<?= base_url() . 'admin/brands/edit/' . $brand->id_brands; ?>"><?= ucwords($brand->brand); ?></a></td> <td><?= $brand->priority; ?></td> <td><?= $brand->jumlah ?></td> <!--<td><a href="<?php echo site_url('admin/brands/view/' . $brand->id_brands) ?>">Detail Kontak</a></td>--> <td> <?php if ($brand->status == 1) { echo 'Ya'; } else { echo 'Tidak'; } ?> </td> <td><?= bt_edit('admin/brands/edit/' . $brand->id_brands); ?></td> <td><?= bt_delete('admin/brands/delete/' . $brand->id_brands); ?></td> </tr> <?php endforeach; ?> <?php else : ?> <tr> <td colspan="3">Merek produk tidak ditemukan.</td> </tr> <?php endif; ?> </tbody> </table> </div> </div> <!--<div class="row"> <div class="col-sm-12"> <?= '<div style="text-align:center;">' . $this->pagination->create_links() . '</div>'; ?> </div> </div>--> <script> function searchBrands() { var input, filter, table, tr, td, i, txtValue; input = document.getElementById("search"); filter = input.value.toUpperCase(); table = document.querySelector(".table"); tr = table.getElementsByTagName("tr"); for (i = 0; i < tr.length; i++) { td = tr[i].getElementsByTagName("td")[0]; // Ubah ke indeks kolom yang ingin dicari (0 untuk Nama Merek) if (td) { txtValue = td.textContent || td.innerText; if (txtValue.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } } } } </script>