================================================================================
XUPER - EVENTS GUIDE & STREAMING PLATFORM / PLATAFORMA DE EVENTOS Y STREAMING
Version: 2.0.5
================================================================================

[ENGLISH]
--------------------------------------------------------------------------------
1. SYSTEM REQUIREMENTS
--------------------------------------------------------------------------------
- PHP 8.2 or higher (8.3/8.4 recommended)
- Extensions: PDO, pdo_mysql, curl, mbstring, openssl, json, redis (optional but recommended)
- MySQL 8.0+ or MariaDB 10.5+
- Nginx or Apache with SSL (HTTPS is mandatory)
- ~50 MB of disk space for the core files (images are cached automatically)

2. INSTALLATION STEPS
--------------------------------------------------------------------------------
Step 1: Upload all the contents of this ZIP to the root of your domain.
Step 2: Set correct permissions:
        chown -R www:www /path/to/your/domain
        chmod -R 755 /path/to/your/domain
Step 3: Open your browser and navigate to: https://YOURDOMAIN.COM/install.php
Step 4: Enter your email and domain, then click "Generate verify.html".
Step 5: Upload the generated verify.html to the root of your domain.
Step 6: Click "Send Request". Wait for the administrator to approve your domain.
Step 7: Once approved, the installer will advance. Set your site title, ads (optional), and filters (optional).
Step 8: Click "Install".
Step 9: SECURITY: Delete install.php and verify.html from your server.

3. USER PANEL
--------------------------------------------------------------------------------
URL: https://YOURDOMAIN.COM/panel/
- Rules: Read the terms of use.
- Events: View ALL events and assign your own channels.
- Published: View published events.
- My Channels: Add, edit, hide or delete your channels.
- My Account: Change your password.
- Domain: Request a domain change.
- Filters: Choose specific sports and leagues to display on your site.
- Ads: (Requires Admin approval) Insert your own ad scripts.

4. CHANNELS & EVENTS
--------------------------------------------------------------------------------
- You can add up to 50 channels (URLs must be HTTPS).
- If you assign a channel to an unpublished event, it will be published automatically.
- Your channels appear first (highlighted) on your domain.
- Changes are reflected on the frontend in less than 1 minute (cache).

5. ADS (PUBLICITY)
--------------------------------------------------------------------------------
- Ads can be placed in two zones: below the search bar, and inside the video player.
- To use your own ads, you must request permission from the Admin from the Ads tab.
- If you do not have permission, the Admin's ads (if any) will be shown by default.

6. THEMES & FILTERS
--------------------------------------------------------------------------------
- Use the sun/moon icon in the top bar to toggle between Dark and Light themes.
- You can filter sports and leagues from the "Filters" tab. Leaving it empty shows ALL events.

7. SUPPORT & UPDATES
--------------------------------------------------------------------------------
- Do not modify core files inside /inc, /api, or /panel unless you know what you are doing.
- For support, contact the platform administrator.


[ESPAÑOL]
--------------------------------------------------------------------------------
1. REQUISITOS DEL SISTEMA
--------------------------------------------------------------------------------
- PHP 8.2 o superior (se recomienda 8.3/8.4)
- Extensiones: PDO, pdo_mysql, curl, mbstring, openssl, json, redis (opcional pero recomendado)
- MySQL 8.0+ o MariaDB 10.5+
- Nginx o Apache con SSL (HTTPS es obligatorio)
- ~50 MB de espacio en disco para los archivos base (las imágenes se cachean automáticamente)

2. PASOS DE INSTALACIÓN
--------------------------------------------------------------------------------
Paso 1: Subí todo el contenido de este ZIP a la raíz de tu dominio.
Paso 2: Asigná los permisos correctos:
        chown -R www:www /ruta/a/tu/dominio
        chmod -R 755 /ruta/a/tu/dominio
Paso 3: Abrí tu navegador y andá a: https://TUDOMINIO.COM/install.php
Paso 4: Ingresá tu email y dominio, luego hacé clic en "Generar verify.html".
Paso 5: Subí el archivo verify.html generado a la raíz de tu dominio.
Paso 6: Hacé clic en "Enviar solicitud". Esperá a que el administrador apruebe tu dominio.
Paso 7: Una vez aprobado, el instalador avanzará. Configurá el título de tu sitio, anuncios (opcional) y filtros (opcional).
Paso 8: Hacé clic en "Instalar".
Paso 9: SEGURIDAD: Borrá install.php y verify.html de tu servidor.

3. PANEL DE USUARIO
--------------------------------------------------------------------------------
URL: https://TUDOMINIO.COM/panel/
- Reglas: Leé los términos de uso.
- Eventos: Mirá TODOS los eventos y asigna tus propios canales.
- Publicados: Mirá los eventos ya publicados.
- Mis Canales: Agregá, editá, ocultá o eliminá tus canales.
- Mi Cuenta: Cambiá tu contraseña.
- Dominio: Solicitá un cambio de dominio.
- Filtros: Elegí deportes y ligas específicas para mostrar en tu sitio.
- Anuncios: (Requiere aprobación del Admin) Insertá tus propios scripts de anuncios.

4. CANALES Y EVENTOS
--------------------------------------------------------------------------------
- Podés agregar hasta 50 canales (las URLs deben ser HTTPS).
- Si asignás un canal a un evento no publicado, se publicará automáticamente.
- Tus canales aparecen primero (resaltados) en tu dominio.
- Los cambios se reflejan en el front en menos de 1 minuto (caché).

5. ANUNCIOS (ADS)
--------------------------------------------------------------------------------
- Los anuncios se pueden colocar en dos zonas: debajo del buscador y dentro del reproductor de video.
- Para usar tus propios anuncios, debés solicitar permiso al Admin desde la pestaña Anuncios.
- Si no tenés permiso, se mostrarán los anuncios del Admin (si los hay) por defecto.

6. TEMAS Y FILTROS
--------------------------------------------------------------------------------
- Usá el ícono de sol/luna en la barra superior para cambiar entre tema Oscuro y Claro.
- Podés filtrar deportes y ligas desde la pestaña "Filtros". Dejarlo vacío muestra TODOS los eventos.

7. SOPORTE Y ACTUALIZACIONES
--------------------------------------------------------------------------------
- No modifiques los archivos base dentro de /inc, /api o /panel a menos que sepas lo que hacés.
- Para soporte, contactá al administrador de la plataforma.
================================================================================
================================================================================
XUPER NGINX RULES / REGLAS NGINX (recommended / recomendado)
================================================================================
EN: If your server uses Nginx, .htaccess files are ignored. Add these lines inside
    your site server { } block (or an include file) and reload Nginx:
ES: Si tu servidor usa Nginx, los archivos .htaccess no tienen efecto. Agrega estas
    lineas dentro del bloque server { } de tu sitio (o en un include) y recarga Nginx:

    location ^~ /inc/ { return 404; }
    location ^~ /cache/ { return 404; }
    location ~ /\.(?!well-known/) { return 404; }
    location = /README.txt { return 404; }
    location = /sw.js { add_header Cache-Control "no-cache"; }
    location ~* \.woff2?$ { expires 30d; add_header Cache-Control "public, immutable"; }
    location ~* \.(?:js|css)$ { expires 12h; if ($arg_v) { expires 30d; } }

EN: Apache users do not need this: the included .htaccess files already protect these folders.
ES: Con Apache no hace falta: los .htaccess incluidos ya protegen estas carpetas.
================================================================================
