query("SELECT COUNT(*) FROM quotations WHERE status = 'Pending'"); $pending_quotes = $stmt->fetchColumn(); $stmt = $pdo->query("SELECT COUNT(*) FROM quotations"); $total_quotes = $stmt->fetchColumn(); $stmt = $pdo->query("SELECT COUNT(*) FROM services WHERE is_active = 1"); $active_services = $stmt->fetchColumn(); $stmt = $pdo->query("SELECT COUNT(*) FROM gallery WHERE is_active = 1"); $gallery_items = $stmt->fetchColumn(); // Fetch recent quotations $stmt = $pdo->query("SELECT * FROM quotations ORDER BY created_at DESC LIMIT 5"); $recent_quotes = $stmt->fetchAll(); } catch (Exception $e) { $pending_quotes = 0; $total_quotes = 0; $active_services = 0; $gallery_items = 0; $recent_quotes = []; } // Projects & Clients stats try { $stmt = $pdo->query("SELECT COUNT(*) FROM projects WHERE is_active = 1"); $total_projects = $stmt->fetchColumn(); } catch(Exception $e) { $total_projects = 0; } try { $stmt = $pdo->query("SELECT COUNT(*) FROM clients WHERE is_blocked = 0"); $active_clients = $stmt->fetchColumn(); } catch(Exception $e) { $active_clients = 0; } try { $stmt = $pdo->query("SELECT COUNT(*) FROM hero_images WHERE is_active = 1"); $active_hero = $stmt->fetchColumn(); } catch(Exception $e) { $active_hero = 0; } ?>

Dashboard Overview

Pending Quotes

Total Quotes

Active Services

Gallery Items

Active Projects

Manage Projects
Active Clients

Manage Clients
Hero Slides Active

Manage Hero
Recent Quotation Requests View All
Date Name Service Type Location Status Action
No recent quotations found.
Pending Reviewed Completed View