Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/quaadraa/admin/views/ |
Upload File : |
<?php /* admin/views/pages.php — mis à jour avec liens d'édition */ ?>
<?php if (isset($_GET['saved'])): ?>
<div class="alert alert-success">✅ Page enregistrée avec succès.</div>
<?php endif; ?>
<div class="admin-table-wrap">
<table class="admin-table">
<thead>
<tr>
<th>Titre</th>
<th>URL</th>
<th>Langue</th>
<th>Publié</th>
<th>Ordre</th>
<th>Modifiée</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php if (empty($pages)): ?>
<tr>
<td colspan="7" style="text-align:center;padding:2rem;color:#5e5e5e">
Aucune page trouvée.
</td>
</tr>
<?php else: ?>
<?php foreach ($pages as $p): ?>
<tr>
<td style="color:#f0ece4;font-weight:600;max-width:200px">
<?= htmlspecialchars(mb_substr($p['title'], 0, 45)) ?>
</td>
<td>
<span style="font-family:monospace;font-size:.75rem;color:#5e5e5e">
/<?= htmlspecialchars($p['lang']) ?>/<?= htmlspecialchars($p['slug']) ?>
</span>
</td>
<td>
<span class="badge-lang"><?= strtoupper(htmlspecialchars($p['lang'])) ?></span>
</td>
<td>
<span class="status-dot <?= $p['is_published'] ? 'status-on' : 'status-off' ?>">
<?= $p['is_published'] ? 'Oui' : 'Non' ?>
</span>
</td>
<td style="color:#5e5e5e"><?= (int)$p['sort_order'] ?></td>
<td style="font-size:.78rem;color:#5e5e5e">
<?= !empty($p['updated_at']) ? date('d/m/Y', strtotime($p['updated_at'])) : '—' ?>
</td>
<td>
<div style="display:flex;gap:.75rem;align-items:center">
<a href="/admin/pages/<?= $p['id'] ?>/edit" class="tbl-action">
✏️ Modifier
</a>
<a href="/<?= htmlspecialchars($p['lang']) ?>/<?= htmlspecialchars($p['slug']) ?>"
target="_blank" class="tbl-action tbl-action-view">
👁 Voir
</a>
</div>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
<style>
.badge-lang {
font-family:inherit;font-size:.7rem;font-weight:700;
letter-spacing:.15em;padding:.2rem .55rem;
background:rgba(201,168,76,.12);color:#C9A84C;
border:1px solid rgba(201,168,76,.25);
}
.status-dot {
display:inline-flex;align-items:center;gap:.35rem;
font-size:.78rem;font-weight:500;
}
.status-dot::before {
content:'';width:7px;height:7px;border-radius:50%;display:block;
}
.status-on { color:#27ae60; }
.status-on::before { background:#27ae60; }
.status-off { color:#5e5e5e; }
.status-off::before { background:#3a3a3a; }
.tbl-action { color:#C9A84C;font-size:.82rem;font-weight:600;white-space:nowrap; }
.tbl-action-view { color:#5e5e5e; }
.tbl-action-view:hover { color:#8e8e8e; }
.alert { padding:.85rem 1.25rem;margin-bottom:1.5rem;font-size:.88rem; }
.alert-success { background:rgba(39,174,96,.1);border:1px solid rgba(39,174,96,.3);color:#27ae60; }
</style>