Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="col-md-20">
- <div class="panel panel-default">
- <div class="panel-body">
- <form class="form-horizontal" id="form_datatransaksi" role="form">
- <?php
- $is_login = $this->session->userdata('is_login');
- $username = $this->session->userdata('username');
- ?>
- <?php if ($is_login): ?>
- <?php
- if($jumlah > 0){
- ?>
- <table>
- <tr>
- <td>Jumlah Barang : <?= $jumlah?> </td>
- </tr>
- </table>
- <table class="table table-hover" width="100%">
- <thead>
- <tr bgcolor="#4CAF50">
- <th scope="col">No. </th>
- <th scope="col">Kode</th>
- <th scope="col">Nama Barang</th>
- <th scope="col">Harga Barang</th>
- <th scope="col">Stok Barang</th>
- <th colspan="3" scope="col">Opsi</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $n=1;
- ?>
- <?php foreach($data as $row): ?>
- <tr>
- <td><?= $n++ ?></td>
- <td><?= $row['kode'] ?></td>
- <td><?= $row['nama'] ?></td>
- <td><?= $row['harga'] ?></td>
- <td><?= $row['stok'] ?></td>
- <td>
- <a href="<?= base_url() ?>kasir/detailBarang/<?= $row['kode'] ?>" class="btn btn-info">Detail</a>
- <a href="<?= base_url() ?>kasir/ubahBarang/<?= $row['kode'] ?>" class="btn btn-warning">Update</a>
- <a href="<?= base_url() ?>kasir/deleteBarangDB/<?= $row['kode'] ?>" class="btn btn-danger">Delete</a>
- </td>
- </tr>
- <?php endforeach ?>
- </tbody>
- </table>
- <?php
- }
- ?>
- <?php else: ?>
- <?= header("location:index.php?pesan=gagal")or die(mysql_error()); ?>
- <?php endif ?>
- </form>
- <br>
- <div>
- <a class="btn btn-primary" href="<?= base_url() ?>Kasir/tambahBarang">Daftar Barang</a>
- <a class="btn btn-primary" href="<?= base_url() ?>laporan-barang">Tampilkan Laporan</a>
- </div>
- </div>
- </div>
- </div>
Add Comment
Please, Sign In to add comment