صمم لي تطبيق افلام ومسلسلات ويوجد وجهة تسجيل سهلة ويمكن انشاء حساب جديد ويوجد حساب اداري باسم lymon والرمز السريMmaymanmm2020 لا يعرفه احد وهو يستطيع رفع الافلام والمسلسلات ويمكن التعديل والحذف ويوجد خاصية البحث على الافلام والمسلسلات ويوجد للادارة ايقونة ذكاء اصطناعي يستطيع ان يكتب اسم الفلم او المسلسل والذكاء الاصطناعي تلقايي يضيفها للتطبيق ويستطيع الاداري الحذف والتعديل على الافلام والمسلسلات مع وجود خلفية جذابة للتطبيق ويستطيع الاداري رفع الافلام والمسلسلات من الجهاز الخاص به
57d273e verified Download index.html from I0ome/lymon-com: direct link, hf CLI and curl.
- Browser
- Download file 35 kB
-
https://huggingface.co/spaces/I0ome/lymon-com/resolve/main/index.html
- Command line
-
hf download hf://spaces/I0ome/lymon-com/index.html
-
curl -L -o index.html https://huggingface.co/spaces/I0ome/lymon-com/resolve/main/index.html
35 kB
| <html lang="ar" dir="rtl"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>LYMON - أفلام ومسلسلات</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet"> | |
| <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap'); | |
| body { | |
| font-family: 'Tajawal', sans-serif; | |
| } | |
| .vanta-bg { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| z-index: -1; | |
| opacity: 0.3; | |
| } | |
| .blur-bg { | |
| backdrop-filter: blur(10px); | |
| background-color: rgba(0, 0, 0, 0.7); | |
| } | |
| .player-container { | |
| aspect-ratio: 16/9; | |
| } | |
| .content-card:hover { | |
| transform: scale(1.05); | |
| transition: all 0.3s ease; | |
| } | |
| .admin-only { | |
| display: none; | |
| } | |
| .logged-in-admin .admin-only { | |
| display: block; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-white"> | |
| <div id="vanta-bg" class="vanta-bg"></div> | |
| <!-- Navigation --> | |
| <nav class="blur-bg fixed w-full z-50"> | |
| <div class="container mx-auto px-4 py-3 flex justify-between items-center"> | |
| <a href="#" class="flex items-center"> | |
| <span class="text-2xl font-bold text-red-600">LYMON</span> | |
| </a> | |
| <div class="flex items-center space-x-6 space-x-reverse"> | |
| <a href="#movies" class="hover:text-red-500">الأفلام</a> | |
| <a href="#series" class="hover:text-red-500">المسلسلات</a> | |
| <div class="relative"> | |
| <input type="text" id="search-input" placeholder="ابحث..." class="bg-gray-800 rounded-full py-2 px-4 w-64 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| <i data-feather="search" class="absolute left-3 top-3 text-gray-400"></i> | |
| </div> | |
| <div id="auth-buttons"> | |
| <button onclick="showLoginModal()" class="bg-red-600 hover:bg-red-700 px-4 py-2 rounded-full">تسجيل الدخول</button> | |
| </div> | |
| <div id="user-menu" class="hidden"> | |
| <div class="flex items-center space-x-2 space-x-reverse cursor-pointer" onclick="toggleUserMenu()"> | |
| <img id="user-avatar" src="http://static.photos/people/200x200/1" class="w-8 h-8 rounded-full"> | |
| <span id="username-display"></span> | |
| <i data-feather="chevron-down"></i> | |
| </div> | |
| <div id="dropdown-menu" class="hidden absolute mt-2 right-0 bg-gray-800 rounded-md shadow-lg py-2 w-48"> | |
| <a href="#" class="block px-4 py-2 hover:bg-gray-700">حسابي</a> | |
| <a href="#" class="block px-4 py-2 hover:bg-gray-700 admin-only">لوحة التحكم</a> | |
| <a href="#" class="block px-4 py-2 hover:bg-gray-700" onclick="logout()">تسجيل الخروج</a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </nav> | |
| <!-- Hero Section --> | |
| <section class="pt-32 pb-20 px-4"> | |
| <div class="container mx-auto text-center"> | |
| <h1 class="text-5xl font-bold mb-6">استمتع بأفضل الأفلام والمسلسلات</h1> | |
| <p class="text-xl text-gray-300 mb-8">آلاف المحتويات بين يديك، شاهد ما تريد وقتما تريد</p> | |
| <div class="flex justify-center space-x-4 space-x-reverse"> | |
| <button class="bg-red-600 hover:bg-red-700 px-6 py-3 rounded-full text-lg">استكشف الآن</button> | |
| <button class="border border-white hover:bg-white hover:text-black px-6 py-3 rounded-full text-lg">كيفية الاستخدام</button> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Movies Section --> | |
| <section id="movies" class="py-12 px-4"> | |
| <div class="container mx-auto"> | |
| <h2 class="text-3xl font-bold mb-8 flex items-center"> | |
| <i data-feather="film" class="mr-2"></i> الأفلام الجديدة | |
| </h2> | |
| <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-6"> | |
| <!-- Movie cards will be loaded here --> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Series Section --> | |
| <section id="series" class="py-12 px-4"> | |
| <div class="container mx-auto"> | |
| <h2 class="text-3xl font-bold mb-8 flex items-center"> | |
| <i data-feather="tv" class="mr-2"></i> المسلسلات الشائعة | |
| </h2> | |
| <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-6"> | |
| <!-- Series cards will be loaded here --> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Admin AI Section --> | |
| <section id="ai-section" class="py-12 px-4 admin-only"> | |
| <div class="container mx-auto bg-gray-800 rounded-xl p-6"> | |
| <h2 class="text-3xl font-bold mb-6 flex items-center"> | |
| <i data-feather="cpu" class="mr-2"></i> مساعد الذكاء الاصطناعي | |
| </h2> | |
| <div class="flex flex-col md:flex-row gap-6"> | |
| <div class="flex-1"> | |
| <textarea id="ai-prompt" class="w-full bg-gray-700 rounded-lg p-4 h-40 focus:outline-none focus:ring-2 focus:ring-red-500" placeholder="اكتب وصف للفيلم أو المسلسل الذي تريد إضافته..."></textarea> | |
| <button onclick="generateContent()" class="mt-4 bg-red-600 hover:bg-red-700 px-6 py-3 rounded-full text-lg">إنشاء محتوى</button> | |
| </div> | |
| <div class="flex-1 bg-gray-700 rounded-lg p-4"> | |
| <div id="ai-result" class="h-40 overflow-auto"></div> | |
| <div class="mt-4 flex space-x-4 space-x-reverse"> | |
| <button id="add-movie-btn" class="bg-green-600 hover:bg-green-700 px-4 py-2 rounded-full hidden">إضافة فيلم</button> | |
| <button id="add-series-btn" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded-full hidden">إضافة مسلسل</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Footer --> | |
| <footer class="bg-gray-800 py-8 px-4"> | |
| <div class="container mx-auto"> | |
| <div class="flex flex-col md:flex-row justify-between"> | |
| <div class="mb-6 md:mb-0"> | |
| <h3 class="text-xl font-bold mb-4">LYMON</h3> | |
| <p class="text-gray-400">منصة متكاملة لمشاهدة الأفلام والمسلسلات</p> | |
| </div> | |
| <div class="grid grid-cols-2 md:grid-cols-3 gap-8"> | |
| <div> | |
| <h4 class="text-lg font-semibold mb-4">روابط سريعة</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-400 hover:text-white">الصفحة الرئيسية</a></li> | |
| <li><a href="#movies" class="text-gray-400 hover:text-white">الأفلام</a></li> | |
| <li><a href="#series" class="text-gray-400 hover:text-white">المسلسلات</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h4 class="text-lg font-semibold mb-4">حول</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-400 hover:text-white">عن المنصة</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">الشروط والأحكام</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">سياسة الخصوصية</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h4 class="text-lg font-semibold mb-4">تواصل معنا</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-400 hover:text-white">فيسبوك</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">تويتر</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">انستغرام</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400"> | |
| <p>© 2023 LYMON. جميع الحقوق محفوظة.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <!-- Login Modal --> | |
| <div id="login-modal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden"> | |
| <div class="bg-gray-800 rounded-xl p-8 w-full max-w-md"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h3 class="text-2xl font-bold">تسجيل الدخول</h3> | |
| <button onclick="hideLoginModal()" class="text-gray-400 hover:text-white"> | |
| <i data-feather="x"></i> | |
| </button> | |
| </div> | |
| <form id="login-form"> | |
| <div class="mb-4"> | |
| <label for="login-username" class="block mb-2">اسم المستخدم</label> | |
| <input type="text" id="login-username" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| <div class="mb-6"> | |
| <label for="login-password" class="block mb-2">كلمة المرور</label> | |
| <input type="password" id="login-password" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| <button type="submit" class="w-full bg-red-600 hover:bg-red-700 py-3 rounded-full text-lg">تسجيل الدخول</button> | |
| </form> | |
| <p class="mt-4 text-center text-gray-400">ليس لديك حساب؟ <a href="#" onclick="showRegisterModal()" class="text-red-500 hover:underline">إنشاء حساب</a></p> | |
| </div> | |
| </div> | |
| <!-- Register Modal --> | |
| <div id="register-modal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden"> | |
| <div class="bg-gray-800 rounded-xl p-8 w-full max-w-md"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h3 class="text-2xl font-bold">إنشاء حساب جديد</h3> | |
| <button onclick="hideRegisterModal()" class="text-gray-400 hover:text-white"> | |
| <i data-feather="x"></i> | |
| </button> | |
| </div> | |
| <form id="register-form"> | |
| <div class="mb-4"> | |
| <label for="register-username" class="block mb-2">اسم المستخدم</label> | |
| <input type="text" id="register-username" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| <div class="mb-4"> | |
| <label for="register-email" class="block mb-2">البريد الإلكتروني</label> | |
| <input type="email" id="register-email" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| <div class="mb-6"> | |
| <label for="register-password" class="block mb-2">كلمة المرور</label> | |
| <input type="password" id="register-password" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| <button type="submit" class="w-full bg-red-600 hover:bg-red-700 py-3 rounded-full text-lg">إنشاء حساب</button> | |
| </form> | |
| <p class="mt-4 text-center text-gray-400">لديك حساب بالفعل؟ <a href="#" onclick="showLoginModal()" class="text-red-500 hover:underline">تسجيل الدخول</a></p> | |
| </div> | |
| </div> | |
| <!-- Add Content Modal --> | |
| <div id="add-content-modal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden"> | |
| <div class="bg-gray-800 rounded-xl p-8 w-full max-w-2xl"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h3 class="text-2xl font-bold" id="add-content-title">إضافة محتوى جديد</h3> | |
| <button onclick="hideAddContentModal()" class="text-gray-400 hover:text-white"> | |
| <i data-feather="x"></i> | |
| </button> | |
| </div> | |
| <form id="add-content-form"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div> | |
| <div class="mb-4"> | |
| <label for="content-title" class="block mb-2">العنوان</label> | |
| <input type="text" id="content-title" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| <div class="mb-4"> | |
| <label for="content-description" class="block mb-2">الوصف</label> | |
| <textarea id="content-description" class="w-full bg-gray-700 rounded-lg p-3 h-24 focus:outline-none focus:ring-2 focus:ring-red-500"></textarea> | |
| </div> | |
| <div class="mb-4"> | |
| <label for="content-year" class="block mb-2">سنة الإصدار</label> | |
| <input type="number" id="content-year" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| </div> | |
| <div> | |
| <div class="mb-4"> | |
| <label for="content-genre" class="block mb-2">النوع</label> | |
| <select id="content-genre" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| <option value="action">أكشن</option> | |
| <option value="comedy">كوميدي</option> | |
| <option value="drama">دراما</option> | |
| <option value="horror">رعب</option> | |
| <option value="sci-fi">خيال علمي</option> | |
| </select> | |
| </div> | |
| <div class="mb-4"> | |
| <label for="content-poster" class="block mb-2">ملصق الفيلم/المسلسل</label> | |
| <input type="file" id="content-poster" accept="image/*" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| <div class="mb-4"> | |
| <label class="block mb-2">طريقة الرفع</label> | |
| <div class="flex space-x-4 space-x-reverse"> | |
| <label class="inline-flex items-center"> | |
| <input type="radio" name="upload-method" value="link" checked class="text-red-600"> | |
| <span class="ml-2">رابط</span> | |
| </label> | |
| <label class="inline-flex items-center"> | |
| <input type="radio" name="upload-method" value="file" class="text-red-600"> | |
| <span class="ml-2">ملف من الجهاز</span> | |
| </label> | |
| </div> | |
| </div> | |
| <div id="content-link-container"> | |
| <label for="content-link" class="block mb-2">رابط الفيلم/المسلسل</label> | |
| <input type="text" id="content-link" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| <div id="content-file-container" class="hidden"> | |
| <label for="content-file" class="block mb-2">ملف الفيلم/المسلسل</label> | |
| <input type="file" id="content-file" accept="video/*" class="w-full bg-gray-700 rounded-lg p-3 focus:outline-none focus:ring-2 focus:ring-red-500"> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-6 flex justify-end space-x-4 space-x-reverse"> | |
| <button type="button" onclick="hideAddContentModal()" class="px-6 py-2 border border-gray-600 rounded-full hover:bg-gray-700">إلغاء</button> | |
| <button type="submit" class="px-6 py-2 bg-red-600 hover:bg-red-700 rounded-full">حفظ</button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| <!-- Player Modal --> | |
| <div id="player-modal" class="fixed inset-0 bg-black bg-opacity-90 flex items-center justify-center z-50 hidden"> | |
| <div class="w-full max-w-5xl"> | |
| <div class="flex justify-end mb-2"> | |
| <button onclick="hidePlayerModal()" class="text-white hover:text-red-500"> | |
| <i data-feather="x" class="w-8 h-8"></i> | |
| </button> | |
| </div> | |
| <div class="player-container bg-black"> | |
| <video id="media-player" controls class="w-full h-full"> | |
| Your browser does not support the video tag. | |
| </video> | |
| </div> | |
| <div class="mt-4 bg-gray-800 p-4 rounded-lg"> | |
| <h3 id="player-title" class="text-xl font-bold mb-2"></h3> | |
| <p id="player-description" class="text-gray-300"></p> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize libraries | |
| AOS.init(); | |
| feather.replace(); | |
| // Vanta.js background | |
| VANTA.GLOBE({ | |
| el: "#vanta-bg", | |
| mouseControls: true, | |
| touchControls: true, | |
| gyroControls: false, | |
| minHeight: 200.00, | |
| minWidth: 200.00, | |
| scale: 1.00, | |
| scaleMobile: 1.00, | |
| color: 0xff0000, | |
| backgroundColor: 0x0 | |
| }); | |
| // Sample data for movies and series | |
| const sampleMovies = [ | |
| { id: 1, title: "الفلم الأول", description: "وصف الفلم الأول هنا", year: 2023, genre: "أكشن", poster: "http://static.photos/movies/320x240/1", link: "http://example.com/movie1.mp4" }, | |
| { id: 2, title: "الفلم الثاني", description: "وصف الفلم الثاني هنا", year: 2022, genre: "كوميدي", poster: "http://static.photos/movies/320x240/2", link: "http://example.com/movie2.mp4" }, | |
| { id: 3, title: "الفلم الثالث", description: "وصف الفلم الثالث هنا", year: 2021, genre: "دراما", poster: "http://static.photos/movies/320x240/3", link: "http://example.com/movie3.mp4" }, | |
| { id: 4, title: "الفلم الرابع", description: "وصف الفلم الرابع هنا", year: 2020, genre: "رعب", poster: "http://static.photos/movies/320x240/4", link: "http://example.com/movie4.mp4" }, | |
| { id: 5, title: "الفلم الخامس", description: "وصف الفلم الخامس هنا", year: 2019, genre: "خيال علمي", poster: "http://static.photos/movies/320x240/5", link: "http://example.com/movie5.mp4" } | |
| ]; | |
| const sampleSeries = [ | |
| { id: 1, title: "المسلسل الأول", description: "وصف المسلسل الأول هنا", year: 2023, genre: "دراما", poster: "http://static.photos/series/320x240/1", link: "http://example.com/series1.mp4" }, | |
| { id: 2, title: "المسلسل الثاني", description: "وصف المسلسل الثاني هنا", year: 2022, genre: "كوميدي", poster: "http://static.photos/series/320x240/2", link: "http://example.com/series2.mp4" }, | |
| { id: 3, title: "المسلسل الثالث", description: "وصف المسلسل الثالث هنا", year: 2021, genre: "أكشن", poster: "http://static.photos/series/320x240/3", link: "http://example.com/series3.mp4" }, | |
| { id: 4, title: "المسلسل الرابع", description: "وصف المسلسل الرابع هنا", year: 2020, genre: "رعب", poster: "http://static.photos/series/320x240/4", link: "http://example.com/series4.mp4" }, | |
| { id: 5, title: "المسلسل الخامس", description: "وصف المسلسل الخامس هنا", year: 2019, genre: "خيال علمي", poster: "http://static.photos/series/320x240/5", link: "http://example.com/series5.mp4" } | |
| ]; | |
| // Load sample data | |
| document.addEventListener('DOMContentLoaded', function() { | |
| loadMovies(); | |
| loadSeries(); | |
| // Event listeners for upload method radio buttons | |
| document.querySelectorAll('input[name="upload-method"]').forEach(radio => { | |
| radio.addEventListener('change', function() { | |
| if (this.value === 'link') { | |
| document.getElementById('content-link-container').classList.remove('hidden'); | |
| document.getElementById('content-file-container').classList.add('hidden'); | |
| } else { | |
| document.getElementById('content-link-container').classList.add('hidden'); | |
| document.getElementById('content-file-container').classList.remove('hidden'); | |
| } | |
| }); | |
| }); | |
| }); | |
| function loadMovies() { | |
| const moviesContainer = document.querySelector('#movies .grid'); | |
| moviesContainer.innerHTML = ''; | |
| sampleMovies.forEach(movie => { | |
| const movieCard = document.createElement('div'); | |
| movieCard.className = 'bg-gray-800 rounded-lg overflow-hidden content-card cursor-pointer'; | |
| movieCard.innerHTML = ` | |
| <div onclick="playMedia('${movie.title}', '${movie.description}', '${movie.link}')"> | |
| <img src="${movie.poster}" alt="${movie.title}" class="w-full h-64 object-cover"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-lg mb-1">${movie.title}</h3> | |
| <div class="flex justify-between text-sm text-gray-400"> | |
| <span>${movie.year}</span> | |
| <span>${movie.genre}</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="admin-only p-4 border-t border-gray-700"> | |
| <button onclick="editContent(event, ${movie.id}, 'movie')" class="text-yellow-500 hover:text-yellow-400 mr-2"> | |
| <i data-feather="edit"></i> | |
| </button> | |
| <button onclick="deleteContent(event, ${movie.id}, 'movie')" class="text-red-500 hover:text-red-400"> | |
| <i data-feather="trash-2"></i> | |
| </button> | |
| </div> | |
| `; | |
| moviesContainer.appendChild(movieCard); | |
| }); | |
| feather.replace(); | |
| } | |
| function loadSeries() { | |
| const seriesContainer = document.querySelector('#series .grid'); | |
| seriesContainer.innerHTML = ''; | |
| sampleSeries.forEach(series => { | |
| const seriesCard = document.createElement('div'); | |
| seriesCard.className = 'bg-gray-800 rounded-lg overflow-hidden content-card cursor-pointer'; | |
| seriesCard.innerHTML = ` | |
| <div onclick="playMedia('${series.title}', '${series.description}', '${series.link}')"> | |
| <img src="${series.poster}" alt="${series.title}" class="w-full h-64 object-cover"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-lg mb-1">${series.title}</h3> | |
| <div class="flex justify-between text-sm text-gray-400"> | |
| <span>${series.year}</span> | |
| <span>${series.genre}</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="admin-only p-4 border-t border-gray-700"> | |
| <button onclick="editContent(event, ${series.id}, 'series')" class="text-yellow-500 hover:text-yellow-400 mr-2"> | |
| <i data-feather="edit"></i> | |
| </button> | |
| <button onclick="deleteContent(event, ${series.id}, 'series')" class="text-red-500 hover:text-red-400"> | |
| <i data-feather="trash-2"></i> | |
| </button> | |
| </div> | |
| `; | |
| seriesContainer.appendChild(seriesCard); | |
| }); | |
| feather.replace(); | |
| } | |
| // Modal functions | |
| function showLoginModal() { | |
| document.getElementById('login-modal').classList.remove('hidden'); | |
| } | |
| function hideLoginModal() { | |
| document.getElementById('login-modal').classList.add('hidden'); | |
| } | |
| function showRegisterModal() { | |
| hideLoginModal(); | |
| document.getElementById('register-modal').classList.remove('hidden'); | |
| } | |
| function hideRegisterModal() { | |
| document.getElementById('register-modal').classList.add('hidden'); | |
| } | |
| function showAddContentModal(type) { | |
| document.getElementById('add-content-title').textContent = type === 'movie' ? 'إضافة فلم جديد' : 'إضافة مسلسل جديد'; | |
| document.getElementById('add-content-modal').classList.remove('hidden'); | |
| // Reset form | |
| document.getElementById('add-content-form').reset(); | |
| document.getElementById('content-link-container').classList.remove('hidden'); | |
| document.getElementById('content-file-container').classList.add('hidden'); | |
| } | |
| function hideAddContentModal() { | |
| document.getElementById('add-content-modal').classList.add('hidden'); | |
| } | |
| // Auth functions | |
| document.getElementById('login-form').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| const username = document.getElementById('login-username').value; | |
| const password = document.getElementById('login-password').value; | |
| // Check if admin | |
| if (username === 'lymon' && password === 'Mmaymanmm2020') { | |
| login(username, true); | |
| } else { | |
| // Here you would normally check against your user database | |
| login(username, false); | |
| } | |
| }); | |
| document.getElementById('register-form').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| const username = document.getElementById('register-username').value; | |
| // Here you would normally register the user in your database | |
| alert(`تم إنشاء حساب جديد للمستخدم ${username}`); | |
| hideRegisterModal(); | |
| showLoginModal(); | |
| }); | |
| function login(username, isAdmin) { | |
| document.getElementById('auth-buttons').classList.add('hidden'); | |
| document.getElementById('user-menu').classList.remove('hidden'); | |
| document.getElementById('username-display').textContent = username; | |
| if (isAdmin) { | |
| document.body.classList.add('logged-in-admin'); | |
| } | |
| hideLoginModal(); | |
| } | |
| function logout() { | |
| document.getElementById('auth-buttons').classList.remove('hidden'); | |
| document.getElementById('user-menu').classList.add('hidden'); | |
| document.body.classList.remove('logged-in-admin'); | |
| } | |
| function toggleUserMenu() { | |
| const menu = document.getElementById('dropdown-menu'); | |
| menu.classList.toggle('hidden'); | |
| } | |
| // Content management functions | |
| function editContent(event, id, type) { | |
| event.stopPropagation(); | |
| showAddContentModal(type); | |
| // Here you would normally fetch the content details from your database | |
| const content = type === 'movie' | |
| ? sampleMovies.find(m => m.id === id) | |
| : sampleSeries.find(s => s.id === id); | |
| if (content) { | |
| document.getElementById('content-title').value = content.title; | |
| document.getElementById('content-description').value = content.description; | |
| document.getElementById('content-year').value = content.year; | |
| document.getElementById('content-genre').value = content.genre.toLowerCase(); | |
| document.getElementById('content-link').value = content.link; | |
| } | |
| } | |
| function deleteContent(event, id, type) { | |
| event.stopPropagation(); | |
| if (confirm('هل أنت متأكد من حذف هذا المحتوى؟')) { | |
| // Here you would normally delete from your database | |
| alert(`تم حذف ${type === 'movie' ? 'الفلم' : 'المسلسل'} بنجاح`); | |
| if (type === 'movie') { | |
| loadMovies(); | |
| } else { | |
| loadSeries(); | |
| } | |
| } | |
| } | |
| document.getElementById('add-content-form').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Here you would normally save to your database | |
| alert('تم حفظ المحتوى بنجاح'); | |
| hideAddContentModal(); | |
| loadMovies(); | |
| loadSeries(); | |
| }); | |
| // AI functions | |
| function generateContent() { | |
| const prompt = document.getElementById('ai-prompt').value; | |
| if (!prompt) { | |
| alert('الرجاء إدخال وصف للمحتوى'); | |
| return; | |
| } | |
| // Simulate AI response | |
| document.getElementById('ai-result').innerHTML = ` | |
| <p><strong>العنوان:</strong> ${prompt.split(' ')[0]} الجديد</p> | |
| <p><strong>الوصف:</strong> هذا محتوى تم إنشاؤه بواسطة الذكاء الاصطناعي بناء على وصفك: "${prompt}"</p> | |
| <p><strong>النوع:</strong> دراما</p> | |
| <p><strong>سنة الإصدار:</strong> 2023</p> | |
| `; | |
| document.getElementById('add-movie-btn').classList.remove('hidden'); | |
| document.getElementById('add-series-btn').classList.remove('hidden'); | |
| // Set up buttons to add the generated content | |
| document.getElementById('add-movie-btn').onclick = function() { | |
| // Here you would normally save the generated content as a movie | |
| alert('تم إضافة الفلم بنجاح'); | |
| loadMovies(); | |
| }; | |
| document.getElementById('add-series-btn').onclick = function() { | |
| // Here you would normally save the generated content as a series | |
| alert('تم إضافة المسلسل بنجاح'); | |
| loadSeries(); | |
| }; | |
| } | |
| // Player functions | |
| function playMedia(title, description, link) { | |
| document.getElementById('player-title').textContent = title; | |
| document.getElementById('player-description').textContent = description; | |
| const player = document.getElementById('media-player'); | |
| player.src = link; | |
| player.load(); | |
| document.getElementById('player-modal').classList.remove('hidden'); | |
| } | |
| function hidePlayerModal() { | |
| const player = document.getElementById('media-player'); | |
| player.pause(); | |
| document.getElementById('player-modal').classList.add('hidden'); | |
| } | |
| // Search functionality | |
| document.getElementById('search-input').addEventListener('input', function() { | |
| const query = this.value.toLowerCase(); | |
| // Search in movies | |
| const movieCards = document.querySelectorAll('#movies .grid > div'); | |
| movieCards.forEach(card => { | |
| const title = card.querySelector('h3').textContent.toLowerCase(); | |
| if (title.includes(query)) { | |
| card.classList.remove('hidden'); | |
| } else { | |
| card.classList.add('hidden'); | |
| } | |
| }); | |
| // Search in series | |
| const seriesCards = document.querySelectorAll('#series .grid > div'); | |
| seriesCards.forEach(card => { | |
| const title = card.querySelector('h3').textContent.toLowerCase(); | |
| if (title.includes(query)) { | |
| card.classList.remove('hidden'); | |
| } else { | |
| card.classList.add('hidden'); | |
| } | |
| }); | |
| }); | |
| // Close dropdown when clicking outside | |
| document.addEventListener('click', function(event) { | |
| const dropdown = document.getElementById('dropdown-menu'); | |
| const userMenu = document.getElementById('user-menu'); | |
| if (!userMenu.contains(event.target) && !dropdown.contains(event.target)) { | |
| dropdown.classList.add('hidden'); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> | |