query("SELECT * FROM submissions ORDER BY created_at DESC"); $submissions = $stmt->fetchAll(); } catch (PDOException $e) { $submissions = []; // In a real app, log this error to a file or service // error_log($e->getMessage()); } // Handle notifications from query parameters $notification = null; if (isset($_GET['success'])) { $count = (int)$_GET['success']; $notification = [ 'type' => 'success', 'message' => "Successfully imported {$count} records from the CSV." ]; } elseif (isset($_GET['error'])) { $notification = [ 'type' => 'danger', 'message' => "An error occurred: " . htmlspecialchars($_GET['error']) ]; } elseif (isset($_GET['refreshed'])) { $notification = [ 'type' => 'info', 'message' => "Submission has been queued for refresh." ]; } // Helper to determine badge color based on status function get_status_badge_class($status) { switch (strtolower($status)) { case 'completed': return 'bg-success-subtle text-success-emphasis'; case 'processing': return 'bg-primary-subtle text-primary-emphasis'; case 'error': return 'bg-danger-subtle text-danger-emphasis'; case 'pending': default: return 'bg-secondary-subtle text-secondary-emphasis'; } } ?> Analyst Dashboard

Analyst Dashboard

Name Company Location Social Profiles Industry Status Actions
No data submitted yet.