| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/development/callings.lvsaints.com/ |
Upload File : |
<?php
// Preview any stored version without making it live.
// Only editors of that version's ward may view it.
require __DIR__ . '/lib.php';
$user = require_editor();
$id = (int) ($_GET['id'] ?? 0);
$stmt = db()->prepare('SELECT html, ward_id FROM page_versions WHERE id = ?');
$stmt->execute([$id]);
$row = $stmt->fetch();
if (!$row) {
http_response_code(404);
exit('Version not found.');
}
if (!can_edit_ward($user, (int) $row['ward_id'])) {
http_response_code(403);
exit('You do not have access to this ward.');
}
header('Content-Type: text/html; charset=utf-8');
echo $row['html'];