<?php $this->load->view('template/header'); ?>

<div class="container">
    <div class="card my-5 text-dark bg-light mb-3">
        <div class="card-header">Data Ulasan</div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table" id="datatable" data-ordering="false">
                    <thead>
                        <tr>
                            <th>No</th>
                            <th>Nama Pembeli</th>
                            <th>Nama Produk</th>
                            <th>Rating</th>
                            <th>Komentar</th>
                            <th>Tanggal Upload</th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php $no = 1;
                    foreach ($rate as $row) : ?>
                            <tr>
                                <td><?= $no++ ?></td>
                                <td><?= $row['nama_pembeli'] ?></td>
                                <td><?= $row['nama_produk'] ?></td>
                                <td><?= $row['rating'] ?></td>
                                <td><?= $row['keterangan'] ?></td>
                                <td><?= $row['date_created'] ?></td>
                            </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<?php $this->load->view('template/js'); ?>
<?php $this->load->view('template/footer'); ?>