insert('homepage_splashes', [ 'splash_id' => generateId('spl_'), 'icon' => trim($_POST['icon'] ?? 'fas fa-star'), 'image_url' => trim($_POST['image_url'] ?? '') ?: null, 'title' => $title, 'description' => trim($_POST['description'] ?? '') ?: null, 'sort_order' => intval($_POST['sort_order'] ?? 0), 'is_active' => 1, ]); setFlash('success', 'Splash block created'); } } if ($action === 'update' && $splashId) { $title = trim($_POST['title'] ?? ''); if ($title) { db()->update('homepage_splashes', [ 'icon' => trim($_POST['icon'] ?? 'fas fa-star'), 'image_url' => trim($_POST['image_url'] ?? '') ?: null, 'title' => $title, 'description' => trim($_POST['description'] ?? '') ?: null, 'sort_order' => intval($_POST['sort_order'] ?? 0), 'is_active' => isset($_POST['is_active']) ? 1 : 0, ], 'splash_id = :id', ['id' => $splashId]); setFlash('success', 'Splash block updated'); } } if ($action === 'delete' && $splashId) { db()->delete('homepage_splashes', 'splash_id = :id', ['id' => $splashId]); setFlash('success', 'Splash block deleted'); } if ($action === 'reorder') { $ids = json_decode($_POST['order'] ?? '[]', true); foreach ($ids as $pos => $sid) { db()->update('homepage_splashes', ['sort_order' => $pos + 1], 'splash_id = :id', ['id' => $sid]); } echo json_encode(['ok' => true]); exit; } header('Location: /admin/splashes.php'); exit; } $splashes = db()->fetchAll( "SELECT * FROM homepage_splashes ORDER BY sort_order ASC, id ASC" ); $iconOptions = [ 'fas fa-leaf' => 'Leaf', 'fas fa-fire' => 'Fire', 'fas fa-truck' => 'Truck', 'fas fa-heart' => 'Heart', 'fas fa-star' => 'Star', 'fas fa-coffee' => 'Coffee', 'fas fa-mug-hot' => 'Mug Hot', 'fas fa-seedling' => 'Seedling', 'fas fa-shield-alt' => 'Shield', 'fas fa-check-circle' => 'Check', 'fas fa-gift' => 'Gift', 'fas fa-globe' => 'Globe', 'fas fa-award' => 'Award', 'fas fa-smile' => 'Smile', 'fas fa-bolt' => 'Bolt', 'fas fa-recycle' => 'Recycle', 'fas fa-hand-holding-heart'=> 'Care', 'fas fa-crown' => 'Crown', 'fas fa-gem' => 'Gem', 'fas fa-thumbs-up' => 'Thumbs Up', ]; ?>

Drag rows to reorder — saves automatically. block total. Homepage scrolls horizontally when more than 4 are active. Each block can show an icon or a custom image.

Homepage Preview

No splash blocks yet. Click Add Splash to get started.
Visual Title Description Order Status Actions
Active' : 'Hidden' ?>