<div id="content" class='content'>
    <div class='row'>
        <div class='col-lg-12'>
            <div class='pull-right'>
                <?= anchor('backup/backup/', '<i class="fa fa-database"></i> <span class="hidden-xs"> Backup Data</span>', array('class' => 'btn btn-warning btn-sm')); ?>
            </div>
        </div>
    </div>
    <br>
    <div class='row'>
        <div class='col-xs-12'>
            <div class='panel <?= $web_box_color ?>'>
                <div class='panel-heading'>
                    <h3 class='panel-title bold'>List Backup</h3>
                </div>
                <div class='panel-body'>
                    <div>
                        <table class="table table-striped" id="mytable" style="width: 100%;">
                            <thead>
                                <tr>
                                    <th style="width: 10px;">No</th>
                                    <th class="text-center">Nama File</th>
                                    <th class="text-center"><span><i class="fa fa-gears"></i></span></th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                $no = null;
                                $dir = "public/data/backup/";

                                if (isset($daftar_file)) {
                                    for ($a = 0; $a < count($daftar_file); $a++) {
                                        if ($daftar_file[$a] != '.' && $daftar_file[$a] != '..') {
                                            $no++;
                                            $file = $daftar_file[$a]; ?>
                                            <tr>
                                                <td align="center"><?= $no; ?></td>
                                                <td><?= $file; ?></td>
                                                <td align="center">
                                                    <a href="<?= $dir . $daftar_file[$a]; ?>" class="btn btn-primary  btn-icon btn-circle" data-toggle="tooltip" data-placement="left" title="Download"><i class="fa fa-download"></i></a>
                                                    <a href="<?= base_url() . 'backup/hapus/' . $daftar_file[$a]; ?>" class="btn btn-danger  btn-icon btn-circle tombol-hapus" data-toggle="tooltip" data-placement="left" title="Hapus"><i class="fa fa-trash-alt"></i></a>
                                                </td>
                                            </tr>
                                <?php
                                        }
                                    }
                                }
                                ?>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="box-footer clearfix">
                </div>
            </div>
        </div>
    </div>