if (!empty($camName) && !empty($streamUrl) && ($isLoggedIn || (!empty($subEmail) && !empty($password)))) { // NOU: VERIFICARE DUPLICAT LA SUBMIT! $stmtCheckUrl = $pdo->prepare("SELECT status FROM camera_submissions WHERE stream_url = ?"); $stmtCheckUrl->execute([$streamUrl]); $existingStat = $stmtCheckUrl->fetchColumn(); if ($existingStat) { $statMsg = $existingStat === 'pending' ? 'este în așteptare pentru aprobare' : ($existingStat === 'approved' ? 'este deja activ pe site' : 'a fost respins anterior'); $data['error_message'] = "Acest Stream URL există deja în baza de date ($statMsg). Nu se pot trimite duplicate."; } else { $pdo->beginTransaction(); try { if (!$isLoggedIn) { $stmtUser = $pdo->prepare("SELECT id FROM users WHERE email = ?"); $stmtUser->execute([$subEmail]); $userId = $stmtUser->fetchColumn(); if ($userId) { throw new \Exception("Un cont cu acest email există deja. Te rugăm să te loghezi mai întâi."); } $hash = password_hash($password, PASSWORD_DEFAULT); $stmtCreate = $pdo->prepare("INSERT INTO users (name, email, password_hash) VALUES (?, ?, ?)"); $stmtCreate->execute([$subName, $subEmail, $hash]); $userId = $pdo->lastInsertId(); $_SESSION['user_id'] = $userId; $_SESSION['user_name'] = $subName; $data['session'] = $_SESSION; } $stmtCam = $pdo->prepare("INSERT INTO camera_submissions (user_id, submitter_name, submitter_email, camera_name, stream_url, website_url, location, category_id, description) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stmtCam->execute([$userId, $subName, $subEmail, $camName, $streamUrl, $websiteUrl, $location, $categoryId, $description]); $pdo->commit(); $data['success_message'] = "Camera a fost trimisă cu succes! Va fi revizuită de echipa noastră."; } catch (\Exception $e) { $pdo->rollBack(); $data['error_message'] = $e->getMessage(); } } } else { $data['error_message'] = "Vă rugăm să completați toate câmpurile obligatorii."; } Live Webcams in Caaguazu | Webcam.beer

Live Webcams in Caaguazu

Explore the stunning views and live conditions in the region of Caaguazu.

Latest Cameras in Caaguazu


Discover Caaguazu

The region of Caaguazu is full of hidden gems and iconic spots. Using our live webcams, you can monitor current traffic, verify weather conditions before a hike, or simply relax by watching a live beach or city square.