BLACKSITE
:
216.73.217.148
:
172.93.223.125 / www.geeteetravels.com
:
Linux ubuntu 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64
:
/
home
/
geeteetravels
/
public_html
/
admin
/
Upload File:
files >> /home/geeteetravels/public_html/admin/settings.php
<?php $pageTitle = 'Site Settings'; $currentPage = 'settings'; require_once 'includes/header.php'; $message = ''; $error = ''; // Handle form submission if ($_SERVER['REQUEST_METHOD'] === 'POST') { $video_input = trim($_POST['hero_video_id']); $video_id = $video_input; // Auto-extract ID from YouTube URL if provided if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $video_input, $match)) { $video_id = $match[1]; } if (empty($video_id)) { $error = "Invalid YouTube Video ID or URL."; } else { try { $stmt = $pdo->prepare("UPDATE settings SET setting_value = ? WHERE setting_key = 'hero_video_id'"); $stmt->execute([$video_id]); $message = "Settings updated successfully!"; } catch (PDOException $e) { $error = "Database error: " . $e->getMessage(); } } } // Fetch current setting $stmt = $pdo->query("SELECT setting_value FROM settings WHERE setting_key = 'hero_video_id'"); $hero_video_id = $stmt->fetchColumn() ?: 'Kp1BIy-4aGc'; ?> <div class="settings-container"> <div class="section-card"> <div class="section-header"> <h3>Homepage Hero Settings</h3> </div> <?php if ($message): ?> <div class="alert alert-success" style="padding: 15px; background: #dcfce7; color: #166534; border-radius: 8px; margin-bottom: 20px;"> <i class="fa fa-check-circle"></i> <?php echo $message; ?> </div> <?php endif; ?> <?php if ($error): ?> <div class="alert alert-danger" style="padding: 15px; background: #fee2e2; color: #991b1b; border-radius: 8px; margin-bottom: 20px;"> <i class="fa fa-exclamation-circle"></i> <?php echo $error; ?> </div> <?php endif; ?> <form method="POST" action=""> <div class="form-group" style="margin-bottom: 25px;"> <label for="hero_video_id" style="display: block; font-weight: 600; margin-bottom: 8px; color: #1e293b;">YouTube Video ID / URL</label> <input type="text" name="hero_video_id" id="hero_video_id" class="form-control" value="<?php echo htmlspecialchars($hero_video_id); ?>" placeholder="e.g. Kp1BIy-4aGc" style="width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px;"> <p style="font-size: 13px; color: #64748b; margin-top: 8px;"> Enter just the ID (e.g., <strong>Kp1BIy-4aGc</strong>) or the full YouTube URL. The system will automatically use it for the homepage banner. </p> </div> <div class="video-preview" style="margin-bottom: 25px; background: #f8fafc; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0;"> <h4 style="margin-bottom: 15px; font-size: 15px; color: #1e293b;">Current Video Preview:</h4> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; background: #000;"> <iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" src="https://www.youtube.com/embed/<?php echo htmlspecialchars($hero_video_id); ?>?controls=1" frameborder="0" allowfullscreen> </iframe> </div> </div> <button type="submit" class="btn-primary" style="background: var(--primary-color); border: none; padding: 12px 30px; border-radius: 8px; color: #fff; cursor: pointer; font-weight: 600;"> Save Site Settings </button> </form> </div> </div> <style> .settings-container { max-width: 800px; } .section-card { background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); } .section-header { margin-bottom: 25px; border-bottom: 1px solid #f1f5f9; padding-bottom: 15px; } .section-header h3 { font-size: 20px; color: #1e293b; } </style> <?php require_once 'includes/footer.php'; ?>