From 400e93e9fd1e65c7d7abb0b233e9d1a3a674307c Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Mon, 16 Feb 2026 13:04:02 +0000 Subject: [PATCH] Auto commit: 2026-02-16T13:04:02.148Z --- api/photo_status.php | 38 ++++++++++ index.php | 165 ++++++++++++++++++++++++++++++------------- 2 files changed, 153 insertions(+), 50 deletions(-) create mode 100644 api/photo_status.php diff --git a/api/photo_status.php b/api/photo_status.php new file mode 100644 index 0000000..282cdb1 --- /dev/null +++ b/api/photo_status.php @@ -0,0 +1,38 @@ +prepare("SELECT COUNT(*) FROM messages WHERE ip_address = ? AND type = 'image' AND created_at > DATE_SUB(NOW(), INTERVAL 6 HOUR)"); + $stmt->execute([$ip]); + $count = (int)$stmt->fetchColumn(); + + $limit = 5; + $remaining = max(0, $limit - $count); + + $reset_in_seconds = 0; + if ($count >= $limit) { + // Find the oldest message in the 6-hour window + $stmt = db()->prepare("SELECT created_at FROM messages WHERE ip_address = ? AND type = 'image' AND created_at > DATE_SUB(NOW(), INTERVAL 6 HOUR) ORDER BY created_at ASC LIMIT 1"); + $stmt->execute([$ip]); + $oldest = $stmt->fetchColumn(); + if ($oldest) { + $oldest_time = strtotime($oldest); + $reset_time = $oldest_time + (6 * 3600); + $reset_in_seconds = max(0, $reset_time - time()); + } + } + + echo json_encode([ + 'count' => $count, + 'limit' => $limit, + 'remaining' => $remaining, + 'reset_in_seconds' => $reset_in_seconds + ]); +} catch (Exception $e) { + echo json_encode(['error' => $e->getMessage()]); +} diff --git a/index.php b/index.php index d2e5a4b..dde0b20 100644 --- a/index.php +++ b/index.php @@ -579,12 +579,27 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; box-shadow: 0 0 20px rgba(24, 119, 242, 0.5); } + @keyframes fadeIn { + from { opacity: 0; transform: translateY(-5px); } + to { opacity: 1; transform: translateY(0); } + } + @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } } + @keyframes alert-pulse { + 0% { transform: scale(1); } + 50% { transform: scale(1.3); background: #facc15 !important; } + 100% { transform: scale(1); } + } + .counter-alert { + animation: alert-pulse 1s infinite ease-in-out; + box-shadow: 0 0 10px #facc15; + } + /* Responsive */ @media (max-width: 992px) { .app-container { @@ -725,9 +740,11 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; - +