hjkhjkjhkhjkgjghjhgjhgjghjhghjghjhgjjnbvnvbnvk
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
wjcvelqp
/
public_html
/
despiteloveday.com.ng
/
Upload FileeE
HOME
<?php $page_title = 'Gallery'; require_once 'config/database.php'; include 'includes/header.php'; // Built-in images that came with the project $builtin = [ '2dd3afca-7365-4bb1-8a01-63866b9de6e2.jpg' => 'Modern Exterior', '378d4329-b678-49f7-b468-4d2669c85e7e.jpg' => 'Front Gate', '7ba754aa-362e-4523-b26e-84d5821643cf.jpg' => 'Night View', '93e34cd8-857b-4740-bd16-b183e9eab6aa.jpg' => 'Master Bedroom', '9392a15d-89e4-4546-8f40-accab36b69dd.jpg' => 'Entertainment Lounge', 'd292201d-b861-4776-a578-f64dfa91e372.jpg' => 'Living Room Sofa', '2d47f6a0-9a1f-451b-8704-6a0011721384.jpg' => 'Living Area Detail', '61cebbfe-f9f6-41bd-b01a-ec5cc8d4eb37.jpg' => 'TV Lounge View', '51853849-8503-4ff8-ba67-2c5cddbe11ef.jpg' => 'Elegant Staircase', '4c7fc651-ac0e-47ea-a632-787462e3947e.jpg' => 'Balcony Seating', '378251b2-71f3-4adc-9687-649ad8cf6b3d.jpg' => 'Clean Bathroom', '24aa4743-bcb3-4640-a482-c9d56665a3a0.jpg' => 'Smart TV Setup', ]; // Uploaded media from admin $uploaded = []; $db = getDB(); if ($db) { try { $uploaded = $db->query("SELECT * FROM media WHERE is_active=1 AND category IN ('gallery','hero','room','other') ORDER BY sort_order ASC, created_at DESC")->fetchAll(); } catch (Exception $e) {} } ?> <section class="page-hero"> <div class="container"> <h1>Property Gallery</h1> <p>Explore the elegant interiors and modern exterior of Despite Loveday Apartments.</p> </div> </section> <section> <div class="container"> <div style="display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:20px;"> <?php // Show uploaded images first ?> <?php foreach ($uploaded as $m): ?> <div style="border-radius:12px; overflow:hidden; box-shadow:var(--shadow); background:white;"> <img src="uploads/<?php echo htmlspecialchars($m['filename']); ?>" alt="<?php echo htmlspecialchars($m['title']); ?>" style="width:100%; height:240px; object-fit:cover;"> <div style="padding:14px 16px; font-size:14px; font-weight:500; color:var(--navy);"> <?php echo htmlspecialchars($m['title'] ?: 'Property Photo'); ?> </div> </div> <?php endforeach; ?> <?php // Then built-in images ?> <?php foreach ($builtin as $file => $caption): ?> <div style="border-radius:12px; overflow:hidden; box-shadow:var(--shadow); background:white;"> <img src="assets/images/<?php echo $file; ?>" alt="<?php echo htmlspecialchars($caption); ?>" style="width:100%; height:240px; object-fit:cover;"> <div style="padding:14px 16px; font-size:14px; font-weight:500; color:var(--navy);"><?php echo htmlspecialchars($caption); ?></div> </div> <?php endforeach; ?> </div> </div> </section> <?php include 'includes/footer.php'; ?>