<?php require dirname(__DIR__) . '/layouts/app.php'; ?>

<section class="page-heading">
    <div>
        <p class="eyebrow">Sauvegarde</p>
        <h1>Backup SQL</h1>
    </div>
    <a class="button-link" href="<?= url('/backup/download') ?>">Telecharger backup</a>
</section>

<section class="work-panel">
    <h2>Base de donnees</h2>
    <p>
        Le fichier SQL contient les donnees principales de l'application:
        utilisateurs, biens, clients, reservations, paiements, notifications et historique.
    </p>
</section>

<section class="table-panel backup-table">
    <table>
        <thead>
            <tr>
                <th>Table</th>
                <th>Contenu</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach (backup_tables() as $table): ?>
                <tr>
                    <td><?= e($table) ?></td>
                    <td>Sauvegardee</td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
</section>

<?php require dirname(__DIR__) . '/layouts/app_footer.php'; ?>
