Файловый менеджер - Редактировать - /home/gqdcvggs/hizhat.com/formore.tv.zip
Назад
PK F �[����L �L make.phpnu �Iw�� <?php require_once 'includes/auth.php'; $error = ''; $success = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $title = trim($_POST['title']); $description = trim($_POST['description']); $age_rating = (int)$_POST['age_rating']; $author = trim($_POST['author']); $director = trim($_POST['director']); $terms_accepted = isset($_POST['terms_accepted']); $notice_accepted = isset($_POST['notice_accepted']); if (empty($title) || empty($description) || empty($author) || empty($director)) { $error = 'Please fill in all required fields'; } elseif (!$terms_accepted) { $error = 'You must accept the Terms of Service'; } elseif (!$notice_accepted) { $error = 'You must accept the content review notice'; } elseif (!isset($_FILES['video']) || $_FILES['video']['error'] !== UPLOAD_ERR_OK) { $error = 'Please select a valid video file'; } elseif (!isset($_FILES['thumbnail']) || $_FILES['thumbnail']['error'] !== UPLOAD_ERR_OK) { $error = 'Please select a valid thumbnail image'; } else { $video_file = $_FILES['video']; $thumbnail_file = $_FILES['thumbnail']; $max_video_size = 500 * 1024 * 1024; $max_thumbnail_size = 5 * 1024 * 1024; $allowed_video_types = ['video/mp4', 'video/avi', 'video/mov', 'video/wmv', 'video/webm']; $allowed_image_types = ['image/jpeg', 'image/png', 'image/gif', 'image/webp']; if ($video_file['size'] > $max_video_size) { $error = 'Video file is too large. Maximum size is 500MB'; } elseif ($thumbnail_file['size'] > $max_thumbnail_size) { $error = 'Thumbnail image is too large. Maximum size is 5MB'; } elseif (!in_array($video_file['type'], $allowed_video_types)) { $error = 'Invalid video format. Please use MP4, AVI, MOV, WMV, or WebM'; } elseif (!in_array($thumbnail_file['type'], $allowed_image_types)) { $error = 'Invalid thumbnail format. Please use JPEG, PNG, GIF, or WebP'; } else { $upload_dir = 'uploads/'; $video_dir = $upload_dir . 'videos/'; $thumbnail_dir = $upload_dir . 'thumbnails/'; if (!is_dir($upload_dir)) mkdir($upload_dir, 0755, true); if (!is_dir($video_dir)) mkdir($video_dir, 0755, true); if (!is_dir($thumbnail_dir)) mkdir($thumbnail_dir, 0755, true); $video_ext = pathinfo($video_file['name'], PATHINFO_EXTENSION); $thumbnail_ext = pathinfo($thumbnail_file['name'], PATHINFO_EXTENSION); $video_filename = uniqid() . '_' . time() . '.' . $video_ext; $thumbnail_filename = uniqid() . '_' . time() . '.' . $thumbnail_ext; $video_path = $video_dir . $video_filename; $thumbnail_path = $thumbnail_dir . $thumbnail_filename; if (move_uploaded_file($video_file['tmp_name'], $video_path) && move_uploaded_file($thumbnail_file['tmp_name'], $thumbnail_path)) { $stmt = $pdo->prepare(" INSERT INTO content (title, description, thumbnail, video_url, age_rating, author, director, status, uploaded_by) VALUES (?, ?, ?, ?, ?, ?, ?, 'pending', ?) "); if ($stmt->execute([$title, $description, $thumbnail_path, $video_path, $age_rating, $author, $director, $current_user['id']])) { $success = 'Content uploaded successfully! It will be reviewed within 48 hours.'; } else { unlink($video_path); unlink($thumbnail_path); $error = 'Failed to save content information'; } } else { $error = 'Failed to upload files'; } } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Upload Content - Formore</title> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet"> <link rel="icon" href="https://cdn.imators.com/logo.png" type="image/png"> <script src="https://cdn.tailwindcss.com"></script> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; font-weight: 300; background: #fff; color: #333; overflow-x: hidden; } .header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1rem 2rem; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(0, 0, 0, 0.05); } .header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; } .logo { font-size: 1.5rem; font-weight: 500; color: #000; text-decoration: none; } .back-btn { background: none; color: #333; border: none; padding: 0.5rem 1rem; cursor: pointer; font-size: 0.9rem; text-decoration: none; transition: all 0.3s ease; font-weight: 300; border-radius: 6px; display: flex; align-items: center; gap: 0.5rem; } .back-btn:hover { background: #f8f9fa; color: #000; } .upload-container { max-width: 700px; margin: 120px auto 4rem; padding: 2rem; } .upload-form { background: #fff; border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 12px; padding: 2.5rem; } .form-title { font-size: 1.75rem; font-weight: 500; margin-bottom: 0.5rem; color: #000; text-align: center; } .form-subtitle { color: #666; text-align: center; margin-bottom: 2rem; font-weight: 300; } .form-group { margin-bottom: 1.5rem; } .form-label { display: block; margin-bottom: 0.5rem; font-weight: 400; color: #333; } .form-input, .form-select { width: 100%; padding: 0.75rem; border: 1px solid #e9ecef; border-radius: 8px; background: #fff; font-size: 0.9rem; font-family: 'Poppins', sans-serif; font-weight: 300; transition: all 0.3s ease; } .form-input:focus, .form-select:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05); } .form-textarea { min-height: 100px; resize: vertical; } .file-upload { position: relative; display: block; cursor: pointer; border: 2px dashed #e9ecef; border-radius: 8px; padding: 2rem; text-align: center; background: #f8f9fa; transition: all 0.3s ease; } .file-upload:hover { border-color: #000; background: #fff; } .file-upload input { position: absolute; opacity: 0; pointer-events: none; } .file-upload-icon { font-size: 2rem; margin-bottom: 0.5rem; } .file-upload-text { color: #333; margin-bottom: 0.25rem; font-weight: 400; } .file-upload-hint { font-size: 0.85rem; color: #999; } .checkbox-group { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; } .checkbox { margin-top: 0.25rem; width: 18px; height: 18px; cursor: pointer; } .checkbox-label { color: #333; line-height: 1.5; font-size: 0.9rem; font-weight: 300; } .checkbox-label a { color: #000; text-decoration: underline; transition: all 0.3s ease; } .checkbox-label a:hover { color: #666; } .submit-btn { width: 100%; background: #000; color: white; border: none; border-radius: 8px; padding: 0.75rem; font-size: 0.9rem; font-weight: 400; cursor: pointer; transition: all 0.3s ease; margin-top: 1rem; font-family: 'Poppins', sans-serif; } .submit-btn:hover { background: #333; transform: translateY(-1px); } .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; } .alert { padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.9rem; } .alert-error { background: rgba(255, 59, 48, 0.1); border: 1px solid rgba(255, 59, 48, 0.2); color: #d70015; } .alert-success { background: rgba(52, 199, 89, 0.1); border: 1px solid rgba(52, 199, 89, 0.2); color: #1d8348; } .progress-bar { width: 100%; height: 4px; background: #e9ecef; border-radius: 2px; overflow: hidden; margin-top: 0.5rem; display: none; } .progress-fill { height: 100%; background: #000; width: 0%; transition: width 0.3s ease; } .file-upload.active { border-color: #000; background: #f8f9fa; } .file-upload.active .progress-fill { background: #34c759; } @media (max-width: 768px) { .header { padding: 1rem; } .logo { font-size: 1.25rem; } .back-btn { padding: 0.5rem 0.75rem; font-size: 0.85rem; } .upload-container { margin-top: 80px; padding: 1rem; } .upload-form { padding: 1.5rem; } .form-title { font-size: 1.5rem; } .form-subtitle { font-size: 0.9rem; margin-bottom: 1.5rem; } .checkbox-label { font-size: 0.85rem; } } </style> </head> <body> <header class="header"> <div class="header-content"> <a href="home.php" class="logo">formore</a> <a href="home.php" class="back-btn">← Back</a> </div> </header> <div class="upload-container"> <div class="upload-form"> <h1 class="form-title">Upload Your Content</h1> <p class="form-subtitle">Share your movies and series made in video games</p> <?php if($error): ?> <div class="alert alert-error"><?php echo htmlspecialchars($error); ?></div> <?php endif; ?> <?php if($success): ?> <div class="alert alert-success"><?php echo htmlspecialchars($success); ?></div> <?php endif; ?> <form method="POST" enctype="multipart/form-data" id="uploadForm"> <div class="form-group"> <label class="form-label">Title *</label> <input type="text" name="title" class="form-input" placeholder="Enter the title of your content" required value="<?php echo isset($_POST['title']) ? htmlspecialchars($_POST['title']) : ''; ?>"> </div> <div class="form-group"> <label class="form-label">Description *</label> <textarea name="description" class="form-input form-textarea" placeholder="Describe your content, the story, the game used..." required><?php echo isset($_POST['description']) ? htmlspecialchars($_POST['description']) : ''; ?></textarea> </div> <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;"> <div class="form-group"> <label class="form-label">Author *</label> <input type="text" name="author" class="form-input" placeholder="Content creator name" required value="<?php echo isset($_POST['author']) ? htmlspecialchars($_POST['author']) : ''; ?>"> </div> <div class="form-group"> <label class="form-label">Director *</label> <input type="text" name="director" class="form-input" placeholder="Director name" required value="<?php echo isset($_POST['director']) ? htmlspecialchars($_POST['director']) : ''; ?>"> </div> </div> <div class="form-group"> <label class="form-label">Age Rating *</label> <select name="age_rating" class="form-select" required> <option value="6" <?php echo (isset($_POST['age_rating']) && $_POST['age_rating'] == '6') ? 'selected' : ''; ?>>6+ (Kids)</option> <option value="13" <?php echo (isset($_POST['age_rating']) && $_POST['age_rating'] == '13') ? 'selected' : ''; ?>>13+ (Teen)</option> <option value="16" <?php echo (isset($_POST['age_rating']) && $_POST['age_rating'] == '16') ? 'selected' : ''; ?>>16+ (Mature)</option> <option value="18" <?php echo (isset($_POST['age_rating']) && $_POST['age_rating'] == '18') ? 'selected' : ''; ?>>18+ (Adult)</option> </select> </div> <div class="form-group"> <label class="form-label">Video File * (Max 500MB)</label> <label class="file-upload"> <input type="file" name="video" accept="video/*" required> <div class="file-upload-icon">🎬</div> <div class="file-upload-text">Click to select your video</div> <div class="file-upload-hint">MP4, AVI, MOV, WMV, WebM</div> </label> <div class="progress-bar" id="videoProgress"> <div class="progress-fill"></div> </div> </div> <div class="form-group"> <label class="form-label">Thumbnail Image * (Max 5MB)</label> <label class="file-upload"> <input type="file" name="thumbnail" accept="image/*" required> <div class="file-upload-icon">🖼️</div> <div class="file-upload-text">Click to select thumbnail</div> <div class="file-upload-hint">JPEG, PNG, GIF, WebP</div> </label> <div class="progress-bar" id="thumbnailProgress"> <div class="progress-fill"></div> </div> </div> <div class="checkbox-group"> <input type="checkbox" name="terms_accepted" class="checkbox" id="terms" required> <label for="terms" class="checkbox-label"> I accept the <a href="https://imators.com/terms-of-use">Terms of Service</a> </label> </div> <div class="checkbox-group"> <input type="checkbox" name="notice_accepted" class="checkbox" id="notice" required> <label for="notice" class="checkbox-label"> I accept that the content I publish will be reviewed, at the level of information such as title, age, description, if these infringe the rules imposed by Formore. </label> </div> <button type="submit" class="submit-btn" id="submitBtn"> Upload Content </button> </form> </div> </div> <script> document.querySelectorAll('input[type="file"]').forEach(input => { input.addEventListener('change', function() { const label = this.closest('.file-upload'); const textDiv = label.querySelector('.file-upload-text'); const progressBar = label.parentNode.querySelector('.progress-bar'); if (this.files.length > 0) { const file = this.files[0]; const maxSize = this.name === 'video' ? 500 * 1024 * 1024 : 5 * 1024 * 1024; if (file.size > maxSize) { alert(`File is too large. Maximum size is ${this.name === 'video' ? '500MB' : '5MB'}`); this.value = ''; return; } textDiv.textContent = file.name; label.classList.add('active'); progressBar.style.display = 'block'; const progressFill = progressBar.querySelector('.progress-fill'); let progress = 0; const interval = setInterval(() => { progress += Math.random() * 20; if (progress >= 100) { progress = 100; clearInterval(interval); } progressFill.style.width = progress + '%'; }, 100); } else { textDiv.textContent = this.name === 'video' ? 'Click to select your video' : 'Click to select thumbnail'; label.classList.remove('active'); progressBar.style.display = 'none'; } }); }); document.getElementById('uploadForm').addEventListener('submit', function() { const submitBtn = document.getElementById('submitBtn'); submitBtn.disabled = true; submitBtn.textContent = 'Uploading...'; }); </script> </body> </html>PK F �[�TO�} } home.phpnu �Iw�� <?php require_once 'includes/auth.php'; $stmt = $pdo->prepare("SELECT * FROM profiles WHERE user_id = ? ORDER BY is_main DESC, created_at ASC"); $stmt->execute([$current_user['id']]); $profiles = $stmt->fetchAll(PDO::FETCH_ASSOC); if (empty($profiles)) { $stmt = $pdo->prepare("INSERT INTO profiles (user_id, name, avatar, age_limit, is_main) VALUES (?, ?, ?, ?, 1)"); $stmt->execute([ $current_user['id'], $current_user['username'], $current_user['profile_picture'], 18 ]); $stmt = $pdo->prepare("SELECT * FROM profiles WHERE user_id = ?"); $stmt->execute([$current_user['id']]); $profiles = $stmt->fetchAll(PDO::FETCH_ASSOC); } $selected_profile_id = $_SESSION['selected_profile'] ?? $profiles[0]['id']; $selected_profile = null; foreach($profiles as $profile) { if($profile['id'] == $selected_profile_id) { $selected_profile = $profile; break; } } if (!$selected_profile) { $selected_profile = $profiles[0]; $_SESSION['selected_profile'] = $selected_profile['id']; } $search = $_GET['search'] ?? ''; $stmt = $pdo->prepare("SELECT DISTINCT category FROM content WHERE status = 'approved' AND category IS NOT NULL AND category != '' ORDER BY category ASC"); $stmt->execute(); $categories = $stmt->fetchAll(PDO::FETCH_COLUMN); $content_by_category = []; if (!empty($search)) { $stmt = $pdo->prepare("SELECT * FROM content WHERE status = 'approved' AND age_rating <= ? AND (title LIKE ? OR description LIKE ? OR author LIKE ?) ORDER BY created_at DESC LIMIT 20"); $search_term = "%$search%"; $stmt->execute([$selected_profile['age_limit'], $search_term, $search_term, $search_term]); $search_results = $stmt->fetchAll(PDO::FETCH_ASSOC); } else { foreach ($categories as $category) { $stmt = $pdo->prepare("SELECT * FROM content WHERE status = 'approved' AND age_rating <= ? AND category = ? ORDER BY created_at DESC LIMIT 12"); $stmt->execute([$selected_profile['age_limit'], $category]); $content_by_category[$category] = $stmt->fetchAll(PDO::FETCH_ASSOC); } } if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['select_profile'])) { $_SESSION['selected_profile'] = $_POST['profile_id']; header('Location: home.php'); exit; } $all_content = []; foreach ($content_by_category as $category => $contents) { $all_content = array_merge($all_content, $contents); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Formore - Your Entertainment</title> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet"> <link rel="icon" href="https://cdn.imators.com/logo.png" type="image/png"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } :root { --bg-primary: #fff; --bg-secondary: #f8f9fa; --text-primary: #333; --text-secondary: #666; --border-color: #e9ecef; --header-bg: rgba(255, 255, 255, 0.95); } html.dark { --bg-primary: #0d0d0d; --bg-secondary: #1a1a1a; --text-primary: #f0f0f0; --text-secondary: #b0b0b0; --border-color: #333; --header-bg: rgba(13, 13, 13, 0.95); } body { font-family: 'Poppins', sans-serif; font-weight: 300; background: var(--bg-primary); color: var(--text-primary); overflow-x: hidden; transition: background 0.3s ease, color 0.3s ease; } .header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1rem 2rem; background: var(--header-bg); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); } .header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; gap: 1rem; } .logo { font-size: 1.5rem; font-weight: 500; color: var(--text-primary); text-decoration: none; } .header-center { flex: 1; display: flex; justify-content: center; max-width: 400px; margin: 0 2rem; } .search-container { position: relative; width: 100%; } .search-input { width: 100%; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 25px; padding: 0.75rem 1.5rem; font-size: 0.9rem; outline: none; color: var(--text-primary); transition: all 0.3s ease; } .search-input::placeholder { color: var(--text-secondary); } .search-input:focus { border-color: var(--text-primary); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1); } html.dark .search-input:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); } .header-actions { display: flex; align-items: center; gap: 0.5rem; } .icon-btn { background: none; border: none; color: var(--text-primary); cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.3s ease; font-size: 1.1rem; } .icon-btn:hover { background: var(--bg-secondary); } .menu-toggle { display: none; } .profile-btn { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; cursor: pointer; border: 2px solid var(--border-color); transition: all 0.3s ease; background: none; padding: 0; } .profile-btn:hover { border-color: var(--text-primary); transform: scale(1.05); } .profile-btn img { width: 100%; height: 100%; object-fit: cover; } .header-btn { background: none; color: var(--text-primary); border: none; padding: 0.5rem 1rem; cursor: pointer; font-size: 0.9rem; text-decoration: none; transition: all 0.3s ease; font-weight: 400; border-radius: 6px; } .header-btn:hover { background: var(--bg-secondary); } .header-btn.primary { background: var(--text-primary); color: var(--bg-primary); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 1.2rem; } .header-btn.primary:hover { opacity: 0.8; } /* Search Overlay */ .search-overlay { position: fixed; inset: 0; background: var(--bg-primary); z-index: 200; display: none; flex-direction: column; } .search-overlay.active { display: flex; } .search-overlay-header { padding: 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 1rem; } .search-overlay-input { flex: 1; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 25px; padding: 0.75rem 1.5rem; font-size: 1rem; color: var(--text-primary); outline: none; } .search-overlay-close { background: none; border: none; color: var(--text-primary); cursor: pointer; font-size: 1.5rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; } .search-results { flex: 1; overflow-y: auto; } .search-result-item { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: all 0.3s ease; } .search-result-item:hover { background: var(--bg-secondary); } .search-result-title { font-weight: 500; color: var(--text-primary); margin-bottom: 0.25rem; } .search-result-meta { font-size: 0.85rem; color: var(--text-secondary); } .main-content { margin-top: 80px; padding: 2rem; max-width: 1400px; margin-left: auto; margin-right: auto; } .content-section { margin-bottom: 3rem; } .section-title { font-size: 1.5rem; font-weight: 500; color: var(--text-primary); margin-bottom: 1.5rem; } .content-carousel { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; } .content-carousel::-webkit-scrollbar { height: 6px; } .content-carousel::-webkit-scrollbar-track { background: var(--bg-secondary); } .content-carousel::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; } .content-card { flex: 0 0 280px; height: 160px; border-radius: 8px; overflow: hidden; cursor: pointer; transition: all 0.3s ease; border: 1px solid var(--border-color); position: relative; } .content-card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); } html.dark .content-card:hover { box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); } .content-card img { width: 100%; height: 100%; object-fit: cover; } .age-badge { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, 0.7); color: white; padding: 0.25rem 0.75rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; } .content-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); padding: 1rem; color: white; opacity: 0; transition: opacity 0.3s ease; } .content-card:hover .content-overlay { opacity: 1; } .content-overlay-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; } .content-overlay-meta { font-size: 0.8rem; opacity: 0.9; } .search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; } .search-card { height: 225px; border-radius: 8px; overflow: hidden; cursor: pointer; position: relative; transition: all 0.3s ease; border: 1px solid var(--border-color); } .search-card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); } html.dark .search-card:hover { box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); } .search-card img { width: 100%; height: 100%; object-fit: cover; } .search-overlay-card { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); padding: 1rem; color: white; opacity: 0; transition: opacity 0.3s ease; } .search-card:hover .search-overlay-card { opacity: 1; } .empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-secondary); } .empty-icon { font-size: 4rem; margin-bottom: 1rem; } .empty-state h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text-primary); } .profile-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 200; opacity: 0; visibility: hidden; transition: all 0.3s ease; } .profile-modal.active { opacity: 1; visibility: visible; } .profile-modal-content { background: var(--bg-primary); border-radius: 16px; padding: 2rem; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); } html.dark .profile-modal-content { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); } .modal-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; color: var(--text-primary); } .profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; } .profile-item { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; cursor: pointer; background: none; border: none; transition: all 0.3s ease; padding: 0.5rem; border-radius: 12px; } .profile-item:hover { background: var(--bg-secondary); } .profile-item.active { background: var(--bg-secondary); border: 2px solid var(--text-primary); } .profile-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 2px solid var(--border-color); transition: all 0.3s ease; } .profile-item:hover .profile-avatar, .profile-item.active .profile-avatar { border-color: var(--text-primary); } .profile-avatar img { width: 100%; height: 100%; object-fit: cover; } .profile-name { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); text-align: center; word-break: break-word; } .add-profile { justify-content: center; } .add-profile-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--bg-secondary); border: 2px dashed var(--border-color); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text-secondary); transition: all 0.3s ease; } .profile-item:hover .add-profile-icon { background: var(--bg-secondary); border-color: var(--text-primary); color: var(--text-primary); } .close-modal { width: 100%; background: var(--text-primary); color: var(--bg-primary); border: none; padding: 0.75rem; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: all 0.3s ease; } .close-modal:hover { opacity: 0.9; } .footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 2rem 2rem; margin-top: 4rem; } .footer-content { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; } .footer-brand { font-size: 1.25rem; font-weight: 500; color: var(--text-primary); margin-bottom: 0.5rem; } .footer-text { font-size: 0.9rem; color: var(--text-secondary); margin: 0; font-weight: 300; } .footer-link { color: var(--text-primary); text-decoration: none; font-size: 0.9rem; font-weight: 300; transition: all 0.3s ease; display: block; margin-bottom: 0.5rem; } .footer-link:hover { color: var(--text-secondary); text-decoration: underline; } @media (max-width: 768px) { .menu-toggle { display: flex; } .header-center { display: none; } .header-content { gap: 0.5rem; } .header-btn { display: none; } .main-content { margin-top: 70px; padding: 1rem; } .content-card { flex: 0 0 150px; height: 90px; } .search-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } .search-card { height: 180px; } .section-title { font-size: 1.25rem; } } @media (max-width: 480px) { .header { padding: 0.75rem; } .header-content { gap: 0.25rem; } .logo { font-size: 1.1rem; } .main-content { padding: 0.75rem; } .content-card { flex: 0 0 120px; height: 70px; } .section-title { font-size: 1rem; } .footer { padding: 1rem; } .footer-content { gap: 1rem; grid-template-columns: 1fr; } .footer-brand { font-size: 1rem; } } </style> </head> <body> <header class="header"> <div class="header-content"> <a href="home.php" class="logo">formore</a> <div class="header-center"> <div class="search-container"> <form method="GET"> <input type="search" name="search" class="search-input" placeholder="Search content..." value="<?php echo htmlspecialchars($search); ?>"> </form> </div> </div> <div class="header-actions"> <button class="menu-toggle" onclick="openSearchOverlay()"> <i class="fas fa-search"></i> </button> <button class="icon-btn" onclick="toggleDarkMode()"> <i class="fas fa-moon" id="themeIcon"></i> </button> <button class="profile-btn" onclick="openProfileModal()"> <img src="<?php echo htmlspecialchars($selected_profile['avatar']); ?>" alt="Profile"> </button> <a href="settings.php" class="header-btn">Settings</a> <a href="make.php" class="header-btn primary">+</a> </div> </div> </header> <div class="search-overlay" id="searchOverlay"> <div class="search-overlay-header"> <input type="search" class="search-overlay-input" id="overlaySearchInput" placeholder="Search content..." onkeyup="handleSearchOverlay(this.value)" > <button class="search-overlay-close" onclick="closeSearchOverlay()"> <i class="fas fa-times"></i> </button> </div> <div class="search-results" id="searchResults"></div> </div> <main class="main-content"> <?php if (empty($search)): ?> <?php foreach($content_by_category as $category => $contents): ?> <?php if (!empty($contents)): ?> <div class="content-section"> <h2 class="section-title"><?php echo htmlspecialchars($category); ?></h2> <div class="content-carousel"> <?php foreach($contents as $content): ?> <div class="content-card" onclick="window.location.href='watch.php?id=<?php echo $content['id']; ?>'"> <img src="<?php echo htmlspecialchars($content['thumbnail']); ?>" alt="<?php echo htmlspecialchars($content['title']); ?>"> <div class="age-badge"><?php echo $content['age_rating']; ?>+</div> <div class="content-overlay"> <div class="content-overlay-title"><?php echo htmlspecialchars($content['title']); ?></div> <div class="content-overlay-meta">By <?php echo htmlspecialchars($content['author']); ?></div> </div> </div> <?php endforeach; ?> </div> </div> <?php endif; ?> <?php endforeach; ?> <?php else: ?> <div class="content-section"> <h2 class="section-title">Search Results for "<?php echo htmlspecialchars($search); ?>"</h2> <?php if (!empty($search_results)): ?> <div class="search-grid"> <?php foreach($search_results as $content): ?> <div class="search-card" onclick="window.location.href='watch.php?id=<?php echo $content['id']; ?>'"> <img src="<?php echo htmlspecialchars($content['thumbnail']); ?>" alt="<?php echo htmlspecialchars($content['title']); ?>"> <div class="age-badge"><?php echo $content['age_rating']; ?>+</div> <div class="search-overlay-card"> <div class="content-overlay-title"><?php echo htmlspecialchars($content['title']); ?></div> <div class="content-overlay-meta">By <?php echo htmlspecialchars($content['author']); ?></div> </div> </div> <?php endforeach; ?> </div> <?php else: ?> <div class="empty-state"> <div class="empty-icon">🔍</div> <h3>No results found</h3> <p>Try adjusting your search terms</p> </div> <?php endif; ?> </div> <?php endif; ?> <?php if (empty($content_by_category) && empty($search)): ?> <div class="empty-state"> <div class="empty-icon">🎬</div> <h3>No content available</h3> <p>Be the first to upload content!</p> <a href="make.php" style="display: inline-block; margin-top: 1rem; background: var(--text-primary); color: var(--bg-primary); padding: 0.75rem 1.5rem; border-radius: 25px; text-decoration: none; font-weight: 500;">Upload Content</a> </div> <?php endif; ?> </main> <div class="profile-modal" id="profileModal"> <div class="profile-modal-content"> <h2 class="modal-title">Who's here for more?</h2> <div class="profiles-grid"> <?php foreach($profiles as $profile): ?> <form method="POST" style="display: contents;"> <input type="hidden" name="profile_id" value="<?php echo $profile['id']; ?>"> <button type="submit" name="select_profile" class="profile-item <?php echo $profile['id'] == $selected_profile['id'] ? 'active' : ''; ?>"> <div class="profile-avatar"> <img src="<?php echo htmlspecialchars($profile['avatar']); ?>" alt="<?php echo htmlspecialchars($profile['name']); ?>"> </div> <div class="profile-name"><?php echo htmlspecialchars($profile['name']); ?></div> </button> </form> <?php endforeach; ?> <button class="profile-item add-profile" onclick="window.location.href='settings.php'"> <div class="add-profile-icon">+</div> <div class="profile-name">Add Profile</div> </button> </div> <button onclick="closeProfileModal()" class="close-modal">Continue</button> </div> </div> <footer class="footer"> <div class="footer-content"> <div> <h3 class="footer-brand">formore</h3> <p class="footer-text">The new streaming.</p> </div> <div> <a href="https://imators.com/terms-of-use" class="footer-link">Terms of Service</a> <a href="https://imators.com/privacy" class="footer-link">Privacy Policy</a> </div> <div> <p class="footer-text">© <?php echo date('Y'); ?> formore is a product of Imators LLC. All rights reserved.</p> </div> </div> </footer> <script> const allContent = <?php echo json_encode($all_content); ?>; function toggleDarkMode() { const html = document.documentElement; const isDark = html.classList.toggle('dark'); localStorage.setItem('theme', isDark ? 'dark' : 'light'); updateThemeIcon(); } function updateThemeIcon() { const icon = document.getElementById('themeIcon'); const isDark = document.documentElement.classList.contains('dark'); icon.className = isDark ? 'fas fa-sun' : 'fas fa-moon'; } function initTheme() { const saved = localStorage.getItem('theme'); const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; const isDark = saved === 'dark' || (saved === null && prefersDark); if (isDark) { document.documentElement.classList.add('dark'); } updateThemeIcon(); } function openSearchOverlay() { document.getElementById('searchOverlay').classList.add('active'); document.getElementById('overlaySearchInput').focus(); } function closeSearchOverlay() { document.getElementById('searchOverlay').classList.remove('active'); } function handleSearchOverlay(query) { const resultsContainer = document.getElementById('searchResults'); if (!query.trim()) { resultsContainer.innerHTML = ''; return; } const q = query.toLowerCase(); const filtered = allContent.filter(item => item.title.toLowerCase().includes(q) || item.author.toLowerCase().includes(q) ); if (filtered.length === 0) { resultsContainer.innerHTML = '<div style="padding: 2rem; text-align: center; color: var(--text-secondary);">Aucun résultat</div>'; return; } resultsContainer.innerHTML = filtered.map(item => ` <div class="search-result-item" onclick="window.location.href='watch.php?id=${item.id}'"> <div class="search-result-title">${item.title}</div> <div class="search-result-meta">By ${item.author}</div> </div> `).join(''); } function openProfileModal() { document.getElementById('profileModal').classList.add('active'); document.body.style.overflow = 'hidden'; } function closeProfileModal() { document.getElementById('profileModal').classList.remove('active'); document.body.style.overflow = 'auto'; } document.getElementById('profileModal').addEventListener('click', function(e) { if (e.target === this) { closeProfileModal(); } }); document.getElementById('searchOverlay').addEventListener('click', function(e) { if (e.target === this) { closeSearchOverlay(); } }); document.addEventListener('keydown', function(e) { if (e.key === 'Escape') { closeProfileModal(); closeSearchOverlay(); } }); document.querySelectorAll('.content-carousel').forEach(carousel => { let isDown = false; let startX; let scrollLeft; carousel.addEventListener('mousedown', (e) => { isDown = true; startX = e.pageX - carousel.offsetLeft; scrollLeft = carousel.scrollLeft; }); carousel.addEventListener('mouseleave', () => { isDown = false; }); carousel.addEventListener('mouseup', () => { isDown = false; }); carousel.addEventListener('mousemove', (e) => { if (!isDown) return; e.preventDefault(); const x = e.pageX - carousel.offsetLeft; const walk = (x - startX) * 2; carousel.scrollLeft = scrollLeft - walk; }); }); initTheme(); </script> </body> </html>PK F �[�<�p p api/get_content.phpnu �[��� <?php require_once '../config.php'; header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST'); header('Access-Control-Allow-Headers: Content-Type'); if ($_SERVER['REQUEST_METHOD'] !== 'POST') { http_response_code(405); echo json_encode(['error' => 'Method not allowed']); exit; } if (!isset($_POST['age_limit'])) { http_response_code(400); echo json_encode(['error' => 'Missing age_limit']); exit; } $age_limit = (int)$_POST['age_limit']; try { $stmt = $pdo->prepare("SELECT DISTINCT category FROM content WHERE status = 'approved' AND category IS NOT NULL AND category != '' ORDER BY category ASC"); $stmt->execute(); $categories = $stmt->fetchAll(PDO::FETCH_COLUMN); $content_by_category = []; foreach ($categories as $category) { $stmt = $pdo->prepare("SELECT * FROM content WHERE status = 'approved' AND age_rating <= ? AND category = ? ORDER BY created_at DESC LIMIT 12"); $stmt->execute([$age_limit, $category]); $content = $stmt->fetchAll(PDO::FETCH_ASSOC); if (!empty($content)) { $content_by_category[$category] = $content; } } echo json_encode($content_by_category); } catch (Exception $e) { http_response_code(500); echo json_encode(['error' => 'Database error']); } ?>PK F �[�}�S S api/search_content.phpnu �[��� <?php require_once '../config.php'; header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST'); header('Access-Control-Allow-Headers: Content-Type'); if ($_SERVER['REQUEST_METHOD'] !== 'POST') { http_response_code(405); echo json_encode(['error' => 'Method not allowed']); exit; } if (!isset($_POST['search']) || !isset($_POST['age_limit'])) { http_response_code(400); echo json_encode(['error' => 'Missing search or age_limit']); exit; } $search = $_POST['search']; $age_limit = (int)$_POST['age_limit']; try { $stmt = $pdo->prepare("SELECT * FROM content WHERE status = 'approved' AND age_rating <= ? AND (title LIKE ? OR description LIKE ? OR author LIKE ?) ORDER BY created_at DESC LIMIT 20"); $search_term = "%$search%"; $stmt->execute([$age_limit, $search_term, $search_term, $search_term]); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); echo json_encode($results); } catch (Exception $e) { http_response_code(500); echo json_encode(['error' => 'Database error']); } ?>PK F �[��=� � api/get_profiles.phpnu �[��� <?php require_once '../config.php'; header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST'); header('Access-Control-Allow-Headers: Content-Type'); if ($_SERVER['REQUEST_METHOD'] !== 'POST') { http_response_code(405); echo json_encode(['error' => 'Method not allowed']); exit; } if (!isset($_POST['user_id'])) { http_response_code(400); echo json_encode(['error' => 'Missing user_id']); exit; } $user_id = $_POST['user_id']; try { $stmt = $pdo->prepare("SELECT * FROM profiles WHERE user_id = ? ORDER BY is_main DESC, created_at ASC"); $stmt->execute([$user_id]); $profiles = $stmt->fetchAll(PDO::FETCH_ASSOC); if (empty($profiles)) { echo json_encode([]); } else { echo json_encode($profiles); } } catch (Exception $e) { http_response_code(500); echo json_encode(['error' => 'Database error']); } ?>PK F �[]��C6 6 api/create_profile.phpnu �[��� <?php require_once '../config.php'; header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST'); header('Access-Control-Allow-Headers: Content-Type'); if ($_SERVER['REQUEST_METHOD'] !== 'POST') { http_response_code(405); echo json_encode(['error' => 'Method not allowed']); exit; } $required_fields = ['user_id', 'name', 'avatar', 'age_limit', 'is_main']; foreach ($required_fields as $field) { if (!isset($_POST[$field])) { http_response_code(400); echo json_encode(['error' => "Missing $field"]); exit; } } $user_id = $_POST['user_id']; $name = $_POST['name']; $avatar = $_POST['avatar']; $age_limit = (int)$_POST['age_limit']; $is_main = $_POST['is_main'] === '1' ? 1 : 0; try { $stmt = $pdo->prepare("INSERT INTO profiles (user_id, name, avatar, age_limit, is_main) VALUES (?, ?, ?, ?, ?)"); $stmt->execute([$user_id, $name, $avatar, $age_limit, $is_main]); $profile_id = $pdo->lastInsertId(); $stmt = $pdo->prepare("SELECT * FROM profiles WHERE id = ?"); $stmt->execute([$profile_id]); $profile = $stmt->fetch(PDO::FETCH_ASSOC); echo json_encode($profile); } catch (Exception $e) { http_response_code(500); echo json_encode(['error' => 'Database error']); } ?>PK F �[��QÉ � case2.pngnu �Iw�� �PNG IHDR � � ��ߊ sRGB ��� �eXIfMM * J R( �i Z � � � � � � :W�g pHYs !8 !8E�1` iDOT � ( � � �D�ه @ IDATx��r7�l�����8S#ER�fQ�{|��sse� �P�-��;D�U�y(�rU��իϛ�W7ýR���.�4�_]�l.�U�:e/�f�K�u�i�q��W���零�T�~��l��A�W�_Ԧ�/�hOai�'����'�h��T�˿���9�x�yq�F��ͅ�/_��<�Z�͋rϟ�ڜ��oNN�o���l�l�no���n���l��m�_l�N_lΞ\n��x�y�������͓���y��js������bs*�<�=}q�y��J��V���z�2.O����͡�x��x���y��l�w�dsx�\e.�����_Ԏ�y���\����{�7s��\�b>�y�e�.����2��V��/_�<��_��믞�̿´%w��ׯ�W��Q��wy�QY�!�{��}+�h�P�~�9<<�n���;����S�He�l���VY��&i�(w���%�������H�G��qQ^��q���~|x�1v~�3�#�=J��`֣��L{�W�#����m������o���M�{�$��~���������?~y�������W���Ne:�r#���ԧ·/�+G�'���6M�_����u����_?ʯ~�ӿǧ���������}���v�^�ݍ\���Z�}U������ �wX��}3�GY�/o6o�\����G�l�|��/�3��A?r���9?�}Ըz�>hl��jo�Q_e?V;��V;�����>����������t����ߙ�����w��տ�v}�?5Dss/�«�nr 8e(`V������|/z��:s0�W�F� �i���/]^/>����_����'��{x((��f-'H*����7{vG�n�'��c�S ��;�<�y�y���y�����q{�{t�L ~awt�9���������2É|��]����ˎ��c��}�ư�0�ܡ�A�O�e��Ź*/���?z�L=w;��\]j����+����2�,�H3ts�w�Y0]SW�]�7!���y`��[�K%�wLE�. >���]Ny�Le:�� �,���n�` �L�:�]'>� �?ҿA[�5�'��Pi�m�K� >`]e(��<�Ţ`, T�������-?�|v�s~k��j��{�t����&���!�����a)�2�˚�6��1�N �ǥ��Oz ��F�i����F�-���\�Ɨ�o��@�:Ñ�g��7�UΠ�Y� �kH��2/X�V�%��_`�y@<��� j�^@�vS� �}О��A}��=�{M�2����ߟ�����v�y��o���q�{��"����8�軣�V�}�?5\�� �EQ���`���j�> -����&]e&�[�O��m趪�K-$ܖa dn6ׂp 8�꤮� J//�KyK}���]oN�\�� ��GǛ��C�X@��r��<��<x�;������#�CA|o�#�?����S��������c�����������c!M�b�u�8~�4�C�[�GJ��bO��2��c/B ��Z$��Ϥ�=��P��g���<��f|�|}�\\� ~[:T�!]��(q ��z:u:��=�[�O��*+�m�s_\ď��X�Z�+��@�Jn�r��o7���s�5ې�\��`On|���4ԲҢ�4��R�� 8��Z��ut�L+Э�NҚߊ�������wI|����Q/7�;�{xn�ܸ ���|+z�`]�7���` t�C0��@7�E��i3���[��<�����ޟ^�@�����@���ViQ�+�m[��Q��>ק����aTq�+��"�٧^���+ s��ߊ{�z}�i��:�Q��~��C-��x�j��=� �}> �䯀���i�, ����mfL?�?u(g�����p7�o� p�]�i�m�� ��m�.� �6�Sw���Q��X�~%�y)p_\��<�����ُe�f(c@���t�PJ��� |`x��w��P仛��w��;��rp�?x�p��`o����fW��TopW=���R黏����Q��P֘l����X��t_����SVi�q=�t�w��'��@ʨ}YZ�c��V������o����x�S����R���E�K�J�c�h0gen%c��nE�@��S.��I���H]��m�{��V9� c�w5&��� 7����� v`[u����0. �؉�p7�]7y���W=T�����୦�S�>J][�"Ǖ�� w�Vި��q>��6���F �N}����[N�*��������9�<��7�q�� 9j,7g��M� �U���2�����}(6��K�'\�znG�� �Q�u��/�&c��e��CU��KQ���o� E]0wY������N}�D�(h�7�>