diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 6f7d0aff..937b7ac4 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -11,10 +11,10 @@ 6. [Система модулей](#6-система-модулей) 7. [Границы ядра и модулей](#7-границы-ядра-и-модулей) 8. [Варианты сборки: MAIN vs LoadBalancer](#8-варианты-сборки-main-vs-loadbalancer) -9. [Порядок миграции](#9-порядок-миграции) -10. [Транзакции и производительность](#10-транзакции-и-производительность) -11. [Стратегия миграции по рискам](#11-стратегия-миграции-по-рискам) -12. [Правила для контрибьюторов](#12-правила-для-контрибьюторов) +9. [Транзакции и производительность](#9-транзакции-и-производительность) +10. [Правила для контрибьюторов](#10-правила-для-контрибьюторов) + +> **План миграции** (фазы 0–15, стратегия рисков, порядок выполнения) вынесен в [MIGRATION.md](MIGRATION.md). --- @@ -1304,322 +1304,9 @@ crons/*.php (на LB) ──→ bootstrap.php (CONTEXT_CLI) --- -## 9. Порядок миграции +## 9. Транзакции и производительность -### Принцип: извлечение → делегирование → замена - -Каждый шаг миграции следует одному паттерну: - -``` -1. Создать новый класс в целевой директории -2. Перенести в него методы из god-объекта -3. В старом файле оставить proxy-метод: - public static function oldMethod(...$args) { - return NewClass::method(...$args); - } -4. Зарегистрировать класс в autoloader -5. Проверить: система работает как раньше -6. (позже) Обновить вызывающий код → удалить proxy -``` - -Так каждый шаг безопасен и обратимо совместим. - ---- - -### Фаза 0: Подготовка ✅ - -Autoload, скелет директорий, bootstrap.php, ServiceContainer, разбиение constants.php → 7 core-файлов. - ---- - -### Фаза 1: Извлечение core/ ✅ - -Database, Cache, Http/Request, Auth, Process, Util — все базовые компоненты извлечены из god-объектов. - -### Фаза 1.7: Оставшиеся извлечения core/ ✅ - -Логирование, SystemInfo, BruteforceGuard, CurlClient, EventDispatcher, Authorization, Authenticator, ImageUtils — 8 шагов завершены. - ---- - -### Фаза 2: Дедупликация CoreUtilities ↔ StreamingUtilities ✅ - -53 дублированных метода дедуплицированы: Redis/сигналы, трекинг подключений, справочные данные, init(). - ---- - -### Фаза 3: Извлечение domain/ — бизнес-логика ✅ - -12 доменных контекстов: Stream, Vod, Line, User, Device, Server, Bouquet, Epg, Settings/Ticket, Security, Auth, Playlist. Все entity/repository/service извлечены. - ---- - -### Фаза 4: Извлечение streaming/ (hot path) ✅ - -streaming/Auth, Delivery, Codec, Protection/Health, StreamingBootstrap — лёгкий bootstrap для hot path. - ---- - -### Фаза 5: Вынесение модулей ✅ - -6 модулей извлечены атомарно: plex, watch, tmdb, ministra, fingerprint/theft-detection/magscan. ModuleInterface + ModuleLoader. Thread/Multithread дедуплицированы в `core/Process/`. - -- 🔲 `ministra/*.js` → modules/ministra/assets/ (JS-файлы портала — отложено) - ---- - -### Фаза 6: Контроллеры и Views (admin/reseller) ✅ - -#### Шаг 6.1 — Единый layout ✅ - -Unified wrappers: `public/Views/layouts/admin.php` + `footer.php`. -- **Admin: 112/112 page-файлов — 100% мигрированы** -- **Reseller: 22/22 page-файлов — 100% мигрированы** -- ⏭️ CSS/JS partials — **отложено** (footer.php: ~800 стр. page-specific inline JS) - -#### Шаг 6.2 — Router + Front Controller ✅ - -`core/Http/Router.php` (450 стр.), `public/index.php` (Front Controller), `Request.php`, `Response.php`, `RequestGuard.php`. Трёхрежимный URL-парсинг (Access Code + XC_SCOPE / Direct URL / fallback). Access Codes поддержаны. - -#### Шаг 6.3 — Конвертация admin-страниц (Controller/View) ✅ - -**111/111 admin-страниц** мигрированы: Controller + View + Scripts + routes. Паттерн: Thin Controller → Service → View. `BaseAdminController` + `_scripts_init.php`. - -#### Шаг 6.4 — Объединение admin/reseller ✅ - -22 reseller-страницы мигрированы. `BaseResellerController` + 22 контроллера/view/маршрута. - -#### Шаг 6.5 — Стабилизация Controller/View контракта ✅ - -Два прохода стабилизации: viewGlobals расширен, nullable-guards для foreach/in_array/count. - -#### Шаг 6.5b — Reseller view nullable audit ✅ - -Source-level fixes: `getPermissions()` → `[]` fallback, defensive defaults в `functions.php`/`table.php` для `direct_reports`, `all_reports`, `stream_ids`, `category_ids`, `series_ids`, `subresellers`. P0/P1 точечные исправления в 10 файлах. - ---- - -### Фаза 7: Миграция admin.php bootstrap - -#### Шаг 7.1 — Вынос inline-данных ✅ -Данные bootstrap консолидированы в `resources/data/admin_constants.php`. - -#### Шаг 7.2 — Замена процедурного bootstrap ✅ -8 инкрементов: runtime → `bootstrapAdminRuntime()` → `admin_session.php` + `admin_runtime.php` → `XC_Bootstrap::boot(CONTEXT_ADMIN)` → фасад `admin_bootstrap.php`. - -#### Шаг 7.3 — Удаление proxy-обёрток из admin.php ✅ -40 proxy-определений удалены, 560+ call-sites заменены на прямые вызовы domain-сервисов. `admin.php` сокращён с ~4448 до ~3050 строк. - -#### Шаг 7.3.1 — Миграция getCategories/getOutputs ✅ -`getCategories()` → `CategoryService::getAllByType()` (~75+ call-sites). `getOutputs()` → `OutputFormatRepository::getAll()` (3 call-sites). Создан `domain/Line/OutputFormatRepository.php`. - -#### Шаг 6.5b — Reseller view nullable audit ✅ -Source-level: `getPermissions()` → `[]` fallback, defensive defaults в `functions.php`/`table.php`. P0 fixes в 8 файлах (foreach/count/in_array guards). P1 в 2 файлах. P2/P3 покрыты source-level defaults. - -#### Шаг 7.4 — Устранение параметра `$db` из Domain-классов ✅ -28 классов (100 методов) → `global $db` внутри. ~357 call-sites обновлены. - ---- - -### Фаза 8: Ликвидация god-объектов ✅ - -**Цель:** Удалить три файла-монолита (`CoreUtilities.php`, `StreamingUtilities.php`, `admin_api.php`), заменив ~7 400 внешних вызовов на прямые обращения к целевым классам. - -| Файл | Было строк | Методов | Внешних вызовов | Статус | -|------|:----------:|:-------:|:---------------:|--------| -| `admin_api.php` | 3 686 | 79 | ~300 | ✅ 8.1 — удалён | -| `StreamingUtilities.php` | 659 | 78 | 1 344 | ✅ 8.2 — удалён | -| `CoreUtilities.php` | 1 971 | 152 | 5 755 | ✅ 8.3–8.11 — удалён | - -#### Шаг 8.1 — admin_api.php ✅ -60 PROXY + 18 OWN методов мигрированы в domain-сервисы. Файл удалён. - -#### Шаг 8.2 — StreamingUtilities.php ✅ -42 PROXY + 33 OWN методов, 18 свойств. ~314 ссылок заменены в 10 батчах. Файл удалён. - -#### Шаг 8.3 — CoreUtilities методы ✅ -81 PROXY + 69 OWN методов извлечены в целевые классы (17 батчей). CU сокращён с 1 971 до 40 строк. - -#### Шаги 8.4–8.6 — Свойства (blocklist, FFmpeg, light) ✅ -- **8.4** 7 blocklist/allowlist свойств → `BlocklistService` lazy getters (FileCache) -- **8.5** 3 FFmpeg свойства → value-object `FfmpegPaths::resolve()` -- **8.6** 3 свойства ($rCategories, $rBouquets, $rSegmentSettings) → сервисные геттеры - -#### Шаги 8.7–8.10 — Инфраструктурные свойства → singletons ✅ -- **8.7** `$rCached` → `FileCache`, `$rConfig` → `ConfigReader`, `$rServers` (184 refs) → `ServerRepository::getAll()` -- **8.8** `$db` (30 refs) → `DatabaseFactory::set()/get()`, `$redis` (62 refs) → `RedisManager::instance()` -- **8.9** `$rSettings` (819 refs, 221 файл) → `SettingsManager::set()/getAll()/get()/update()` -- **8.10** `$rRequest` (3863 refs, 166 файлов) → `RequestManager::set()/getAll()/get()/update()` - -#### Шаг 8.11 — Удаление CoreUtilities.php ✅ -6 call-sites `CoreUtilities::init()` → `LegacyInitializer::initCore()`. Файл физически удалён. - -**Эволюция CU:** - -| Фаза | Строк | Методов | Свойств | -|------|------:|--------:|--------:| -| До рефакторинга | 1 971 | 152 | 21 | -| После 8.3 | 40 | 3 | 21 | -| После 8.4–8.6 | 19 | 2 | 8 | -| После 8.7–8.8 | 9 | 1 | 2 | -| После 8.9–8.10 | 5 | 1 | 0 | -| **8.11 — УДАЛЁН** | **0** | **0** | **0** | - -**Новые singleton/service классы (Phase 8):** `SettingsManager`, `RequestManager`, `ConfigReader`, `DatabaseFactory` (singleton), `RedisManager` (singleton), `FfmpegPaths`, `FileCache`, `DataEncryptor`, `InputSanitizer`, `IpUtils`, `UrlBuilder`, `ImageUtils`, `Helpers`, `ProcessManager`, `ConnectionManager`, `BackupService`, `ProviderService`, `ProfileService`, `RadioService`, `SystemCheck`, `InputValidator`. - ---- - -### Фаза 9: Стабилизация сборки - -> **Цель фазы:** после массовых рефакторингов (Phases 7–8) довести проект до состояния «зелёной» сборки: корректный Makefile, стандартизированные PHP-заголовки, унифицированный layout, экспорт глобалов. - -#### Шаг 9.1 — Makefile: LB-сборка для новой архитектуры ✅ - -**Проблема:** `LB_FILES` не включал `core/`, `domain/`, `streaming/`, `infrastructure/`, `resources/`, `autoload.php`, `bootstrap.php` — LB-сборка не могла работать с мигрированным кодом. - -**Решение (5 правок в Makefile):** -1. `LB_FILES` → `LB_DIRS` (14 dirs) + `LB_ROOT_FILES` (5 root files) -2. `lb_copy_files`: второй цикл для root-файлов через `git ls-files --error-unmatch` -3. `lb_update_copy_files`: каскадная проверка (dirs → root files) для delta-обновлений -4. `LB_DIRS_TO_REMOVE`: +6 admin-only исключений (`includes/bootstrap`, `domain/User`, `domain/Device`, `domain/Auth`, `resources/langs`, `resources/libs`) -5. `set_permissions`: `core/ domain/ streaming/ infrastructure/ resources/` → dirs:755, files:644; root PHP → 644 - -**Найденный баг:** Старый `LB_FILES` включал файлы `status`, `update`, `service`, но grep `"^src/$item/"` с trailing `/` никогда не матчил их — они молча не копировались. Теперь исправлено отдельным циклом. - -#### Шаг 9.2 — Стандартизация PHP-заголовков (Clean Headers) ✅ - -**Проблема:** Admin- и reseller-view-файлы начинались разнородно: ` - - -``` - -Когда файл исполняется напрямую (`php admin/dashboard.php`), guard проходит, и legacy bootstrap запускается как обычно. Когда файл подключается как view (`$__viewMode = true; include 'dashboard.php'`), блок пропускается — нет двойной инициализации. - -**Масштаб:** 112 admin-файлов + 22 reseller-файла — все начинаются с ``. - -**Скрипт удалён после использования** (`tools/clean_headers.py` — одноразовый). - -#### Шаг 9.3 — Миграция view-layout: renderUnifiedLayoutHeader ✅ - -**Проблема:** Каждый admin/reseller PHP-файл подключал `header.php` и `footer.php` вручную через `include`/`require` с разным синтаксисом: -```php -// Было — 5+ вариантов: -include 'header.php'; -require 'header.php'; -include_once 'header.php'; - -include(__DIR__ . '/header.php'); -``` - -При переходе к layout-контроллерам это создаёт хаос: нет единой точки для подключения общих переменных, нет возможности подменить layout без правки 134 файлов. - -**Решение:** Автоматизация через скрипт `tools/migrate_views.py` (3 итерации: `.vscode/tasks.json` → «Run migrate_views 1–3»). - -**Новые файлы:** -- `public/Views/layouts/admin.php` — `renderUnifiedLayoutHeader($scope, $vars)`: извлекает 16 глобалов из `$GLOBALS` (`rUserInfo`, `rSettings`, `rThemes`, `rMobile`, `rHues`, `db`, `language`, `allServersHealthy`, `rServerError`, `rServers`, `allServers`, `rUpdate`, `_TITLE`, `rModal`, `rProxyServers`, `rPermissions`), затем `require` legacy `admin/header.php` или `reseller/header.php` в зависимости от `$scope` -- `public/Views/layouts/footer.php` — `renderUnifiedLayoutFooter($scope, $vars)`: аналогичная обёртка для `footer.php` - -**Паттерн замены:** -```php -// Было: -include 'header.php'; - -// Стало: -renderUnifiedLayoutHeader('admin'); -``` - -```php -// Было: -include 'footer.php'; - -// Стало: -renderUnifiedLayoutFooter('admin'); -``` - -**Масштаб:** 112 admin-файлов + 22 reseller-файла — все переведены на `renderUnifiedLayoutHeader()`/`renderUnifiedLayoutFooter()`. - -**Зачем обёртка, а не прямой include?** -1. Единая точка подключения глобалов — при рефакторинге header достаточно изменить один файл -2. Scope-параметр (`'admin'` / `'reseller'`) определяет правильный header без `if/else` в каждом файле -3. Позволяет в будущем заменить legacy header на Blade/Twig без правки 134 view-файлов -4. `$vars` позволяет передавать page-specific данные (напр. `_TITLE`) в layout без `$GLOBALS`-загрязнения - -**Скрипт удалён после использования** (`tools/migrate_views.py` — одноразовый). - -#### Шаг 9.4 — Глобальные переменные: экспорт singleton-данных ✅ - -**Проблема:** После удаления god-объектов (Phase 8) все данные доступны только через singleton-менеджеры (`SettingsManager::getAll()`, `FfmpegPaths::probe()`, `ServerRepository::getAll()` и т.д.). Каждая функция вынуждена вызывать геттер в начале: -```php -// Было — каждый метод повторяет вызовы: -$rSettings = SettingsManager::getAll(); // 400+ call-sites -$rFFPROBE = FfmpegPaths::probe(); // 18 call-sites -$rServers = ServerRepository::getAll(); // 50+ call-sites -``` - -**Решение:** `LegacyInitializer::exportGlobals()` — вызывается один раз в конце `initCore()` и `initStreaming()`, экспортирует singleton-данные в `$GLOBALS`: - -| Глобальная переменная | Источник | Контекст | -|---|---|---| -| `$rSettings` | `SettingsManager::getAll()` | core + streaming | -| `$rRequest` | `RequestManager::getAll()` | core + streaming | -| `$rConfig` | `ConfigReader::getAll()` | core + streaming | -| `$rServers` | `ServerRepository::getAll()` | core + streaming | -| `$rFFPROBE` | `FfmpegPaths::probe()` | core + streaming | -| `$rFFMPEG_CPU` | `FfmpegPaths::cpu()` | core + streaming | -| `$rFFMPEG_GPU` | `FfmpegPaths::gpu()` | core + streaming | -| `$db` | `DatabaseFactory` | уже глобальная | - -**Использование:** -```php -// Теперь — одна строка global: -public static function probeStream($url) { - global $rSettings, $rFFPROBE; - // $rSettings и $rFFPROBE доступны сразу -} -``` - -**Правила:** -- Глобалы — **read-only snapshot**, устанавливаются при bootstrap -- Для мутаций использовать Manager: `SettingsManager::update('key', 'val')` -- Streaming-контекст дополнительно экспортирует: `$rCached`, `$rBlockedUA`, `$rBlockedISP`, `$rBlockedIPs`, `$rBlockedServers`, `$rAllowedIPs`, `$rProxies`, `$rBouquets`, `$rSegmentSettings` - -**Обновлённые файлы (54 замены в 20 файлах):** -- `core/Init/LegacyInitializer.php` — добавлен `exportGlobals()`, вызов из `initCore()` + FFmpeg globals в `initStreaming()` -- `streaming/Codec/FFprobeRunner.php` — `global $rSettings, $rFFPROBE` -- `streaming/Codec/SubtitleExtractor.php` — `global $rSettings, $rFFMPEG_CPU` -- `streaming/Health/ProcessChecker.php` — `global $rServers` -- `domain/Stream/StreamProcess.php` — 4 метода: `global $db, $rSettings, $rServers, $rFFMPEG_CPU, $rFFMPEG_GPU`; переименование `$rFFMPEGCPU`→`$rFFMPEG_CPU`, `$rFFMPEGGPU`→`$rFFMPEG_GPU` -- `domain/Stream/ConnectionTracker.php` — 5 методов: `global $rSettings, $rServers, $db` -- `domain/Stream/PlaylistGenerator.php` — `global $db, $rSettings, $rServers` -- `domain/Stream/StreamService.php` — `global $db, $rSettings` -- `domain/Stream/ChannelService.php` — `global $db, $rSettings` -- `domain/Stream/StreamRepository.php` — `global $db, $rSettings` -- `domain/Server/ServerRepository.php` — 6 методов: `global $rSettings, $rServers, $db` -- `domain/Auth/AuthService.php` — 2 метода: `global $db, $rSettings` -- `domain/Vod/EpisodeService.php` — `global $db, $rSettings` -- `domain/User/UserRepository.php` — 2 метода: `global $db, $rSettings` -- `domain/Security/BlocklistService.php` — `global $rServers` -- `core/Config/DomainResolver.php` — `global $rServers, $rSettings` -- `core/Auth/Authenticator.php` — 2 метода: `global $db, $rSettings` -- `core/Http/CurlClient.php` — 2 метода: `global $rServers` -- `crons/users.php` — `global $rServers, $rSettings` -- `includes/admin.php` — 4 функции: `global $rServers` (+ `$rSettings`) - ---- - -## 10. Транзакции и производительность - -### 10.1. Кто управляет транзакциями +### 9.1. Кто управляет транзакциями **Правило:** Транзакцией управляет **Service**. Контроллер и Repository не открывают транзакции. @@ -1632,7 +1319,8 @@ Controller ──→ Service ──→ Repository + Infrastructure └── (rollback при исключении) ``` -### 10.2. Паттерн транзакции + +### 9.2. Паттерн транзакции ```php class StreamService { @@ -1655,7 +1343,7 @@ class StreamService { } ``` -### 10.3. Границы по контексту +### 9.3. Границы по контексту | Контекст | Транзакция | Кто управляет | Пример | |----------|-----------|---------------|--------| @@ -1665,7 +1353,7 @@ class StreamService { | **Cron** | Каждая итерация = отдельная транзакция | CronJob | `ServersCron::processServer()` | | **Streaming** | ❌ Нет транзакций | — | Hot path не мутирует через транзакции | -### 10.4. Внешние процессы +### 9.4. Внешние процессы Операция «создать поток + запустить ffmpeg + обновить nginx» — не атомарна. FFmpeg/nginx — внешние процессы, откатить нельзя. @@ -1694,14 +1382,14 @@ class StreamService { } ``` -### 10.5. Два режима работы системы +### 9.5. Два режима работы системы | Режим | Путь | Частота | Допустимая latency | Загрузка | |-------|------|---------|-------------------|----------| | **Hot path** (streaming) | `www/stream/*.php` | ~10K–100K req/min | < 50ms p99 | Минимальный bootstrap, никаких модулей | | **Cold path** (admin) | `admin/*.php`, API | ~1–100 req/min | < 500ms p99 | Полный bootstrap, все модули | -### 10.6. Бюджет hot path +### 9.6. Бюджет hot path Streaming-запрос (`auth.php` → `live.php`) должен уложиться в: @@ -1717,7 +1405,7 @@ Total: < 30ms (target) | < 50ms (max) **НЕЛЬЗЯ загружать в hot path:** Router, EventDispatcher с подписчиками, ServiceContainer полный boot. **МОЖНО:** Database (persistent), Redis (single connection), GeoIP (mmap), streaming/*. -### 10.7. Async / Queue (будущее) +### 9.7. Async / Queue (будущее) Длинные операции (ffprobe, tmdb, mass import) — кандидаты на async: @@ -1729,95 +1417,11 @@ HTTP → Service → Queue Job (Redis LPUSH) → Worker (cron) → Result --- -## 11. Стратегия миграции по рискам - -### 11.1. Принцип: каждый шаг обратим - -Каждое изменение следует паттерну **extract → delegate → verify → replace**: - -``` -1. Extract: создать новый класс -2. Delegate: старый код вызывает новый через proxy -3. Verify: система работает как раньше + новый код работает -4. Replace: обновить вызывающий код на прямые вызовы (отдельный шаг) -``` - -Если шаг 3 провалился — откат = удалить новый класс + убрать proxy. Система возвращается в предыдущее состояние. - -### 11.2. Регрессионная стратегия - -| Уровень | Что проверяется | Как проверяется | Когда | -|---------|----------------|-----------------|-------| -| **Syntax** | PHP-файлы компилируются | `php -l` на каждый изменённый файл | После каждого коммита | -| **Smoke** | Система запускается | `make new && make lb` + проверка HTTP 200 | После каждой фазы | -| **Functional** | Основные сценарии работают | Ручной checklist (создать поток, запустить, остановить) | После каждой фазы | -| **Integration** | LB-сборка работает | Деплой на тестовый LB-сервер + стриминг-тест | После фаз 1–4 | -| **Backward compat** | API не сломан | Проверка ответов API (формат JSON, коды ошибок) | После фазы 6 | - -### 11.3. Dual bootstrap на переходном этапе - -**Текущее состояние (фазы 1–6):** Dual bootstrap работает параллельно. - -``` -bootstrap.php (новый) includes/admin.php (старый legacy) - │ │ - ├── autoload.php ├── require Database.php - ├── ServiceContainer ├── CoreUtilities::init() - ├── ConfigLoader ├── API/ResellerAPI init - └── новые core/ классы └── 50 define() + global $db -``` - -**Правила dual bootstrap:** -1. `bootstrap.php` загружается ПЕРВЫМ в каждой точке входа -2. `includes/admin.php` загружается ПОСЛЕ — для legacy-кода, который ещё не мигрирован -3. Новые классы (`core/`, `domain/`) инициализируются через `ServiceContainer` -4. Legacy-код (`CoreUtilities`, `admin_api.php`) продолжает работать через proxy-методы -5. После полной миграции (Фаза 8) — `includes/admin.php` удаляется - -### 11.4. API backward compatibility - -**Правило:** Внешний API (`player.api`, `xmltv.php`, межсерверный API) не меняет формат ответов до Фазы 8. - -``` -Фазы 1–7: Внутренняя рефакторизация, внешний API неизменен -Фаза 8: API v2 (опционально) с новой маршрутизацией - API v1 продолжает работать через compatibility layer -``` - -### 11.5. Разделение релизов - -| Релиз | Содержит | Риск | -|-------|----------|------| -| **v1.8** | Фазы 0–2 (core/ extraction, dedup) | 🟢 Низкий — proxy-методы, обратная совместимость | -| **v1.9** | Фазы 3–4 (domain/ + streaming/ extraction) | 🟡 Средний — больше перемещений, proxy покрывает | -| **v2.0** | Фазы 5–6 (modules + controllers) | 🟡 Средний — новая маршрутизация, dual bootstrap | -| **v2.1** | Фазы 7–8 (cleanup, удаление legacy) | 🔴 Высокий — удаление god-объектов, нет fallback | - -### 11.6. Rollback plan - -``` -Если v2.0 ломает production: -1. git revert последний merge в main -2. Пересобрать: make new && make lb -3. Задеплоить предыдущую сборку -4. Post-mortem: что сломалось, почему не поймали на smoke test -``` - -Для v2.1 (удаление legacy) — **feature flag:** -```php -// config.ini -[migration] -use_legacy_bootstrap = false ; true = откат на admin.php -use_legacy_api = false ; true = откат на admin_api.php switch -``` - ---- - -## 12. Правила для контрибьюторов +## 10. Правила для контрибьюторов > Этот раздел — краткая выжимка для тех, кто не читал весь документ. Подробности — в CONTRIBUTING.md. -### 12.1. Как добавить новый эндпоинт (admin) +### 10.1. Как добавить новый эндпоинт (admin) 1. Найти контекст в `domain/` (например `domain/Stream/`) 2. Добавить метод в `StreamService.php` (бизнес-логика) @@ -1825,20 +1429,20 @@ use_legacy_api = false ; true = откат на admin_api.php switch 4. Добавить action в Controller или `admin_api.php` → вызов Service 5. `php -l` на изменённые файлы -### 12.2. Как добавить новую таблицу +### 10.2. Как добавить новую таблицу 1. Добавить миграцию в `infrastructure/install/` 2. Создать Repository в `domain/{Context}/` с CRUD-методами 3. Зарегистрировать в `autoload.php` -### 12.3. Как НЕ сломать streaming +### 10.3. Как НЕ сломать streaming - **Никогда** не менять `www/stream/*.php` без явного ревью - **Никогда** не добавлять `require` тяжёлых классов в streaming bootstrap - Не использовать EventDispatcher / Router / ServiceContainer в hot path - Проверять latency: `< 50ms p99` -### 12.4. Правила PR +### 10.4. Правила PR 1. Один PR = одна фича/багфикс. Не смешивать рефакторинг с фичами. 2. `php -l` на все изменённые файлы перед пушем. @@ -1846,7 +1450,7 @@ use_legacy_api = false ; true = откат на admin_api.php switch 4. proxy-методы помечать `// @legacy-proxy — убрать в Фазе 8`. 5. Новые классы регистрировать в `autoload.php`. -### 12.5. Простые правила (cheat sheet) +### 10.5. Простые правила (cheat sheet) ``` ✗ Не пиши SQL в Controller → Пиши в Repository diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 00000000..278beee9 --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,777 @@ +# XC_VM — План миграции + +> Этот документ описывает **порядок миграции**, **детали каждой фазы** и **стратегию управления рисками**. +> Архитектурные принципы, структура проекта и описание компонентов — см. [ARCHITECTURE.md](ARCHITECTURE.md). + +## Содержание + +1. [Принцип миграции](#1-принцип-миграции) +2. [Фазы 0–9: Завершённые](#2-фазы-09-завершённые) +3. [Фаза 10: Удаление legacy admin entry-points](#3-фаза-10-удаление-legacy-admin-entry-points) +4. [Фаза 11: Унификация API](#4-фаза-11-унификация-api) +5. [Фаза 12: CLI — единый runner](#5-фаза-12-cli--единый-runner) +6. [Фаза 13: Streaming entry points](#6-фаза-13-streaming-entry-points) +7. [Фаза 14: CSS/JS partials](#7-фаза-14-cssjs-partials) +8. [Фаза 15: Удаление includes/admin.php](#8-фаза-15-удаление-includesadminphp) +9. [Порядок выполнения и риск-матрица](#9-порядок-выполнения-и-риск-матрица) +10. [Стратегия миграции по рискам](#10-стратегия-миграции-по-рискам) + +--- + +## 1. Принцип миграции + +### Извлечение → делегирование → замена + +Каждый шаг миграции следует одному паттерну: + +``` +1. Создать новый класс в целевой директории +2. Перенести в него методы из god-объекта +3. В старом файле оставить proxy-метод: + public static function oldMethod(...$args) { + return NewClass::method(...$args); + } +4. Зарегистрировать класс в autoloader +5. Проверить: система работает как раньше +6. (позже) Обновить вызывающий код → удалить proxy +``` + +Так каждый шаг безопасен и обратимо совместим. + +--- + +## 2. Фазы 0–9: Завершённые + +### Фаза 0: Подготовка ✅ + +Autoload, скелет директорий, bootstrap.php, ServiceContainer, разбиение constants.php → 7 core-файлов. + +--- + +### Фаза 1: Извлечение core/ ✅ + +Database, Cache, Http/Request, Auth, Process, Util — все базовые компоненты извлечены из god-объектов. + +### Фаза 1.7: Оставшиеся извлечения core/ ✅ + +Логирование, SystemInfo, BruteforceGuard, CurlClient, EventDispatcher, Authorization, Authenticator, ImageUtils — 8 шагов завершены. + +--- + +### Фаза 2: Дедупликация CoreUtilities ↔ StreamingUtilities ✅ + +53 дублированных метода дедуплицированы: Redis/сигналы, трекинг подключений, справочные данные, init(). + +--- + +### Фаза 3: Извлечение domain/ — бизнес-логика ✅ + +12 доменных контекстов: Stream, Vod, Line, User, Device, Server, Bouquet, Epg, Settings/Ticket, Security, Auth, Playlist. Все entity/repository/service извлечены. + +--- + +### Фаза 4: Извлечение streaming/ (hot path) ✅ + +streaming/Auth, Delivery, Codec, Protection/Health, StreamingBootstrap — лёгкий bootstrap для hot path. + +--- + +### Фаза 5: Вынесение модулей ✅ + +6 модулей извлечены атомарно: plex, watch, tmdb, ministra, fingerprint/theft-detection/magscan. ModuleInterface + ModuleLoader. Thread/Multithread дедуплицированы в `core/Process/`. + +- 🔲 `ministra/*.js` → modules/ministra/assets/ (JS-файлы портала — отложено до Фазы 13.4) + +--- + +### Фаза 6: Контроллеры и Views (admin/reseller) ✅ + +#### Шаг 6.1 — Единый layout ✅ + +Unified wrappers: `public/Views/layouts/admin.php` + `footer.php`. +- **Admin: 112/112 page-файлов — 100% мигрированы** +- **Reseller: 22/22 page-файлов — 100% мигрированы** +- ⏭️ CSS/JS partials — **отложено** до Фазы 14 (footer.php: ~800 стр. page-specific inline JS) + +#### Шаг 6.2 — Router + Front Controller ✅ + +`core/Http/Router.php` (450 стр.), `public/index.php` (Front Controller), `Request.php`, `Response.php`, `RequestGuard.php`. Трёхрежимный URL-парсинг (Access Code + XC_SCOPE / Direct URL / fallback). Access Codes поддержаны. + +#### Шаг 6.3 — Конвертация admin-страниц (Controller/View) ✅ + +**111/111 admin-страниц** мигрированы: Controller + View + Scripts + routes. Паттерн: Thin Controller → Service → View. `BaseAdminController` + `_scripts_init.php`. + +#### Шаг 6.4 — Объединение admin/reseller ✅ + +22 reseller-страницы мигрированы. `BaseResellerController` + 22 контроллера/view/маршрута. + +#### Шаг 6.5 — Стабилизация Controller/View контракта ✅ + +Два прохода стабилизации: viewGlobals расширен, nullable-guards для foreach/in_array/count. + +#### Шаг 6.5b — Reseller view nullable audit ✅ + +Source-level fixes: `getPermissions()` → `[]` fallback, defensive defaults в `functions.php`/`table.php` для `direct_reports`, `all_reports`, `stream_ids`, `category_ids`, `series_ids`, `subresellers`. P0/P1 точечные исправления в 10 файлах. + +--- + +### Фаза 7: Миграция admin.php bootstrap + +#### Шаг 7.1 — Вынос inline-данных ✅ +Данные bootstrap консолидированы в `resources/data/admin_constants.php`. + +#### Шаг 7.2 — Замена процедурного bootstrap ✅ +8 инкрементов: runtime → `bootstrapAdminRuntime()` → `admin_session.php` + `admin_runtime.php` → `XC_Bootstrap::boot(CONTEXT_ADMIN)` → фасад `admin_bootstrap.php`. + +#### Шаг 7.3 — Удаление proxy-обёрток из admin.php ✅ +40 proxy-определений удалены, 560+ call-sites заменены на прямые вызовы domain-сервисов. `admin.php` сокращён с ~4448 до ~3050 строк. + +#### Шаг 7.3.1 — Миграция getCategories/getOutputs ✅ +`getCategories()` → `CategoryService::getAllByType()` (~75+ call-sites). `getOutputs()` → `OutputFormatRepository::getAll()` (3 call-sites). Создан `domain/Line/OutputFormatRepository.php`. + +#### Шаг 7.4 — Устранение параметра `$db` из Domain-классов ✅ +28 классов (100 методов) → `global $db` внутри. ~357 call-sites обновлены. + +--- + +### Фаза 8: Ликвидация god-объектов ✅ + +**Цель:** Удалить три файла-монолита (`CoreUtilities.php`, `StreamingUtilities.php`, `admin_api.php`), заменив ~7 400 внешних вызовов на прямые обращения к целевым классам. + +| Файл | Было строк | Методов | Внешних вызовов | Статус | +|------|:----------:|:-------:|:---------------:|--------| +| `admin_api.php` | 3 686 | 79 | ~300 | ✅ 8.1 — удалён | +| `StreamingUtilities.php` | 659 | 78 | 1 344 | ✅ 8.2 — удалён | +| `CoreUtilities.php` | 1 971 | 152 | 5 755 | ✅ 8.3–8.11 — удалён | + +#### Шаг 8.1 — admin_api.php ✅ +60 PROXY + 18 OWN методов мигрированы в domain-сервисы. Файл удалён. + +#### Шаг 8.2 — StreamingUtilities.php ✅ +42 PROXY + 33 OWN методов, 18 свойств. ~314 ссылок заменены в 10 батчах. Файл удалён. + +#### Шаг 8.3 — CoreUtilities методы ✅ +81 PROXY + 69 OWN методов извлечены в целевые классы (17 батчей). CU сокращён с 1 971 до 40 строк. + +#### Шаги 8.4–8.6 — Свойства (blocklist, FFmpeg, light) ✅ +- **8.4** 7 blocklist/allowlist свойств → `BlocklistService` lazy getters (FileCache) +- **8.5** 3 FFmpeg свойства → value-object `FfmpegPaths::resolve()` +- **8.6** 3 свойства ($rCategories, $rBouquets, $rSegmentSettings) → сервисные геттеры + +#### Шаги 8.7–8.10 — Инфраструктурные свойства → singletons ✅ +- **8.7** `$rCached` → `FileCache`, `$rConfig` → `ConfigReader`, `$rServers` (184 refs) → `ServerRepository::getAll()` +- **8.8** `$db` (30 refs) → `DatabaseFactory::set()/get()`, `$redis` (62 refs) → `RedisManager::instance()` +- **8.9** `$rSettings` (819 refs, 221 файл) → `SettingsManager::set()/getAll()/get()/update()` +- **8.10** `$rRequest` (3863 refs, 166 файлов) → `RequestManager::set()/getAll()/get()/update()` + +#### Шаг 8.11 — Удаление CoreUtilities.php ✅ +6 call-sites `CoreUtilities::init()` → `LegacyInitializer::initCore()`. Файл физически удалён. + +**Эволюция CU:** + +| Фаза | Строк | Методов | Свойств | +|------|------:|--------:|--------:| +| До рефакторинга | 1 971 | 152 | 21 | +| После 8.3 | 40 | 3 | 21 | +| После 8.4–8.6 | 19 | 2 | 8 | +| После 8.7–8.8 | 9 | 1 | 2 | +| После 8.9–8.10 | 5 | 1 | 0 | +| **8.11 — УДАЛЁН** | **0** | **0** | **0** | + +**Новые singleton/service классы (Phase 8):** `SettingsManager`, `RequestManager`, `ConfigReader`, `DatabaseFactory` (singleton), `RedisManager` (singleton), `FfmpegPaths`, `FileCache`, `DataEncryptor`, `InputSanitizer`, `IpUtils`, `UrlBuilder`, `ImageUtils`, `Helpers`, `ProcessManager`, `ConnectionManager`, `BackupService`, `ProviderService`, `ProfileService`, `RadioService`, `SystemCheck`, `InputValidator`. + +--- + +### Фаза 9: Стабилизация сборки ✅ + +> **Цель фазы:** после массовых рефакторингов (Phases 7–8) довести проект до состояния «зелёной» сборки: корректный Makefile, стандартизированные PHP-заголовки, унифицированный layout, экспорт глобалов. + +#### Шаг 9.1 — Makefile: LB-сборка для новой архитектуры ✅ + +**Проблема:** `LB_FILES` не включал `core/`, `domain/`, `streaming/`, `infrastructure/`, `resources/`, `autoload.php`, `bootstrap.php` — LB-сборка не могла работать с мигрированным кодом. + +**Решение (5 правок в Makefile):** +1. `LB_FILES` → `LB_DIRS` (14 dirs) + `LB_ROOT_FILES` (5 root files) +2. `lb_copy_files`: второй цикл для root-файлов через `git ls-files --error-unmatch` +3. `lb_update_copy_files`: каскадная проверка (dirs → root files) для delta-обновлений +4. `LB_DIRS_TO_REMOVE`: +6 admin-only исключений (`includes/bootstrap`, `domain/User`, `domain/Device`, `domain/Auth`, `resources/langs`, `resources/libs`) +5. `set_permissions`: `core/ domain/ streaming/ infrastructure/ resources/` → dirs:755, files:644; root PHP → 644 + +#### Шаг 9.2 — Стандартизация PHP-заголовков (Clean Headers) ✅ + +**Проблема:** Admin- и reseller-view-файлы начинались разнородно — невозможно безопасно включать как view-фрагменты из layout-контроллера. + +**Решение:** Guard-условие `$__viewMode` (скрипт `tools/clean_headers.py`, 4 итерации): + +```php + + + +``` + +**Масштаб:** 112 admin-файлов + 22 reseller-файла. + +#### Шаг 9.3 — Миграция view-layout: renderUnifiedLayoutHeader ✅ + +**Решение:** `renderUnifiedLayoutHeader($scope, $vars)` / `renderUnifiedLayoutFooter($scope, $vars)` — единая обёртка для подключения header/footer с извлечением 16 глобалов. + +**Новые файлы:** +- `public/Views/layouts/admin.php` +- `public/Views/layouts/footer.php` + +**Масштаб:** 112 admin + 22 reseller файла переведены. + +#### Шаг 9.4 — Глобальные переменные: экспорт singleton-данных ✅ + +`LegacyInitializer::exportGlobals()` — экспортирует singleton-данные в `$GLOBALS` один раз при bootstrap. + +**Экспортируемые переменные:** `$rSettings`, `$rRequest`, `$rConfig`, `$rServers`, `$rFFPROBE`, `$rFFMPEG_CPU`, `$rFFMPEG_GPU`, `$db` + streaming-контекст: `$rCached`, `$rBlockedUA/ISP/IPs/Servers`, `$rAllowedIPs`, `$rProxies`, `$rBouquets`, `$rSegmentSettings`. + +**Масштаб:** 54 замены в 20 файлах. + +--- + +## 3. Фаза 10: Удаление legacy admin entry-points ✅ + +> **Цель:** Все admin-запросы обслуживаются ТОЛЬКО через `public/index.php` (Front Controller → Router → Controller → View). Директория `src/admin/` удалена. + +#### Шаг 10.1 — Устранение fallback в Front Controller ✅ + +**Что сделано:** +1. Созданы контроллеры для 7 ещё не маршрутизированных страниц: + - `LogoutController` — destroySession + redirect + - `PlayerEmbedController` — проксирует admin/player.php + - `PostController` — устанавливает `$GLOBALS['__forcePostMode']`, проксирует admin/post.php + - `LoginController` — проксирует admin/login.php (собственный HTML-документ) + - `SetupController` — методы `index()` (setup.php) и `database()` (database.php) +2. Добавлены 7 маршрутов в `public/routes/admin.php` (logout, player, post, login, setup, database, index) +3. Унифицирована секция 4a FC: все scope (admin/reseller/player) используют Router для noBootstrapPages +4. Секция 7 (legacy fallback) обёрнута feature flag `$rSettings['use_legacy_fallback']` (default: true) +5. Модифицирован `admin/post.php`: `$rICount` теперь учитывает `$GLOBALS['__forcePostMode']` + +#### Шаг 10.2 — Миграция admin/login.php → LoginController ✅ + +LoginController создан как thin proxy: chdir(admin/) + require login.php. Маршруты `login` и `index` зарегистрированы. + +#### Шаг 10.3 — Миграция admin/setup.php, database.php → SetupController ✅ + +SetupController: методы index() и database() проксируют в legacy-файлы. Маршруты зарегистрированы. + +#### Шаг 10.4 — Миграция admin/api.php → AjaxController ✅ + +AjaxController — thin proxy: chdir(admin/) + require api.php. Маршрут `$router->any('api', ...)`. FC API-fallback обёрнут feature flag. + +#### Шаг 10.5 — Консолидация session.php + functions.php ✅ + +**Создано:** +- `infrastructure/bootstrap/admin_session_fc.php` — clean-версия admin/session.php для FC-пути +- `infrastructure/bootstrap/admin_functions_fc.php` — clean-версия admin/functions.php + +FC переключён на `infrastructure/bootstrap/admin_*_fc.php`. Оригиналы оставлены для direct nginx access. + +#### Шаг 10.6 — Удаление директории src/admin/ ✅ + +**Что сделано:** +1. 127 PHP-файлов перемещены из `admin/` → `public/Views/admin/` +2. 423 статических файла (CSS, fonts, images, JS, libs) перемещены из `admin/assets/` → `public/assets/admin/` +3. Директория `src/admin/` полностью удалена +4. Обновлены все ссылки: + - **FC** (`public/index.php`): `$adminDir = MAIN_HOME . 'public/Views/admin/'` + - **5 контроллеров**: LoginController, SetupController, PostController, PlayerEmbedController, AjaxController — пути к `public/Views/admin/` + - **2 layout-файла**: `dirname(__DIR__) . '/admin/header.php'` / `footer.php` + - **BaseAdminController**: `$__viewMode = true` перед view require + - **112 view-файлов**: `__DIR__ . '/../layouts/'` (исправлены относительные пути) + - **8 view-файлов**: `dirname(__DIR__, 3) . '/modules/'` (исправлена глубина) + - **AuthRepository.php**: `$rAlias` admin → `'public/Views/admin'` + - **Makefile**: permissions `$(TEMP_DIR)/public/assets/admin` +5. nginx template (`bin/nginx/conf/codes/template`) уже корректный: `alias /home/xc_vm/public/assets/#TYPE#/` +6. Syntax check: 126/127 pass (review.php — pre-existing bug, не регрессия) + +--- + +## 4. Фаза 11: Унификация API — внешние и внутренние + +> **Цель:** Единый API-слой через `public/Controllers/Api/` с Router-маршрутизацией. Удаление самостоятельных PHP-файлов в `src/www/` (`player_api.php`, `enigma2.php`, `epg.php`, `playlist.php`, `xplugin.php`). + +#### Шаг 11.1 — Player API → PlayerApiController + +**Проблема:** `www/player_api.php` (~600 строк) — самостоятельный entry point с собственным bootstrap через `stream/init.php`. Action-based switch (`get_epg`, `get_live_streams`, `get_vod_streams`, `get_series`, `get_series_info`, `get_vod_info`). + +**Решение:** +1. Создать `public/Controllers/Api/PlayerApiController.php` +2. Каждый action → метод: `getLiveStreams()`, `getVodStreams()`, `getSeries()`, `getEpg()`, ... +3. Аутентификация (username/password или token) → `StreamingAuth::authenticate()` +4. Entry point: `www/player_api.php` → thin proxy вызов контроллера (обратная совместимость URL) +5. Позже: nginx rewrite на `public/index.php` с scope=`api` + +#### Шаг 11.2 — Enigma2 API → Enigma2ApiController + +**Проблема:** `www/enigma2.php` (~400 строк) + `www/xplugin.php` (~300 строк) — два entry point для Enigma2-устройств (STB). Отдельные bootstrap-пути, дублирование auth-логики. + +**Решение:** +1. `public/Controllers/Api/Enigma2ApiController.php` — объединить enigma2 + xplugin +2. Методы: `getLiveCategories()`, `getVodCategories()`, `getLiveStreams()`, `auth()`, `watchdog()`, ... +3. `www/enigma2.php` и `www/xplugin.php` → thin proxies → удаление после переключения nginx + +#### Шаг 11.3 — Playlist/EPG → PlaylistController, EpgController + +**Проблема:** `www/playlist.php` (~300 строк) и `www/epg.php` (~200 строк) — генерация M3U и XMLTV. Самостоятельные entry points. + +**Решение:** +1. `public/Controllers/Api/PlaylistController.php` — M3U/M3U8 генерация +2. `public/Controllers/Api/EpgController.php` — XMLTV XML генерация +3. Auth-логика уже в `UserRepository::getUserInfo()` — переиспользовать +4. Thin proxy → удаление + +#### Шаг 11.4 — Internal Server API → InternalApiController + +**Проблема:** `www/api.php` (~800 строк) — межсерверный API (server-to-server). Защищён `live_streaming_pass` + IP whitelist. ~40 case в switch: `stream`, `vod`, `reload_nginx`, `fpm_status`, `restore_images`, ... + +**Решение:** +1. `public/Controllers/Api/InternalApiController.php` +2. Группировка: `stream*` → `StreamInternalController`, `vod*` → `VodInternalController`, `server*` → `ServerInternalController` +3. Middleware: IP whitelist + password check → `InternalApiMiddleware` +4. `www/api.php` → маршрутизатор, затем удаление +5. **ВАЖНО:** hot path не затрагивается — внутренний API это cold path (~1 req/min) + +#### Шаг 11.5 — Admin/Reseller REST API → единые маршруты + +**Проблема:** `includes/api/admin/index.php` и `includes/api/reseller/index.php` — два REST API через `APIWrapper`. Отдельная аутентификация (api_key через access codes). + +**Решение:** +1. Admin REST: `public/Controllers/Api/AdminApiController.php` +2. Reseller REST: `public/Controllers/Api/ResellerApiController.php` +3. Auth: access code type 3 (admin) / type 4 (reseller) → middleware +4. `includes/api/admin/` и `includes/api/reseller/` → thin proxies → удаление +5. Маршруты в `public/routes/api.php` + +#### Шаг 11.6 — Удаление legacy API файлов + +**Предусловия:** 11.1–11.5 завершены, nginx rewrites обновлены. + +**Действия:** +1. Удалить `www/player_api.php`, `www/enigma2.php`, `www/xplugin.php`, `www/epg.php`, `www/playlist.php` +2. Удалить `www/api.php` (межсерверный) +3. Удалить `includes/api/admin/`, `includes/api/reseller/` +4. `www/probe.php`, `www/progress.php` → thin helpers (оставить или перенести в stream/) +5. Обновить nginx-конфиг: rewrite на `public/index.php` с scope=`api` +6. Smoke test: player_api, enigma2, playlist, epg, internal API + +--- + +## 5. Фаза 12: CLI — единый runner и структурированные команды + +> **Цель:** Все CLI-скрипты (`includes/cli/`, `crons/`, `src/service`, `src/tools`, `src/status`) запускаются через единую точку входа `cli/console.php`. Каждый скрипт — класс-команда с интерфейсом `CommandInterface`. + +#### Шаг 12.1 — Console entry point + CommandInterface + +**Создать:** +``` +cli/ +├── console.php # Единая точка входа: parse argv → dispatch Command +├── CommandInterface.php # interface: getName(), getDescription(), execute(array $args): int +└── CommandRegistry.php # Реестр команд (name → class) +``` + +**Паттерн:** +```php +// cli/console.php +require_once __DIR__ . '/../bootstrap.php'; +XC_Bootstrap::boot(XC_Bootstrap::CONTEXT_CLI); +$registry = new CommandRegistry(); +$registry->registerFromDir(__DIR__ . '/Commands'); +$registry->registerFromDir(__DIR__ . '/CronJobs'); +exit($registry->dispatch($argv)); +``` + +**Запуск:** +```bash +# Было: +php /home/xc_vm/includes/cli/startup.php +php /home/xc_vm/crons/servers.php + +# Стало: +php /home/xc_vm/cli/console.php startup +php /home/xc_vm/cli/console.php cron:servers +``` + +#### Шаг 12.2 — Миграция демонов includes/cli/ → cli/Commands/ + +**Скрипты:** `startup.php`, `watchdog.php`, `signals.php`, `queue.php`, `cache_handler.php`, `connection_sync.php`, `monitor.php`, `scanner.php`, `balancer.php`. + +**Паттерн миграции (для каждого):** +1. Создать `cli/Commands/XxxCommand.php` implements `CommandInterface` +2. Вынести `loadXxx()` → `execute()` +3. Общий boilerplate (user check, process title, cron lock) → trait `DaemonTrait` +4. В старом файле оставить proxy: `require __DIR__ . '/../cli/console.php'; exit;` (обратная совместимость) +5. Обновить `src/service` (daemons.sh): новые пути запуска + +**Инвентарь:** 24 файла в `includes/cli/`: + +| Legacy файл | → Command | Тип | +|---|---|---| +| `startup.php` | `Commands/StartupCommand` | daemon | +| `watchdog.php` | `Commands/WatchdogCommand` | daemon | +| `signals.php` | `Commands/SignalsCommand` | daemon | +| `queue.php` | `Commands/QueueCommand` | daemon | +| `cache_handler.php` | `Commands/CacheHandlerCommand` | daemon | +| `connection_sync.php` | `Commands/ConnectionSyncCommand` | daemon | +| `monitor.php` | `Commands/MonitorCommand` | CLI | +| `scanner.php` | `Commands/ScannerCommand` | CLI | +| `balancer.php` | `Commands/BalancerCommand` | CLI | +| `migrate.php` | `Commands/MigrateCommand` | CLI | +| `tools.php` | `Commands/ToolsCommand` | CLI | +| `update.php` | `Commands/UpdateCommand` | CLI | +| `binaries.php` | `Commands/BinariesCommand` | CLI | +| `archive.php` | `Commands/ArchiveCommand` | CLI | +| `created.php` | `Commands/CreatedCommand` | CLI | +| `delay.php` | `Commands/DelayCommand` | CLI | +| `loopback.php` | `Commands/LoopbackCommand` | CLI | +| `llod.php` | `Commands/LlodCommand` | CLI | +| `ondemand.php` | `Commands/OndemandCommand` | CLI | +| `plex_item.php` | `Commands/PlexItemCommand` | CLI | +| `proxy.php` | `Commands/ProxyCommand` | CLI | +| `record.php` | `Commands/RecordCommand` | CLI | +| `thumbnail.php` | `Commands/ThumbnailCommand` | CLI | +| `watch_item.php` | `Commands/WatchItemCommand` | CLI | + +#### Шаг 12.3 — Миграция crons/ → cli/CronJobs/ + +**Инвентарь:** 25 cron-файлов. + +**Паттерн миграции (для каждого):** +1. Создать `cli/CronJobs/XxxCron.php` implements `CommandInterface` +2. Общий boilerplate → trait `CronTrait` (user check, lock, shutdown) +3. Вместо `loadCron()` → `execute()` +4. Proxy в старом файле для обратной совместимости crontab + +| Legacy файл | → CronJob | Заметки | +|---|---|---| +| `activity.php` | `CronJobs/ActivityCron` | | +| `backups.php` | `CronJobs/BackupsCron` | | +| `cache.php` | `CronJobs/CacheCron` | | +| `cache_engine.php` | `CronJobs/CacheEngineCron` | | +| `certbot.php` | `CronJobs/CertbotCron` | | +| `cleanup.php` | `CronJobs/CleanupCron` | | +| `epg.php` | `CronJobs/EpgCron` | Крупный: EPG-класс + парсинг XML | +| `errors.php` | `CronJobs/ErrorsCron` | | +| `lines_logs.php` | `CronJobs/LinesLogsCron` | | +| `plex.php` | `CronJobs/PlexCron` | Модуль plex | +| `providers.php` | `CronJobs/ProvidersCron` | | +| `root_mysql.php` | `CronJobs/RootMysqlCron` | Требует root | +| `root_signals.php` | `CronJobs/RootSignalsCron` | Требует root | +| `series.php` | `CronJobs/SeriesCron` | | +| `servers.php` | `CronJobs/ServersCron` | | +| `stats.php` | `CronJobs/StatsCron` | | +| `streams.php` | `CronJobs/StreamsCron` | | +| `streams_logs.php` | `CronJobs/StreamsLogsCron` | | +| `tmdb.php` | `CronJobs/TmdbCron` | Модуль tmdb | +| `tmdb_popular.php` | `CronJobs/TmdbPopularCron` | Модуль tmdb | +| `tmp.php` | `CronJobs/TmpCron` | | +| `update.php` | `CronJobs/UpdateCron` | | +| `users.php` | `CronJobs/UsersCron` | | +| `vod.php` | `CronJobs/VodCron` | | +| `watch.php` | `CronJobs/WatchCron` | Модуль watch | + +#### Шаг 12.4 — Миграция root-level скриптов + +| Legacy | → | Заметки | +|---|---|---| +| `src/service` (shell) | `cli/console.php service:{start\|stop\|restart\|reload}` | Shell-обёртка остаётся для systemd | +| `src/status` (PHP) | `cli/console.php status` | DB migrations, version check | +| `src/tools` (PHP) | `cli/console.php tools:{rescue\|access\|ports}` | Утилиты | +| `src/update` (Python) | Остаётся Python-скриптом, вызывает `cli/console.php update:post` | | + +#### Шаг 12.5 — Обновление daemons.sh и crontab + +1. `src/bin/daemons.sh` → запуск через `cli/console.php {command}` вместо `includes/cli/{script}.php` +2. Шаблон crontab → `cli/console.php cron:{name}` вместо `php crons/{name}.php` +3. `src/service` → команды start/stop через `cli/console.php` + +#### Шаг 12.6 — Удаление legacy CLI файлов + +**Предусловия:** 12.2–12.5 завершены, все процессы используют новые пути. + +**Действия:** +1. Удалить `includes/cli/*.php` (24 файла) +2. Удалить `crons/*.php` (25 файлов) → оставить директорию для crontab proxies на переходный период +3. Обновить `Makefile`: `CLI_DIRS` включает `cli/` +4. `php -l` + smoke test (запуск демонов, cron-задач) + +--- + +## 6. Фаза 13: Streaming entry points — оптимизация без ломки hot path + +> **Цель:** Минимизировать дублирование bootstrap в `www/stream/*.php`, НЕ увеличивая latency. Hot path остаётся < 50ms p99. + +> **ВАЖНО:** Streaming — священная территория. Никакого Router, никакого ServiceContainer, никакого полного autoload в hot path. Только точечные улучшения. + +#### Шаг 13.1 — Единый streaming entry point (micro-router) + +**Проблема:** 11 файлов в `www/stream/` — каждый с `require 'init.php'` + своим shutdown handler. nginx rewrite направляет на конкретный файл. Дублирование инициализации. + +**Решение:** Лёгкий micro-router (НЕ полный Router из core/): +```php +// www/stream/index.php (новый) +require_once 'init.php'; +$handler = basename($_SERVER['SCRIPT_FILENAME'], '.php'); +$map = [ + 'live' => 'live.php', + 'vod' => 'vod.php', + 'segment' => 'segment.php', + 'key' => 'key.php', + 'timeshift' => 'timeshift.php', + 'thumb' => 'thumb.php', + 'subtitle' => 'subtitle.php', + 'rtmp' => 'rtmp.php', + 'auth' => 'auth.php', +]; +if (isset($map[$handler])) { + require $map[$handler]; +} else { + http_response_code(404); +} +``` +- Один `require 'init.php'`, один `register_shutdown_function` +- nginx rewrite не меняется (по-прежнему указывает на конкретные файлы) +- Опционально: переключить nginx на единый `stream/index.php` с параметром + +**Бенчмарк:** overhead micro-router < 0.1ms (один array lookup). Допустимо. + +#### Шаг 13.2 — Дедупликация shutdown handlers + +**Проблема:** Каждый streaming-файл определяет свой `shutdown()`. 80% кода одинаковый: close DB, unlink PID, log error. + +**Решение:** +1. `streaming/Lifecycle/ShutdownHandler.php` — общий `shutdown($context)` с контекстом (live/vod/segment и т.д.) +2. В каждом файле: `register_shutdown_function([ShutdownHandler::class, 'handle'], 'live');` +3. Специфическая логика (вроде `$rServers[SERVER_ID]['time_offset']` в vod.php) — callback + +#### Шаг 13.3 — Извлечение streaming auth middleware + +**Проблема:** `stream/live.php`, `stream/vod.php`, `stream/timeshift.php` — дублируют блок аутентификации (~50 строк): token parse → user lookup → blocklist check → geo check → connection limit. + +**Решение:** +1. `streaming/Auth/StreamAuthMiddleware.php` — `authenticate(string $token, string $type): array|false` +2. Возвращает `['user' => $rUserInfo, 'stream' => $rStreamInfo]` или генерирует ошибку +3. Каждый файл: `$auth = StreamAuthMiddleware::authenticate($token, 'live');` + +**Ограничение:** Не использовать DI-container — только static-вызов с `global $db, $rSettings`. + +#### Шаг 13.4 — Ministra JS → modules/ministra/assets/ + +**Проблема:** ~80 JS-файлов в `src/ministra/` — клиентский портал для Stalker-устройств. Живут вне модульной структуры. + +**Решение:** +1. `mv src/ministra/*.js src/modules/ministra/assets/` +2. `src/ministra/portal.php` → `modules/ministra/PortalHandler.php` (уже запланировано) +3. `src/ministra/index.html` → `modules/ministra/assets/index.html` +4. nginx-конфиг: `alias /home/xc_vm/modules/ministra/assets/` +5. Обновить Makefile + +--- + +## 7. Фаза 14: CSS/JS partials — разбиение footer.php + +> **Цель:** Вынести ~800 строк page-specific inline JS из `admin/footer.php` в отдельные файлы. footer.php остаётся < 100 строк (layout-only). + +#### Шаг 14.1 — Аудит inline JS в footer.php + +1. Список всех ` + + +// Стало: +// public/assets/js/pages/streams.js — отдельный файл +// footer.php: +``` + +**Действия:** +1. Для каждого page-блока → создать `public/assets/js/pages/{page}.js` +2. В footer.php: динамический ` - - - - \ No newline at end of file diff --git a/src/admin/asns.php b/src/admin/asns.php deleted file mode 100644 index 20502a71..00000000 --- a/src/admin/asns.php +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/assets/videos/login-bg.mp4 b/src/admin/assets/videos/login-bg.mp4 deleted file mode 100644 index 658a5a81..00000000 Binary files a/src/admin/assets/videos/login-bg.mp4 and /dev/null differ diff --git a/src/admin/backups.php b/src/admin/backups.php deleted file mode 100644 index 61c2f929..00000000 --- a/src/admin/backups.php +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/bouquet.php b/src/admin/bouquet.php deleted file mode 100644 index 1689d04f..00000000 --- a/src/admin/bouquet.php +++ /dev/null @@ -1,497 +0,0 @@ -= count($rRequiredIDs)) { - } else { - $db->query('SELECT `id`, `stream_display_name` FROM `streams` WHERE `id` IN (' . implode(',', $rRequiredIDs) . ');'); - - foreach ($db->get_rows() as $rRow) { - $rNames[$rRow['id']] = $rRow['stream_display_name']; - } - } - - if (0 >= count($rBouquetSeries)) { - } else { - $db->query('SELECT `id`, `title` FROM `streams_series` WHERE `id` IN (' . implode(',', $rBouquetSeries) . ');'); - - foreach ($db->get_rows() as $rRow) { - $rSeriesNames[$rRow['id']] = $rRow['title']; - } - } - } - - $_TITLE = 'Bouquets'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; // !$__viewMode -echo '' . "\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/bouquet_order.php b/src/admin/bouquet_order.php deleted file mode 100644 index c5b77cb3..00000000 --- a/src/admin/bouquet_order.php +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/bouquet_sort.php b/src/admin/bouquet_sort.php deleted file mode 100644 index 8c3692f2..00000000 --- a/src/admin/bouquet_sort.php +++ /dev/null @@ -1,591 +0,0 @@ - - - - - - - [], 'movie' => [], 'radio' => [], 'series' => []]; -$rOrdered = ['stream' => [], 'movie' => [], 'radio' => [], 'series' => []]; -$rChannels = array_map('intval', json_decode($rBouquet['bouquet_channels'], true)); -$rMovies = array_map('intval', json_decode($rBouquet['bouquet_movies'], true)); -$rSeries = array_map('intval', json_decode($rBouquet['bouquet_series'], true)); -$rRadios = array_map('intval', json_decode($rBouquet['bouquet_radios'], true)); - -if (count($rChannels) > 0) { - $db->query('SELECT `streams`.`id`, `streams`.`type`, `streams`.`category_id`, `streams`.`stream_display_name` FROM `streams` WHERE `streams`.`type` IN (1,3) AND `streams`.`id` IN (' . implode(',', array_map('intval', $rChannels)) . ');'); - - foreach ($db->get_rows() as $C740da31596f24ef) { - $rListings['stream'][intval($C740da31596f24ef['id'])] = $C740da31596f24ef; - } -} - -if (count($rMovies) > 0) { - $db->query('SELECT `streams`.`id`, `streams`.`type`, `streams`.`category_id`, `streams`.`stream_display_name` FROM `streams` WHERE `streams`.`type` = 2 AND `streams`.`id` IN (' . implode(',', array_map('intval', $rMovies)) . ');'); - - foreach ($db->get_rows() as $C740da31596f24ef) { - $rListings['movie'][intval($C740da31596f24ef['id'])] = $C740da31596f24ef; - } -} - -if (count($rRadios) > 0) { - $db->query('SELECT `streams`.`id`, `streams`.`type`, `streams`.`category_id`, `streams`.`stream_display_name` FROM `streams` WHERE `streams`.`type` = 4 AND `streams`.`id` IN (' . implode(',', array_map('intval', $rRadios)) . ');'); - - foreach ($db->get_rows() as $C740da31596f24ef) { - $rListings['radio'][intval($C740da31596f24ef['id'])] = $C740da31596f24ef; - } -} - -if (count($rSeries) > 0) { - $db->query('SELECT `streams_series`.`id`, `streams_series`.`category_id`, `streams_series`.`title` FROM `streams_series` WHERE `streams_series`.`id` IN (' . implode(',', array_map('intval', $rSeries)) . ');'); - - foreach ($db->get_rows() as $C740da31596f24ef) { - $rListings['series'][intval($C740da31596f24ef['id'])] = $C740da31596f24ef; - } -} - -foreach ($rChannels as $Fe753328765ad26c) { - if (isset($rListings['stream'][intval($Fe753328765ad26c)])) { - $rOrdered['stream'][] = $rListings['stream'][intval($Fe753328765ad26c)]; - } -} - -foreach ($rMovies as $a417725f28d75ef7) { - if (isset($rListings['movie'][intval($a417725f28d75ef7)])) { - $rOrdered['movie'][] = $rListings['movie'][intval($a417725f28d75ef7)]; - } -} - -foreach ($rRadios as $c804bfe21a4f0b26) { - if (isset($rListings['radio'][intval($c804bfe21a4f0b26)])) { - $rOrdered['radio'][] = $rListings['radio'][intval($c804bfe21a4f0b26)]; - } -} - -foreach ($rSeries as $bb2621204e39e62d) { - if (isset($rListings['series'][intval($bb2621204e39e62d)])) { - $rOrdered['series'][] = $rListings['series'][intval($bb2621204e39e62d)]; - } -} -$_TITLE = 'Bouquet Sort'; - -require_once __DIR__ . '/../public/Views/layouts/admin.php'; -renderUnifiedLayoutHeader('admin'); - -?> - -
> -
-
-
-
-
- -
-

-
-
-
-
-
- - - -
-
-
- - -
- -
-
-
-
- -
-
-
    -
  • - - -
  • -
-
-
- -
-
-
    -
  • - - - - - -
  • -
  • - -
  • -
-
-
-
-
- -
-
-
    -
  • - - -
  • -
-
-
- -
-
-
    -
  • - - - - - -
  • -
  • - -
  • -
-
-
-
-
- -
-
-
    -
  • - - -
  • -
-
-
- -
-
-
    -
  • - - - - - -
  • -
  • - -
  • -
-
-
-
-
- -
-
-
    -
  • - - -
  • -
-
-
- -
-
-
    -
  • - - - - - -
  • -
  • - -
  • -
-
-
-
-
-
-
-
-
-
-
- - - - - - - diff --git a/src/admin/bouquets.php b/src/admin/bouquets.php deleted file mode 100644 index 3a0a1ef5..00000000 --- a/src/admin/bouquets.php +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - -
style="display: none;" > -
-
-
-
-
- -
-

-
-
-
-
-
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- -- - -
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/cache.php b/src/admin/cache.php deleted file mode 100644 index c37e15b9..00000000 --- a/src/admin/cache.php +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/channel_order.php b/src/admin/channel_order.php deleted file mode 100644 index 4b54476a..00000000 --- a/src/admin/channel_order.php +++ /dev/null @@ -1,570 +0,0 @@ - - array(), 'movie' => array(), 'series' => array(), 'radio' => array()); - $db->query('SELECT COUNT(`id`) AS `count` FROM `streams`;'); - $rCount = $db->get_row()['count']; - - if (!($rCount <= 50000 || $rOverride)) { - } else { - $db->query('SELECT `id`, `type`, `stream_display_name`, `category_id` FROM `streams` ORDER BY `order` ASC, `stream_display_name` ASC;'); - - if (0 >= $db->num_rows()) { - } else { - foreach ($db->get_rows() as $rRow) { - if ($rRow['type'] == 1 || $rRow['type'] == 3) { - $rOrdered['stream'][] = $rRow; - } else { - if ($rRow['type'] == 2) { - $rOrdered['movie'][] = $rRow; - } else { - if ($rRow['type'] == 4) { - $rOrdered['radio'][] = $rRow; - } else { - if ($rRow['type'] != 5) { - } else { - $rOrdered['series'][] = $rRow; - } - } - } - } - } - } - } - - $_TITLE = 'Channel Order'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); ?> - - - - - - - - \ No newline at end of file diff --git a/src/admin/client_logs.php b/src/admin/client_logs.php deleted file mode 100644 index 2b9b4c14..00000000 --- a/src/admin/client_logs.php +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/admin/code.php b/src/admin/code.php deleted file mode 100644 index bb4ade34..00000000 --- a/src/admin/code.php +++ /dev/null @@ -1,424 +0,0 @@ - - - -
- style="display: none;" > -
-
-
-
-
- -
-

-

-
-
-
-
-
- - - -
-
-
- - - -
- -
-
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
- - data-plugin="switchery" class="js-switch" - data-color="#039cfd" /> -
-
-
-
-
    -
  • - -
  • -
-
-
-
-
-
- -
-
- > - -
-
- -
-
-
-
    -
  • - -
  • -
  • - - -
  • -
  • - Next -
  • -
-
-
-
-
-
- -
- -
- - -
-
-
-
- -
- -
-
-
-
- - - - - - - -
-
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/codes.php b/src/admin/codes.php deleted file mode 100644 index 807ba0ff..00000000 --- a/src/admin/codes.php +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - -
style="display: none;" > -
-
-
-
-
- -
-

Access Codes

-
-
-
-
-
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - -
Access CodeTypeEnabled
- - - - - - -
- - -
-
-
-
-
-
-
-
- - - - - - - diff --git a/src/admin/created_channel.php b/src/admin/created_channel.php deleted file mode 100644 index 75fb7d6b..00000000 --- a/src/admin/created_channel.php +++ /dev/null @@ -1,756 +0,0 @@ - - 'source', - 'parent' => '#', - 'text' => "Online", - 'icon' => 'mdi mdi-play', - 'state' => ['opened' => true] - ], - [ - 'id' => 'offline', - 'parent' => '#', - 'text' => "Offline", - 'icon' => 'mdi mdi-stop', - 'state' => ['opened' => true] - ] - ]; - - if (isset($rChannel)) { - $rProperties = json_decode($rChannel['movie_properties'], true); - - if (!$rProperties) { - $rProperties = ['type' => $rChannel['series_no'] > 0 ? 0 : 1]; - } - - $rChannelSys = StreamRepository::getSystemRows(RequestManager::getAll()['id']); - - foreach ($rServers as $rServer) { - if (isset($rChannelSys[intval($rServer['id'])])) { - $rParent = $rChannelSys[intval($rServer['id'])]['parent_id'] != 0 - ? intval($rChannelSys[intval($rServer['id'])]['parent_id']) - : (!$rChannelSys[intval($rServer['id'])]['on_demand'] ? 'source' : null); - } else { - $rParent = 'offline'; - } - - if ($rParent !== null) { - $rServerTree[] = [ - 'id' => $rServer['id'], - 'parent' => $rParent, - 'text' => $rServer['server_name'], - 'icon' => 'mdi mdi-server-network', - 'state' => ['opened' => true] - ]; - } - } - } else { - foreach ($rServers as $rServer) { - $rServerTree[] = [ - 'id' => $rServer['id'], - 'parent' => 'offline', - 'text' => $rServer['server_name'], - 'icon' => 'mdi mdi-server-network', - 'state' => ['opened' => true] - ]; - } - } - - $_TITLE = 'Created Channel'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -?> -
> -
-
-
-
-
- -
-

-
-
-
-
-
- $rEncodeError) { - ?> - - -
-
-
- - - - - - - - -
- -
-
-
-
-
- -
- -
-
-
- -
- -
- -
-
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- - -
- -
-
-
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- - - - - - - - - - -
IDNameCategory / SeriesActions
-
-
-
-
    -
  • - -
  • - -
  • - Next -
  • -
    -
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
- -
- -
- -
-
-
- -
-
-
-
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - $rSources): ?> - - - - - - - - - -
Push FromRTMP URL
- - - -
- -
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
- -
-
-
- - -
- -
- - -
- -
-
-
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
-
-
- -
- -
-
-
- -
- -
- -
-
-
-
-
- - - - - - - - -
Directory
-
-
- - - - - - - - -
Filename
-
-
-
- -
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/created_channel_mass.php b/src/admin/created_channel_mass.php deleted file mode 100644 index af05bc4b..00000000 --- a/src/admin/created_channel_mass.php +++ /dev/null @@ -1,648 +0,0 @@ - - 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); - - foreach ($rServers as $rServer) { - $rServerTree[] = array('id' => intval($rServer['id']), 'parent' => 'offline', 'text' => htmlspecialchars($rServer['server_name']), 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - $_TITLE = 'Mass Edit Channels'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); ?> - - - - - - - - \ No newline at end of file diff --git a/src/admin/created_channels.php b/src/admin/created_channels.php deleted file mode 100644 index cd4363e7..00000000 --- a/src/admin/created_channels.php +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/credit_logs.php b/src/admin/credit_logs.php deleted file mode 100644 index ae601133..00000000 --- a/src/admin/credit_logs.php +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/dashboard.php b/src/admin/dashboard.php deleted file mode 100644 index 6eae82f8..00000000 --- a/src/admin/dashboard.php +++ /dev/null @@ -1,928 +0,0 @@ - - array('secondary', '#7e8e9d', '#ffffff'), 2 => array('secondary', '#7e8e9d', '#ffffff'), 3 => array('secondary', '#7e8e9d', '#ffffff'), 4 => array('secondary', '#7e8e9d', '#ffffff')); - $rColourMap = array(array('#7e8e9d', 'bg-map-dark-1'), array('#6c7b8a', 'bg-map-dark-2'), array('#5a6977', 'bg-map-dark-3'), array('#485765', 'bg-map-dark-4'), array('#374654', 'bg-map-dark-5'), array('#273643', 'bg-map-dark-6')); - } else { - $rColours = array(1 => array('purple', '#675db7', '#675db7'), 2 => array('success', '#23b397', '#23b397'), 3 => array('pink', '#e36498', '#e36498'), 4 => array('info', '#56C3D6', '#56C3D6')); - $rColourMap = array(array('#23b397', 'bg-success'), array('#56c2d6', 'bg-info'), array('#5089de', 'bg-primary'), array('#675db7', 'bg-purple'), array('#e36498', 'bg-pink'), array('#98a6ad', 'bg-secondary')); - } - - if (!isset(RequestManager::getAll()['server_id']) || isset($rServers[RequestManager::getAll()['server_id']])) { - } else { - goHome(); - } - - $rConnectionMap = array(); - $rConnectionCount = 0; - - if (isset(RequestManager::getAll()['server_id'])) { - $db->query('SELECT `geoip_country_code`, COUNT(`geoip_country_code`) AS `count` FROM `lines_activity` WHERE (`server_id` = ? OR `proxy_id` = ?) GROUP BY `geoip_country_code` ORDER BY `count` DESC;', intval(RequestManager::getAll()['server_id']), intval(RequestManager::getAll()['server_id'])); - } else { - $db->query('SELECT `geoip_country_code`, COUNT(`geoip_country_code`) AS `count` FROM `lines_activity` GROUP BY `geoip_country_code` ORDER BY `count` DESC;'); - } - - if (0 >= $db->num_rows()) { - } else { - $i = 0; - - foreach ($db->get_rows() as $rRow) { - if ($i < count($rColourMap)) { - $rRow['colour'] = $rColourMap[$i]; - } else { - $rRow['colour'] = $rColourMap[count($rColourMap) - 1]; - } - - if (isset($rCountryCodes[$rRow['geoip_country_code']])) { - $rRow['name'] = $rCountryCodes[$rRow['geoip_country_code']]; - } else { - $rRow['name'] = 'Unknown Country'; - } - - $rConnectionCount += $rRow['count']; - $rConnectionMap[] = $rRow; - $i++; - } - } - - if (isset(RequestManager::getAll()['server_id'])) { - } else { - $rLimit = 3600; - $rTime = time(); - $rNearestRange = $rTime - $rLimit; - $rServerStats = array(); - $db->query('SELECT * FROM `servers_stats` WHERE `time` >= ? ORDER BY `time` ASC;', $rNearestRange); - - if (0 >= $db->num_rows()) { - } else { - foreach ($db->get_rows() as $rRow) { - $rServerStats[intval($rRow['server_id'])][] = $rRow['cpu']; - } - } - } - - $rOrderedServers = $rServers; - array_multisort(array_column($rOrderedServers, 'order'), SORT_ASC, $rOrderedServers); - - $_TITLE = 'Dashboard'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); - ?> - -
-
- - -
- - - - -
-
-
-
-
-
- -
-
-
-
-

0 Mbps

-

Network Output

-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-

0 Mbps

-

Network Input

-
-
-
-
-
-
- -
-
-
-

Service Status

-
-
- - - dbh->query("SELECT JSON_CONTAINS('0', 0, '\$') AS `json_test`;"); - } catch (Exception $e) { - $rHasError = true; - ?> -
- -
- MariaDB Outdated! - You're using an old version of MariaDB. Please update to at least v10.5 in order for XC_VM to work correctly.
-


-
-
- -
- -
- Database Incomplete - Your database is outdated, please run /home/xc_vm/status as root user to update your tables.
-


-
-
- 600) { - $rHasError = true; - ?> -
- -
- Root Crons Missing - Root cronjob hasn't run recently, please check root crontab or run /home/xc_vm/status
-


-
-
- - - -
-
-
-
-
- - - -
-
-
-

CPU & Memory

-
-
-
-
-
-
-
-
-
-

Network Traffic

-
-
-
-
-
-
- - - - -
-
-
-

Connections

-
-
-
-
-
-
- - - -
-
-
-

Connections by Location

-
-
-
-
-
-
- -
-
- % -
-
-
-
- -
-
-
-
-
-
- - - - - - - - - - -
- -
-
- -
-
-
-
-
-
-
-
-
-

-
- -
-

-
- -
-
-

CPU

-
-
-
-
-
-
-
-
-

Streams Live

-
- -
-

Down

-
- -
-
-

MEM

-
-
-
-
-
-
-
-
-

Requests /sec

-
-
- -
-
-

-
-
- -
-
-
-

IO

-
-
-
-
-
-
-
-
-

 (Mbps)

-
-
- -
-
-

 (Mbps)

-
-
- -
-
-
-

DISK

-
-
-
-
-
-
-
- -
- - - - - - - - - - - - -
- - - -
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/edit_profile.php b/src/admin/edit_profile.php deleted file mode 100644 index 0802fa6c..00000000 --- a/src/admin/edit_profile.php +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/enigma.php b/src/admin/enigma.php deleted file mode 100644 index c06e5e30..00000000 --- a/src/admin/enigma.php +++ /dev/null @@ -1,449 +0,0 @@ - array()); - } - - $_TITLE = 'Enigma Device'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; // !$__viewMode -echo '' . "\r\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/enigma_mass.php b/src/admin/enigma_mass.php deleted file mode 100644 index 2be8ce09..00000000 --- a/src/admin/enigma_mass.php +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/enigmas.php b/src/admin/enigmas.php deleted file mode 100644 index 3ce5e3d6..00000000 --- a/src/admin/enigmas.php +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/epg.php b/src/admin/epg.php deleted file mode 100644 index b20e2624..00000000 --- a/src/admin/epg.php +++ /dev/null @@ -1,291 +0,0 @@ - - - -
> -
-
-
-
-
- -
-

-
-
-
-
-
-
-
-
- - - -
- -
-
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
- -
- -
-
-
-
-
    -
  • - -
  • -
-
-
-
-
- - - - - - - - - - - $rEPGRow) { ?> - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/epg_view.php b/src/admin/epg_view.php deleted file mode 100644 index f25abdb9..00000000 --- a/src/admin/epg_view.php +++ /dev/null @@ -1,328 +0,0 @@ - - 0) { - $rWhere[] = "JSON_CONTAINS(`category_id`, ?, '\$')"; - $rWhereV[] = json_encode(intval(RequestManager::getAll()['category'])); - } - - if (!empty(RequestManager::getAll()['search'])) { - $rWhere[] = '(`stream_display_name` LIKE ? OR `id` LIKE ?)'; - $rWhereV[] = '%' . RequestManager::getAll()['search'] . '%'; - $rWhereV[] = RequestManager::getAll()['search']; - } - - $rWhereString = (count($rWhere) > 0) ? 'WHERE ' . implode(' AND ', $rWhere) : ''; - - $rOrderBy = '`stream_display_name` ASC'; - if (!empty(RequestManager::getAll()['sort']) && in_array(RequestManager::getAll()['sort'], array('name', 'added'))) { - $rOrderBy = $rOrder[RequestManager::getAll()['sort']]; - } - - $rStreamIDs = array(); - $db->query('SELECT COUNT(`id`) AS `count` FROM `streams` ' . $rWhereString . ';', ...$rWhereV); - $rCount = $db->get_row()['count']; - $db->query('SELECT `id` FROM `streams` ' . $rWhereString . ' ORDER BY ' . $rOrderBy . ' LIMIT ' . $rStart . ', ' . $rLimit . ';', ...$rWhereV); - - foreach ($db->get_rows() as $rRow) { - $rStreamIDs[] = $rRow['id']; - } - $rPages = ceil($rCount / $rLimit); - $rPagination = array(); - - foreach (range(max($rPageInt - 2, 1), min($rPageInt + 2, $rPages)) as $i) { - $rPagination[] = $i; - } - $_TITLE = 'TV Guide'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); - ?> - - - - - - - - \ No newline at end of file diff --git a/src/admin/epgs.php b/src/admin/epgs.php deleted file mode 100644 index bb151c9f..00000000 --- a/src/admin/epgs.php +++ /dev/null @@ -1,235 +0,0 @@ - - - -
> -
-
-
-
-
- -
-

-
-
-
-
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
Channels
- -
- - - -
- -
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/episode.php b/src/admin/episode.php deleted file mode 100644 index 0c5e4109..00000000 --- a/src/admin/episode.php +++ /dev/null @@ -1,1103 +0,0 @@ - -query('SELECT `series_id` FROM `streams_episodes` WHERE `stream_id` = ?;', intval(RequestManager::getAll()['id'])); - - if (0 >= $db->num_rows()) { - } else { - RequestManager::update('sid', intval($db->get_row()['series_id'])); - } - } - - if ($rSeriesArr = getSerie(RequestManager::getAll()['sid'])) { - } else { - goHome(); - } - - if (!isset(RequestManager::getAll()['id'])) { - } else { - $rEpisode = StreamRepository::getById(RequestManager::getAll()['id']); - - if ($rEpisode && $rEpisode['type'] == 5) { - } else { - goHome(); - } - } - - $rServerTree = array(array('id' => 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); - - if (isset($rEpisode)) { - $db->query('SELECT `season_num`, `episode_num` FROM `streams_episodes` WHERE `stream_id` = ?;', $rEpisode['id']); - - if (0 < $db->num_rows()) { - $rRow = $db->get_row(); - $rEpisode['episode'] = intval($rRow['episode_num']); - $rEpisode['season'] = intval($rRow['season_num']); - } else { - $rEpisode['episode'] = 0; - $rEpisode['season'] = 0; - } - - $rEpisode['properties'] = json_decode($rEpisode['movie_properties'], true); - $rStreamSys = StreamRepository::getSystemRows(RequestManager::getAll()['id']); - - foreach ($rServers as $rServer) { - if (isset($rStreamSys[intval($rServer['id'])])) { - $rParent = 'source'; - } else { - $rParent = 'offline'; - } - - $rServerTree[] = array('id' => $rServer['id'], 'parent' => $rParent, 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - } else { - if (Authorization::check('adv', 'add_episode')) { - foreach ($rServers as $rServer) { - $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - - if (isset(RequestManager::getAll()['multi'])) { - if (Authorization::check('adv', 'import_episodes')) { - $rMulti = true; - } else { - exit(); - } - } - } else { - exit(); - } - } - - $_TITLE = 'Episode'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -echo '' . "\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/episodes.php b/src/admin/episodes.php deleted file mode 100644 index d45c3805..00000000 --- a/src/admin/episodes.php +++ /dev/null @@ -1,487 +0,0 @@ - -query('SELECT DISTINCT(`audio_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `audio_codec` IS NOT NULL AND `type` = 5 ORDER BY `audio_codec` ASC;'); - - foreach ($db->get_rows() as $rRow) { - $rAudioCodecs[] = $rRow['audio_codec']; - } - $db->query('SELECT DISTINCT(`video_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `video_codec` IS NOT NULL AND `type` = 5 ORDER BY `video_codec` ASC;'); - - foreach ($db->get_rows() as $rRow) { - $rVideoCodecs[] = $rRow['video_codec']; - } - $_TITLE = 'Episodes'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -echo '' . "\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/episodes_mass.php b/src/admin/episodes_mass.php deleted file mode 100644 index d2307129..00000000 --- a/src/admin/episodes_mass.php +++ /dev/null @@ -1,475 +0,0 @@ - - 'source', - 'parent' => '#', - 'text' => "Active", - 'icon' => 'mdi mdi-play', - 'state' => array('opened' => true) - ), - array( - 'id' => 'offline', - 'parent' => '#', - 'text' => "Offline", - 'icon' => 'mdi mdi-stop', - 'state' => array('opened' => true) - ) - ); - - foreach ($rServers as $rServer) { - $rServerTree[] = array( - 'id' => $rServer['id'], - 'parent' => 'offline', - 'text' => $rServer['server_name'], - 'icon' => 'mdi mdi-server-network', - 'state' => array('opened' => true) - ); - } - - $_TITLE = 'Mass Edit Episodes'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); - ?> - -
> -
-
-
-
-
- -
-

-
-
-
-
-
- - - -
-
-
- - - -
- - -
- -
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - - - - - - - - - - - -
Image
- -
- - -
-
-
-

- -

- -
-
- - -
- -
- -
-
- -
-
- - -
- -
- -
-
- -
-
- - -
- -
- -
-
- - -
-
- - -
- -
- -
-
- - -
-
- - -
- -
- -
-
- - -
-
- - -
- -
- -
-
- - -
-
- - -
- -
- -
-
- -
-
- -
    -
  • - -
  • -
  • - -
  • -
-
- - -
-
-
- -
-
- - -
- -
-
-
-
- -
-
- -
- -
-
-
-
- -
- -
-
- -
- -
-
-
-
- -
    -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/fingerprint.php b/src/admin/fingerprint.php deleted file mode 100644 index 5bc3f302..00000000 --- a/src/admin/fingerprint.php +++ /dev/null @@ -1,336 +0,0 @@ - - - -
- -
-
-
-
-
- -
-

-
-
-
-
-
-
-
-
- -
-
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
- - - - - - - - - - - - -
-
-
-
-
- -
-
- -
- -
- -
- -
- -
- -
- -
- -
-
- -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - -
UsernameStreamIPDuration
-
-
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/group.php b/src/admin/group.php deleted file mode 100644 index e5645d05..00000000 --- a/src/admin/group.php +++ /dev/null @@ -1,824 +0,0 @@ -query("SELECT `id` FROM `users_packages` WHERE JSON_CONTAINS(`groups`, ?, '\$');", $rGroup['group_id']); - - foreach ($db->get_rows() as $rRow) { - $rPackageIDs[] = $rRow['id']; - } - $rGroupIDs = json_decode($rGroup['subresellers'], true); - $rNotice = html_entity_decode($rGroup['notice_html']); - $rNotice = preg_replace('#]*+>#i', '', $rNotice); - $rNotice = preg_replace('#]*+>#i', '', $rNotice); - $rNotice = str_replace(array('&', '<', '>'), array('&amp;', '&lt;', '&gt;'), $rNotice); - $rNotice = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $rNotice); - $rNotice = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $rNotice); - $rNotice = html_entity_decode($rNotice, ENT_COMPAT, 'UTF-8'); - $rNotice = preg_replace("#(<[^>]+?[\\x00-\\x20\"'])(?:on|xmlns)[^>]*+[>\\b]?#iu", '$1>', $rNotice); - $rNotice = preg_replace("#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu", '$1=$2nojavascript...', $rNotice); - $rNotice = preg_replace("#([a-z]*)[\\x00-\\x20]*=(['\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu", '$1=$2novbscript...', $rNotice); - $rNotice = preg_replace("#([a-z]*)[\\x00-\\x20]*=(['\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u", '$1=$2nomozbinding...', $rNotice); - $rNotice = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i", '$1>', $rNotice); - $rNotice = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i", '$1>', $rNotice); - $rNotice = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu", '$1>', $rNotice); - } - - $_TITLE = 'Group'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; // !$__viewMode -echo '' . "\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/groups.php b/src/admin/groups.php deleted file mode 100644 index f868e52a..00000000 --- a/src/admin/groups.php +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/hmac.php b/src/admin/hmac.php deleted file mode 100644 index b2cabd5b..00000000 --- a/src/admin/hmac.php +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/admin/hmacs.php b/src/admin/hmacs.php deleted file mode 100644 index e07e732a..00000000 --- a/src/admin/hmacs.php +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/ip.php b/src/admin/ip.php deleted file mode 100644 index 37d77f14..00000000 --- a/src/admin/ip.php +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/admin/ips.php b/src/admin/ips.php deleted file mode 100644 index 598f883e..00000000 --- a/src/admin/ips.php +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/isp.php b/src/admin/isp.php deleted file mode 100644 index 5bb5123b..00000000 --- a/src/admin/isp.php +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/admin/isps.php b/src/admin/isps.php deleted file mode 100644 index a66852e2..00000000 --- a/src/admin/isps.php +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/line.php b/src/admin/line.php deleted file mode 100644 index e0383108..00000000 --- a/src/admin/line.php +++ /dev/null @@ -1,545 +0,0 @@ -query('SELECT `mag_id` FROM `mag_devices` WHERE `user_id` = ?;', $rLine['id']); - - if ($db->num_rows() > 0) { - header('Location: mag?id=' . intval($db->get_row()['mag_id'])); - exit; - } else { - goHome(); - } - } - - if ($rLine['is_e2']) { - $db->query('SELECT `device_id` FROM `enigma2_devices` WHERE `user_id` = ?;', $rLine['id']); - - if ($db->num_rows() > 0) { - header('Location: enigma?id=' . intval($db->get_row()['device_id'])); - exit; - } else { - goHome(); - } - } - } else { - if (!Authorization::check('adv', 'add_user')) { - goHome(); - } - } - - $rRegisteredUsers = UserRepository::getRegisteredUsers(); - $_TITLE = 'Line'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -?> - - - - - - - - \ No newline at end of file diff --git a/src/admin/line_activity.php b/src/admin/line_activity.php deleted file mode 100644 index 729e9d12..00000000 --- a/src/admin/line_activity.php +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/line_ips.php b/src/admin/line_ips.php deleted file mode 100644 index c50eed03..00000000 --- a/src/admin/line_ips.php +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/line_mass.php b/src/admin/line_mass.php deleted file mode 100644 index 1ede6b9d..00000000 --- a/src/admin/line_mass.php +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/admin/lines.php b/src/admin/lines.php deleted file mode 100644 index d43fee6d..00000000 --- a/src/admin/lines.php +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/live_connections.php b/src/admin/live_connections.php deleted file mode 100644 index f7dcf2ae..00000000 --- a/src/admin/live_connections.php +++ /dev/null @@ -1,347 +0,0 @@ - - - -
> -
-
-
-
-
- -
-

-
-
-
-
-
-
-
-
- -
- -
-
- -
-
- -
- -
- -
- -
- -
-
- -
-
- -
-
- -
-
- -
- -
- -
- -
- - - - - - - - - - - - - - - - - - -
IDQualityLineStreamServerPlayerISPIPDurationOutputRestreamer
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/login_logs.php b/src/admin/login_logs.php deleted file mode 100644 index faa0c809..00000000 --- a/src/admin/login_logs.php +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/mag.php b/src/admin/mag.php deleted file mode 100644 index 1654f872..00000000 --- a/src/admin/mag.php +++ /dev/null @@ -1,737 +0,0 @@ - - array()); - } - - $_TITLE = 'MAG Device'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); ?> - - -
> -
-
-
-
-
- -
-

MAG Device

-
-
-
-
-
-
-
-
- - - - -
- -
-
-
-
-
- -
- -
-
-
- -
- -
-
- Unpair -
-
-
-
- -
- -
-
- Clear -
-
-
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
- -
- -
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
-
- -
- -
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
- -
-
-
- -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
- -
-
-
-
- -
- -
- - -
-
-
-
- -
- -
-
-
-
-
- -
-
-
-
- -
- - - - - - - - - - - - - - > - - - - - - - - - -
IDBouquet Name
-
-
-
- -
-
-
-
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/mag_events.php b/src/admin/mag_events.php deleted file mode 100644 index eef17a77..00000000 --- a/src/admin/mag_events.php +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/mag_mass.php b/src/admin/mag_mass.php deleted file mode 100644 index c4401403..00000000 --- a/src/admin/mag_mass.php +++ /dev/null @@ -1,532 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/mags.php b/src/admin/mags.php deleted file mode 100644 index ad05632b..00000000 --- a/src/admin/mags.php +++ /dev/null @@ -1,298 +0,0 @@ - - - -
> -
-
-
-
-
- -
-

-
-
-
-
-
- - - -
-
-
-
- -
- -
- -
-
- -
-
- -
- -
- -
-
- - - - - - - - - - - - - - - - - -
DeviceLast Connection
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/magscan_settings.php b/src/admin/magscan_settings.php deleted file mode 100644 index ed564e7a..00000000 --- a/src/admin/magscan_settings.php +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/admin/mass_delete.php b/src/admin/mass_delete.php deleted file mode 100644 index 9194d1ec..00000000 --- a/src/admin/mass_delete.php +++ /dev/null @@ -1,894 +0,0 @@ - - - -
style="display: none;" > -
-
-
-
-
- -
-

-
-
-
-
-
- - - -
-
-
- -
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- - - - - - - - - - - - -
IDIconStream NameCategoryServerStatus
-
-
    -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- - - - - - - - - - - - - -
ImageTMDb
-
-
    -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- - - - - - - - - - - - -
IDIconStation NameCategoryStatus
-
-
    -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
- - - - - - - - - - - - - - - -
IDImageNameCategorySeasonsEpisodesTMDbFirst AiredLast Updated
-
-
    -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- - - - - - - - - - - -
Image
-
-
    -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
- - - - - - - - - - - - - - - - - - - -
IDUsernameOwnerStatusTrialRestreamerConnectionsExpiration
-
-
    -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
- - - - - - - - - - - - - - - - -
IDUsernameOwnerIPTypeStatusCreditsUsersLast LoginActions
-
-
    -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
- - - - - - - - - - - - - - - - -
Device
-
-
    -
  • - -
  • -
-
-
-
-
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
- - - - - - - - - - - - - - - - -
Device
-
-
    -
  • - -
  • -
-
-
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/movie.php b/src/admin/movie.php deleted file mode 100644 index 3525a743..00000000 --- a/src/admin/movie.php +++ /dev/null @@ -1,849 +0,0 @@ - - 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); - $activeStreamingServers = array(); - - if (isset($rMovie)) { - $rMovie['properties'] = json_decode($rMovie['movie_properties'], true); - $rStreamSys = StreamRepository::getSystemRows(RequestManager::getAll()['id']); - - // Getting and extracting the path to a movie - $streamSourceJson = $rMovie['stream_source'] ?? ''; - $rMovieSource = json_decode($streamSourceJson, true); - if (!is_array($rMovieSource)) { - $rMovieSource = ['']; - } - $rSource = $rMovieSource[0] ?? ''; - if (str_starts_with($rSource, 's:')) { - $parts = explode(':', $rSource, 3); - $rPathSources = (count($parts) >= 3) ? urldecode($parts[2]) : ''; - } else { - $rPathSources = $rSource; - } - - foreach ($rServers as $rServer) { - if ($rServer['direct_source'] == 0 && $rServer['stream_status'] == 1) { - $activeStreamingServers[] = intval($rServer['id']); - } - - if (isset($rStreamSys[intval($rServer['id'])])) { - $rParent = 'source'; - } else { - $rParent = 'offline'; - } - - $rServerTree[] = array('id' => $rServer['id'], 'parent' => $rParent, 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - } else { - foreach ($rServers as $rServer) { - $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - } - - $_TITLE = 'Movie'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); - ?> - - -
style="display: none;" > -
-
-
-
-
- -
-

- -

-
-
-
-
-
- - - - - - - - - $rEncodeError): - if (in_array(intval($rServerID), $activeStreamingServers)): - ?> - - - - - - - $rEncodeError): ?> - - - - - - -
-
- enctype="multipart/form-data" action="#" method="POST" data-parsley-validate=""> - - - - - - - -
- -
-
-
-
- -
- -
- " required data-parsley-trigger="change"> -
-
- -
-
- -
- -
- -
-
- -
-
- -
- -
- -
- - - - -
-
-
- -

- Importing Movies using this method will parse your M3U or folder and push the individual episodes through Watch Folder. If you have category and bouquet allocation set up in Watch Folder Settings then they will be used here too. -

-
- -
-
- - - - - - - - -
-
-
-
-
- -
- -
-
-
- - -
- -
- - -
-
-
- -
- - -
-
- -
- -
- -
- -
- -
-
- -
-
-
    -
  • - -
  • -
-
-
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
- -
-
- -
- -
-
-
- -
- -
-
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
- -
-
-
-
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
- - -
- -
- -
- -
-
-
- -
- -
- -
-
-
- -
- -
-
-
-
-
    -
  • - -
  • -
  • - -
  • -
-
- -
-
-
-
- -
-
-
-
-
- -
- -
-
-
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
- -
-
-
- -
- -
-
-
- -
- -
- -
-
-
- -
- -
- -
- - -
-
-
- -
-
- - - - - - - - -
-
-
- - - - - - - - -
-
-
- -
- -
- -
-
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/movie_mass.php b/src/admin/movie_mass.php deleted file mode 100644 index 2cc6fea9..00000000 --- a/src/admin/movie_mass.php +++ /dev/null @@ -1,471 +0,0 @@ - - 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); - - foreach ($rServers as $rServer) { - $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - $_TITLE = 'Mass Edit Movies'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); - ?> - - - - - - - - \ No newline at end of file diff --git a/src/admin/movies.php b/src/admin/movies.php deleted file mode 100644 index dad9e5aa..00000000 --- a/src/admin/movies.php +++ /dev/null @@ -1,361 +0,0 @@ - - query('SELECT DISTINCT(`audio_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `audio_codec` IS NOT NULL AND `type` = 2 ORDER BY `audio_codec` ASC;'); - foreach ($db->get_rows() as $rRow) { - $rAudioCodecs[] = $rRow['audio_codec']; - } - - $db->query('SELECT DISTINCT(`video_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `video_codec` IS NOT NULL AND `type` = 2 ORDER BY `video_codec` ASC;'); - foreach ($db->get_rows() as $rRow) { - $rVideoCodecs[] = $rRow['video_codec']; - } - - $_TITLE = 'Movies'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); - ?> - - -
> -
-
-
-
-
- -
-

-
-
-
-
-
- - - - - - -
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - -
ImageTMDb
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/mysql_syslog.php b/src/admin/mysql_syslog.php deleted file mode 100644 index 0613978e..00000000 --- a/src/admin/mysql_syslog.php +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - - - -
style="display: none;" > -
-
-
-
-
- -
-

System Logs

-
-
-
-
-
-
-
- - - - - - - - - - - - -
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/ondemand.php b/src/admin/ondemand.php deleted file mode 100644 index 8b380aa4..00000000 --- a/src/admin/ondemand.php +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - -
style="display: none;" > -
-
-
-
-
- -
-

On-Demand Scanner

-
-
-
-
-
- - - -
-
-
-
- -
-
- -
-
- -
-
- -
- -
- -
-
- - - - - - - - - - - - - - -
IDIconStreamServerStatusResponseStream InfoLast Scanned
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/package.php b/src/admin/package.php deleted file mode 100644 index d66ee28d..00000000 --- a/src/admin/package.php +++ /dev/null @@ -1,671 +0,0 @@ - - '', 'name' => 'Off'), array('id' => 'A1', 'name' => 'Anonymous Proxy'), array('id' => 'A2', 'name' => 'Satellite Provider'), array('id' => 'O1', 'name' => 'Other Country'), array('id' => 'AF', 'name' => 'Afghanistan'), array('id' => 'AX', 'name' => 'Aland Islands'), array('id' => 'AL', 'name' => 'Albania'), array('id' => 'DZ', 'name' => 'Algeria'), array('id' => 'AS', 'name' => 'American Samoa'), array('id' => 'AD', 'name' => 'Andorra'), array('id' => 'AO', 'name' => 'Angola'), array('id' => 'AI', 'name' => 'Anguilla'), array('id' => 'AQ', 'name' => 'Antarctica'), array('id' => 'AG', 'name' => 'Antigua And Barbuda'), array('id' => 'AR', 'name' => 'Argentina'), array('id' => 'AM', 'name' => 'Armenia'), array('id' => 'AW', 'name' => 'Aruba'), array('id' => 'AU', 'name' => 'Australia'), array('id' => 'AT', 'name' => 'Austria'), array('id' => 'AZ', 'name' => 'Azerbaijan'), array('id' => 'BS', 'name' => 'Bahamas'), array('id' => 'BH', 'name' => 'Bahrain'), array('id' => 'BD', 'name' => 'Bangladesh'), array('id' => 'BB', 'name' => 'Barbados'), array('id' => 'BY', 'name' => 'Belarus'), array('id' => 'BE', 'name' => 'Belgium'), array('id' => 'BZ', 'name' => 'Belize'), array('id' => 'BJ', 'name' => 'Benin'), array('id' => 'BM', 'name' => 'Bermuda'), array('id' => 'BT', 'name' => 'Bhutan'), array('id' => 'BO', 'name' => 'Bolivia'), array('id' => 'BA', 'name' => 'Bosnia And Herzegovina'), array('id' => 'BW', 'name' => 'Botswana'), array('id' => 'BV', 'name' => 'Bouvet Island'), array('id' => 'BR', 'name' => 'Brazil'), array('id' => 'IO', 'name' => 'British Indian Ocean Territory'), array('id' => 'BN', 'name' => 'Brunei Darussalam'), array('id' => 'BG', 'name' => 'Bulgaria'), array('id' => 'BF', 'name' => 'Burkina Faso'), array('id' => 'BI', 'name' => 'Burundi'), array('id' => 'KH', 'name' => 'Cambodia'), array('id' => 'CM', 'name' => 'Cameroon'), array('id' => 'CA', 'name' => 'Canada'), array('id' => 'CV', 'name' => 'Cape Verde'), array('id' => 'KY', 'name' => 'Cayman Islands'), array('id' => 'CF', 'name' => 'Central African Republic'), array('id' => 'TD', 'name' => 'Chad'), array('id' => 'CL', 'name' => 'Chile'), array('id' => 'CN', 'name' => 'China'), array('id' => 'CX', 'name' => 'Christmas Island'), array('id' => 'CC', 'name' => 'Cocos (Keeling) Islands'), array('id' => 'CO', 'name' => 'Colombia'), array('id' => 'KM', 'name' => 'Comoros'), array('id' => 'CG', 'name' => 'Congo'), array('id' => 'CD', 'name' => 'Congo, Democratic Republic'), array('id' => 'CK', 'name' => 'Cook Islands'), array('id' => 'CR', 'name' => 'Costa Rica'), array('id' => 'CI', 'name' => "Cote D'Ivoire"), array('id' => 'HR', 'name' => 'Croatia'), array('id' => 'CU', 'name' => 'Cuba'), array('id' => 'CY', 'name' => 'Cyprus'), array('id' => 'CZ', 'name' => 'Czech Republic'), array('id' => 'DK', 'name' => 'Denmark'), array('id' => 'DJ', 'name' => 'Djibouti'), array('id' => 'DM', 'name' => 'Dominica'), array('id' => 'DO', 'name' => 'Dominican Republic'), array('id' => 'EC', 'name' => 'Ecuador'), array('id' => 'EG', 'name' => 'Egypt'), array('id' => 'SV', 'name' => 'El Salvador'), array('id' => 'GQ', 'name' => 'Equatorial Guinea'), array('id' => 'ER', 'name' => 'Eritrea'), array('id' => 'EE', 'name' => 'Estonia'), array('id' => 'ET', 'name' => 'Ethiopia'), array('id' => 'FK', 'name' => 'Falkland Islands (Malvinas)'), array('id' => 'FO', 'name' => 'Faroe Islands'), array('id' => 'FJ', 'name' => 'Fiji'), array('id' => 'FI', 'name' => 'Finland'), array('id' => 'FR', 'name' => 'France'), array('id' => 'GF', 'name' => 'French Guiana'), array('id' => 'PF', 'name' => 'French Polynesia'), array('id' => 'TF', 'name' => 'French Southern Territories'), array('id' => 'MK', 'name' => 'Fyrom'), array('id' => 'GA', 'name' => 'Gabon'), array('id' => 'GM', 'name' => 'Gambia'), array('id' => 'GE', 'name' => 'Georgia'), array('id' => 'DE', 'name' => 'Germany'), array('id' => 'GH', 'name' => 'Ghana'), array('id' => 'GI', 'name' => 'Gibraltar'), array('id' => 'GR', 'name' => 'Greece'), array('id' => 'GL', 'name' => 'Greenland'), array('id' => 'GD', 'name' => 'Grenada'), array('id' => 'GP', 'name' => 'Guadeloupe'), array('id' => 'GU', 'name' => 'Guam'), array('id' => 'GT', 'name' => 'Guatemala'), array('id' => 'GG', 'name' => 'Guernsey'), array('id' => 'GN', 'name' => 'Guinea'), array('id' => 'GW', 'name' => 'Guinea-Bissau'), array('id' => 'GY', 'name' => 'Guyana'), array('id' => 'HT', 'name' => 'Haiti'), array('id' => 'HM', 'name' => 'Heard Island & Mcdonald Islands'), array('id' => 'VA', 'name' => 'Holy See (Vatican City State)'), array('id' => 'HN', 'name' => 'Honduras'), array('id' => 'HK', 'name' => 'Hong Kong'), array('id' => 'HU', 'name' => 'Hungary'), array('id' => 'IS', 'name' => 'Iceland'), array('id' => 'IN', 'name' => 'India'), array('id' => 'ID', 'name' => 'Indonesia'), array('id' => 'IR', 'name' => 'Iran, Islamic Republic Of'), array('id' => 'IQ', 'name' => 'Iraq'), array('id' => 'IE', 'name' => 'Ireland'), array('id' => 'IM', 'name' => 'Isle Of Man'), array('id' => 'IL', 'name' => 'Israel'), array('id' => 'IT', 'name' => 'Italy'), array('id' => 'JM', 'name' => 'Jamaica'), array('id' => 'JP', 'name' => 'Japan'), array('id' => 'JE', 'name' => 'Jersey'), array('id' => 'JO', 'name' => 'Jordan'), array('id' => 'KZ', 'name' => 'Kazakhstan'), array('id' => 'KE', 'name' => 'Kenya'), array('id' => 'KI', 'name' => 'Kiribati'), array('id' => 'KR', 'name' => 'Korea'), array('id' => 'KW', 'name' => 'Kuwait'), array('id' => 'KG', 'name' => 'Kyrgyzstan'), array('id' => 'LA', 'name' => "Lao People's Democratic Republic"), array('id' => 'LV', 'name' => 'Latvia'), array('id' => 'LB', 'name' => 'Lebanon'), array('id' => 'LS', 'name' => 'Lesotho'), array('id' => 'LR', 'name' => 'Liberia'), array('id' => 'LY', 'name' => 'Libyan Arab Jamahiriya'), array('id' => 'LI', 'name' => 'Liechtenstein'), array('id' => 'LT', 'name' => 'Lithuania'), array('id' => 'LU', 'name' => 'Luxembourg'), array('id' => 'MO', 'name' => 'Macao'), array('id' => 'MG', 'name' => 'Madagascar'), array('id' => 'MW', 'name' => 'Malawi'), array('id' => 'MY', 'name' => 'Malaysia'), array('id' => 'MV', 'name' => 'Maldives'), array('id' => 'ML', 'name' => 'Mali'), array('id' => 'MT', 'name' => 'Malta'), array('id' => 'MH', 'name' => 'Marshall Islands'), array('id' => 'MQ', 'name' => 'Martinique'), array('id' => 'MR', 'name' => 'Mauritania'), array('id' => 'MU', 'name' => 'Mauritius'), array('id' => 'YT', 'name' => 'Mayotte'), array('id' => 'MX', 'name' => 'Mexico'), array('id' => 'FM', 'name' => 'Micronesia, Federated States Of'), array('id' => 'MD', 'name' => 'Moldova'), array('id' => 'MC', 'name' => 'Monaco'), array('id' => 'MN', 'name' => 'Mongolia'), array('id' => 'ME', 'name' => 'Montenegro'), array('id' => 'MS', 'name' => 'Montserrat'), array('id' => 'MA', 'name' => 'Morocco'), array('id' => 'MZ', 'name' => 'Mozambique'), array('id' => 'MM', 'name' => 'Myanmar'), array('id' => 'NA', 'name' => 'Namibia'), array('id' => 'NR', 'name' => 'Nauru'), array('id' => 'NP', 'name' => 'Nepal'), array('id' => 'NL', 'name' => 'Netherlands'), array('id' => 'AN', 'name' => 'Netherlands Antilles'), array('id' => 'NC', 'name' => 'New Caledonia'), array('id' => 'NZ', 'name' => 'New Zealand'), array('id' => 'NI', 'name' => 'Nicaragua'), array('id' => 'NE', 'name' => 'Niger'), array('id' => 'NG', 'name' => 'Nigeria'), array('id' => 'NU', 'name' => 'Niue'), array('id' => 'NF', 'name' => 'Norfolk Island'), array('id' => 'MP', 'name' => 'Northern Mariana Islands'), array('id' => 'NO', 'name' => 'Norway'), array('id' => 'OM', 'name' => 'Oman'), array('id' => 'PK', 'name' => 'Pakistan'), array('id' => 'PW', 'name' => 'Palau'), array('id' => 'PS', 'name' => 'Palestinian Territory, Occupied'), array('id' => 'PA', 'name' => 'Panama'), array('id' => 'PG', 'name' => 'Papua New Guinea'), array('id' => 'PY', 'name' => 'Paraguay'), array('id' => 'PE', 'name' => 'Peru'), array('id' => 'PH', 'name' => 'Philippines'), array('id' => 'PN', 'name' => 'Pitcairn'), array('id' => 'PL', 'name' => 'Poland'), array('id' => 'PT', 'name' => 'Portugal'), array('id' => 'PR', 'name' => 'Puerto Rico'), array('id' => 'QA', 'name' => 'Qatar'), array('id' => 'RE', 'name' => 'Reunion'), array('id' => 'RO', 'name' => 'Romania'), array('id' => 'RU', 'name' => 'Russian Federation'), array('id' => 'RW', 'name' => 'Rwanda'), array('id' => 'BL', 'name' => 'Saint Barthelemy'), array('id' => 'SH', 'name' => 'Saint Helena'), array('id' => 'KN', 'name' => 'Saint Kitts And Nevis'), array('id' => 'LC', 'name' => 'Saint Lucia'), array('id' => 'MF', 'name' => 'Saint Martin'), array('id' => 'PM', 'name' => 'Saint Pierre And Miquelon'), array('id' => 'VC', 'name' => 'Saint Vincent And Grenadines'), array('id' => 'WS', 'name' => 'Samoa'), array('id' => 'SM', 'name' => 'San Marino'), array('id' => 'ST', 'name' => 'Sao Tome And Principe'), array('id' => 'SA', 'name' => 'Saudi Arabia'), array('id' => 'SN', 'name' => 'Senegal'), array('id' => 'RS', 'name' => 'Serbia'), array('id' => 'SC', 'name' => 'Seychelles'), array('id' => 'SL', 'name' => 'Sierra Leone'), array('id' => 'SG', 'name' => 'Singapore'), array('id' => 'SK', 'name' => 'Slovakia'), array('id' => 'SI', 'name' => 'Slovenia'), array('id' => 'SB', 'name' => 'Solomon Islands'), array('id' => 'SO', 'name' => 'Somalia'), array('id' => 'ZA', 'name' => 'South Africa'), array('id' => 'GS', 'name' => 'South Georgia And Sandwich Isl.'), array('id' => 'ES', 'name' => 'Spain'), array('id' => 'LK', 'name' => 'Sri Lanka'), array('id' => 'SD', 'name' => 'Sudan'), array('id' => 'SR', 'name' => 'Suriname'), array('id' => 'SJ', 'name' => 'Svalbard And Jan Mayen'), array('id' => 'SZ', 'name' => 'Swaziland'), array('id' => 'SE', 'name' => 'Sweden'), array('id' => 'CH', 'name' => 'Switzerland'), array('id' => 'SY', 'name' => 'Syrian Arab Republic'), array('id' => 'TW', 'name' => 'Taiwan'), array('id' => 'TJ', 'name' => 'Tajikistan'), array('id' => 'TZ', 'name' => 'Tanzania'), array('id' => 'TH', 'name' => 'Thailand'), array('id' => 'TL', 'name' => 'Timor-Leste'), array('id' => 'TG', 'name' => 'Togo'), array('id' => 'TK', 'name' => 'Tokelau'), array('id' => 'TO', 'name' => 'Tonga'), array('id' => 'TT', 'name' => 'Trinidad And Tobago'), array('id' => 'TN', 'name' => 'Tunisia'), array('id' => 'TR', 'name' => 'Turkey'), array('id' => 'TM', 'name' => 'Turkmenistan'), array('id' => 'TC', 'name' => 'Turks And Caicos Islands'), array('id' => 'TV', 'name' => 'Tuvalu'), array('id' => 'UG', 'name' => 'Uganda'), array('id' => 'UA', 'name' => 'Ukraine'), array('id' => 'AE', 'name' => 'United Arab Emirates'), array('id' => 'GB', 'name' => 'United Kingdom'), array('id' => 'US', 'name' => 'United States'), array('id' => 'UM', 'name' => 'United States Outlying Islands'), array('id' => 'UY', 'name' => 'Uruguay'), array('id' => 'UZ', 'name' => 'Uzbekistan'), array('id' => 'VU', 'name' => 'Vanuatu'), array('id' => 'VE', 'name' => 'Venezuela'), array('id' => 'VN', 'name' => 'Viet Nam'), array('id' => 'VG', 'name' => 'Virgin Islands, British'), array('id' => 'VI', 'name' => 'Virgin Islands, U.S.'), array('id' => 'WF', 'name' => 'Wallis And Futuna'), array('id' => 'EH', 'name' => 'Western Sahara'), array('id' => 'YE', 'name' => 'Yemen'), array('id' => 'ZM', 'name' => 'Zambia'), array('id' => 'ZW', 'name' => 'Zimbabwe')); - $_TITLE = 'Package'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); ?> - - - - - - - - \ No newline at end of file diff --git a/src/admin/packages.php b/src/admin/packages.php deleted file mode 100644 index e84e8ec5..00000000 --- a/src/admin/packages.php +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/panel_logs.php b/src/admin/panel_logs.php deleted file mode 100644 index 0c06f543..00000000 --- a/src/admin/panel_logs.php +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/plex.php b/src/admin/plex.php deleted file mode 100644 index 3b84b96a..00000000 --- a/src/admin/plex.php +++ /dev/null @@ -1,23 +0,0 @@ - - 'Uninterruptible Sleep', 'I' => 'Idle', 'R' => 'Running', 'S' => 'Interruptible Sleep', 'T' => 'Stopped', 'W' => 'Paging', 'X' => 'Dead', 'Z' => 'Zombie'); - $_TITLE = 'Process Monitor'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); ?> - - - - - - - - - -?> \ No newline at end of file diff --git a/src/admin/profile.php b/src/admin/profile.php deleted file mode 100644 index 424c2525..00000000 --- a/src/admin/profile.php +++ /dev/null @@ -1,655 +0,0 @@ - - $rGPU) { - $rDevices[$rServer['id'] . '_' . $rGPUID] = $rServer['server_name'] . ' - ' . $rGPU['name']; - } - } - } - $_TITLE = 'Transcoding Profile'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -?> - -
> -
-
-
-
-
- -
-

-
-
-
-
-
- - - -
-
-
- - - -
- -
-
-
-
-
- -
- -
-
-
- -
- -
-
- -
- -
- -
- - -
-
- -
- -
-
- - - -
-
- -
- -
- -
- -
-
-
- -
- -
- -
- - data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
- -
- -
- - -
- -
-
-
- -
- -
- - -
- -
-
-
- -
- -
- - -
- -
-
-
- -
- -
- - -
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
-
-
-
-
- -
    -
  • - -
  • -
-
-
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/profiles.php b/src/admin/profiles.php deleted file mode 100644 index a498c106..00000000 --- a/src/admin/profiles.php +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/provider.php b/src/admin/provider.php deleted file mode 100644 index 9d9b469d..00000000 --- a/src/admin/provider.php +++ /dev/null @@ -1,398 +0,0 @@ - - - -
style="display: none;" > -
-
-
-
-
- -
-

Provider

-
-
-
-
-
-
-
-
- - - - -
- -
-
-
-
-
- -
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
- -
- -
-
-
- -
- checkedchecked data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
- -
- checked data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
- -
- checked data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
- -
- checked data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
    -
  • - -
  • -
-
-
-
- - -
-
-
- - - - - - - - - - - - query('SELECT `stream_id`, `category_array`, `stream_display_name`, `modified`, `stream_icon` FROM `providers_streams` WHERE `provider_id` = ? AND `type` = \'live\' ORDER BY `modified` DESC, `stream_id` ASC;', RequestManager::getAll()['id']); ?> - get_rows() as $rRow) : ?> - - - - - - - - - - -
IDStream NameCategoriesModifiedActions
" . date('H:i:s', $rRow['modified']) . ''; ?> - - -
-
-
-
- - -
-
-
- - - - - - - - - - - - query('SELECT `stream_id`, `category_array`, `stream_display_name`, `modified`, `stream_icon`, `channel_id` FROM `providers_streams` WHERE `provider_id` = ? AND `type` = \'movie\' ORDER BY `modified` DESC, `stream_id` ASC;', RequestManager::getAll()['id']); ?> - get_rows() as $rRow) : ?> - - - - - - - - - - -
IDMovie NameCategoriesModifiedActions
" . date('H:i:s', $rRow['modified']) . ''; ?> - - -
-
-
-
- -
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/providers.php b/src/admin/providers.php deleted file mode 100644 index 23fa1ddb..00000000 --- a/src/admin/providers.php +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/proxies.php b/src/admin/proxies.php deleted file mode 100644 index 30ca63d9..00000000 --- a/src/admin/proxies.php +++ /dev/null @@ -1,648 +0,0 @@ - - - - - -
> -
-
-
-
-
- -
-

Proxy Servers

-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - 0, 'cpu' => 0); - - if (!$rServers[$rServer['id']]['server_online']) { - $rWatchDog['cpu'] = 0; - $rWatchDog['total_mem_used_percent'] = 0; - } - ?> - - - ' . "\n" . ' ' . "\n" . ' ' . "\n\t\t\t\t\t\t\t\t\t" . "' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n" . ' ' . "\n\t\t\t\t\t\t\t\t\t" . "' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t"; - endif; - endforeach; - - ?> - - - - -
IDStatusProxy NameProxied ServerProxy IPNetworkConnectionsCPU %MEM %PingActions
- - '; - } else { - if ($rServer['server_online']) { - echo ''; - } else { - $rLastCheck = $rServer['last_check_ago'] > 0 ? date($rSettings['datetime_format'], $rServer['last_check_ago']) : 'Never'; - - if ($rServer['status'] == 3) { - echo ''; - } elseif ($rServer['status'] == 4) { - echo ''; - } elseif ($rServer['status'] == 5) { - echo ''; - } else { - echo ''; - } - } - } - - echo ' '; - echo $rServer['server_name']; - echo (!empty($rServer['domain_name']) ? '
' . explode(',', $rServer['domain_name'])[0] . '' : ''); - echo '
'; - echo $rServers[$rServer['parent_id'][0]]['server_name']; - echo ''; - - if (1 >= count($rServer['parent_id'])) { - } else { - echo '  '; - } - - echo ' "; - echo $rServer['server_ip']; - echo '' . "\n\t\t\t\t\t\t\t\t\t"; - $rClients = getLiveConnections($rServer['id'], true); - - if (Authorization::check('adv', 'live_connections')) { - $rClients = ''; - } else { - $rClients = "'; - } - - echo $rClients; - echo "\t\t\t\t\t\t\t\t\t" . '
of '; - echo number_format($rServer['total_clients'], 0); - echo '' . "\n" . '
' . "\n" . ' ' . "\n\t\t\t\t\t\t\t\t\t\t" . '
'; - echo number_format($rServer['network_guaranteed_speed'], 0); - echo ' Mbps' . "\n" . '
' . "\n" . ' '; - - if (intval($rWatchDog['cpu']) <= 34) { - $statusColor = '#23b397'; - } else { - if (intval($rWatchDog['cpu']) <= 67) { - $statusColor = '#f8cc6b'; - } else { - $statusColor = '#f0643b'; - } - } - - echo ' ' . "\n" . ' ' . "\n" . ' '; - - if (intval($rWatchDog['total_mem_used_percent']) <= 34) { - $statusColor = '#23b397'; - } elseif (intval($rWatchDog['total_mem_used_percent']) <= 67) { - $statusColor = '#f8cc6b'; - } else { - $statusColor = '#f0643b'; - } - - echo ' ' . "\n" . ' ' . "\n\t\t\t\t\t\t\t\t\t\t"; - - if (Authorization::check('adv', 'edit_server')) { - if (SettingsManager::getAll()['group_buttons']) { - echo "\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t"; - } else { - echo "\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '" . "\n" . ' ' . "\n" . ' '; - - if ($rServer['enabled']) { - echo ' " . "\n" . ' '; - } else { - echo ' " . "\n" . ' '; - } - - echo ' " . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t"; - } - } else { - echo '--'; - } - - echo "\t\t\t\t\t\t\t\t\t" . '
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/proxy.php b/src/admin/proxy.php deleted file mode 100644 index 40f33e38..00000000 --- a/src/admin/proxy.php +++ /dev/null @@ -1,417 +0,0 @@ - - 'ALL', 'name' => 'All Countries'), array('id' => 'A1', 'name' => 'Anonymous Proxy'), array('id' => 'A2', 'name' => 'Satellite Provider'), array('id' => 'O1', 'name' => 'Other Country'), array('id' => 'AF', 'name' => 'Afghanistan'), array('id' => 'AX', 'name' => 'Aland Islands'), array('id' => 'AL', 'name' => 'Albania'), array('id' => 'DZ', 'name' => 'Algeria'), array('id' => 'AS', 'name' => 'American Samoa'), array('id' => 'AD', 'name' => 'Andorra'), array('id' => 'AO', 'name' => 'Angola'), array('id' => 'AI', 'name' => 'Anguilla'), array('id' => 'AQ', 'name' => 'Antarctica'), array('id' => 'AG', 'name' => 'Antigua And Barbuda'), array('id' => 'AR', 'name' => 'Argentina'), array('id' => 'AM', 'name' => 'Armenia'), array('id' => 'AW', 'name' => 'Aruba'), array('id' => 'AU', 'name' => 'Australia'), array('id' => 'AT', 'name' => 'Austria'), array('id' => 'AZ', 'name' => 'Azerbaijan'), array('id' => 'BS', 'name' => 'Bahamas'), array('id' => 'BH', 'name' => 'Bahrain'), array('id' => 'BD', 'name' => 'Bangladesh'), array('id' => 'BB', 'name' => 'Barbados'), array('id' => 'BY', 'name' => 'Belarus'), array('id' => 'BE', 'name' => 'Belgium'), array('id' => 'BZ', 'name' => 'Belize'), array('id' => 'BJ', 'name' => 'Benin'), array('id' => 'BM', 'name' => 'Bermuda'), array('id' => 'BT', 'name' => 'Bhutan'), array('id' => 'BO', 'name' => 'Bolivia'), array('id' => 'BA', 'name' => 'Bosnia And Herzegovina'), array('id' => 'BW', 'name' => 'Botswana'), array('id' => 'BV', 'name' => 'Bouvet Island'), array('id' => 'BR', 'name' => 'Brazil'), array('id' => 'IO', 'name' => 'British Indian Ocean Territory'), array('id' => 'BN', 'name' => 'Brunei Darussalam'), array('id' => 'BG', 'name' => 'Bulgaria'), array('id' => 'BF', 'name' => 'Burkina Faso'), array('id' => 'BI', 'name' => 'Burundi'), array('id' => 'KH', 'name' => 'Cambodia'), array('id' => 'CM', 'name' => 'Cameroon'), array('id' => 'CA', 'name' => 'Canada'), array('id' => 'CV', 'name' => 'Cape Verde'), array('id' => 'KY', 'name' => 'Cayman Islands'), array('id' => 'CF', 'name' => 'Central African Republic'), array('id' => 'TD', 'name' => 'Chad'), array('id' => 'CL', 'name' => 'Chile'), array('id' => 'CN', 'name' => 'China'), array('id' => 'CX', 'name' => 'Christmas Island'), array('id' => 'CC', 'name' => 'Cocos (Keeling) Islands'), array('id' => 'CO', 'name' => 'Colombia'), array('id' => 'KM', 'name' => 'Comoros'), array('id' => 'CG', 'name' => 'Congo'), array('id' => 'CD', 'name' => 'Congo, Democratic Republic'), array('id' => 'CK', 'name' => 'Cook Islands'), array('id' => 'CR', 'name' => 'Costa Rica'), array('id' => 'CI', 'name' => "Cote D'Ivoire"), array('id' => 'HR', 'name' => 'Croatia'), array('id' => 'CU', 'name' => 'Cuba'), array('id' => 'CY', 'name' => 'Cyprus'), array('id' => 'CZ', 'name' => 'Czech Republic'), array('id' => 'DK', 'name' => 'Denmark'), array('id' => 'DJ', 'name' => 'Djibouti'), array('id' => 'DM', 'name' => 'Dominica'), array('id' => 'DO', 'name' => 'Dominican Republic'), array('id' => 'EC', 'name' => 'Ecuador'), array('id' => 'EG', 'name' => 'Egypt'), array('id' => 'SV', 'name' => 'El Salvador'), array('id' => 'GQ', 'name' => 'Equatorial Guinea'), array('id' => 'ER', 'name' => 'Eritrea'), array('id' => 'EE', 'name' => 'Estonia'), array('id' => 'ET', 'name' => 'Ethiopia'), array('id' => 'FK', 'name' => 'Falkland Islands (Malvinas)'), array('id' => 'FO', 'name' => 'Faroe Islands'), array('id' => 'FJ', 'name' => 'Fiji'), array('id' => 'FI', 'name' => 'Finland'), array('id' => 'FR', 'name' => 'France'), array('id' => 'GF', 'name' => 'French Guiana'), array('id' => 'PF', 'name' => 'French Polynesia'), array('id' => 'TF', 'name' => 'French Southern Territories'), array('id' => 'MK', 'name' => 'Fyrom'), array('id' => 'GA', 'name' => 'Gabon'), array('id' => 'GM', 'name' => 'Gambia'), array('id' => 'GE', 'name' => 'Georgia'), array('id' => 'DE', 'name' => 'Germany'), array('id' => 'GH', 'name' => 'Ghana'), array('id' => 'GI', 'name' => 'Gibraltar'), array('id' => 'GR', 'name' => 'Greece'), array('id' => 'GL', 'name' => 'Greenland'), array('id' => 'GD', 'name' => 'Grenada'), array('id' => 'GP', 'name' => 'Guadeloupe'), array('id' => 'GU', 'name' => 'Guam'), array('id' => 'GT', 'name' => 'Guatemala'), array('id' => 'GG', 'name' => 'Guernsey'), array('id' => 'GN', 'name' => 'Guinea'), array('id' => 'GW', 'name' => 'Guinea-Bissau'), array('id' => 'GY', 'name' => 'Guyana'), array('id' => 'HT', 'name' => 'Haiti'), array('id' => 'HM', 'name' => 'Heard Island & Mcdonald Islands'), array('id' => 'VA', 'name' => 'Holy See (Vatican City State)'), array('id' => 'HN', 'name' => 'Honduras'), array('id' => 'HK', 'name' => 'Hong Kong'), array('id' => 'HU', 'name' => 'Hungary'), array('id' => 'IS', 'name' => 'Iceland'), array('id' => 'IN', 'name' => 'India'), array('id' => 'ID', 'name' => 'Indonesia'), array('id' => 'IR', 'name' => 'Iran, Islamic Republic Of'), array('id' => 'IQ', 'name' => 'Iraq'), array('id' => 'IE', 'name' => 'Ireland'), array('id' => 'IM', 'name' => 'Isle Of Man'), array('id' => 'IL', 'name' => 'Israel'), array('id' => 'IT', 'name' => 'Italy'), array('id' => 'JM', 'name' => 'Jamaica'), array('id' => 'JP', 'name' => 'Japan'), array('id' => 'JE', 'name' => 'Jersey'), array('id' => 'JO', 'name' => 'Jordan'), array('id' => 'KZ', 'name' => 'Kazakhstan'), array('id' => 'KE', 'name' => 'Kenya'), array('id' => 'KI', 'name' => 'Kiribati'), array('id' => 'KR', 'name' => 'Korea'), array('id' => 'KW', 'name' => 'Kuwait'), array('id' => 'KG', 'name' => 'Kyrgyzstan'), array('id' => 'LA', 'name' => "Lao People's Democratic Republic"), array('id' => 'LV', 'name' => 'Latvia'), array('id' => 'LB', 'name' => 'Lebanon'), array('id' => 'LS', 'name' => 'Lesotho'), array('id' => 'LR', 'name' => 'Liberia'), array('id' => 'LY', 'name' => 'Libyan Arab Jamahiriya'), array('id' => 'LI', 'name' => 'Liechtenstein'), array('id' => 'LT', 'name' => 'Lithuania'), array('id' => 'LU', 'name' => 'Luxembourg'), array('id' => 'MO', 'name' => 'Macao'), array('id' => 'MG', 'name' => 'Madagascar'), array('id' => 'MW', 'name' => 'Malawi'), array('id' => 'MY', 'name' => 'Malaysia'), array('id' => 'MV', 'name' => 'Maldives'), array('id' => 'ML', 'name' => 'Mali'), array('id' => 'MT', 'name' => 'Malta'), array('id' => 'MH', 'name' => 'Marshall Islands'), array('id' => 'MQ', 'name' => 'Martinique'), array('id' => 'MR', 'name' => 'Mauritania'), array('id' => 'MU', 'name' => 'Mauritius'), array('id' => 'YT', 'name' => 'Mayotte'), array('id' => 'MX', 'name' => 'Mexico'), array('id' => 'FM', 'name' => 'Micronesia, Federated States Of'), array('id' => 'MD', 'name' => 'Moldova'), array('id' => 'MC', 'name' => 'Monaco'), array('id' => 'MN', 'name' => 'Mongolia'), array('id' => 'ME', 'name' => 'Montenegro'), array('id' => 'MS', 'name' => 'Montserrat'), array('id' => 'MA', 'name' => 'Morocco'), array('id' => 'MZ', 'name' => 'Mozambique'), array('id' => 'MM', 'name' => 'Myanmar'), array('id' => 'NA', 'name' => 'Namibia'), array('id' => 'NR', 'name' => 'Nauru'), array('id' => 'NP', 'name' => 'Nepal'), array('id' => 'NL', 'name' => 'Netherlands'), array('id' => 'AN', 'name' => 'Netherlands Antilles'), array('id' => 'NC', 'name' => 'New Caledonia'), array('id' => 'NZ', 'name' => 'New Zealand'), array('id' => 'NI', 'name' => 'Nicaragua'), array('id' => 'NE', 'name' => 'Niger'), array('id' => 'NG', 'name' => 'Nigeria'), array('id' => 'NU', 'name' => 'Niue'), array('id' => 'NF', 'name' => 'Norfolk Island'), array('id' => 'MP', 'name' => 'Northern Mariana Islands'), array('id' => 'NO', 'name' => 'Norway'), array('id' => 'OM', 'name' => 'Oman'), array('id' => 'PK', 'name' => 'Pakistan'), array('id' => 'PW', 'name' => 'Palau'), array('id' => 'PS', 'name' => 'Palestinian Territory, Occupied'), array('id' => 'PA', 'name' => 'Panama'), array('id' => 'PG', 'name' => 'Papua New Guinea'), array('id' => 'PY', 'name' => 'Paraguay'), array('id' => 'PE', 'name' => 'Peru'), array('id' => 'PH', 'name' => 'Philippines'), array('id' => 'PN', 'name' => 'Pitcairn'), array('id' => 'PL', 'name' => 'Poland'), array('id' => 'PT', 'name' => 'Portugal'), array('id' => 'PR', 'name' => 'Puerto Rico'), array('id' => 'QA', 'name' => 'Qatar'), array('id' => 'RE', 'name' => 'Reunion'), array('id' => 'RO', 'name' => 'Romania'), array('id' => 'RU', 'name' => 'Russian Federation'), array('id' => 'RW', 'name' => 'Rwanda'), array('id' => 'BL', 'name' => 'Saint Barthelemy'), array('id' => 'SH', 'name' => 'Saint Helena'), array('id' => 'KN', 'name' => 'Saint Kitts And Nevis'), array('id' => 'LC', 'name' => 'Saint Lucia'), array('id' => 'MF', 'name' => 'Saint Martin'), array('id' => 'PM', 'name' => 'Saint Pierre And Miquelon'), array('id' => 'VC', 'name' => 'Saint Vincent And Grenadines'), array('id' => 'WS', 'name' => 'Samoa'), array('id' => 'SM', 'name' => 'San Marino'), array('id' => 'ST', 'name' => 'Sao Tome And Principe'), array('id' => 'SA', 'name' => 'Saudi Arabia'), array('id' => 'SN', 'name' => 'Senegal'), array('id' => 'RS', 'name' => 'Serbia'), array('id' => 'SC', 'name' => 'Seychelles'), array('id' => 'SL', 'name' => 'Sierra Leone'), array('id' => 'SG', 'name' => 'Singapore'), array('id' => 'SK', 'name' => 'Slovakia'), array('id' => 'SI', 'name' => 'Slovenia'), array('id' => 'SB', 'name' => 'Solomon Islands'), array('id' => 'SO', 'name' => 'Somalia'), array('id' => 'ZA', 'name' => 'South Africa'), array('id' => 'GS', 'name' => 'South Georgia And Sandwich Isl.'), array('id' => 'ES', 'name' => 'Spain'), array('id' => 'LK', 'name' => 'Sri Lanka'), array('id' => 'SD', 'name' => 'Sudan'), array('id' => 'SR', 'name' => 'Suriname'), array('id' => 'SJ', 'name' => 'Svalbard And Jan Mayen'), array('id' => 'SZ', 'name' => 'Swaziland'), array('id' => 'SE', 'name' => 'Sweden'), array('id' => 'CH', 'name' => 'Switzerland'), array('id' => 'SY', 'name' => 'Syrian Arab Republic'), array('id' => 'TW', 'name' => 'Taiwan'), array('id' => 'TJ', 'name' => 'Tajikistan'), array('id' => 'TZ', 'name' => 'Tanzania'), array('id' => 'TH', 'name' => 'Thailand'), array('id' => 'TL', 'name' => 'Timor-Leste'), array('id' => 'TG', 'name' => 'Togo'), array('id' => 'TK', 'name' => 'Tokelau'), array('id' => 'TO', 'name' => 'Tonga'), array('id' => 'TT', 'name' => 'Trinidad And Tobago'), array('id' => 'TN', 'name' => 'Tunisia'), array('id' => 'TR', 'name' => 'Turkey'), array('id' => 'TM', 'name' => 'Turkmenistan'), array('id' => 'TC', 'name' => 'Turks And Caicos Islands'), array('id' => 'TV', 'name' => 'Tuvalu'), array('id' => 'UG', 'name' => 'Uganda'), array('id' => 'UA', 'name' => 'Ukraine'), array('id' => 'AE', 'name' => 'United Arab Emirates'), array('id' => 'GB', 'name' => 'United Kingdom'), array('id' => 'US', 'name' => 'United States'), array('id' => 'UM', 'name' => 'United States Outlying Islands'), array('id' => 'UY', 'name' => 'Uruguay'), array('id' => 'UZ', 'name' => 'Uzbekistan'), array('id' => 'VU', 'name' => 'Vanuatu'), array('id' => 'VE', 'name' => 'Venezuela'), array('id' => 'VN', 'name' => 'Viet Nam'), array('id' => 'VG', 'name' => 'Virgin Islands, British'), array('id' => 'VI', 'name' => 'Virgin Islands, U.S.'), array('id' => 'WF', 'name' => 'Wallis And Futuna'), array('id' => 'EH', 'name' => 'Western Sahara'), array('id' => 'YE', 'name' => 'Yemen'), array('id' => 'ZM', 'name' => 'Zambia'), array('id' => 'ZW', 'name' => 'Zimbabwe')); - $_TITLE = 'Edit Proxy'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); ?> - -
> -
-
-
-
-
- -
-

Edit Proxy

-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
-
- -
-
-
-
- -
- -
- -
- -
-
-
-
- -
- -
-
-
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
    -
  • - - - -
  • -
-
-
-
-
- -
-
-
-
-
- -
- -
- -
- -
-
-
- -
- -
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
-
- -
- data-plugin="switchery" class="js-switch" data-color="#039cfd" /> -
-
- -
-
-
- -
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/queue.php b/src/admin/queue.php deleted file mode 100644 index 15d61a92..00000000 --- a/src/admin/queue.php +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/quick_tools.php b/src/admin/quick_tools.php deleted file mode 100644 index dc0d87e4..00000000 --- a/src/admin/quick_tools.php +++ /dev/null @@ -1,695 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/radio.php b/src/admin/radio.php deleted file mode 100644 index ceac9fef..00000000 --- a/src/admin/radio.php +++ /dev/null @@ -1,533 +0,0 @@ - - 'source', - 'parent' => '#', - 'text' => "Online", - 'icon' => 'mdi mdi-play', - 'state' => array('opened' => true) - ), - array( - 'id' => 'offline', - 'parent' => '#', - 'text' => "Offline", - 'icon' => 'mdi mdi-stop', - 'state' => array('opened' => true) - ) - ); - - if (isset($rStation)) { - $rStationOptions = StreamRepository::getOptions(RequestManager::getAll()['id']); - $rStationSys = StreamRepository::getSystemRows(RequestManager::getAll()['id']); - - foreach ($rServers as $rServer) { - if (isset($rStationSys[intval($rServer['id'])])) { - $rParent = ($rStationSys[intval($rServer['id'])]['parent_id'] != 0) ? intval($rStationSys[intval($rServer['id'])]['parent_id']) : 'source'; - if ($rStationSys[intval($rServer['id'])]['on_demand']) { - $rOnDemand[] = intval($rServer['id']); - } - } else { - $rParent = 'offline'; - } - - $rServerTree[] = array( - 'id' => $rServer['id'], - 'parent' => $rParent, - 'text' => $rServer['server_name'], - 'icon' => 'mdi mdi-server-network', - 'state' => array('opened' => true) - ); - } - } else { - foreach ($rServers as $rServer) { - $rServerTree[] = array( - 'id' => $rServer['id'], - 'parent' => 'offline', - 'text' => $rServer['server_name'], - 'icon' => 'mdi mdi-server-network', - 'state' => array('opened' => true) - ); - } - } - - $_TITLE = 'Radio Stations'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -?> - - - - - - - - \ No newline at end of file diff --git a/src/admin/radio_mass.php b/src/admin/radio_mass.php deleted file mode 100644 index cb64a54a..00000000 --- a/src/admin/radio_mass.php +++ /dev/null @@ -1,529 +0,0 @@ - - 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); - - foreach ($rServers as $rServer) { - $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - $_TITLE = 'Mass Edit Stations'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -?> -
style="display: none;" > -
-
-
-
-
- -
-

Mass Edit Stations

-
-
-
-
-
- - - -
-
-
- - - -
- -
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- - - - - - - - - - - - -
IDIconStation NameCategoryStatus
-
-
-
-
-
-

- To mass edit any of the below options, tick the checkbox next to it and change the input value. -

-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
-
-
-
-
-

- To mass edit any of the below options, tick the checkbox next to it and change the input value. -

-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
-
-
-
-
-
-

- To mass edit any of the below options, tick the checkbox next to it and change the input value. -

-
-
- - -
- -
- -
-
-
-
- - -
- -
- -
-
-
-
-
-
- -
- -
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/radios.php b/src/admin/radios.php deleted file mode 100644 index f952f5b0..00000000 --- a/src/admin/radios.php +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/record.php b/src/admin/record.php deleted file mode 100644 index a2a680b7..00000000 --- a/src/admin/record.php +++ /dev/null @@ -1,69 +0,0 @@ - $rArchive['start'], 'end' => $rArchive['end'], 'title' => $rArchive['title'], 'description' => $rArchive['description'], 'archive' => true); - - if ($rStream && $rStream['type'] == 1 && $rProgramme) { - } else { - goHome(); - } - } else { - if (!isset(RequestManager::getAll()['stream_id'])) { - } else { - $rStream = StreamRepository::getById(RequestManager::getAll()['stream_id']); - $rProgramme = array('start' => strtotime(RequestManager::getAll()['start_date']), 'end' => strtotime(RequestManager::getAll()['start_date']) + intval(RequestManager::getAll()['duration']) * 60, 'title' => '', 'description' => ''); - - if (!(!$rStream || $rStream['type'] != 1 || !$rProgramme || $rProgramme['end'] < time())) { - } else { - header('Location: record'); - } - } - } - } - - if (!$rStream) { - } else { - $rBitrate = null; - $db->query('SELECT `server_id`, `bitrate` FROM `streams_servers` WHERE `stream_id` = ?;', $rStream['id']); - - foreach ($db->get_rows() as $rRow) { - $rAvailableServers[] = $rRow['server_id']; - - if (!(!$rBitrate && $rRow['bitrate'] || $rRow['bitrate'] && $rBitrate < $rRow['bitrate'])) { - } else { - $rBitrate = $rRow['bitrate']; - } - } - } - - $_TITLE = 'Record'; - - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; // !$__viewMode -include dirname(__DIR__) . '/modules/watch/views/record.php'; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); -include dirname(__DIR__) . '/modules/watch/views/record_scripts.php'; diff --git a/src/admin/restream_logs.php b/src/admin/restream_logs.php deleted file mode 100644 index fdf89ded..00000000 --- a/src/admin/restream_logs.php +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/review.php b/src/admin/review.php deleted file mode 100644 index 93de3d90..00000000 --- a/src/admin/review.php +++ /dev/null @@ -1,939 +0,0 @@ - - - - - - - 'live', 2 => 'movie')[intval($rType)]) as $rCategory) { - $rCategoryIDs[] = $rCategory['id']; - } - $rNewCategories = array(); - - foreach (RequestManager::getAll()['category_selection'] as $rCategory) { - if (in_array($rCategory, $rCategoryIDs) || is_numeric($rCategory)) { - } else { - $rReturn = CategoryService::process(array('category_type' => array(1 => 'live', 2 => 'movie')[intval($rType)], 'category_name' => $rCategory)); - $rNewCategories[$rCategory] = $rReturn['data']['insert_id']; - } - } - - foreach (RequestManager::getAll() as $rKey => $rValue) { - if (substr($rKey, 0, 7) != 'import_') { - } else { - $rID = intval(explode('import_', $rKey)[1]); - - if (!RequestManager::getAll()['import_' . $rID]) { - } else { - $rCategories = array(); - - foreach (json_decode(RequestManager::getAll()['category_id_' . $rID], true) as $rCategory) { - if (!is_numeric($rCategory) && isset($rNewCategories[$rCategory])) { - $rCategories[] = intval($rNewCategories[$rCategory]); - } else { - if (!is_numeric($rCategory)) { - } else { - $rCategories[] = intval($rCategory); - } - } - } - - if ($rType == 1) { - $rPostData['review'][] = array('stream_source' => array(RequestManager::getAll()['url_' . $rID]), 'stream_icon' => RequestManager::getAll()['icon_' . $rID], 'stream_display_name' => RequestManager::getAll()['name_' . $rID], 'epg_lang' => null, 'channel_id' => (!empty(RequestManager::getAll()['channel_id_' . $rID]) ? RequestManager::getAll()['channel_id_' . $rID] : null), 'epg_api' => (!empty(RequestManager::getAll()['epg_type_' . $rID]) ? RequestManager::getAll()['epg_type_' . $rID] : 0), 'epg_id' => (!empty(RequestManager::getAll()['epg_id_' . $rID]) ? RequestManager::getAll()['epg_id_' . $rID] : 0), 'bouquets' => json_decode(RequestManager::getAll()['bouquets_' . $rID], true), 'category_id' => $rCategories); - } else { - $rPostData['review'][] = array('stream_source' => array(RequestManager::getAll()['url_' . $rID]), 'stream_display_name' => RequestManager::getAll()['name_' . $rID], 'tmdb_id' => (!empty(RequestManager::getAll()['tmdb_id_' . $rID]) ? RequestManager::getAll()['tmdb_id_' . $rID] : null), 'bouquets' => json_decode(RequestManager::getAll()['bouquets_' . $rID], true), 'category_id' => $rCategories); - } - } - } - } - - if ($rType == 1) { - $rReturn = StreamService::process($rPostData); - $_STATUS = $rReturn['status']; - - if ($_STATUS != STATUS_SUCCESS) { - } else { - header('Location: ./streams?status=' . STATUS_SUCCESS); - exit(); - } - } else { - $rReturn = MovieService::process($rPostData); - $_STATUS = $rReturn['status']; - - if ($_STATUS != STATUS_SUCCESS) { - } else { - header('Location: ./movies?status=' . STATUS_SUCCESS); - exit(); - } - } - } else { - if (!isset($_FILES['m3u_file'])) { - } else { - unset(RequestManager::getAll()['submit_stream']); - $rPostData = base64_encode(json_encode(RequestManager::getAll())); - $rCategories = CategoryService::getAllByType(array(1 => 'live', 2 => 'movie')[intval($rType)]); - $rBouquets = BouquetService::getAllSimple(); - $rSources = array(); - $rDuplicates = array(); - $db->query('SELECT `stream_source` FROM `streams` WHERE `type` = ?;', $rType); - - foreach ($db->get_rows() as $rRow) { - foreach (json_decode($rRow['stream_source'], true) as $rURL) { - if (in_array($rURL, $rSources)) { - } else { - $rSources[] = str_replace('https://', 'http://', $rURL); - } - } - } - $rStreamDatabase = array(); - - if (empty($_FILES['m3u_file']['tmp_name']) || !in_array(strtolower(pathinfo($_FILES['m3u_file']['name'], PATHINFO_EXTENSION)), array('m3u', 'm3u8'))) { - $_STATUS = STATUS_INVALID_FILE; - } else { - $rImport = array(); - $rResults = M3UParser::parse($_FILES['m3u_file']['tmp_name']); - - foreach ($rResults as $rResult) { - list($rTag) = $rResult->getExtTags(); - - if (!$rTag) { - } else { - $rURL = $rResult->getPath(); - - if ($rType == 1) { - $rExtensions = array('ts', 'm3u8', 'm3u', 'mpd', 'ism', ''); - } else { - $rExtensions = array('mp4', 'mkv', 'mov', 'avi', 'mpg', 'mpeg', 'flv', 'wmv', 'm4v'); - } - - if (!in_array(strtolower(pathinfo(explode('?', $rURL)[0])['extension']), $rExtensions)) { - } else { - $rExists = in_array(str_replace('https://', 'http://', $rURL), $rSources); - - if ($rExists && !RequestManager::getAll()['duplicates']) { - } else { - if (count($rImport) < 500) { - if ($rType == 1) { - $rImport[] = array('url' => $rURL, 'logo' => ($rTag->getAttribute('tvg-logo') ?: ''), 'tvg_id' => ($rTag->getAttribute('tvg-id') ?: ''), 'title' => ($rTag->getTitle() ?: ''), 'category' => ($rTag->getAttribute('group-title') ?: ''), 'exists' => $rExists); - } else { - $rImport[] = array('url' => $rURL, 'title' => ($rTag->getTitle() ?: ''), 'category' => ($rTag->getAttribute('group-title') ?: ''), 'exists' => $rExists); - } - } else { - $_STATUS = STATUS_TOO_MANY_RESULTS; - break; - } - } - } - } - } - - if (count($rImport) == 0) { - $_STATUS = STATUS_NO_SOURCES; - $rImport = null; - } - } - } - } - - if (isset($rImport) && $rImport) { - // Code for processing $rImport - } else { - $rServerTree = array(array('id' => 'source', 'parent' => '#', 'text' => "Live Stream", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); - - foreach ($rServers as $rServer) { - $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - $rStreamArguments = StreamConfigRepository::getStreamArguments(); - $rTranscodeProfiles = StreamConfigRepository::getTranscodeProfiles(); - } - - $rLogoSet = $rCategorySet = array(); - $_TITLE = 'Review'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); - ?> - - - - - - - - - \ No newline at end of file diff --git a/src/admin/rtmp_ip.php b/src/admin/rtmp_ip.php deleted file mode 100644 index 57966f4a..00000000 --- a/src/admin/rtmp_ip.php +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/rtmp_ips.php b/src/admin/rtmp_ips.php deleted file mode 100644 index d25c9c04..00000000 --- a/src/admin/rtmp_ips.php +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/rtmp_monitor.php b/src/admin/rtmp_monitor.php deleted file mode 100644 index 479a44f7..00000000 --- a/src/admin/rtmp_monitor.php +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/serie.php b/src/admin/serie.php deleted file mode 100644 index 3bfff575..00000000 --- a/src/admin/serie.php +++ /dev/null @@ -1,1038 +0,0 @@ - - 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => ['opened' => true]], - ['id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => ['opened' => true]] - ]; - - foreach ($rServers as $rServer) { - $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - $_TITLE = 'TV Series'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); - ?> - - - - - - - - - \ No newline at end of file diff --git a/src/admin/series.php b/src/admin/series.php deleted file mode 100644 index 644b9c26..00000000 --- a/src/admin/series.php +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/series_mass.php b/src/admin/series_mass.php deleted file mode 100644 index 5dd01979..00000000 --- a/src/admin/series_mass.php +++ /dev/null @@ -1,359 +0,0 @@ - - - -' . "\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/server_order.php b/src/admin/server_order.php deleted file mode 100644 index 0a89ae89..00000000 --- a/src/admin/server_order.php +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/server_view.php b/src/admin/server_view.php deleted file mode 100644 index cc7e8806..00000000 --- a/src/admin/server_view.php +++ /dev/null @@ -1,1004 +0,0 @@ - - array(), 'memory' => array(), 'io' => array(), 'input' => array(), 'output' => array(), 'dates' => array(null, null)); - - foreach (WatchdogMonitor::getWatchdog($rServer['id']) as $rData) { - if ($rStats['dates'][0] && $rData['time'] * 1000 > $rStats['dates'][0]) { - } else { - $rStats['dates'][0] = $rData['time'] * 1000; - } - - if ($rStats['dates'][1] && $rStats['dates'][1] > $rData['time'] * 1000) { - } else { - $rStats['dates'][1] = $rData['time'] * 1000; - } - - $rStats['cpu'][] = array($rData['time'] * 1000, floatval(rtrim($rData['cpu'], '%'))); - $rStats['memory'][] = array($rData['time'] * 1000, floatval(rtrim($rData['total_mem_used_percent'], '%'))); - $rStats['io'][] = array($rData['time'] * 1000, floatval(json_decode($rData['iostat_info'], true)['avg-cpu']['iowait'])); - $rStats['input'][] = array($rData['time'] * 1000, round($rData['bytes_received'] / 125000, 0)); - $rStats['output'][] = array($rData['time'] * 1000, round($rData['bytes_sent'] / 125000, 0)); - } - $rCertificate = json_decode($rServer['certbot_ssl'], true); - $rCertValid = false; - - if ($rCertificate['expiration']) { - $rHasCert = true; - - if (time() >= $rCertificate['expiration']) { - } else { - $rCertValid = true; - } - - $rExpiration = date($rSettings['datetime_format'], $rCertificate['expiration']); - } else { - $rHasCert = false; - $rExpiration = 'No Certificate Installed'; - } - - if ($rServer['server_type'] == 0) { - $_TITLE = 'View Server'; - } else { - $_TITLE = 'View Proxy'; - } - - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); ?> - - - - - - - - - - \ No newline at end of file diff --git a/src/admin/stream_categories.php b/src/admin/stream_categories.php deleted file mode 100644 index 404ffb1d..00000000 --- a/src/admin/stream_categories.php +++ /dev/null @@ -1,379 +0,0 @@ - - CategoryService::getAllByType(), 2 => CategoryService::getAllByType('movie'), 3 => CategoryService::getAllByType('series'), 4 => CategoryService::getAllByType('radio')); - $rMainCategories = array(1 => array(), 2 => array(), 3 => array()); - - foreach (array(1, 2, 3, 4) as $rID) { - foreach ($rCategories[$rID] as $rCategoryID => $rCategoryData) { - $rMainCategories[$rID][] = $rCategoryData; - } - } - $_TITLE = 'Stream Categories'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -?> - - - - - - - \ No newline at end of file diff --git a/src/admin/stream_category.php b/src/admin/stream_category.php deleted file mode 100644 index 8a9bdde8..00000000 --- a/src/admin/stream_category.php +++ /dev/null @@ -1,328 +0,0 @@ - - - -
style="display: none;" > -
-
-
-
-
- -
-

- - Category

-
-
-
-
-
-
-
-
- - - - -
- -
-
-
-
- -
- -
- -
-
- - - -
- -
- -
-
-
- -
- data-plugin="switchery" class="js-switch" - data-color="#039cfd" /> -
-
-
-
-
    -
  • - -
  • -
-
-
-
-
- - - - - - - - - -
Stream IDStream NameActions
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/admin/stream_errors.php b/src/admin/stream_errors.php deleted file mode 100644 index 0e24425d..00000000 --- a/src/admin/stream_errors.php +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/admin/stream_mass.php b/src/admin/stream_mass.php deleted file mode 100644 index ad636783..00000000 --- a/src/admin/stream_mass.php +++ /dev/null @@ -1,339 +0,0 @@ - - 'source', 'parent' => '#', 'text' => "Online", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); - - foreach ($rServers as $rServer) { - $rServerTree[] = array('id' => intval($rServer['id']), 'parent' => 'offline', 'text' => htmlspecialchars($rServer['server_name']), 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); - } - $_TITLE = 'Mass Edit Streams'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -echo '' . "\n"; - -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); -?> - - - - - \ No newline at end of file diff --git a/src/admin/stream_rank.php b/src/admin/stream_rank.php deleted file mode 100644 index 2bc146a2..00000000 --- a/src/admin/stream_rank.php +++ /dev/null @@ -1,257 +0,0 @@ - - 'Live Stream', 2 => 'Movie', 3 => 'Created Channel', 4 => 'Radio Station', 5 => 'Episode'); - $rPeriod = (RequestManager::getAll()['period'] ?: 'all'); - $db->query('SELECT `streams_stats`.*, `streams`.`stream_display_name` FROM `streams_stats` INNER JOIN `streams` ON `streams`.`id` = `streams_stats`.`stream_id` WHERE `streams_stats`.`type` = ? AND `streams`.`type` IN (1,3) GROUP BY `stream_id` ORDER BY `streams_stats`.`rank` ASC LIMIT 500;', $rPeriod); - $rRows = $db->get_rows(); - $_TITLE = 'Stream Rank'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -?> -
- style="display: none;" > -
-
-
-
-
- -
-

Stream Rank

-
-
-
-
-
-
-
-
-
- -
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - -
Rank #Stream NameTime WatchedTotal ConnectionsTotal Users
- - - - -
-
-
-
-
-
- -
- - - - - - \ No newline at end of file diff --git a/src/admin/stream_review.php b/src/admin/stream_review.php deleted file mode 100644 index 7e73a0ac..00000000 --- a/src/admin/stream_review.php +++ /dev/null @@ -1,450 +0,0 @@ - - $rStream) { - if (!RequestManager::getAll()['save_bouquets']) { - } else { - $rHasBouquets = array(); - - foreach (BouquetService::getAll() as $rBouquetID => $rBouquet) { - if (!(in_array($rID, $rBouquet['streams']) || in_array($rID, $rBouquet['channels']))) { - } else { - $rHasBouquets[] = $rBouquetID; - } - } - $rDelBouquet = $rAddBouquet = array(); - - foreach ($rHasBouquets as $rBouquetID) { - if (in_array($rBouquetID, $rStream['bouquets'])) { - } else { - removeFromBouquet('stream', $rBouquetID, $rID); - } - } - - foreach ($rStream['bouquets'] as $rBouquetID) { - if (in_array($rBouquetID, $rHasBouquets)) { - } else { - $rAddBouquet[] = $rBouquetID; - addToBouquet('stream', $rBouquetID, $rID); - } - } - } - - if (RequestManager::getAll()['save_categories'] && RequestManager::getAll()['save_epg']) { - $db->query('UPDATE `streams` SET `stream_display_name` = ?, `category_id` = ?, `channel_id` = ?, `epg_id` = ? WHERE `id` = ?;', $rStream['name'], '[' . implode(',', array_map('intval', $rStream['categories'])) . ']', ($rStream['channel_id'] ?: null), (is_null($rStream['epg_id']) ? null : $rStream['epg_id']), $rID); - } else { - if (RequestManager::getAll()['save_categories']) { - $db->query('UPDATE `streams` SET `stream_display_name` = ?, `category_id` = ? WHERE `id` = ?;', $rStream['name'], '[' . implode(',', array_map('intval', $rStream['categories'])) . ']', $rID); - } else { - if (RequestManager::getAll()['save_epg']) { - $db->query('UPDATE `streams` SET `stream_display_name` = ?, `channel_id` = ?, `epg_id` = ?, WHERE `id` = ?;', $rStream['name'], ($rStream['channel_id'] ?: null), (is_null($rStream['epg_id']) ? null : $rStream['epg_id']), $rID); - } else { - $db->query('UPDATE `streams` SET `stream_display_name` = ? WHERE `id` = ?;', $rStream['name'], $rID); - } - } - } - } - header('Location: ./streams?status=' . STATUS_SUCCESS); - - exit(); - } else { - if (!isset(RequestManager::getAll()['streams'])) { - } else { - $rStreams = json_decode(RequestManager::getAll()['streams'], true); - $rCategories = CategoryService::getAllByType('live'); - $rBouquets = BouquetService::getAllSimple(); - $rStreamBouquets = array(); - foreach ($rBouquets as $rBouquet) { - $rBouquetChannels = json_decode($rBouquet['bouquet_channels'], true); - - foreach ($rBouquetChannels as $rStreamID) { - if (!in_array($rStreamID, $rStreams)) { - } else { - $rStreamBouquets[$rStreamID][] = $rBouquet['id']; - } - } - } - $rOptions = array('categories' => isset(RequestManager::getAll()['edit_categories']), 'epg' => isset(RequestManager::getAll()['edit_epg']), 'bouquets' => isset(RequestManager::getAll()['edit_bouquets'])); - $rWidth = array(25, 20, 20); - - if ($rOptions['categories'] || $rOptions['bouquets'] || $rOptions['epg']) { - } else { - $rWidth = array(90, 0, 0); - } - - $rImport = array(); - - if (0 >= count($rStreams)) { - } else { - $db->query('SELECT * FROM `streams` WHERE `id` IN (' . implode(',', array_map('intval', $rStreams)) . ');'); - - foreach ($db->get_rows() as $rRow) { - $rImport[] = array('id' => $rRow['id'], 'channel_id' => ($rRow['channel_id'] ?: ''), 'epg_id' => ($rRow['epg_id'] ?: ''), 'title' => ($rRow['stream_display_name'] ?: ''), 'category' => json_decode($rRow['category_id'], true), 'bouquets' => ($rStreamBouquets[$rRow['id']] ?: array())); - } - } - - if (count($rImport) != 0) { - } else { - $_STATUS = STATUS_NO_SOURCES; - $rImport = null; - } - } - } - $_TITLE = 'Review'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -?> - - - - - - - - \ No newline at end of file diff --git a/src/admin/stream_tools.php b/src/admin/stream_tools.php deleted file mode 100644 index aa3c4086..00000000 --- a/src/admin/stream_tools.php +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/admin/stream_view.php b/src/admin/stream_view.php deleted file mode 100644 index f448c7d3..00000000 --- a/src/admin/stream_view.php +++ /dev/null @@ -1,836 +0,0 @@ - - 'Stream', 2 => 'Movie', 3 => 'Channel', 4 => 'Station', 5 => 'Episode')[$rStream['type']]; - $rEPGData = null; - $rImage = null; - - if ($rStream['type'] == 1) { - $rEPGData = EpgService::getChannelEpg($rStream); - - if (0 >= $rStream['vframes_server_id']) { - } else { - $rExpires = time() + 3600; - $rTokenData = array('session_id' => session_id(), 'expires' => $rExpires, 'stream_id' => intval(RequestManager::getAll()['id']), 'ip' => NetworkUtils::getUserIP()); - $rUIToken = Encryption::encrypt(json_encode($rTokenData), SettingsManager::getAll()['live_streaming_pass'], OPENSSL_EXTRA); - - if (issecure()) { - $rVServer = ServerRepository::getAll()[$rStream['vframes_server_id']]; - $rImage = 'https://' . (($rVServer['domain_name'] ? $rVServer['domain_name'] : $rVServer['server_ip'])) . ':' . intval($rVServer['https_broadcast_port']) . '/admin/thumb?uitoken=' . $rUIToken; - } else { - $rVServer = ServerRepository::getAll()[$rStream['vframes_server_id']]; - $rImage = 'http://' . (($rVServer['domain_name'] ? $rVServer['domain_name'] : $rVServer['server_ip'])) . ':' . intval($rVServer['http_broadcast_port']) . '/admin/thumb?uitoken=' . $rUIToken; - } - } - - $rAdaptiveLink = (json_decode($rStream['adaptive_link'], true) ?: array()); - } else { - if ($rStream['type'] == 2 || $rStream['type'] == 5) { - $rProperties = json_decode($rStream['movie_properties'], true); - $rImage = (!empty($rProperties['backdrop_path'][0]) ? ImageUtils::validateURL($rProperties['backdrop_path'][0], (issecure() ? 'https' : 'http')) : ImageUtils::validateURL($rProperties['movie_image'], (issecure() ? 'https' : 'http'))); - - if (empty($rImage)) { - } else { - if (@getimagesize($rImage)) { - } else { - $rImage = null; - } - } - } else { - if ($rStream['type'] != 3) { - } else { - $rCCInfo = null; - $db->query('SELECT `streams_servers`.`stream_started`, `streams_servers`.`cc_info` FROM `streams` LEFT JOIN `streams_servers` ON `streams_servers`.`stream_id` = `streams`.`id` AND `streams_servers`.`parent_id` IS NULL WHERE `streams`.`id` = ? GROUP BY `streams`.`id`;', $rStream['id']); - - if (0 >= $db->num_rows()) { - } else { - $rServerRow = $db->get_row(); - $rCCInfo = json_decode($rServerRow['cc_info'], true); - $rSeconds = time() - intval($rServerRow['stream_started']); - } - } - } - } - - if ($rStream['type'] != 5) { - } else { - $rSeries = null; - $db->query('SELECT * FROM `streams_series` WHERE `id` = (SELECT `series_id` FROM `streams_episodes` WHERE `stream_id` = ?);', $rStream['id']); - - if (0 >= $db->num_rows()) { - } else { - $rSeries = $db->get_row(); - } - - $rSeriesID = $rSeries['id']; - } - - $rStreamStats = StreamRepository::getStats($rStream['id']); - $_TITLE = 'View ' . $rTypeString; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -echo '' . "\r\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/streams.php b/src/admin/streams.php deleted file mode 100644 index a50b21b9..00000000 --- a/src/admin/streams.php +++ /dev/null @@ -1,513 +0,0 @@ - -query('SELECT DISTINCT(`audio_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `audio_codec` IS NOT NULL AND `type` = 1 ORDER BY `audio_codec` ASC;'); - - foreach ($db->get_rows() as $rRow) { - $rAudioCodecs[] = $rRow['audio_codec']; - } - $db->query('SELECT DISTINCT(`video_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `video_codec` IS NOT NULL AND `type` = 1 ORDER BY `video_codec` ASC;'); - - foreach ($db->get_rows() as $rRow) { - $rVideoCodecs[] = $rRow['video_codec']; - } - $_TITLE = 'Streams'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; -echo '' . "\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/theft_detection.php b/src/admin/theft_detection.php deleted file mode 100644 index 77eef6d4..00000000 --- a/src/admin/theft_detection.php +++ /dev/null @@ -1,242 +0,0 @@ -' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n" . ' '; -include 'topbar.php'; -echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

VOD Theft Detection

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n" . ' '; - -foreach ($rTheftDetection[$rRange] as $rRow) { - if ($rRange == 0) { - $rButtons = ''; - } else { - $rDates = date($rSettings['date_format'], time() - intval($rRange)) . ' - ' . date($rSettings['date_format'], time()); - $rButtons = ''; - } - - if (Authorization::check('adv', 'edit_user')) { - $rID = "" . $rRow['user_id'] . ''; - $rUsername = "" . $rRow['username'] . ''; - } else { - $rID = $rRow['user_id']; - $rUsername = $rRow['username']; - } - - echo ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' '; -} -echo ' ' . "\r\n\t\t\t\t\t\t" . '
User IDUsernameView CountActions
'; - echo $rID; - echo ''; - echo $rUsername; - echo ''; - echo $rRow['vod_count']; - echo ''; - echo $rButtons; - echo '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/ticket.php b/src/admin/ticket.php deleted file mode 100644 index 18ed905e..00000000 --- a/src/admin/ticket.php +++ /dev/null @@ -1,183 +0,0 @@ -' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n" . ' '; -include 'topbar.php'; -echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

Ticket Response

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
    ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); -?> - - - - - \ No newline at end of file diff --git a/src/admin/ticket_view.php b/src/admin/ticket_view.php deleted file mode 100644 index bb05b378..00000000 --- a/src/admin/ticket_view.php +++ /dev/null @@ -1,69 +0,0 @@ -query('UPDATE `tickets` SET `admin_read` = 1 WHERE `id` = ?;', RequestManager::getAll()['id']); - } - - $_TITLE = 'View Ticket'; - require_once __DIR__ . '/../public/Views/layouts/admin.php'; - renderUnifiedLayoutHeader('admin'); -endif; // !$__viewMode -echo '' . "\r\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); diff --git a/src/admin/tickets.php b/src/admin/tickets.php deleted file mode 100644 index c3b1b388..00000000 --- a/src/admin/tickets.php +++ /dev/null @@ -1,254 +0,0 @@ -' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n" . ' '; -include 'topbar.php'; -echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

Tickets

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t"; -$rTickets = getTickets($rUserInfo['id'], true); - -foreach ($rTickets as $rTicket) { - echo "\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t"; -} -echo "\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t" . '
IDResellerTitleStatusCreated DateLast ReplyAction
'; - echo intval($rTicket['id']); - echo ''; - echo $rTicket['username']; - echo ''; - echo $rTicket['title']; - echo ''; - echo $rStatusArray[$rTicket['status']]; - echo ''; - echo $rTicket['created']; - echo ''; - echo $rTicket['last_reply']; - echo '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; - -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); -?> - - - - - - \ No newline at end of file diff --git a/src/admin/user.php b/src/admin/user.php deleted file mode 100644 index a1fdc608..00000000 --- a/src/admin/user.php +++ /dev/null @@ -1,352 +0,0 @@ - - - - -
> -
-
-
-
-
- -
-

User

-
-
-
- -
-
-
-
-
- - - - -
- - -
-
-
-
-
- -
- -
-
-
- -
- - value="" - data-indicator="pwindicator"> -
-
-
-
-
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- - -
-
-
- 0): ?> -

Leave the override cell blank to disable package override for the selected package.

- - - - - - - - - - - - - - - - - - - -
#PackageCreditsOverride
- -


- - - -
-
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/user_logs.php b/src/admin/user_logs.php deleted file mode 100644 index 176ffa37..00000000 --- a/src/admin/user_logs.php +++ /dev/null @@ -1,198 +0,0 @@ -' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n" . ' '; -include 'topbar.php'; -echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

Reseller Logs

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n" . '
' . "\r\n" . ' ' . "\r\n" . '
' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t" . '
IDResellerLine / DeviceActionCostCredits RemainingDate
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; - -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); -?> - - - - - \ No newline at end of file diff --git a/src/admin/user_mass.php b/src/admin/user_mass.php deleted file mode 100644 index 6ecadd7c..00000000 --- a/src/admin/user_mass.php +++ /dev/null @@ -1,236 +0,0 @@ -' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n" . ' '; -include 'topbar.php'; -echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

Mass Edit Users

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t"; - -if (!(isset($_STATUS) && $_STATUS == STATUS_SUCCESS)) { -} else { - echo "\t\t\t\t" . '' . "\r\n\t\t\t\t"; -} - -echo "\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n" . '
' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
IDUsernameOwnerIPStatusTypeCreditsUsersLinesMAGsEnigmasLast LoginActions
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '

' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . 'To mass edit any of the below options, tick the checkbox next to it and change the input value.' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '

' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
    ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . 'Previous' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . 'Next' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; - -foreach (getPackages() as $rPackage) { - if (!$rPackage['is_official']) { - } else { - echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; - } -} -echo "\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
#PackageCreditsOverride
'; - echo intval($rPackage['id']); - echo ''; - echo $rPackage['package_name']; - echo ''; - echo intval($rPackage['official_credits']); - echo '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
    ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . 'Previous' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/useragent.php b/src/admin/useragent.php deleted file mode 100644 index c5d336f4..00000000 --- a/src/admin/useragent.php +++ /dev/null @@ -1,225 +0,0 @@ -' . "\n" . '
' . "\n\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n" . ' '; -include 'topbar.php'; -echo "\t\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '

'; - -if (isset($rUAArr)) { - echo 'Edit'; -} else { - echo 'Block'; -} - -echo ' User-Agent

' . "\n\t\t\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t" . '
' . "\n\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t"; - -if (!isset($rUAArr)) { -} else { - echo "\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t"; -} - -echo "\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t" . '
    ' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t" . '
' . "\n\t" . '
' . "\n" . '' . "\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); ?> - - - - - \ No newline at end of file diff --git a/src/admin/useragents.php b/src/admin/useragents.php deleted file mode 100644 index 29b1ddd2..00000000 --- a/src/admin/useragents.php +++ /dev/null @@ -1,248 +0,0 @@ -' . "\n" . '
' . "\n\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n" . ' '; -include 'topbar.php'; -echo "\t\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '

Blocked User-Agents

' . "\n\t\t\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t" . '
' . "\n\t\t" . '
' . "\n\t\t\t" . '
' . "\n" . ' '; - -if (!(isset($_STATUS) && $_STATUS == STATUS_SUCCESS)) { -} else { - echo ' ' . "\n" . ' '; -} - -echo "\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t"; - -foreach (getUserAgents() as $rUserAgent) { - echo "\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t"; -} -echo "\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t" . '
IDUser-AgentExact MatchActions
'; - echo intval($rUserAgent['id']); - echo ''; - echo $rUserAgent['user_agent']; - echo '' . "\n\t\t\t\t\t\t\t\t\t\t"; - - if ($rUserAgent['exact_match']) { - echo "\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t"; - } else { - echo "\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t"; - } - - echo "\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '" . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t" . '
' . "\n\t" . '
' . "\n" . '' . "\n"; -require_once __DIR__ . '/../public/Views/layouts/footer.php'; -renderUnifiedLayoutFooter('admin'); -?> - - - - - \ No newline at end of file diff --git a/src/admin/users.php b/src/admin/users.php deleted file mode 100644 index 2dc4fe7c..00000000 --- a/src/admin/users.php +++ /dev/null @@ -1,288 +0,0 @@ - - - - -
> -
-
-
-
-
- -
-

Users

-
-
-
- -
-
- - - - -
-
-
-
- -
- - - -
- -
- -
- -
- - -
- -
-
- - - - - - - - - - - - - - - - - - - - -
IDUsernameOwnerIPStatusTypeCreditsUsersLinesMAGsEnigmasLast LoginActions
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/admin/watch.php b/src/admin/watch.php deleted file mode 100644 index 549efb01..00000000 --- a/src/admin/watch.php +++ /dev/null @@ -1,24 +0,0 @@ -deserialize($data); + $result = $this->deserialize($data); + + if ($result === false) { + @unlink($file); + } + + return $result; } /** @@ -79,9 +86,12 @@ class FileCache implements CacheInterface { $file = $this->basePath . $key; $serialized = $this->serialize($data); - $result = @file_put_contents($file, $serialized, LOCK_EX); - - return $result !== false; + $tmp = $file . '.' . getmypid() . '.tmp'; + if (@file_put_contents($tmp, $serialized, LOCK_EX) === false) { + @unlink($tmp); + return false; + } + return @rename($tmp, $file); } /** @@ -191,15 +201,25 @@ class FileCache implements CacheInterface { /** * Deserialize data using igbinary (if available) or PHP unserialize * + * Returns false on corrupted data (cache miss). + * * @param string $data - * @return mixed + * @return mixed|false */ protected function deserialize($data) { if ($this->useIgbinary) { - return igbinary_unserialize($data); + $result = @igbinary_unserialize($data); + if ($result === false && $data !== igbinary_serialize(false)) { + return false; + } + return $result; } - return unserialize($data); + $result = @unserialize($data); + if ($result === false && $data !== serialize(false)) { + return false; + } + return $result; } // ------------------------------------------------------------------ diff --git a/src/domain/Auth/AuthRepository.php b/src/domain/Auth/AuthRepository.php index 28610359..871c2578 100644 --- a/src/domain/Auth/AuthRepository.php +++ b/src/domain/Auth/AuthRepository.php @@ -46,7 +46,7 @@ class AuthRepository { } $rType = array('admin', 'reseller', 'ministra', 'includes/api/admin', 'includes/api/reseller', 'ministra/new', 'player')[$rCode['type']]; - $rAlias = array('admin', 'reseller', 'ministra', 'includes/api/admin', 'includes/api/reseller', 'ministra/new', 'public/assets/player')[$rCode['type']]; + $rAlias = array('public/Views/admin', 'reseller', 'ministra', 'includes/api/admin', 'includes/api/reseller', 'ministra/new', 'public/assets/player')[$rCode['type']]; $rBurst = array(500, 50, 50, 1000, 1000, 50, 500)[$rCode['type']]; if (strlen($rCode['code']) >= 4) { @@ -59,7 +59,7 @@ class AuthRepository { if (count(self::getActiveCodes($rMainHome)) == 0) { if (!file_exists($rMainHome . 'bin/nginx/conf/codes/default.conf')) { - file_put_contents($rMainHome . 'bin/nginx/conf/codes/default.conf', str_replace(array('alias ', '#WHITELIST#', '#CODE#', '#TYPE#', '#ALIAS#'), array('root ', '', '', 'admin', 'admin'), $rTemplate)); + file_put_contents($rMainHome . 'bin/nginx/conf/codes/default.conf', str_replace(array('alias ', '#WHITELIST#', '#CODE#', '#TYPE#', '#ALIAS#'), array('root ', '', '', 'admin', 'public/Views/admin'), $rTemplate)); } } else { if (file_exists($rMainHome . 'bin/nginx/conf/codes/default.conf')) { diff --git a/src/includes/admin.php b/src/includes/admin.php index a20e46aa..18f8c43d 100644 --- a/src/includes/admin.php +++ b/src/includes/admin.php @@ -1,5 +1,10 @@ =')) { + $updateRequired = true; + } +} + +if (isset(RequestManager::getAll()['status'])) { + $_STATUS = intval(RequestManager::getAll()['status']); + $rArgs = RequestManager::getAll(); + unset($rArgs['status']); + $customScript = setArgs($rArgs); +} + +if (getPageName() != 'setup') { + $db->query('SELECT COUNT(`id`) AS `count` FROM `users` LEFT JOIN `users_groups` ON `users_groups`.`group_id` = `users`.`member_group_id` WHERE `users_groups`.`is_admin` = 1;'); + + if ($db->get_row()['count'] == 0) { + header('Location: ./setup'); + exit(); + } +} diff --git a/src/infrastructure/bootstrap/admin_session_fc.php b/src/infrastructure/bootstrap/admin_session_fc.php new file mode 100644 index 00000000..fb0f86c2 --- /dev/null +++ b/src/infrastructure/bootstrap/admin_session_fc.php @@ -0,0 +1,51 @@ + false]); + exit; + } + + $referrer = ''; + if (defined('PAGE_NAME') && PAGE_NAME !== 'login') { + $referrer = '?referrer=' . urlencode(PAGE_NAME); + } + + header('Location: ./login' . $referrer); + exit; +} + +$_SESSION['last_activity'] = time(); +session_write_close(); diff --git a/src/public/Controllers/Admin/AjaxController.php b/src/public/Controllers/Admin/AjaxController.php new file mode 100644 index 00000000..b5387c74 --- /dev/null +++ b/src/public/Controllers/Admin/AjaxController.php @@ -0,0 +1,20 @@ +redirect('./login'); + } +} diff --git a/src/public/Controllers/Admin/PlayerEmbedController.php b/src/public/Controllers/Admin/PlayerEmbedController.php new file mode 100644 index 00000000..dd8aacdb --- /dev/null +++ b/src/public/Controllers/Admin/PlayerEmbedController.php @@ -0,0 +1,17 @@ +requirePermission(); + @chdir(MAIN_HOME . 'public/Views/admin/'); + require MAIN_HOME . 'public/Views/admin/player.php'; + } +} diff --git a/src/public/Controllers/Admin/PostController.php b/src/public/Controllers/Admin/PostController.php new file mode 100644 index 00000000..b89873aa --- /dev/null +++ b/src/public/Controllers/Admin/PostController.php @@ -0,0 +1,28 @@ + 1 (included from footer) → выдаёт JavaScript + * - Когда $rICount == 1 (direct access) → обрабатывает POST + * + * Через FC post.php попадает сюда после bootstrap, поэтому $rICount > 1. + * Чтобы активировать POST-обработку, принудительно переопределяем условие. + */ +class PostController extends BaseAdminController +{ + public function index() + { + @chdir(MAIN_HOME . 'public/Views/admin/'); + + // Принудительно установить $rICount = 1 чтобы post.php обработал POST, + // а не выдал JavaScript. Include count уже > 1 из-за FC bootstrap. + $GLOBALS['__forcePostMode'] = true; + + require MAIN_HOME . 'public/Views/admin/post.php'; + } +} diff --git a/src/public/Controllers/Admin/SetupController.php b/src/public/Controllers/Admin/SetupController.php new file mode 100644 index 00000000..ea302a53 --- /dev/null +++ b/src/public/Controllers/Admin/SetupController.php @@ -0,0 +1,28 @@ + 'Stream', 2 => 'Movie', 3 => 'Channel', 4 => 'Station', 5 => 'Episode')[$rStream['type']]; $rEPGData = null; $rImage = null; + $rUIToken = null; + $rAdaptiveLink = null; + $rProperties = null; + $rCCInfo = null; + $rSeconds = null; + $rSeries = null; + $rSeriesID = null; if ($rStream['type'] == 1) { $rEPGData = EpgService::getChannelEpg($rStream); diff --git a/src/admin/api.php b/src/public/Views/admin/api.php similarity index 100% rename from src/admin/api.php rename to src/public/Views/admin/api.php diff --git a/src/public/Views/admin/archive.php b/src/public/Views/admin/archive.php index 63e3b500..2e01118e 100644 --- a/src/public/Views/admin/archive.php +++ b/src/public/Views/admin/archive.php @@ -1,6 +1,353 @@ - + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/asns.php b/src/public/Views/admin/asns.php index 39ba4e12..f401b1c9 100644 --- a/src/public/Views/admin/asns.php +++ b/src/public/Views/admin/asns.php @@ -1,6 +1,313 @@ - + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/backups.php b/src/public/Views/admin/backups.php index dc348cd7..e144a9aa 100644 --- a/src/public/Views/admin/backups.php +++ b/src/public/Views/admin/backups.php @@ -1,7 +1,366 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/bouquet.php b/src/public/Views/admin/bouquet.php index a1aa3668..110f3f98 100644 --- a/src/public/Views/admin/bouquet.php +++ b/src/public/Views/admin/bouquet.php @@ -1,6 +1,497 @@ = count($rRequiredIDs)) { + } else { + $db->query('SELECT `id`, `stream_display_name` FROM `streams` WHERE `id` IN (' . implode(',', $rRequiredIDs) . ');'); + + foreach ($db->get_rows() as $rRow) { + $rNames[$rRow['id']] = $rRow['stream_display_name']; + } + } + + if (0 >= count($rBouquetSeries)) { + } else { + $db->query('SELECT `id`, `title` FROM `streams_series` WHERE `id` IN (' . implode(',', $rBouquetSeries) . ');'); + + foreach ($db->get_rows() as $rRow) { + $rSeriesNames[$rRow['id']] = $rRow['title']; + } + } + } + + $_TITLE = 'Bouquets'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; // !$__viewMode +echo '' . "\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/bouquet_order.php b/src/public/Views/admin/bouquet_order.php index 0ebbcc50..72a169ac 100644 --- a/src/public/Views/admin/bouquet_order.php +++ b/src/public/Views/admin/bouquet_order.php @@ -1,6 +1,284 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/bouquet_sort.php b/src/public/Views/admin/bouquet_sort.php index 3ee11600..f8a1adbd 100644 --- a/src/public/Views/admin/bouquet_sort.php +++ b/src/public/Views/admin/bouquet_sort.php @@ -1,6 +1,591 @@ + + + + + + [], 'movie' => [], 'radio' => [], 'series' => []]; +$rOrdered = ['stream' => [], 'movie' => [], 'radio' => [], 'series' => []]; +$rChannels = array_map('intval', json_decode($rBouquet['bouquet_channels'], true)); +$rMovies = array_map('intval', json_decode($rBouquet['bouquet_movies'], true)); +$rSeries = array_map('intval', json_decode($rBouquet['bouquet_series'], true)); +$rRadios = array_map('intval', json_decode($rBouquet['bouquet_radios'], true)); + +if (count($rChannels) > 0) { + $db->query('SELECT `streams`.`id`, `streams`.`type`, `streams`.`category_id`, `streams`.`stream_display_name` FROM `streams` WHERE `streams`.`type` IN (1,3) AND `streams`.`id` IN (' . implode(',', array_map('intval', $rChannels)) . ');'); + + foreach ($db->get_rows() as $C740da31596f24ef) { + $rListings['stream'][intval($C740da31596f24ef['id'])] = $C740da31596f24ef; + } +} + +if (count($rMovies) > 0) { + $db->query('SELECT `streams`.`id`, `streams`.`type`, `streams`.`category_id`, `streams`.`stream_display_name` FROM `streams` WHERE `streams`.`type` = 2 AND `streams`.`id` IN (' . implode(',', array_map('intval', $rMovies)) . ');'); + + foreach ($db->get_rows() as $C740da31596f24ef) { + $rListings['movie'][intval($C740da31596f24ef['id'])] = $C740da31596f24ef; + } +} + +if (count($rRadios) > 0) { + $db->query('SELECT `streams`.`id`, `streams`.`type`, `streams`.`category_id`, `streams`.`stream_display_name` FROM `streams` WHERE `streams`.`type` = 4 AND `streams`.`id` IN (' . implode(',', array_map('intval', $rRadios)) . ');'); + + foreach ($db->get_rows() as $C740da31596f24ef) { + $rListings['radio'][intval($C740da31596f24ef['id'])] = $C740da31596f24ef; + } +} + +if (count($rSeries) > 0) { + $db->query('SELECT `streams_series`.`id`, `streams_series`.`category_id`, `streams_series`.`title` FROM `streams_series` WHERE `streams_series`.`id` IN (' . implode(',', array_map('intval', $rSeries)) . ');'); + + foreach ($db->get_rows() as $C740da31596f24ef) { + $rListings['series'][intval($C740da31596f24ef['id'])] = $C740da31596f24ef; + } +} + +foreach ($rChannels as $Fe753328765ad26c) { + if (isset($rListings['stream'][intval($Fe753328765ad26c)])) { + $rOrdered['stream'][] = $rListings['stream'][intval($Fe753328765ad26c)]; + } +} + +foreach ($rMovies as $a417725f28d75ef7) { + if (isset($rListings['movie'][intval($a417725f28d75ef7)])) { + $rOrdered['movie'][] = $rListings['movie'][intval($a417725f28d75ef7)]; + } +} + +foreach ($rRadios as $c804bfe21a4f0b26) { + if (isset($rListings['radio'][intval($c804bfe21a4f0b26)])) { + $rOrdered['radio'][] = $rListings['radio'][intval($c804bfe21a4f0b26)]; + } +} + +foreach ($rSeries as $bb2621204e39e62d) { + if (isset($rListings['series'][intval($bb2621204e39e62d)])) { + $rOrdered['series'][] = $rListings['series'][intval($bb2621204e39e62d)]; + } +} +$_TITLE = 'Bouquet Sort'; + +require_once __DIR__ . '/../layouts/admin.php'; +renderUnifiedLayoutHeader('admin'); + +?> + +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+ + + +
+
+
+ + +
+ +
+
+
+
+ +
+
+
    +
  • + + +
  • +
+
+
+ +
+
+
    +
  • + + + + + +
  • +
  • + +
  • +
+
+
+
+
+ +
+
+
    +
  • + + +
  • +
+
+
+ +
+
+
    +
  • + + + + + +
  • +
  • + +
  • +
+
+
+
+
+ +
+
+
    +
  • + + +
  • +
+
+
+ +
+
+
    +
  • + + + + + +
  • +
  • + +
  • +
+
+
+
+
+ +
+
+
    +
  • + + +
  • +
+
+
+ +
+
+
    +
  • + + + + + +
  • +
  • + +
  • +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + diff --git a/src/public/Views/admin/bouquets.php b/src/public/Views/admin/bouquets.php index e2f2754a..5c7d36eb 100644 --- a/src/public/Views/admin/bouquets.php +++ b/src/public/Views/admin/bouquets.php @@ -1,6 +1,232 @@ + + + + + + + + + + + + + +
style="display: none;" > +
+
+
+
+
+ +
+

+
+
+
+
+
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ -- + +
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/public/Views/admin/cache.php b/src/public/Views/admin/cache.php index d685f34e..184b1b74 100644 --- a/src/public/Views/admin/cache.php +++ b/src/public/Views/admin/cache.php @@ -1,7 +1,482 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/channel_order.php b/src/public/Views/admin/channel_order.php index 99aaf6e9..09e3bbc7 100644 --- a/src/public/Views/admin/channel_order.php +++ b/src/public/Views/admin/channel_order.php @@ -1,7 +1,570 @@ + + array(), 'movie' => array(), 'series' => array(), 'radio' => array()); + $db->query('SELECT COUNT(`id`) AS `count` FROM `streams`;'); + $rCount = $db->get_row()['count']; + + if (!($rCount <= 50000 || $rOverride)) { + } else { + $db->query('SELECT `id`, `type`, `stream_display_name`, `category_id` FROM `streams` ORDER BY `order` ASC, `stream_display_name` ASC;'); + + if (0 >= $db->num_rows()) { + } else { + foreach ($db->get_rows() as $rRow) { + if ($rRow['type'] == 1 || $rRow['type'] == 3) { + $rOrdered['stream'][] = $rRow; + } else { + if ($rRow['type'] == 2) { + $rOrdered['movie'][] = $rRow; + } else { + if ($rRow['type'] == 4) { + $rOrdered['radio'][] = $rRow; + } else { + if ($rRow['type'] != 5) { + } else { + $rOrdered['series'][] = $rRow; + } + } + } + } + } + } + } + + $_TITLE = 'Channel Order'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); ?> + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/client_logs.php b/src/public/Views/admin/client_logs.php index 6c0953f9..22973e86 100644 --- a/src/public/Views/admin/client_logs.php +++ b/src/public/Views/admin/client_logs.php @@ -1,7 +1,239 @@ - + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/code.php b/src/public/Views/admin/code.php index 86585701..5e6270dd 100644 --- a/src/public/Views/admin/code.php +++ b/src/public/Views/admin/code.php @@ -1,7 +1,424 @@ + + + +
+ style="display: none;" > +
+
+
+
+
+ +
+

+

+
+
+
+
+
+ + + +
+
+
+ + + +
+ +
+
+
+
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+ +
+ + data-plugin="switchery" class="js-switch" + data-color="#039cfd" /> +
+
+
+
+
    +
  • + +
  • +
+
+
+
+
+
+ +
+
+ > + +
+
+ +
+
+
+
    +
  • + +
  • +
  • + + +
  • +
  • + Next +
  • +
+
+
+
+
+
+ +
+ +
+ + +
+
+
+
+ +
+ +
+
+
+
+ + + + + + + +
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/public/Views/admin/codes.php b/src/public/Views/admin/codes.php index 72673e9d..3c1bf588 100644 --- a/src/public/Views/admin/codes.php +++ b/src/public/Views/admin/codes.php @@ -1,6 +1,275 @@ + + + + + + + + + + + +
style="display: none;" > +
+
+
+
+
+ +
+

Access Codes

+
+
+
+
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
Access CodeTypeEnabled
+ + + + + + +
+ + +
+
+
+
+
+
+
+
+ + + + + + + diff --git a/src/public/Views/admin/created_channel.php b/src/public/Views/admin/created_channel.php index 394ad579..6306f429 100644 --- a/src/public/Views/admin/created_channel.php +++ b/src/public/Views/admin/created_channel.php @@ -1,7 +1,756 @@ + 'source', + 'parent' => '#', + 'text' => "Online", + 'icon' => 'mdi mdi-play', + 'state' => ['opened' => true] + ], + [ + 'id' => 'offline', + 'parent' => '#', + 'text' => "Offline", + 'icon' => 'mdi mdi-stop', + 'state' => ['opened' => true] + ] + ]; + + if (isset($rChannel)) { + $rProperties = json_decode($rChannel['movie_properties'], true); + + if (!$rProperties) { + $rProperties = ['type' => $rChannel['series_no'] > 0 ? 0 : 1]; + } + + $rChannelSys = StreamRepository::getSystemRows(RequestManager::getAll()['id']); + + foreach ($rServers as $rServer) { + if (isset($rChannelSys[intval($rServer['id'])])) { + $rParent = $rChannelSys[intval($rServer['id'])]['parent_id'] != 0 + ? intval($rChannelSys[intval($rServer['id'])]['parent_id']) + : (!$rChannelSys[intval($rServer['id'])]['on_demand'] ? 'source' : null); + } else { + $rParent = 'offline'; + } + + if ($rParent !== null) { + $rServerTree[] = [ + 'id' => $rServer['id'], + 'parent' => $rParent, + 'text' => $rServer['server_name'], + 'icon' => 'mdi mdi-server-network', + 'state' => ['opened' => true] + ]; + } + } + } else { + foreach ($rServers as $rServer) { + $rServerTree[] = [ + 'id' => $rServer['id'], + 'parent' => 'offline', + 'text' => $rServer['server_name'], + 'icon' => 'mdi mdi-server-network', + 'state' => ['opened' => true] + ]; + } + } + + $_TITLE = 'Created Channel'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +?> +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+ $rEncodeError) { + ?> + + +
+
+
+ + + + + + + + +
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+ +
+
+
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + + + + + + + + + +
IDNameCategory / SeriesActions
+
+
+
+
    +
  • + +
  • + +
  • + Next +
  • +
    +
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + $rSources): ?> + + + + + + + + + +
Push FromRTMP URL
+ + + +
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+ +
+
+
+ + +
+ +
+ + +
+ +
+
+
+
+
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+
+
+ + + + + + + + +
Directory
+
+
+ + + + + + + + +
Filename
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/created_channel_mass.php b/src/public/Views/admin/created_channel_mass.php index 94582d76..a076a45e 100644 --- a/src/public/Views/admin/created_channel_mass.php +++ b/src/public/Views/admin/created_channel_mass.php @@ -1,7 +1,648 @@ + + 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); + + foreach ($rServers as $rServer) { + $rServerTree[] = array('id' => intval($rServer['id']), 'parent' => 'offline', 'text' => htmlspecialchars($rServer['server_name']), 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + $_TITLE = 'Mass Edit Channels'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); ?> + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/created_channels.php b/src/public/Views/admin/created_channels.php index 4a20e79f..13f96ea5 100644 --- a/src/public/Views/admin/created_channels.php +++ b/src/public/Views/admin/created_channels.php @@ -1,7 +1,306 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/credit_logs.php b/src/public/Views/admin/credit_logs.php index e18fd933..7bd7720d 100644 --- a/src/public/Views/admin/credit_logs.php +++ b/src/public/Views/admin/credit_logs.php @@ -1,6 +1,219 @@ - + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/dashboard.php b/src/public/Views/admin/dashboard.php index 1b10192d..65c5c6ed 100644 --- a/src/public/Views/admin/dashboard.php +++ b/src/public/Views/admin/dashboard.php @@ -1,7 +1,928 @@ + + array('secondary', '#7e8e9d', '#ffffff'), 2 => array('secondary', '#7e8e9d', '#ffffff'), 3 => array('secondary', '#7e8e9d', '#ffffff'), 4 => array('secondary', '#7e8e9d', '#ffffff')); + $rColourMap = array(array('#7e8e9d', 'bg-map-dark-1'), array('#6c7b8a', 'bg-map-dark-2'), array('#5a6977', 'bg-map-dark-3'), array('#485765', 'bg-map-dark-4'), array('#374654', 'bg-map-dark-5'), array('#273643', 'bg-map-dark-6')); + } else { + $rColours = array(1 => array('purple', '#675db7', '#675db7'), 2 => array('success', '#23b397', '#23b397'), 3 => array('pink', '#e36498', '#e36498'), 4 => array('info', '#56C3D6', '#56C3D6')); + $rColourMap = array(array('#23b397', 'bg-success'), array('#56c2d6', 'bg-info'), array('#5089de', 'bg-primary'), array('#675db7', 'bg-purple'), array('#e36498', 'bg-pink'), array('#98a6ad', 'bg-secondary')); + } + + if (!isset(RequestManager::getAll()['server_id']) || isset($rServers[RequestManager::getAll()['server_id']])) { + } else { + goHome(); + } + + $rConnectionMap = array(); + $rConnectionCount = 0; + + if (isset(RequestManager::getAll()['server_id'])) { + $db->query('SELECT `geoip_country_code`, COUNT(`geoip_country_code`) AS `count` FROM `lines_activity` WHERE (`server_id` = ? OR `proxy_id` = ?) GROUP BY `geoip_country_code` ORDER BY `count` DESC;', intval(RequestManager::getAll()['server_id']), intval(RequestManager::getAll()['server_id'])); + } else { + $db->query('SELECT `geoip_country_code`, COUNT(`geoip_country_code`) AS `count` FROM `lines_activity` GROUP BY `geoip_country_code` ORDER BY `count` DESC;'); + } + + if (0 >= $db->num_rows()) { + } else { + $i = 0; + + foreach ($db->get_rows() as $rRow) { + if ($i < count($rColourMap)) { + $rRow['colour'] = $rColourMap[$i]; + } else { + $rRow['colour'] = $rColourMap[count($rColourMap) - 1]; + } + + if (isset($rCountryCodes[$rRow['geoip_country_code']])) { + $rRow['name'] = $rCountryCodes[$rRow['geoip_country_code']]; + } else { + $rRow['name'] = 'Unknown Country'; + } + + $rConnectionCount += $rRow['count']; + $rConnectionMap[] = $rRow; + $i++; + } + } + + if (isset(RequestManager::getAll()['server_id'])) { + } else { + $rLimit = 3600; + $rTime = time(); + $rNearestRange = $rTime - $rLimit; + $rServerStats = array(); + $db->query('SELECT * FROM `servers_stats` WHERE `time` >= ? ORDER BY `time` ASC;', $rNearestRange); + + if (0 >= $db->num_rows()) { + } else { + foreach ($db->get_rows() as $rRow) { + $rServerStats[intval($rRow['server_id'])][] = $rRow['cpu']; + } + } + } + + $rOrderedServers = $rServers; + array_multisort(array_column($rOrderedServers, 'order'), SORT_ASC, $rOrderedServers); + + $_TITLE = 'Dashboard'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); + ?> + +
+
+ + +
+ + + + +
+
+
+
+
+
+ +
+
+
+
+

0 Mbps

+

Network Output

+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

0 Mbps

+

Network Input

+
+
+
+
+
+
+ +
+
+
+

Service Status

+
+
+ + + dbh->query("SELECT JSON_CONTAINS('0', 0, '\$') AS `json_test`;"); + } catch (Exception $e) { + $rHasError = true; + ?> +
+ +
+ MariaDB Outdated! + You're using an old version of MariaDB. Please update to at least v10.5 in order for XC_VM to work correctly.
+


+
+
+ +
+ +
+ Database Incomplete + Your database is outdated, please run /home/xc_vm/status as root user to update your tables.
+


+
+
+ 600) { + $rHasError = true; + ?> +
+ +
+ Root Crons Missing + Root cronjob hasn't run recently, please check root crontab or run /home/xc_vm/status
+


+
+
+ + + +
+
+
+
+
+ + + +
+
+
+

CPU & Memory

+
+
+
+
+
+
+
+
+
+

Network Traffic

+
+
+
+
+
+
+ + + + +
+
+
+

Connections

+
+
+
+
+
+
+ + + +
+
+
+

Connections by Location

+
+
+
+
+
+
+ +
+
+ % +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + +
+ +
+
+ +
+
+
+
+
+
+
+
+
+

+
+ +
+

+
+ +
+
+

CPU

+
+
+
+
+
+
+
+
+

Streams Live

+
+ +
+

Down

+
+ +
+
+

MEM

+
+
+
+
+
+
+
+
+

Requests /sec

+
+
+ +
+
+

+
+
+ +
+
+
+

IO

+
+
+
+
+
+
+
+
+

 (Mbps)

+
+
+ +
+
+

 (Mbps)

+
+
+ +
+
+
+

DISK

+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+ + + +
+
+ + + + + + \ No newline at end of file diff --git a/src/admin/database.php b/src/public/Views/admin/database.php similarity index 100% rename from src/admin/database.php rename to src/public/Views/admin/database.php diff --git a/src/public/Views/admin/edit_profile.php b/src/public/Views/admin/edit_profile.php index 8eda5feb..e4807f14 100644 --- a/src/public/Views/admin/edit_profile.php +++ b/src/public/Views/admin/edit_profile.php @@ -1,6 +1,303 @@ - + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/enigma.php b/src/public/Views/admin/enigma.php index d158a8fd..4ed1848a 100644 --- a/src/public/Views/admin/enigma.php +++ b/src/public/Views/admin/enigma.php @@ -1,7 +1,449 @@ array()); + } + + $_TITLE = 'Enigma Device'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; // !$__viewMode +echo '' . "\r\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/enigma_mass.php b/src/public/Views/admin/enigma_mass.php index d103786b..65acd2f7 100644 --- a/src/public/Views/admin/enigma_mass.php +++ b/src/public/Views/admin/enigma_mass.php @@ -1,7 +1,451 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/enigmas.php b/src/public/Views/admin/enigmas.php index d263c4e9..28e886a1 100644 --- a/src/public/Views/admin/enigmas.php +++ b/src/public/Views/admin/enigmas.php @@ -1,7 +1,290 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/epg.php b/src/public/Views/admin/epg.php index 7303a5cc..0ef28f52 100644 --- a/src/public/Views/admin/epg.php +++ b/src/public/Views/admin/epg.php @@ -1,7 +1,291 @@ + + + +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+
+
+
+ + + +
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+
+
    +
  • + +
  • +
+
+
+
+
+ + + + + + + + + + + $rEPGRow) { ?> + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/public/Views/admin/epg_view.php b/src/public/Views/admin/epg_view.php index c8dc2472..c6bc4e95 100644 --- a/src/public/Views/admin/epg_view.php +++ b/src/public/Views/admin/epg_view.php @@ -1,7 +1,328 @@ + + 0) { + $rWhere[] = "JSON_CONTAINS(`category_id`, ?, '\$')"; + $rWhereV[] = json_encode(intval(RequestManager::getAll()['category'])); + } + + if (!empty(RequestManager::getAll()['search'])) { + $rWhere[] = '(`stream_display_name` LIKE ? OR `id` LIKE ?)'; + $rWhereV[] = '%' . RequestManager::getAll()['search'] . '%'; + $rWhereV[] = RequestManager::getAll()['search']; + } + + $rWhereString = (count($rWhere) > 0) ? 'WHERE ' . implode(' AND ', $rWhere) : ''; + + $rOrderBy = '`stream_display_name` ASC'; + if (!empty(RequestManager::getAll()['sort']) && in_array(RequestManager::getAll()['sort'], array('name', 'added'))) { + $rOrderBy = $rOrder[RequestManager::getAll()['sort']]; + } + + $rStreamIDs = array(); + $db->query('SELECT COUNT(`id`) AS `count` FROM `streams` ' . $rWhereString . ';', ...$rWhereV); + $rCount = $db->get_row()['count']; + $db->query('SELECT `id` FROM `streams` ' . $rWhereString . ' ORDER BY ' . $rOrderBy . ' LIMIT ' . $rStart . ', ' . $rLimit . ';', ...$rWhereV); + + foreach ($db->get_rows() as $rRow) { + $rStreamIDs[] = $rRow['id']; + } + $rPages = ceil($rCount / $rLimit); + $rPagination = array(); + + foreach (range(max($rPageInt - 2, 1), min($rPageInt + 2, $rPages)) as $i) { + $rPagination[] = $i; + } + $_TITLE = 'TV Guide'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); + ?> + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/epgs.php b/src/public/Views/admin/epgs.php index ac67da8e..7ac9a0fa 100644 --- a/src/public/Views/admin/epgs.php +++ b/src/public/Views/admin/epgs.php @@ -1,6 +1,235 @@ + + + +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Channels
+ +
+ + + +
+ +
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/public/Views/admin/episode.php b/src/public/Views/admin/episode.php index 9ed2d4de..9692db51 100644 --- a/src/public/Views/admin/episode.php +++ b/src/public/Views/admin/episode.php @@ -1,7 +1,1103 @@ + query('SELECT `series_id` FROM `streams_episodes` WHERE `stream_id` = ?;', intval(RequestManager::getAll()['id'])); + + if (0 >= $db->num_rows()) { + } else { + RequestManager::update('sid', intval($db->get_row()['series_id'])); + } + } + + if ($rSeriesArr = getSerie(RequestManager::getAll()['sid'])) { + } else { + goHome(); + } + + if (!isset(RequestManager::getAll()['id'])) { + } else { + $rEpisode = StreamRepository::getById(RequestManager::getAll()['id']); + + if ($rEpisode && $rEpisode['type'] == 5) { + } else { + goHome(); + } + } + + $rServerTree = array(array('id' => 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); + + if (isset($rEpisode)) { + $db->query('SELECT `season_num`, `episode_num` FROM `streams_episodes` WHERE `stream_id` = ?;', $rEpisode['id']); + + if (0 < $db->num_rows()) { + $rRow = $db->get_row(); + $rEpisode['episode'] = intval($rRow['episode_num']); + $rEpisode['season'] = intval($rRow['season_num']); + } else { + $rEpisode['episode'] = 0; + $rEpisode['season'] = 0; + } + + $rEpisode['properties'] = json_decode($rEpisode['movie_properties'], true); + $rStreamSys = StreamRepository::getSystemRows(RequestManager::getAll()['id']); + + foreach ($rServers as $rServer) { + if (isset($rStreamSys[intval($rServer['id'])])) { + $rParent = 'source'; + } else { + $rParent = 'offline'; + } + + $rServerTree[] = array('id' => $rServer['id'], 'parent' => $rParent, 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + } else { + if (Authorization::check('adv', 'add_episode')) { + foreach ($rServers as $rServer) { + $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + + if (isset(RequestManager::getAll()['multi'])) { + if (Authorization::check('adv', 'import_episodes')) { + $rMulti = true; + } else { + exit(); + } + } + } else { + exit(); + } + } + + $_TITLE = 'Episode'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +echo '' . "\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/episodes.php b/src/public/Views/admin/episodes.php index 24a9a945..fd0f044f 100644 --- a/src/public/Views/admin/episodes.php +++ b/src/public/Views/admin/episodes.php @@ -1,7 +1,487 @@ + query('SELECT DISTINCT(`audio_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `audio_codec` IS NOT NULL AND `type` = 5 ORDER BY `audio_codec` ASC;'); + + foreach ($db->get_rows() as $rRow) { + $rAudioCodecs[] = $rRow['audio_codec']; + } + $db->query('SELECT DISTINCT(`video_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `video_codec` IS NOT NULL AND `type` = 5 ORDER BY `video_codec` ASC;'); + + foreach ($db->get_rows() as $rRow) { + $rVideoCodecs[] = $rRow['video_codec']; + } + $_TITLE = 'Episodes'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +echo '' . "\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/episodes_mass.php b/src/public/Views/admin/episodes_mass.php index e4bdb528..09bb880d 100644 --- a/src/public/Views/admin/episodes_mass.php +++ b/src/public/Views/admin/episodes_mass.php @@ -1,7 +1,475 @@ + + 'source', + 'parent' => '#', + 'text' => "Active", + 'icon' => 'mdi mdi-play', + 'state' => array('opened' => true) + ), + array( + 'id' => 'offline', + 'parent' => '#', + 'text' => "Offline", + 'icon' => 'mdi mdi-stop', + 'state' => array('opened' => true) + ) + ); + + foreach ($rServers as $rServer) { + $rServerTree[] = array( + 'id' => $rServer['id'], + 'parent' => 'offline', + 'text' => $rServer['server_name'], + 'icon' => 'mdi mdi-server-network', + 'state' => array('opened' => true) + ); + } + + $_TITLE = 'Mass Edit Episodes'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); + ?> + +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+ + + +
+
+
+ + + +
+ + +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + +
Image
+ +
+ + +
+
+
+

+ +

+ +
+
+ + +
+ +
+ +
+
+ +
+
+ + +
+ +
+ +
+
+ +
+
+ + +
+ +
+ +
+
+ + +
+
+ + +
+ +
+ +
+
+ + +
+
+ + +
+ +
+ +
+
+ + +
+
+ + +
+ +
+ +
+
+ + +
+
+ + +
+ +
+ +
+
+ +
+
+ +
    +
  • + +
  • +
  • + +
  • +
+
+ + +
+
+
+ +
+
+ + +
+ +
+
+
+
+ +
+
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+
+ +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/public/Views/admin/fingerprint.php b/src/public/Views/admin/fingerprint.php index 0948bcda..bdcb900f 100644 --- a/src/public/Views/admin/fingerprint.php +++ b/src/public/Views/admin/fingerprint.php @@ -1,6 +1,336 @@ + + + +
+ +
+
+
+
+
+ +
+

+
+
+
+
+
+
+
+
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
UsernameStreamIPDuration
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/admin/footer.php b/src/public/Views/admin/footer.php similarity index 100% rename from src/admin/footer.php rename to src/public/Views/admin/footer.php diff --git a/src/admin/functions.php b/src/public/Views/admin/functions.php similarity index 78% rename from src/admin/functions.php rename to src/public/Views/admin/functions.php index ae338385..bea8f0dc 100644 --- a/src/admin/functions.php +++ b/src/public/Views/admin/functions.php @@ -3,6 +3,15 @@ if (!defined('MAIN_HOME')) { define('MAIN_HOME', '/home/xc_vm/'); } +// Импорт глобальных переменных bootstrap'а. +// bootstrapAdminRuntime() использует `global` для записи переменных. +// Когда functions.php включается из метода контроллера (не из глобального scope), +// эти переменные без `global` не видны в текущем scope. +// В глобальном scope (прямой вызов через nginx) — это no-op. +global $db, $rSettings, $rMobile, $rServers, $rProxyServers, $rDetect, + $rTimeout, $rProtocol, $allServers, $rPermissions, $language, $allowedLangs, + $rServerError, $allServersHealthy, $updateRequired, $rUserInfo, $_INFO; + require_once MAIN_HOME . 'includes/admin.php'; if ($rMobile) { diff --git a/src/public/Views/admin/group.php b/src/public/Views/admin/group.php index 78c392a1..5a31bb56 100644 --- a/src/public/Views/admin/group.php +++ b/src/public/Views/admin/group.php @@ -1,7 +1,824 @@ query("SELECT `id` FROM `users_packages` WHERE JSON_CONTAINS(`groups`, ?, '\$');", $rGroup['group_id']); + + foreach ($db->get_rows() as $rRow) { + $rPackageIDs[] = $rRow['id']; + } + $rGroupIDs = json_decode($rGroup['subresellers'], true); + $rNotice = html_entity_decode($rGroup['notice_html']); + $rNotice = preg_replace('#]*+>#i', '', $rNotice); + $rNotice = preg_replace('#]*+>#i', '', $rNotice); + $rNotice = str_replace(array('&', '<', '>'), array('&amp;', '&lt;', '&gt;'), $rNotice); + $rNotice = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $rNotice); + $rNotice = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $rNotice); + $rNotice = html_entity_decode($rNotice, ENT_COMPAT, 'UTF-8'); + $rNotice = preg_replace("#(<[^>]+?[\\x00-\\x20\"'])(?:on|xmlns)[^>]*+[>\\b]?#iu", '$1>', $rNotice); + $rNotice = preg_replace("#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu", '$1=$2nojavascript...', $rNotice); + $rNotice = preg_replace("#([a-z]*)[\\x00-\\x20]*=(['\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu", '$1=$2novbscript...', $rNotice); + $rNotice = preg_replace("#([a-z]*)[\\x00-\\x20]*=(['\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u", '$1=$2nomozbinding...', $rNotice); + $rNotice = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i", '$1>', $rNotice); + $rNotice = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i", '$1>', $rNotice); + $rNotice = preg_replace("#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu", '$1>', $rNotice); + } + + $_TITLE = 'Group'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; // !$__viewMode +echo '' . "\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/groups.php b/src/public/Views/admin/groups.php index b1ee3a78..771b1257 100644 --- a/src/public/Views/admin/groups.php +++ b/src/public/Views/admin/groups.php @@ -1,6 +1,251 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/admin/header.php b/src/public/Views/admin/header.php similarity index 100% rename from src/admin/header.php rename to src/public/Views/admin/header.php diff --git a/src/public/Views/admin/hmac.php b/src/public/Views/admin/hmac.php index d098b918..f2f61129 100644 --- a/src/public/Views/admin/hmac.php +++ b/src/public/Views/admin/hmac.php @@ -1,7 +1,251 @@ + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/hmacs.php b/src/public/Views/admin/hmacs.php index 9013e180..04db1ae6 100644 --- a/src/public/Views/admin/hmacs.php +++ b/src/public/Views/admin/hmacs.php @@ -1,6 +1,275 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/admin/index.php b/src/public/Views/admin/index.php similarity index 100% rename from src/admin/index.php rename to src/public/Views/admin/index.php diff --git a/src/public/Views/admin/ip.php b/src/public/Views/admin/ip.php index 20a00811..de37def5 100644 --- a/src/public/Views/admin/ip.php +++ b/src/public/Views/admin/ip.php @@ -1,7 +1,223 @@ + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/ips.php b/src/public/Views/admin/ips.php index 9fdfcffa..a3fcce68 100644 --- a/src/public/Views/admin/ips.php +++ b/src/public/Views/admin/ips.php @@ -1,6 +1,229 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/isp.php b/src/public/Views/admin/isp.php index fa1c2d8b..70163a03 100644 --- a/src/public/Views/admin/isp.php +++ b/src/public/Views/admin/isp.php @@ -1,7 +1,231 @@ + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/isps.php b/src/public/Views/admin/isps.php index 609f0303..fdbef01b 100644 --- a/src/public/Views/admin/isps.php +++ b/src/public/Views/admin/isps.php @@ -1,6 +1,266 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/line.php b/src/public/Views/admin/line.php index f393db89..24f0a139 100644 --- a/src/public/Views/admin/line.php +++ b/src/public/Views/admin/line.php @@ -1,7 +1,545 @@ +query('SELECT `mag_id` FROM `mag_devices` WHERE `user_id` = ?;', $rLine['id']); + + if ($db->num_rows() > 0) { + header('Location: mag?id=' . intval($db->get_row()['mag_id'])); + exit; + } else { + goHome(); + } + } + + if ($rLine['is_e2']) { + $db->query('SELECT `device_id` FROM `enigma2_devices` WHERE `user_id` = ?;', $rLine['id']); + + if ($db->num_rows() > 0) { + header('Location: enigma?id=' . intval($db->get_row()['device_id'])); + exit; + } else { + goHome(); + } + } + } else { + if (!Authorization::check('adv', 'add_user')) { + goHome(); + } + } + + $rRegisteredUsers = UserRepository::getRegisteredUsers(); + $_TITLE = 'Line'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +?> + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/line_activity.php b/src/public/Views/admin/line_activity.php index bc09fb64..47a90e81 100644 --- a/src/public/Views/admin/line_activity.php +++ b/src/public/Views/admin/line_activity.php @@ -1,7 +1,291 @@ - + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/line_ips.php b/src/public/Views/admin/line_ips.php index 3b79deff..61528061 100644 --- a/src/public/Views/admin/line_ips.php +++ b/src/public/Views/admin/line_ips.php @@ -1,7 +1,270 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/line_mass.php b/src/public/Views/admin/line_mass.php index b8882469..46466a0d 100644 --- a/src/public/Views/admin/line_mass.php +++ b/src/public/Views/admin/line_mass.php @@ -1,7 +1,485 @@ - + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/lines.php b/src/public/Views/admin/lines.php index 275648ea..9c3f4d5c 100644 --- a/src/public/Views/admin/lines.php +++ b/src/public/Views/admin/lines.php @@ -1,7 +1,398 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/live_connections.php b/src/public/Views/admin/live_connections.php index 207334ad..bbaee557 100644 --- a/src/public/Views/admin/live_connections.php +++ b/src/public/Views/admin/live_connections.php @@ -1,7 +1,347 @@ + + +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+
+
+
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + +
IDQualityLineStreamServerPlayerISPIPDurationOutputRestreamer
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/admin/login.php b/src/public/Views/admin/login.php similarity index 100% rename from src/admin/login.php rename to src/public/Views/admin/login.php diff --git a/src/public/Views/admin/login_logs.php b/src/public/Views/admin/login_logs.php index 7fb43e7f..58af1387 100644 --- a/src/public/Views/admin/login_logs.php +++ b/src/public/Views/admin/login_logs.php @@ -1,6 +1,259 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/admin/logout.php b/src/public/Views/admin/logout.php similarity index 100% rename from src/admin/logout.php rename to src/public/Views/admin/logout.php diff --git a/src/public/Views/admin/mag.php b/src/public/Views/admin/mag.php index 0848e8f5..cad8bde0 100644 --- a/src/public/Views/admin/mag.php +++ b/src/public/Views/admin/mag.php @@ -1,7 +1,737 @@ + + array()); + } + + $_TITLE = 'MAG Device'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); ?> + + +
> +
+
+
+
+
+ +
+

MAG Device

+
+
+
+
+
+
+
+
+ + + + +
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+ Unpair +
+
+
+
+ +
+ +
+
+ Clear +
+
+
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+ +
+ +
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+
+ +
+ +
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+ + +
+
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+ +
+ + + + + + + + + + + + + + > + + + + + + + + + +
IDBouquet Name
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/mag_events.php b/src/public/Views/admin/mag_events.php index 391d8ac2..f69aeeef 100644 --- a/src/public/Views/admin/mag_events.php +++ b/src/public/Views/admin/mag_events.php @@ -1,6 +1,200 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/mag_mass.php b/src/public/Views/admin/mag_mass.php index 08fe2b07..a88cde81 100644 --- a/src/public/Views/admin/mag_mass.php +++ b/src/public/Views/admin/mag_mass.php @@ -1,7 +1,532 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/mags.php b/src/public/Views/admin/mags.php index ffb0086d..35660003 100644 --- a/src/public/Views/admin/mags.php +++ b/src/public/Views/admin/mags.php @@ -1,7 +1,298 @@ + + + +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+ + + +
+
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + +
DeviceLast Connection
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/magscan_settings.php b/src/public/Views/admin/magscan_settings.php index 3c4eec46..5975837c 100644 --- a/src/public/Views/admin/magscan_settings.php +++ b/src/public/Views/admin/magscan_settings.php @@ -1,6 +1,307 @@ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/mass_delete.php b/src/public/Views/admin/mass_delete.php index 87ca77c9..bfe15937 100644 --- a/src/public/Views/admin/mass_delete.php +++ b/src/public/Views/admin/mass_delete.php @@ -1,7 +1,894 @@ + + + +
style="display: none;" > +
+
+
+
+
+ +
+

+
+
+
+
+
+ + + +
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + +
IDIconStream NameCategoryServerStatus
+
+
    +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + +
ImageTMDb
+
+
    +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + +
IDIconStation NameCategoryStatus
+
+
    +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + +
IDImageNameCategorySeasonsEpisodesTMDbFirst AiredLast Updated
+
+
    +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + +
Image
+
+
    +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + +
IDUsernameOwnerStatusTrialRestreamerConnectionsExpiration
+
+
    +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + +
IDUsernameOwnerIPTypeStatusCreditsUsersLast LoginActions
+
+
    +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + +
Device
+
+
    +
  • + +
  • +
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + +
Device
+
+
    +
  • + +
  • +
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/admin/modals.php b/src/public/Views/admin/modals.php similarity index 100% rename from src/admin/modals.php rename to src/public/Views/admin/modals.php diff --git a/src/public/Views/admin/movie.php b/src/public/Views/admin/movie.php index 6a4154fd..f1afcb89 100644 --- a/src/public/Views/admin/movie.php +++ b/src/public/Views/admin/movie.php @@ -1,7 +1,849 @@ - + 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); + $activeStreamingServers = array(); + + if (isset($rMovie)) { + $rMovie['properties'] = json_decode($rMovie['movie_properties'], true); + $rStreamSys = StreamRepository::getSystemRows(RequestManager::getAll()['id']); + + // Getting and extracting the path to a movie + $streamSourceJson = $rMovie['stream_source'] ?? ''; + $rMovieSource = json_decode($streamSourceJson, true); + if (!is_array($rMovieSource)) { + $rMovieSource = ['']; + } + $rSource = $rMovieSource[0] ?? ''; + if (str_starts_with($rSource, 's:')) { + $parts = explode(':', $rSource, 3); + $rPathSources = (count($parts) >= 3) ? urldecode($parts[2]) : ''; + } else { + $rPathSources = $rSource; + } + + foreach ($rServers as $rServer) { + if ($rServer['direct_source'] == 0 && $rServer['stream_status'] == 1) { + $activeStreamingServers[] = intval($rServer['id']); + } + + if (isset($rStreamSys[intval($rServer['id'])])) { + $rParent = 'source'; + } else { + $rParent = 'offline'; + } + + $rServerTree[] = array('id' => $rServer['id'], 'parent' => $rParent, 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + } else { + foreach ($rServers as $rServer) { + $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + } + + $_TITLE = 'Movie'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); + ?> + + +
style="display: none;" > +
+
+
+
+
+ +
+

+ +

+
+
+
+
+
+ + + + + + + + + $rEncodeError): + if (in_array(intval($rServerID), $activeStreamingServers)): + ?> + + + + + + + $rEncodeError): ?> + + + + + + +
+
+ enctype="multipart/form-data" action="#" method="POST" data-parsley-validate=""> + + + + + + + +
+ +
+
+
+
+ +
+ +
+ " required data-parsley-trigger="change"> +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ + + + +
+
+
+ +

+ Importing Movies using this method will parse your M3U or folder and push the individual episodes through Watch Folder. If you have category and bouquet allocation set up in Watch Folder Settings then they will be used here too. +

+
+ +
+
+ + + + + + + + +
+
+
+
+
+ +
+ +
+
+
+ + +
+ +
+ + +
+
+
+ +
+ + +
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+
    +
  • + +
  • +
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
    +
  • + +
  • +
  • + +
  • +
+
+
+ +
+
+
+
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+ + +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+
+
    +
  • + +
  • +
  • + +
  • +
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+ +
+
+
+
+
    +
  • + +
  • +
  • + +
  • +
+
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ + +
+
+
+ +
+
+ + + + + + + + +
+
+
+ + + + + + + + +
+
+
+ +
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/movie_mass.php b/src/public/Views/admin/movie_mass.php index 1fb51612..894d4ea9 100644 --- a/src/public/Views/admin/movie_mass.php +++ b/src/public/Views/admin/movie_mass.php @@ -1,7 +1,471 @@ + + 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); + + foreach ($rServers as $rServer) { + $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + $_TITLE = 'Mass Edit Movies'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); + ?> + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/movies.php b/src/public/Views/admin/movies.php index e8f9a6ab..3ee5bb30 100644 --- a/src/public/Views/admin/movies.php +++ b/src/public/Views/admin/movies.php @@ -1,7 +1,361 @@ + + query('SELECT DISTINCT(`audio_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `audio_codec` IS NOT NULL AND `type` = 2 ORDER BY `audio_codec` ASC;'); + foreach ($db->get_rows() as $rRow) { + $rAudioCodecs[] = $rRow['audio_codec']; + } + + $db->query('SELECT DISTINCT(`video_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `video_codec` IS NOT NULL AND `type` = 2 ORDER BY `video_codec` ASC;'); + foreach ($db->get_rows() as $rRow) { + $rVideoCodecs[] = $rRow['video_codec']; + } + + $_TITLE = 'Movies'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); + ?> + + +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+ + + + + + +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
ImageTMDb
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/mysql_syslog.php b/src/public/Views/admin/mysql_syslog.php index 6e0ed0bf..f9e30c19 100644 --- a/src/public/Views/admin/mysql_syslog.php +++ b/src/public/Views/admin/mysql_syslog.php @@ -1,6 +1,253 @@ + + + + + + + + + + + +
style="display: none;" > +
+
+
+
+
+ +
+

System Logs

+
+
+
+
+
+
+
+ + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/ondemand.php b/src/public/Views/admin/ondemand.php index 246fffd0..7942bfcf 100644 --- a/src/public/Views/admin/ondemand.php +++ b/src/public/Views/admin/ondemand.php @@ -1,7 +1,258 @@ + + + + + + + +
style="display: none;" > +
+
+
+
+
+ +
+

On-Demand Scanner

+
+
+
+
+
+ + + +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + +
IDIconStreamServerStatusResponseStream InfoLast Scanned
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/package.php b/src/public/Views/admin/package.php index 9dd2ac9d..70a9317a 100644 --- a/src/public/Views/admin/package.php +++ b/src/public/Views/admin/package.php @@ -1,7 +1,671 @@ + + '', 'name' => 'Off'), array('id' => 'A1', 'name' => 'Anonymous Proxy'), array('id' => 'A2', 'name' => 'Satellite Provider'), array('id' => 'O1', 'name' => 'Other Country'), array('id' => 'AF', 'name' => 'Afghanistan'), array('id' => 'AX', 'name' => 'Aland Islands'), array('id' => 'AL', 'name' => 'Albania'), array('id' => 'DZ', 'name' => 'Algeria'), array('id' => 'AS', 'name' => 'American Samoa'), array('id' => 'AD', 'name' => 'Andorra'), array('id' => 'AO', 'name' => 'Angola'), array('id' => 'AI', 'name' => 'Anguilla'), array('id' => 'AQ', 'name' => 'Antarctica'), array('id' => 'AG', 'name' => 'Antigua And Barbuda'), array('id' => 'AR', 'name' => 'Argentina'), array('id' => 'AM', 'name' => 'Armenia'), array('id' => 'AW', 'name' => 'Aruba'), array('id' => 'AU', 'name' => 'Australia'), array('id' => 'AT', 'name' => 'Austria'), array('id' => 'AZ', 'name' => 'Azerbaijan'), array('id' => 'BS', 'name' => 'Bahamas'), array('id' => 'BH', 'name' => 'Bahrain'), array('id' => 'BD', 'name' => 'Bangladesh'), array('id' => 'BB', 'name' => 'Barbados'), array('id' => 'BY', 'name' => 'Belarus'), array('id' => 'BE', 'name' => 'Belgium'), array('id' => 'BZ', 'name' => 'Belize'), array('id' => 'BJ', 'name' => 'Benin'), array('id' => 'BM', 'name' => 'Bermuda'), array('id' => 'BT', 'name' => 'Bhutan'), array('id' => 'BO', 'name' => 'Bolivia'), array('id' => 'BA', 'name' => 'Bosnia And Herzegovina'), array('id' => 'BW', 'name' => 'Botswana'), array('id' => 'BV', 'name' => 'Bouvet Island'), array('id' => 'BR', 'name' => 'Brazil'), array('id' => 'IO', 'name' => 'British Indian Ocean Territory'), array('id' => 'BN', 'name' => 'Brunei Darussalam'), array('id' => 'BG', 'name' => 'Bulgaria'), array('id' => 'BF', 'name' => 'Burkina Faso'), array('id' => 'BI', 'name' => 'Burundi'), array('id' => 'KH', 'name' => 'Cambodia'), array('id' => 'CM', 'name' => 'Cameroon'), array('id' => 'CA', 'name' => 'Canada'), array('id' => 'CV', 'name' => 'Cape Verde'), array('id' => 'KY', 'name' => 'Cayman Islands'), array('id' => 'CF', 'name' => 'Central African Republic'), array('id' => 'TD', 'name' => 'Chad'), array('id' => 'CL', 'name' => 'Chile'), array('id' => 'CN', 'name' => 'China'), array('id' => 'CX', 'name' => 'Christmas Island'), array('id' => 'CC', 'name' => 'Cocos (Keeling) Islands'), array('id' => 'CO', 'name' => 'Colombia'), array('id' => 'KM', 'name' => 'Comoros'), array('id' => 'CG', 'name' => 'Congo'), array('id' => 'CD', 'name' => 'Congo, Democratic Republic'), array('id' => 'CK', 'name' => 'Cook Islands'), array('id' => 'CR', 'name' => 'Costa Rica'), array('id' => 'CI', 'name' => "Cote D'Ivoire"), array('id' => 'HR', 'name' => 'Croatia'), array('id' => 'CU', 'name' => 'Cuba'), array('id' => 'CY', 'name' => 'Cyprus'), array('id' => 'CZ', 'name' => 'Czech Republic'), array('id' => 'DK', 'name' => 'Denmark'), array('id' => 'DJ', 'name' => 'Djibouti'), array('id' => 'DM', 'name' => 'Dominica'), array('id' => 'DO', 'name' => 'Dominican Republic'), array('id' => 'EC', 'name' => 'Ecuador'), array('id' => 'EG', 'name' => 'Egypt'), array('id' => 'SV', 'name' => 'El Salvador'), array('id' => 'GQ', 'name' => 'Equatorial Guinea'), array('id' => 'ER', 'name' => 'Eritrea'), array('id' => 'EE', 'name' => 'Estonia'), array('id' => 'ET', 'name' => 'Ethiopia'), array('id' => 'FK', 'name' => 'Falkland Islands (Malvinas)'), array('id' => 'FO', 'name' => 'Faroe Islands'), array('id' => 'FJ', 'name' => 'Fiji'), array('id' => 'FI', 'name' => 'Finland'), array('id' => 'FR', 'name' => 'France'), array('id' => 'GF', 'name' => 'French Guiana'), array('id' => 'PF', 'name' => 'French Polynesia'), array('id' => 'TF', 'name' => 'French Southern Territories'), array('id' => 'MK', 'name' => 'Fyrom'), array('id' => 'GA', 'name' => 'Gabon'), array('id' => 'GM', 'name' => 'Gambia'), array('id' => 'GE', 'name' => 'Georgia'), array('id' => 'DE', 'name' => 'Germany'), array('id' => 'GH', 'name' => 'Ghana'), array('id' => 'GI', 'name' => 'Gibraltar'), array('id' => 'GR', 'name' => 'Greece'), array('id' => 'GL', 'name' => 'Greenland'), array('id' => 'GD', 'name' => 'Grenada'), array('id' => 'GP', 'name' => 'Guadeloupe'), array('id' => 'GU', 'name' => 'Guam'), array('id' => 'GT', 'name' => 'Guatemala'), array('id' => 'GG', 'name' => 'Guernsey'), array('id' => 'GN', 'name' => 'Guinea'), array('id' => 'GW', 'name' => 'Guinea-Bissau'), array('id' => 'GY', 'name' => 'Guyana'), array('id' => 'HT', 'name' => 'Haiti'), array('id' => 'HM', 'name' => 'Heard Island & Mcdonald Islands'), array('id' => 'VA', 'name' => 'Holy See (Vatican City State)'), array('id' => 'HN', 'name' => 'Honduras'), array('id' => 'HK', 'name' => 'Hong Kong'), array('id' => 'HU', 'name' => 'Hungary'), array('id' => 'IS', 'name' => 'Iceland'), array('id' => 'IN', 'name' => 'India'), array('id' => 'ID', 'name' => 'Indonesia'), array('id' => 'IR', 'name' => 'Iran, Islamic Republic Of'), array('id' => 'IQ', 'name' => 'Iraq'), array('id' => 'IE', 'name' => 'Ireland'), array('id' => 'IM', 'name' => 'Isle Of Man'), array('id' => 'IL', 'name' => 'Israel'), array('id' => 'IT', 'name' => 'Italy'), array('id' => 'JM', 'name' => 'Jamaica'), array('id' => 'JP', 'name' => 'Japan'), array('id' => 'JE', 'name' => 'Jersey'), array('id' => 'JO', 'name' => 'Jordan'), array('id' => 'KZ', 'name' => 'Kazakhstan'), array('id' => 'KE', 'name' => 'Kenya'), array('id' => 'KI', 'name' => 'Kiribati'), array('id' => 'KR', 'name' => 'Korea'), array('id' => 'KW', 'name' => 'Kuwait'), array('id' => 'KG', 'name' => 'Kyrgyzstan'), array('id' => 'LA', 'name' => "Lao People's Democratic Republic"), array('id' => 'LV', 'name' => 'Latvia'), array('id' => 'LB', 'name' => 'Lebanon'), array('id' => 'LS', 'name' => 'Lesotho'), array('id' => 'LR', 'name' => 'Liberia'), array('id' => 'LY', 'name' => 'Libyan Arab Jamahiriya'), array('id' => 'LI', 'name' => 'Liechtenstein'), array('id' => 'LT', 'name' => 'Lithuania'), array('id' => 'LU', 'name' => 'Luxembourg'), array('id' => 'MO', 'name' => 'Macao'), array('id' => 'MG', 'name' => 'Madagascar'), array('id' => 'MW', 'name' => 'Malawi'), array('id' => 'MY', 'name' => 'Malaysia'), array('id' => 'MV', 'name' => 'Maldives'), array('id' => 'ML', 'name' => 'Mali'), array('id' => 'MT', 'name' => 'Malta'), array('id' => 'MH', 'name' => 'Marshall Islands'), array('id' => 'MQ', 'name' => 'Martinique'), array('id' => 'MR', 'name' => 'Mauritania'), array('id' => 'MU', 'name' => 'Mauritius'), array('id' => 'YT', 'name' => 'Mayotte'), array('id' => 'MX', 'name' => 'Mexico'), array('id' => 'FM', 'name' => 'Micronesia, Federated States Of'), array('id' => 'MD', 'name' => 'Moldova'), array('id' => 'MC', 'name' => 'Monaco'), array('id' => 'MN', 'name' => 'Mongolia'), array('id' => 'ME', 'name' => 'Montenegro'), array('id' => 'MS', 'name' => 'Montserrat'), array('id' => 'MA', 'name' => 'Morocco'), array('id' => 'MZ', 'name' => 'Mozambique'), array('id' => 'MM', 'name' => 'Myanmar'), array('id' => 'NA', 'name' => 'Namibia'), array('id' => 'NR', 'name' => 'Nauru'), array('id' => 'NP', 'name' => 'Nepal'), array('id' => 'NL', 'name' => 'Netherlands'), array('id' => 'AN', 'name' => 'Netherlands Antilles'), array('id' => 'NC', 'name' => 'New Caledonia'), array('id' => 'NZ', 'name' => 'New Zealand'), array('id' => 'NI', 'name' => 'Nicaragua'), array('id' => 'NE', 'name' => 'Niger'), array('id' => 'NG', 'name' => 'Nigeria'), array('id' => 'NU', 'name' => 'Niue'), array('id' => 'NF', 'name' => 'Norfolk Island'), array('id' => 'MP', 'name' => 'Northern Mariana Islands'), array('id' => 'NO', 'name' => 'Norway'), array('id' => 'OM', 'name' => 'Oman'), array('id' => 'PK', 'name' => 'Pakistan'), array('id' => 'PW', 'name' => 'Palau'), array('id' => 'PS', 'name' => 'Palestinian Territory, Occupied'), array('id' => 'PA', 'name' => 'Panama'), array('id' => 'PG', 'name' => 'Papua New Guinea'), array('id' => 'PY', 'name' => 'Paraguay'), array('id' => 'PE', 'name' => 'Peru'), array('id' => 'PH', 'name' => 'Philippines'), array('id' => 'PN', 'name' => 'Pitcairn'), array('id' => 'PL', 'name' => 'Poland'), array('id' => 'PT', 'name' => 'Portugal'), array('id' => 'PR', 'name' => 'Puerto Rico'), array('id' => 'QA', 'name' => 'Qatar'), array('id' => 'RE', 'name' => 'Reunion'), array('id' => 'RO', 'name' => 'Romania'), array('id' => 'RU', 'name' => 'Russian Federation'), array('id' => 'RW', 'name' => 'Rwanda'), array('id' => 'BL', 'name' => 'Saint Barthelemy'), array('id' => 'SH', 'name' => 'Saint Helena'), array('id' => 'KN', 'name' => 'Saint Kitts And Nevis'), array('id' => 'LC', 'name' => 'Saint Lucia'), array('id' => 'MF', 'name' => 'Saint Martin'), array('id' => 'PM', 'name' => 'Saint Pierre And Miquelon'), array('id' => 'VC', 'name' => 'Saint Vincent And Grenadines'), array('id' => 'WS', 'name' => 'Samoa'), array('id' => 'SM', 'name' => 'San Marino'), array('id' => 'ST', 'name' => 'Sao Tome And Principe'), array('id' => 'SA', 'name' => 'Saudi Arabia'), array('id' => 'SN', 'name' => 'Senegal'), array('id' => 'RS', 'name' => 'Serbia'), array('id' => 'SC', 'name' => 'Seychelles'), array('id' => 'SL', 'name' => 'Sierra Leone'), array('id' => 'SG', 'name' => 'Singapore'), array('id' => 'SK', 'name' => 'Slovakia'), array('id' => 'SI', 'name' => 'Slovenia'), array('id' => 'SB', 'name' => 'Solomon Islands'), array('id' => 'SO', 'name' => 'Somalia'), array('id' => 'ZA', 'name' => 'South Africa'), array('id' => 'GS', 'name' => 'South Georgia And Sandwich Isl.'), array('id' => 'ES', 'name' => 'Spain'), array('id' => 'LK', 'name' => 'Sri Lanka'), array('id' => 'SD', 'name' => 'Sudan'), array('id' => 'SR', 'name' => 'Suriname'), array('id' => 'SJ', 'name' => 'Svalbard And Jan Mayen'), array('id' => 'SZ', 'name' => 'Swaziland'), array('id' => 'SE', 'name' => 'Sweden'), array('id' => 'CH', 'name' => 'Switzerland'), array('id' => 'SY', 'name' => 'Syrian Arab Republic'), array('id' => 'TW', 'name' => 'Taiwan'), array('id' => 'TJ', 'name' => 'Tajikistan'), array('id' => 'TZ', 'name' => 'Tanzania'), array('id' => 'TH', 'name' => 'Thailand'), array('id' => 'TL', 'name' => 'Timor-Leste'), array('id' => 'TG', 'name' => 'Togo'), array('id' => 'TK', 'name' => 'Tokelau'), array('id' => 'TO', 'name' => 'Tonga'), array('id' => 'TT', 'name' => 'Trinidad And Tobago'), array('id' => 'TN', 'name' => 'Tunisia'), array('id' => 'TR', 'name' => 'Turkey'), array('id' => 'TM', 'name' => 'Turkmenistan'), array('id' => 'TC', 'name' => 'Turks And Caicos Islands'), array('id' => 'TV', 'name' => 'Tuvalu'), array('id' => 'UG', 'name' => 'Uganda'), array('id' => 'UA', 'name' => 'Ukraine'), array('id' => 'AE', 'name' => 'United Arab Emirates'), array('id' => 'GB', 'name' => 'United Kingdom'), array('id' => 'US', 'name' => 'United States'), array('id' => 'UM', 'name' => 'United States Outlying Islands'), array('id' => 'UY', 'name' => 'Uruguay'), array('id' => 'UZ', 'name' => 'Uzbekistan'), array('id' => 'VU', 'name' => 'Vanuatu'), array('id' => 'VE', 'name' => 'Venezuela'), array('id' => 'VN', 'name' => 'Viet Nam'), array('id' => 'VG', 'name' => 'Virgin Islands, British'), array('id' => 'VI', 'name' => 'Virgin Islands, U.S.'), array('id' => 'WF', 'name' => 'Wallis And Futuna'), array('id' => 'EH', 'name' => 'Western Sahara'), array('id' => 'YE', 'name' => 'Yemen'), array('id' => 'ZM', 'name' => 'Zambia'), array('id' => 'ZW', 'name' => 'Zimbabwe')); + $_TITLE = 'Package'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); ?> + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/packages.php b/src/public/Views/admin/packages.php index 19386144..29e1fe6e 100644 --- a/src/public/Views/admin/packages.php +++ b/src/public/Views/admin/packages.php @@ -1,6 +1,241 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/panel_logs.php b/src/public/Views/admin/panel_logs.php index 44eb02d0..4705d473 100644 --- a/src/public/Views/admin/panel_logs.php +++ b/src/public/Views/admin/panel_logs.php @@ -1,6 +1,289 @@ - + + + + + + + + + + + \ No newline at end of file diff --git a/src/admin/player.php b/src/public/Views/admin/player.php similarity index 100% rename from src/admin/player.php rename to src/public/Views/admin/player.php diff --git a/src/public/Views/admin/plex.php b/src/public/Views/admin/plex.php index 559e722c..cd72bfe0 100644 --- a/src/public/Views/admin/plex.php +++ b/src/public/Views/admin/plex.php @@ -1,7 +1,23 @@ + 'Uninterruptible Sleep', 'I' => 'Idle', 'R' => 'Running', 'S' => 'Interruptible Sleep', 'T' => 'Stopped', 'W' => 'Paging', 'X' => 'Dead', 'Z' => 'Zombie'); + $_TITLE = 'Process Monitor'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); ?> + + + + + + + + +?> \ No newline at end of file diff --git a/src/public/Views/admin/profile.php b/src/public/Views/admin/profile.php index 6f3c09c4..9247f33e 100644 --- a/src/public/Views/admin/profile.php +++ b/src/public/Views/admin/profile.php @@ -1,7 +1,655 @@ + $rGPU) { + $rDevices[$rServer['id'] . '_' . $rGPUID] = $rServer['server_name'] . ' - ' . $rGPU['name']; + } + } + } + $_TITLE = 'Transcoding Profile'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +?> + +
> +
+
+
+
+
+ +
+

+
+
+
+
+
+ + + +
+
+
+ + + +
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+ + +
+
+ +
+ +
+
+ + + +
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ + data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+
+ +
    +
  • + +
  • +
+
+
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/profiles.php b/src/public/Views/admin/profiles.php index df3edb01..e407b5b7 100644 --- a/src/public/Views/admin/profiles.php +++ b/src/public/Views/admin/profiles.php @@ -1,6 +1,255 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/provider.php b/src/public/Views/admin/provider.php index 2e0395de..eae8a723 100644 --- a/src/public/Views/admin/provider.php +++ b/src/public/Views/admin/provider.php @@ -1,7 +1,398 @@ + + + +
style="display: none;" > +
+
+
+
+
+ +
+

Provider

+
+
+
+
+
+
+
+
+ + + + +
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ checkedchecked data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+ +
+ checked data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+ +
+ checked data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+ +
+ checked data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
    +
  • + +
  • +
+
+
+
+ + +
+
+
+ + + + + + + + + + + + query('SELECT `stream_id`, `category_array`, `stream_display_name`, `modified`, `stream_icon` FROM `providers_streams` WHERE `provider_id` = ? AND `type` = \'live\' ORDER BY `modified` DESC, `stream_id` ASC;', RequestManager::getAll()['id']); ?> + get_rows() as $rRow) : ?> + + + + + + + + + + +
IDStream NameCategoriesModifiedActions
" . date('H:i:s', $rRow['modified']) . ''; ?> + + +
+
+
+
+ + +
+
+
+ + + + + + + + + + + + query('SELECT `stream_id`, `category_array`, `stream_display_name`, `modified`, `stream_icon`, `channel_id` FROM `providers_streams` WHERE `provider_id` = ? AND `type` = \'movie\' ORDER BY `modified` DESC, `stream_id` ASC;', RequestManager::getAll()['id']); ?> + get_rows() as $rRow) : ?> + + + + + + + + + + +
IDMovie NameCategoriesModifiedActions
" . date('H:i:s', $rRow['modified']) . ''; ?> + + +
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/public/Views/admin/providers.php b/src/public/Views/admin/providers.php index 0e433e88..1618caf6 100644 --- a/src/public/Views/admin/providers.php +++ b/src/public/Views/admin/providers.php @@ -1,6 +1,306 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/proxies.php b/src/public/Views/admin/proxies.php index 6e095fd8..99eff340 100644 --- a/src/public/Views/admin/proxies.php +++ b/src/public/Views/admin/proxies.php @@ -1,6 +1,648 @@ + + + + + +
> +
+
+
+
+
+ +
+

Proxy Servers

+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + 0, 'cpu' => 0); + + if (!$rServers[$rServer['id']]['server_online']) { + $rWatchDog['cpu'] = 0; + $rWatchDog['total_mem_used_percent'] = 0; + } + ?> + + + ' . "\n" . ' ' . "\n" . ' ' . "\n\t\t\t\t\t\t\t\t\t" . "' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n" . ' ' . "\n\t\t\t\t\t\t\t\t\t" . "' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t"; + endif; + endforeach; + + ?> + + + + +
IDStatusProxy NameProxied ServerProxy IPNetworkConnectionsCPU %MEM %PingActions
+ + '; + } else { + if ($rServer['server_online']) { + echo ''; + } else { + $rLastCheck = $rServer['last_check_ago'] > 0 ? date($rSettings['datetime_format'], $rServer['last_check_ago']) : 'Never'; + + if ($rServer['status'] == 3) { + echo ''; + } elseif ($rServer['status'] == 4) { + echo ''; + } elseif ($rServer['status'] == 5) { + echo ''; + } else { + echo ''; + } + } + } + + echo ' '; + echo $rServer['server_name']; + echo (!empty($rServer['domain_name']) ? '
' . explode(',', $rServer['domain_name'])[0] . '' : ''); + echo '
'; + echo $rServers[$rServer['parent_id'][0]]['server_name']; + echo ''; + + if (1 >= count($rServer['parent_id'])) { + } else { + echo '  '; + } + + echo ' "; + echo $rServer['server_ip']; + echo '' . "\n\t\t\t\t\t\t\t\t\t"; + $rClients = getLiveConnections($rServer['id'], true); + + if (Authorization::check('adv', 'live_connections')) { + $rClients = ''; + } else { + $rClients = "'; + } + + echo $rClients; + echo "\t\t\t\t\t\t\t\t\t" . '
of '; + echo number_format($rServer['total_clients'], 0); + echo '' . "\n" . '
' . "\n" . ' ' . "\n\t\t\t\t\t\t\t\t\t\t" . '
'; + echo number_format($rServer['network_guaranteed_speed'], 0); + echo ' Mbps' . "\n" . '
' . "\n" . ' '; + + if (intval($rWatchDog['cpu']) <= 34) { + $statusColor = '#23b397'; + } else { + if (intval($rWatchDog['cpu']) <= 67) { + $statusColor = '#f8cc6b'; + } else { + $statusColor = '#f0643b'; + } + } + + echo ' ' . "\n" . ' ' . "\n" . ' '; + + if (intval($rWatchDog['total_mem_used_percent']) <= 34) { + $statusColor = '#23b397'; + } elseif (intval($rWatchDog['total_mem_used_percent']) <= 67) { + $statusColor = '#f8cc6b'; + } else { + $statusColor = '#f0643b'; + } + + echo ' ' . "\n" . ' ' . "\n\t\t\t\t\t\t\t\t\t\t"; + + if (Authorization::check('adv', 'edit_server')) { + if (SettingsManager::getAll()['group_buttons']) { + echo "\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t"; + } else { + echo "\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '" . "\n" . ' ' . "\n" . ' '; + + if ($rServer['enabled']) { + echo ' " . "\n" . ' '; + } else { + echo ' " . "\n" . ' '; + } + + echo ' " . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t"; + } + } else { + echo '--'; + } + + echo "\t\t\t\t\t\t\t\t\t" . '
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/proxy.php b/src/public/Views/admin/proxy.php index 61926a99..33f96004 100644 --- a/src/public/Views/admin/proxy.php +++ b/src/public/Views/admin/proxy.php @@ -1,6 +1,417 @@ - + 'ALL', 'name' => 'All Countries'), array('id' => 'A1', 'name' => 'Anonymous Proxy'), array('id' => 'A2', 'name' => 'Satellite Provider'), array('id' => 'O1', 'name' => 'Other Country'), array('id' => 'AF', 'name' => 'Afghanistan'), array('id' => 'AX', 'name' => 'Aland Islands'), array('id' => 'AL', 'name' => 'Albania'), array('id' => 'DZ', 'name' => 'Algeria'), array('id' => 'AS', 'name' => 'American Samoa'), array('id' => 'AD', 'name' => 'Andorra'), array('id' => 'AO', 'name' => 'Angola'), array('id' => 'AI', 'name' => 'Anguilla'), array('id' => 'AQ', 'name' => 'Antarctica'), array('id' => 'AG', 'name' => 'Antigua And Barbuda'), array('id' => 'AR', 'name' => 'Argentina'), array('id' => 'AM', 'name' => 'Armenia'), array('id' => 'AW', 'name' => 'Aruba'), array('id' => 'AU', 'name' => 'Australia'), array('id' => 'AT', 'name' => 'Austria'), array('id' => 'AZ', 'name' => 'Azerbaijan'), array('id' => 'BS', 'name' => 'Bahamas'), array('id' => 'BH', 'name' => 'Bahrain'), array('id' => 'BD', 'name' => 'Bangladesh'), array('id' => 'BB', 'name' => 'Barbados'), array('id' => 'BY', 'name' => 'Belarus'), array('id' => 'BE', 'name' => 'Belgium'), array('id' => 'BZ', 'name' => 'Belize'), array('id' => 'BJ', 'name' => 'Benin'), array('id' => 'BM', 'name' => 'Bermuda'), array('id' => 'BT', 'name' => 'Bhutan'), array('id' => 'BO', 'name' => 'Bolivia'), array('id' => 'BA', 'name' => 'Bosnia And Herzegovina'), array('id' => 'BW', 'name' => 'Botswana'), array('id' => 'BV', 'name' => 'Bouvet Island'), array('id' => 'BR', 'name' => 'Brazil'), array('id' => 'IO', 'name' => 'British Indian Ocean Territory'), array('id' => 'BN', 'name' => 'Brunei Darussalam'), array('id' => 'BG', 'name' => 'Bulgaria'), array('id' => 'BF', 'name' => 'Burkina Faso'), array('id' => 'BI', 'name' => 'Burundi'), array('id' => 'KH', 'name' => 'Cambodia'), array('id' => 'CM', 'name' => 'Cameroon'), array('id' => 'CA', 'name' => 'Canada'), array('id' => 'CV', 'name' => 'Cape Verde'), array('id' => 'KY', 'name' => 'Cayman Islands'), array('id' => 'CF', 'name' => 'Central African Republic'), array('id' => 'TD', 'name' => 'Chad'), array('id' => 'CL', 'name' => 'Chile'), array('id' => 'CN', 'name' => 'China'), array('id' => 'CX', 'name' => 'Christmas Island'), array('id' => 'CC', 'name' => 'Cocos (Keeling) Islands'), array('id' => 'CO', 'name' => 'Colombia'), array('id' => 'KM', 'name' => 'Comoros'), array('id' => 'CG', 'name' => 'Congo'), array('id' => 'CD', 'name' => 'Congo, Democratic Republic'), array('id' => 'CK', 'name' => 'Cook Islands'), array('id' => 'CR', 'name' => 'Costa Rica'), array('id' => 'CI', 'name' => "Cote D'Ivoire"), array('id' => 'HR', 'name' => 'Croatia'), array('id' => 'CU', 'name' => 'Cuba'), array('id' => 'CY', 'name' => 'Cyprus'), array('id' => 'CZ', 'name' => 'Czech Republic'), array('id' => 'DK', 'name' => 'Denmark'), array('id' => 'DJ', 'name' => 'Djibouti'), array('id' => 'DM', 'name' => 'Dominica'), array('id' => 'DO', 'name' => 'Dominican Republic'), array('id' => 'EC', 'name' => 'Ecuador'), array('id' => 'EG', 'name' => 'Egypt'), array('id' => 'SV', 'name' => 'El Salvador'), array('id' => 'GQ', 'name' => 'Equatorial Guinea'), array('id' => 'ER', 'name' => 'Eritrea'), array('id' => 'EE', 'name' => 'Estonia'), array('id' => 'ET', 'name' => 'Ethiopia'), array('id' => 'FK', 'name' => 'Falkland Islands (Malvinas)'), array('id' => 'FO', 'name' => 'Faroe Islands'), array('id' => 'FJ', 'name' => 'Fiji'), array('id' => 'FI', 'name' => 'Finland'), array('id' => 'FR', 'name' => 'France'), array('id' => 'GF', 'name' => 'French Guiana'), array('id' => 'PF', 'name' => 'French Polynesia'), array('id' => 'TF', 'name' => 'French Southern Territories'), array('id' => 'MK', 'name' => 'Fyrom'), array('id' => 'GA', 'name' => 'Gabon'), array('id' => 'GM', 'name' => 'Gambia'), array('id' => 'GE', 'name' => 'Georgia'), array('id' => 'DE', 'name' => 'Germany'), array('id' => 'GH', 'name' => 'Ghana'), array('id' => 'GI', 'name' => 'Gibraltar'), array('id' => 'GR', 'name' => 'Greece'), array('id' => 'GL', 'name' => 'Greenland'), array('id' => 'GD', 'name' => 'Grenada'), array('id' => 'GP', 'name' => 'Guadeloupe'), array('id' => 'GU', 'name' => 'Guam'), array('id' => 'GT', 'name' => 'Guatemala'), array('id' => 'GG', 'name' => 'Guernsey'), array('id' => 'GN', 'name' => 'Guinea'), array('id' => 'GW', 'name' => 'Guinea-Bissau'), array('id' => 'GY', 'name' => 'Guyana'), array('id' => 'HT', 'name' => 'Haiti'), array('id' => 'HM', 'name' => 'Heard Island & Mcdonald Islands'), array('id' => 'VA', 'name' => 'Holy See (Vatican City State)'), array('id' => 'HN', 'name' => 'Honduras'), array('id' => 'HK', 'name' => 'Hong Kong'), array('id' => 'HU', 'name' => 'Hungary'), array('id' => 'IS', 'name' => 'Iceland'), array('id' => 'IN', 'name' => 'India'), array('id' => 'ID', 'name' => 'Indonesia'), array('id' => 'IR', 'name' => 'Iran, Islamic Republic Of'), array('id' => 'IQ', 'name' => 'Iraq'), array('id' => 'IE', 'name' => 'Ireland'), array('id' => 'IM', 'name' => 'Isle Of Man'), array('id' => 'IL', 'name' => 'Israel'), array('id' => 'IT', 'name' => 'Italy'), array('id' => 'JM', 'name' => 'Jamaica'), array('id' => 'JP', 'name' => 'Japan'), array('id' => 'JE', 'name' => 'Jersey'), array('id' => 'JO', 'name' => 'Jordan'), array('id' => 'KZ', 'name' => 'Kazakhstan'), array('id' => 'KE', 'name' => 'Kenya'), array('id' => 'KI', 'name' => 'Kiribati'), array('id' => 'KR', 'name' => 'Korea'), array('id' => 'KW', 'name' => 'Kuwait'), array('id' => 'KG', 'name' => 'Kyrgyzstan'), array('id' => 'LA', 'name' => "Lao People's Democratic Republic"), array('id' => 'LV', 'name' => 'Latvia'), array('id' => 'LB', 'name' => 'Lebanon'), array('id' => 'LS', 'name' => 'Lesotho'), array('id' => 'LR', 'name' => 'Liberia'), array('id' => 'LY', 'name' => 'Libyan Arab Jamahiriya'), array('id' => 'LI', 'name' => 'Liechtenstein'), array('id' => 'LT', 'name' => 'Lithuania'), array('id' => 'LU', 'name' => 'Luxembourg'), array('id' => 'MO', 'name' => 'Macao'), array('id' => 'MG', 'name' => 'Madagascar'), array('id' => 'MW', 'name' => 'Malawi'), array('id' => 'MY', 'name' => 'Malaysia'), array('id' => 'MV', 'name' => 'Maldives'), array('id' => 'ML', 'name' => 'Mali'), array('id' => 'MT', 'name' => 'Malta'), array('id' => 'MH', 'name' => 'Marshall Islands'), array('id' => 'MQ', 'name' => 'Martinique'), array('id' => 'MR', 'name' => 'Mauritania'), array('id' => 'MU', 'name' => 'Mauritius'), array('id' => 'YT', 'name' => 'Mayotte'), array('id' => 'MX', 'name' => 'Mexico'), array('id' => 'FM', 'name' => 'Micronesia, Federated States Of'), array('id' => 'MD', 'name' => 'Moldova'), array('id' => 'MC', 'name' => 'Monaco'), array('id' => 'MN', 'name' => 'Mongolia'), array('id' => 'ME', 'name' => 'Montenegro'), array('id' => 'MS', 'name' => 'Montserrat'), array('id' => 'MA', 'name' => 'Morocco'), array('id' => 'MZ', 'name' => 'Mozambique'), array('id' => 'MM', 'name' => 'Myanmar'), array('id' => 'NA', 'name' => 'Namibia'), array('id' => 'NR', 'name' => 'Nauru'), array('id' => 'NP', 'name' => 'Nepal'), array('id' => 'NL', 'name' => 'Netherlands'), array('id' => 'AN', 'name' => 'Netherlands Antilles'), array('id' => 'NC', 'name' => 'New Caledonia'), array('id' => 'NZ', 'name' => 'New Zealand'), array('id' => 'NI', 'name' => 'Nicaragua'), array('id' => 'NE', 'name' => 'Niger'), array('id' => 'NG', 'name' => 'Nigeria'), array('id' => 'NU', 'name' => 'Niue'), array('id' => 'NF', 'name' => 'Norfolk Island'), array('id' => 'MP', 'name' => 'Northern Mariana Islands'), array('id' => 'NO', 'name' => 'Norway'), array('id' => 'OM', 'name' => 'Oman'), array('id' => 'PK', 'name' => 'Pakistan'), array('id' => 'PW', 'name' => 'Palau'), array('id' => 'PS', 'name' => 'Palestinian Territory, Occupied'), array('id' => 'PA', 'name' => 'Panama'), array('id' => 'PG', 'name' => 'Papua New Guinea'), array('id' => 'PY', 'name' => 'Paraguay'), array('id' => 'PE', 'name' => 'Peru'), array('id' => 'PH', 'name' => 'Philippines'), array('id' => 'PN', 'name' => 'Pitcairn'), array('id' => 'PL', 'name' => 'Poland'), array('id' => 'PT', 'name' => 'Portugal'), array('id' => 'PR', 'name' => 'Puerto Rico'), array('id' => 'QA', 'name' => 'Qatar'), array('id' => 'RE', 'name' => 'Reunion'), array('id' => 'RO', 'name' => 'Romania'), array('id' => 'RU', 'name' => 'Russian Federation'), array('id' => 'RW', 'name' => 'Rwanda'), array('id' => 'BL', 'name' => 'Saint Barthelemy'), array('id' => 'SH', 'name' => 'Saint Helena'), array('id' => 'KN', 'name' => 'Saint Kitts And Nevis'), array('id' => 'LC', 'name' => 'Saint Lucia'), array('id' => 'MF', 'name' => 'Saint Martin'), array('id' => 'PM', 'name' => 'Saint Pierre And Miquelon'), array('id' => 'VC', 'name' => 'Saint Vincent And Grenadines'), array('id' => 'WS', 'name' => 'Samoa'), array('id' => 'SM', 'name' => 'San Marino'), array('id' => 'ST', 'name' => 'Sao Tome And Principe'), array('id' => 'SA', 'name' => 'Saudi Arabia'), array('id' => 'SN', 'name' => 'Senegal'), array('id' => 'RS', 'name' => 'Serbia'), array('id' => 'SC', 'name' => 'Seychelles'), array('id' => 'SL', 'name' => 'Sierra Leone'), array('id' => 'SG', 'name' => 'Singapore'), array('id' => 'SK', 'name' => 'Slovakia'), array('id' => 'SI', 'name' => 'Slovenia'), array('id' => 'SB', 'name' => 'Solomon Islands'), array('id' => 'SO', 'name' => 'Somalia'), array('id' => 'ZA', 'name' => 'South Africa'), array('id' => 'GS', 'name' => 'South Georgia And Sandwich Isl.'), array('id' => 'ES', 'name' => 'Spain'), array('id' => 'LK', 'name' => 'Sri Lanka'), array('id' => 'SD', 'name' => 'Sudan'), array('id' => 'SR', 'name' => 'Suriname'), array('id' => 'SJ', 'name' => 'Svalbard And Jan Mayen'), array('id' => 'SZ', 'name' => 'Swaziland'), array('id' => 'SE', 'name' => 'Sweden'), array('id' => 'CH', 'name' => 'Switzerland'), array('id' => 'SY', 'name' => 'Syrian Arab Republic'), array('id' => 'TW', 'name' => 'Taiwan'), array('id' => 'TJ', 'name' => 'Tajikistan'), array('id' => 'TZ', 'name' => 'Tanzania'), array('id' => 'TH', 'name' => 'Thailand'), array('id' => 'TL', 'name' => 'Timor-Leste'), array('id' => 'TG', 'name' => 'Togo'), array('id' => 'TK', 'name' => 'Tokelau'), array('id' => 'TO', 'name' => 'Tonga'), array('id' => 'TT', 'name' => 'Trinidad And Tobago'), array('id' => 'TN', 'name' => 'Tunisia'), array('id' => 'TR', 'name' => 'Turkey'), array('id' => 'TM', 'name' => 'Turkmenistan'), array('id' => 'TC', 'name' => 'Turks And Caicos Islands'), array('id' => 'TV', 'name' => 'Tuvalu'), array('id' => 'UG', 'name' => 'Uganda'), array('id' => 'UA', 'name' => 'Ukraine'), array('id' => 'AE', 'name' => 'United Arab Emirates'), array('id' => 'GB', 'name' => 'United Kingdom'), array('id' => 'US', 'name' => 'United States'), array('id' => 'UM', 'name' => 'United States Outlying Islands'), array('id' => 'UY', 'name' => 'Uruguay'), array('id' => 'UZ', 'name' => 'Uzbekistan'), array('id' => 'VU', 'name' => 'Vanuatu'), array('id' => 'VE', 'name' => 'Venezuela'), array('id' => 'VN', 'name' => 'Viet Nam'), array('id' => 'VG', 'name' => 'Virgin Islands, British'), array('id' => 'VI', 'name' => 'Virgin Islands, U.S.'), array('id' => 'WF', 'name' => 'Wallis And Futuna'), array('id' => 'EH', 'name' => 'Western Sahara'), array('id' => 'YE', 'name' => 'Yemen'), array('id' => 'ZM', 'name' => 'Zambia'), array('id' => 'ZW', 'name' => 'Zimbabwe')); + $_TITLE = 'Edit Proxy'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); ?> + +
> +
+
+
+
+
+ +
+

Edit Proxy

+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+
+ +
+
+
+
+ +
+ +
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
    +
  • + + + +
  • +
+
+
+
+
+ +
+
+
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+
+ +
+ data-plugin="switchery" class="js-switch" data-color="#039cfd" /> +
+
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/queue.php b/src/public/Views/admin/queue.php index 7410c560..b41e742d 100644 --- a/src/public/Views/admin/queue.php +++ b/src/public/Views/admin/queue.php @@ -1,7 +1,196 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/quick_tools.php b/src/public/Views/admin/quick_tools.php index 6ab9bdb8..7d3b2101 100644 --- a/src/public/Views/admin/quick_tools.php +++ b/src/public/Views/admin/quick_tools.php @@ -1,7 +1,695 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/radio.php b/src/public/Views/admin/radio.php index b83932e8..b40bed94 100644 --- a/src/public/Views/admin/radio.php +++ b/src/public/Views/admin/radio.php @@ -1,7 +1,533 @@ + 'source', + 'parent' => '#', + 'text' => "Online", + 'icon' => 'mdi mdi-play', + 'state' => array('opened' => true) + ), + array( + 'id' => 'offline', + 'parent' => '#', + 'text' => "Offline", + 'icon' => 'mdi mdi-stop', + 'state' => array('opened' => true) + ) + ); + + if (isset($rStation)) { + $rStationOptions = StreamRepository::getOptions(RequestManager::getAll()['id']); + $rStationSys = StreamRepository::getSystemRows(RequestManager::getAll()['id']); + + foreach ($rServers as $rServer) { + if (isset($rStationSys[intval($rServer['id'])])) { + $rParent = ($rStationSys[intval($rServer['id'])]['parent_id'] != 0) ? intval($rStationSys[intval($rServer['id'])]['parent_id']) : 'source'; + if ($rStationSys[intval($rServer['id'])]['on_demand']) { + $rOnDemand[] = intval($rServer['id']); + } + } else { + $rParent = 'offline'; + } + + $rServerTree[] = array( + 'id' => $rServer['id'], + 'parent' => $rParent, + 'text' => $rServer['server_name'], + 'icon' => 'mdi mdi-server-network', + 'state' => array('opened' => true) + ); + } + } else { + foreach ($rServers as $rServer) { + $rServerTree[] = array( + 'id' => $rServer['id'], + 'parent' => 'offline', + 'text' => $rServer['server_name'], + 'icon' => 'mdi mdi-server-network', + 'state' => array('opened' => true) + ); + } + } + + $_TITLE = 'Radio Stations'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +?> + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/radio_mass.php b/src/public/Views/admin/radio_mass.php index cbc61ea6..b3ba68d7 100644 --- a/src/public/Views/admin/radio_mass.php +++ b/src/public/Views/admin/radio_mass.php @@ -1,7 +1,529 @@ + 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); + + foreach ($rServers as $rServer) { + $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + $_TITLE = 'Mass Edit Stations'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +?> +
style="display: none;" > +
+
+
+
+
+ +
+

Mass Edit Stations

+
+
+
+
+
+ + + +
+
+
+ + + +
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + +
IDIconStation NameCategoryStatus
+
+
+
+
+
+

+ To mass edit any of the below options, tick the checkbox next to it and change the input value. +

+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+
+
+
+
+

+ To mass edit any of the below options, tick the checkbox next to it and change the input value. +

+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+
+
+
+
+
+

+ To mass edit any of the below options, tick the checkbox next to it and change the input value. +

+
+
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/radios.php b/src/public/Views/admin/radios.php index 2904ad93..08c8893f 100644 --- a/src/public/Views/admin/radios.php +++ b/src/public/Views/admin/radios.php @@ -1,7 +1,308 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/record.php b/src/public/Views/admin/record.php index 87e786d5..3ac66afd 100644 --- a/src/public/Views/admin/record.php +++ b/src/public/Views/admin/record.php @@ -1,6 +1,69 @@ $rArchive['start'], 'end' => $rArchive['end'], 'title' => $rArchive['title'], 'description' => $rArchive['description'], 'archive' => true); + + if ($rStream && $rStream['type'] == 1 && $rProgramme) { + } else { + goHome(); + } + } else { + if (!isset(RequestManager::getAll()['stream_id'])) { + } else { + $rStream = StreamRepository::getById(RequestManager::getAll()['stream_id']); + $rProgramme = array('start' => strtotime(RequestManager::getAll()['start_date']), 'end' => strtotime(RequestManager::getAll()['start_date']) + intval(RequestManager::getAll()['duration']) * 60, 'title' => '', 'description' => ''); + + if (!(!$rStream || $rStream['type'] != 1 || !$rProgramme || $rProgramme['end'] < time())) { + } else { + header('Location: record'); + } + } + } + } + + if (!$rStream) { + } else { + $rBitrate = null; + $db->query('SELECT `server_id`, `bitrate` FROM `streams_servers` WHERE `stream_id` = ?;', $rStream['id']); + + foreach ($db->get_rows() as $rRow) { + $rAvailableServers[] = $rRow['server_id']; + + if (!(!$rBitrate && $rRow['bitrate'] || $rRow['bitrate'] && $rBitrate < $rRow['bitrate'])) { + } else { + $rBitrate = $rRow['bitrate']; + } + } + } + + $_TITLE = 'Record'; + + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; // !$__viewMode +include dirname(__DIR__, 3) . '/modules/watch/views/record.php'; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); +include dirname(__DIR__, 3) . '/modules/watch/views/record_scripts.php'; diff --git a/src/admin/resize.php b/src/public/Views/admin/resize.php similarity index 100% rename from src/admin/resize.php rename to src/public/Views/admin/resize.php diff --git a/src/public/Views/admin/restream_logs.php b/src/public/Views/admin/restream_logs.php index 30cd19c2..885d5d5e 100644 --- a/src/public/Views/admin/restream_logs.php +++ b/src/public/Views/admin/restream_logs.php @@ -1,6 +1,208 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/review.php b/src/public/Views/admin/review.php index 7b512ec7..2dcea5d8 100644 --- a/src/public/Views/admin/review.php +++ b/src/public/Views/admin/review.php @@ -1,6 +1,939 @@ + + + + + + + 'live', 2 => 'movie')[intval($rType)]) as $rCategory) { + $rCategoryIDs[] = $rCategory['id']; + } + $rNewCategories = array(); + + foreach (RequestManager::getAll()['category_selection'] as $rCategory) { + if (in_array($rCategory, $rCategoryIDs) || is_numeric($rCategory)) { + } else { + $rReturn = CategoryService::process(array('category_type' => array(1 => 'live', 2 => 'movie')[intval($rType)], 'category_name' => $rCategory)); + $rNewCategories[$rCategory] = $rReturn['data']['insert_id']; + } + } + + foreach (RequestManager::getAll() as $rKey => $rValue) { + if (substr($rKey, 0, 7) != 'import_') { + } else { + $rID = intval(explode('import_', $rKey)[1]); + + if (!RequestManager::getAll()['import_' . $rID]) { + } else { + $rCategories = array(); + + foreach (json_decode(RequestManager::getAll()['category_id_' . $rID], true) as $rCategory) { + if (!is_numeric($rCategory) && isset($rNewCategories[$rCategory])) { + $rCategories[] = intval($rNewCategories[$rCategory]); + } else { + if (!is_numeric($rCategory)) { + } else { + $rCategories[] = intval($rCategory); + } + } + } + + if ($rType == 1) { + $rPostData['review'][] = array('stream_source' => array(RequestManager::getAll()['url_' . $rID]), 'stream_icon' => RequestManager::getAll()['icon_' . $rID], 'stream_display_name' => RequestManager::getAll()['name_' . $rID], 'epg_lang' => null, 'channel_id' => (!empty(RequestManager::getAll()['channel_id_' . $rID]) ? RequestManager::getAll()['channel_id_' . $rID] : null), 'epg_api' => (!empty(RequestManager::getAll()['epg_type_' . $rID]) ? RequestManager::getAll()['epg_type_' . $rID] : 0), 'epg_id' => (!empty(RequestManager::getAll()['epg_id_' . $rID]) ? RequestManager::getAll()['epg_id_' . $rID] : 0), 'bouquets' => json_decode(RequestManager::getAll()['bouquets_' . $rID], true), 'category_id' => $rCategories); + } else { + $rPostData['review'][] = array('stream_source' => array(RequestManager::getAll()['url_' . $rID]), 'stream_display_name' => RequestManager::getAll()['name_' . $rID], 'tmdb_id' => (!empty(RequestManager::getAll()['tmdb_id_' . $rID]) ? RequestManager::getAll()['tmdb_id_' . $rID] : null), 'bouquets' => json_decode(RequestManager::getAll()['bouquets_' . $rID], true), 'category_id' => $rCategories); + } + } + } + } + + if ($rType == 1) { + $rReturn = StreamService::process($rPostData); + $_STATUS = $rReturn['status']; + + if ($_STATUS != STATUS_SUCCESS) { + } else { + header('Location: ./streams?status=' . STATUS_SUCCESS); + exit(); + } + } else { + $rReturn = MovieService::process($rPostData); + $_STATUS = $rReturn['status']; + + if ($_STATUS != STATUS_SUCCESS) { + } else { + header('Location: ./movies?status=' . STATUS_SUCCESS); + exit(); + } + } + } else { + if (!isset($_FILES['m3u_file'])) { + } else { + unset(RequestManager::getAll()['submit_stream']); + $rPostData = base64_encode(json_encode(RequestManager::getAll())); + $rCategories = CategoryService::getAllByType(array(1 => 'live', 2 => 'movie')[intval($rType)]); + $rBouquets = BouquetService::getAllSimple(); + $rSources = array(); + $rDuplicates = array(); + $db->query('SELECT `stream_source` FROM `streams` WHERE `type` = ?;', $rType); + + foreach ($db->get_rows() as $rRow) { + foreach (json_decode($rRow['stream_source'], true) as $rURL) { + if (in_array($rURL, $rSources)) { + } else { + $rSources[] = str_replace('https://', 'http://', $rURL); + } + } + } + $rStreamDatabase = array(); + + if (empty($_FILES['m3u_file']['tmp_name']) || !in_array(strtolower(pathinfo($_FILES['m3u_file']['name'], PATHINFO_EXTENSION)), array('m3u', 'm3u8'))) { + $_STATUS = STATUS_INVALID_FILE; + } else { + $rImport = array(); + $rResults = M3UParser::parse($_FILES['m3u_file']['tmp_name']); + + foreach ($rResults as $rResult) { + list($rTag) = $rResult->getExtTags(); + + if (!$rTag) { + } else { + $rURL = $rResult->getPath(); + + if ($rType == 1) { + $rExtensions = array('ts', 'm3u8', 'm3u', 'mpd', 'ism', ''); + } else { + $rExtensions = array('mp4', 'mkv', 'mov', 'avi', 'mpg', 'mpeg', 'flv', 'wmv', 'm4v'); + } + + if (!in_array(strtolower(pathinfo(explode('?', $rURL)[0])['extension']), $rExtensions)) { + } else { + $rExists = in_array(str_replace('https://', 'http://', $rURL), $rSources); + + if ($rExists && !RequestManager::getAll()['duplicates']) { + } else { + if (count($rImport) < 500) { + if ($rType == 1) { + $rImport[] = array('url' => $rURL, 'logo' => ($rTag->getAttribute('tvg-logo') ?: ''), 'tvg_id' => ($rTag->getAttribute('tvg-id') ?: ''), 'title' => ($rTag->getTitle() ?: ''), 'category' => ($rTag->getAttribute('group-title') ?: ''), 'exists' => $rExists); + } else { + $rImport[] = array('url' => $rURL, 'title' => ($rTag->getTitle() ?: ''), 'category' => ($rTag->getAttribute('group-title') ?: ''), 'exists' => $rExists); + } + } else { + $_STATUS = STATUS_TOO_MANY_RESULTS; + break; + } + } + } + } + } + + if (count($rImport) == 0) { + $_STATUS = STATUS_NO_SOURCES; + $rImport = null; + } + } + } + } + + if (isset($rImport) && $rImport) { + // Code for processing $rImport + } else { + $rServerTree = array(array('id' => 'source', 'parent' => '#', 'text' => "Live Stream", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); + + foreach ($rServers as $rServer) { + $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + $rStreamArguments = StreamConfigRepository::getStreamArguments(); + $rTranscodeProfiles = StreamConfigRepository::getTranscodeProfiles(); + } + + $rLogoSet = $rCategorySet = array(); + $_TITLE = 'Review'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); + ?> + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/rtmp_ip.php b/src/public/Views/admin/rtmp_ip.php index 4e1bb039..2f71e182 100644 --- a/src/public/Views/admin/rtmp_ip.php +++ b/src/public/Views/admin/rtmp_ip.php @@ -1,7 +1,274 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/rtmp_ips.php b/src/public/Views/admin/rtmp_ips.php index d6f17878..bfdd0149 100644 --- a/src/public/Views/admin/rtmp_ips.php +++ b/src/public/Views/admin/rtmp_ips.php @@ -1,6 +1,287 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/rtmp_monitor.php b/src/public/Views/admin/rtmp_monitor.php index f7340b91..28c127fe 100644 --- a/src/public/Views/admin/rtmp_monitor.php +++ b/src/public/Views/admin/rtmp_monitor.php @@ -1,7 +1,346 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/serie.php b/src/public/Views/admin/serie.php index ce2b62c6..2d3bd154 100644 --- a/src/public/Views/admin/serie.php +++ b/src/public/Views/admin/serie.php @@ -1,7 +1,1038 @@ + + 'source', 'parent' => '#', 'text' => "Active", 'icon' => 'mdi mdi-play', 'state' => ['opened' => true]], + ['id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => ['opened' => true]] + ]; + + foreach ($rServers as $rServer) { + $rServerTree[] = array('id' => $rServer['id'], 'parent' => 'offline', 'text' => $rServer['server_name'], 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + $_TITLE = 'TV Series'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); + ?> + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/series.php b/src/public/Views/admin/series.php index 4b28b6be..d89f0f00 100644 --- a/src/public/Views/admin/series.php +++ b/src/public/Views/admin/series.php @@ -1,7 +1,283 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/series_mass.php b/src/public/Views/admin/series_mass.php index c987433c..bae68d1d 100644 --- a/src/public/Views/admin/series_mass.php +++ b/src/public/Views/admin/series_mass.php @@ -1,7 +1,359 @@ - + + +' . "\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/server_order.php b/src/public/Views/admin/server_order.php index fe4bbbfc..3f63b821 100644 --- a/src/public/Views/admin/server_order.php +++ b/src/public/Views/admin/server_order.php @@ -1,7 +1,250 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/server_view.php b/src/public/Views/admin/server_view.php index ef727185..526b8f05 100644 --- a/src/public/Views/admin/server_view.php +++ b/src/public/Views/admin/server_view.php @@ -1,6 +1,1004 @@ - + array(), 'memory' => array(), 'io' => array(), 'input' => array(), 'output' => array(), 'dates' => array(null, null)); + + foreach (WatchdogMonitor::getWatchdog($rServer['id']) as $rData) { + if ($rStats['dates'][0] && $rData['time'] * 1000 > $rStats['dates'][0]) { + } else { + $rStats['dates'][0] = $rData['time'] * 1000; + } + + if ($rStats['dates'][1] && $rStats['dates'][1] > $rData['time'] * 1000) { + } else { + $rStats['dates'][1] = $rData['time'] * 1000; + } + + $rStats['cpu'][] = array($rData['time'] * 1000, floatval(rtrim($rData['cpu'], '%'))); + $rStats['memory'][] = array($rData['time'] * 1000, floatval(rtrim($rData['total_mem_used_percent'], '%'))); + $rStats['io'][] = array($rData['time'] * 1000, floatval(json_decode($rData['iostat_info'], true)['avg-cpu']['iowait'])); + $rStats['input'][] = array($rData['time'] * 1000, round($rData['bytes_received'] / 125000, 0)); + $rStats['output'][] = array($rData['time'] * 1000, round($rData['bytes_sent'] / 125000, 0)); + } + $rCertificate = json_decode($rServer['certbot_ssl'], true); + $rCertValid = false; + + if ($rCertificate['expiration']) { + $rHasCert = true; + + if (time() >= $rCertificate['expiration']) { + } else { + $rCertValid = true; + } + + $rExpiration = date($rSettings['datetime_format'], $rCertificate['expiration']); + } else { + $rHasCert = false; + $rExpiration = 'No Certificate Installed'; + } + + if ($rServer['server_type'] == 0) { + $_TITLE = 'View Server'; + } else { + $_TITLE = 'View Proxy'; + } + + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); ?> + + + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/stream_categories.php b/src/public/Views/admin/stream_categories.php index 198ebe75..29b39e4a 100644 --- a/src/public/Views/admin/stream_categories.php +++ b/src/public/Views/admin/stream_categories.php @@ -1,7 +1,379 @@ + CategoryService::getAllByType(), 2 => CategoryService::getAllByType('movie'), 3 => CategoryService::getAllByType('series'), 4 => CategoryService::getAllByType('radio')); + $rMainCategories = array(1 => array(), 2 => array(), 3 => array()); + + foreach (array(1, 2, 3, 4) as $rID) { + foreach ($rCategories[$rID] as $rCategoryID => $rCategoryData) { + $rMainCategories[$rID][] = $rCategoryData; + } + } + $_TITLE = 'Stream Categories'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +?> + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/stream_category.php b/src/public/Views/admin/stream_category.php index e8e8596f..6377e077 100644 --- a/src/public/Views/admin/stream_category.php +++ b/src/public/Views/admin/stream_category.php @@ -1,7 +1,328 @@ + + + +
style="display: none;" > +
+
+
+
+
+ +
+

+ + Category

+
+
+
+
+
+
+
+
+ + + + +
+ +
+
+
+
+ +
+ +
+ +
+
+ + + +
+ +
+ +
+
+
+ +
+ data-plugin="switchery" class="js-switch" + data-color="#039cfd" /> +
+
+
+
+
    +
  • + +
  • +
+
+
+
+
+ + + + + + + + + +
Stream IDStream NameActions
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/public/Views/admin/stream_errors.php b/src/public/Views/admin/stream_errors.php index 0c2901c8..cf327783 100644 --- a/src/public/Views/admin/stream_errors.php +++ b/src/public/Views/admin/stream_errors.php @@ -1,7 +1,350 @@ + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/stream_mass.php b/src/public/Views/admin/stream_mass.php index 2c42b84d..57787b7c 100644 --- a/src/public/Views/admin/stream_mass.php +++ b/src/public/Views/admin/stream_mass.php @@ -1,7 +1,339 @@ + 'source', 'parent' => '#', 'text' => "Online", 'icon' => 'mdi mdi-play', 'state' => array('opened' => true)), array('id' => 'offline', 'parent' => '#', 'text' => "Offline", 'icon' => 'mdi mdi-stop', 'state' => array('opened' => true))); + + foreach ($rServers as $rServer) { + $rServerTree[] = array('id' => intval($rServer['id']), 'parent' => 'offline', 'text' => htmlspecialchars($rServer['server_name']), 'icon' => 'mdi mdi-server-network', 'state' => array('opened' => true)); + } + $_TITLE = 'Mass Edit Streams'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +echo '' . "\n"; + +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); +?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/stream_rank.php b/src/public/Views/admin/stream_rank.php index 1c458fe9..0f39dc6a 100644 --- a/src/public/Views/admin/stream_rank.php +++ b/src/public/Views/admin/stream_rank.php @@ -1,7 +1,257 @@ + 'Live Stream', 2 => 'Movie', 3 => 'Created Channel', 4 => 'Radio Station', 5 => 'Episode'); + $rPeriod = (RequestManager::getAll()['period'] ?: 'all'); + $db->query('SELECT `streams_stats`.*, `streams`.`stream_display_name` FROM `streams_stats` INNER JOIN `streams` ON `streams`.`id` = `streams_stats`.`stream_id` WHERE `streams_stats`.`type` = ? AND `streams`.`type` IN (1,3) GROUP BY `stream_id` ORDER BY `streams_stats`.`rank` ASC LIMIT 500;', $rPeriod); + $rRows = $db->get_rows(); + $_TITLE = 'Stream Rank'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +?> +
+ style="display: none;" > +
+
+
+
+
+ +
+

Stream Rank

+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Rank #Stream NameTime WatchedTotal ConnectionsTotal Users
+ + + + +
+
+
+
+
+
+ +
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/stream_review.php b/src/public/Views/admin/stream_review.php index 92cf1ead..ca2a461b 100644 --- a/src/public/Views/admin/stream_review.php +++ b/src/public/Views/admin/stream_review.php @@ -1,7 +1,450 @@ + $rStream) { + if (!RequestManager::getAll()['save_bouquets']) { + } else { + $rHasBouquets = array(); + + foreach (BouquetService::getAll() as $rBouquetID => $rBouquet) { + if (!(in_array($rID, $rBouquet['streams']) || in_array($rID, $rBouquet['channels']))) { + } else { + $rHasBouquets[] = $rBouquetID; + } + } + $rDelBouquet = $rAddBouquet = array(); + + foreach ($rHasBouquets as $rBouquetID) { + if (in_array($rBouquetID, $rStream['bouquets'])) { + } else { + removeFromBouquet('stream', $rBouquetID, $rID); + } + } + + foreach ($rStream['bouquets'] as $rBouquetID) { + if (in_array($rBouquetID, $rHasBouquets)) { + } else { + $rAddBouquet[] = $rBouquetID; + addToBouquet('stream', $rBouquetID, $rID); + } + } + } + + if (RequestManager::getAll()['save_categories'] && RequestManager::getAll()['save_epg']) { + $db->query('UPDATE `streams` SET `stream_display_name` = ?, `category_id` = ?, `channel_id` = ?, `epg_id` = ? WHERE `id` = ?;', $rStream['name'], '[' . implode(',', array_map('intval', $rStream['categories'])) . ']', ($rStream['channel_id'] ?: null), (is_null($rStream['epg_id']) ? null : $rStream['epg_id']), $rID); + } else { + if (RequestManager::getAll()['save_categories']) { + $db->query('UPDATE `streams` SET `stream_display_name` = ?, `category_id` = ? WHERE `id` = ?;', $rStream['name'], '[' . implode(',', array_map('intval', $rStream['categories'])) . ']', $rID); + } else { + if (RequestManager::getAll()['save_epg']) { + $db->query('UPDATE `streams` SET `stream_display_name` = ?, `channel_id` = ?, `epg_id` = ?, WHERE `id` = ?;', $rStream['name'], ($rStream['channel_id'] ?: null), (is_null($rStream['epg_id']) ? null : $rStream['epg_id']), $rID); + } else { + $db->query('UPDATE `streams` SET `stream_display_name` = ? WHERE `id` = ?;', $rStream['name'], $rID); + } + } + } + } + header('Location: ./streams?status=' . STATUS_SUCCESS); + + exit(); + } else { + if (!isset(RequestManager::getAll()['streams'])) { + } else { + $rStreams = json_decode(RequestManager::getAll()['streams'], true); + $rCategories = CategoryService::getAllByType('live'); + $rBouquets = BouquetService::getAllSimple(); + $rStreamBouquets = array(); + foreach ($rBouquets as $rBouquet) { + $rBouquetChannels = json_decode($rBouquet['bouquet_channels'], true); + + foreach ($rBouquetChannels as $rStreamID) { + if (!in_array($rStreamID, $rStreams)) { + } else { + $rStreamBouquets[$rStreamID][] = $rBouquet['id']; + } + } + } + $rOptions = array('categories' => isset(RequestManager::getAll()['edit_categories']), 'epg' => isset(RequestManager::getAll()['edit_epg']), 'bouquets' => isset(RequestManager::getAll()['edit_bouquets'])); + $rWidth = array(25, 20, 20); + + if ($rOptions['categories'] || $rOptions['bouquets'] || $rOptions['epg']) { + } else { + $rWidth = array(90, 0, 0); + } + + $rImport = array(); + + if (0 >= count($rStreams)) { + } else { + $db->query('SELECT * FROM `streams` WHERE `id` IN (' . implode(',', array_map('intval', $rStreams)) . ');'); + + foreach ($db->get_rows() as $rRow) { + $rImport[] = array('id' => $rRow['id'], 'channel_id' => ($rRow['channel_id'] ?: ''), 'epg_id' => ($rRow['epg_id'] ?: ''), 'title' => ($rRow['stream_display_name'] ?: ''), 'category' => json_decode($rRow['category_id'], true), 'bouquets' => ($rStreamBouquets[$rRow['id']] ?: array())); + } + } + + if (count($rImport) != 0) { + } else { + $_STATUS = STATUS_NO_SOURCES; + $rImport = null; + } + } + } + $_TITLE = 'Review'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +?> + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/stream_tools.php b/src/public/Views/admin/stream_tools.php index 35a38fdc..0312d5a5 100644 --- a/src/public/Views/admin/stream_tools.php +++ b/src/public/Views/admin/stream_tools.php @@ -1,7 +1,382 @@ + + + + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/stream_view.php b/src/public/Views/admin/stream_view.php index e43645ae..1313d4f9 100644 --- a/src/public/Views/admin/stream_view.php +++ b/src/public/Views/admin/stream_view.php @@ -1,7 +1,836 @@ + 'Stream', 2 => 'Movie', 3 => 'Channel', 4 => 'Station', 5 => 'Episode')[$rStream['type']]; + $rEPGData = null; + $rImage = null; + + if ($rStream['type'] == 1) { + $rEPGData = EpgService::getChannelEpg($rStream); + + if (0 >= $rStream['vframes_server_id']) { + } else { + $rExpires = time() + 3600; + $rTokenData = array('session_id' => session_id(), 'expires' => $rExpires, 'stream_id' => intval(RequestManager::getAll()['id']), 'ip' => NetworkUtils::getUserIP()); + $rUIToken = Encryption::encrypt(json_encode($rTokenData), SettingsManager::getAll()['live_streaming_pass'], OPENSSL_EXTRA); + + if (issecure()) { + $rVServer = ServerRepository::getAll()[$rStream['vframes_server_id']]; + $rImage = 'https://' . (($rVServer['domain_name'] ? $rVServer['domain_name'] : $rVServer['server_ip'])) . ':' . intval($rVServer['https_broadcast_port']) . '/admin/thumb?uitoken=' . $rUIToken; + } else { + $rVServer = ServerRepository::getAll()[$rStream['vframes_server_id']]; + $rImage = 'http://' . (($rVServer['domain_name'] ? $rVServer['domain_name'] : $rVServer['server_ip'])) . ':' . intval($rVServer['http_broadcast_port']) . '/admin/thumb?uitoken=' . $rUIToken; + } + } + + $rAdaptiveLink = (json_decode($rStream['adaptive_link'], true) ?: array()); + } else { + if ($rStream['type'] == 2 || $rStream['type'] == 5) { + $rProperties = json_decode($rStream['movie_properties'], true); + $rImage = (!empty($rProperties['backdrop_path'][0]) ? ImageUtils::validateURL($rProperties['backdrop_path'][0], (issecure() ? 'https' : 'http')) : ImageUtils::validateURL($rProperties['movie_image'], (issecure() ? 'https' : 'http'))); + + if (empty($rImage)) { + } else { + if (@getimagesize($rImage)) { + } else { + $rImage = null; + } + } + } else { + if ($rStream['type'] != 3) { + } else { + $rCCInfo = null; + $db->query('SELECT `streams_servers`.`stream_started`, `streams_servers`.`cc_info` FROM `streams` LEFT JOIN `streams_servers` ON `streams_servers`.`stream_id` = `streams`.`id` AND `streams_servers`.`parent_id` IS NULL WHERE `streams`.`id` = ? GROUP BY `streams`.`id`;', $rStream['id']); + + if (0 >= $db->num_rows()) { + } else { + $rServerRow = $db->get_row(); + $rCCInfo = json_decode($rServerRow['cc_info'], true); + $rSeconds = time() - intval($rServerRow['stream_started']); + } + } + } + } + + if ($rStream['type'] != 5) { + } else { + $rSeries = null; + $db->query('SELECT * FROM `streams_series` WHERE `id` = (SELECT `series_id` FROM `streams_episodes` WHERE `stream_id` = ?);', $rStream['id']); + + if (0 >= $db->num_rows()) { + } else { + $rSeries = $db->get_row(); + } + + $rSeriesID = $rSeries['id']; + } + + $rStreamStats = StreamRepository::getStats($rStream['id']); + $_TITLE = 'View ' . $rTypeString; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +echo '' . "\r\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/streams.php b/src/public/Views/admin/streams.php index 7e326d56..6b83db40 100644 --- a/src/public/Views/admin/streams.php +++ b/src/public/Views/admin/streams.php @@ -1,7 +1,513 @@ + query('SELECT DISTINCT(`audio_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `audio_codec` IS NOT NULL AND `type` = 1 ORDER BY `audio_codec` ASC;'); + + foreach ($db->get_rows() as $rRow) { + $rAudioCodecs[] = $rRow['audio_codec']; + } + $db->query('SELECT DISTINCT(`video_codec`) FROM `streams_servers` LEFT JOIN `streams` ON `streams`.`id` = `streams_servers`.`stream_id` WHERE `video_codec` IS NOT NULL AND `type` = 1 ORDER BY `video_codec` ASC;'); + + foreach ($db->get_rows() as $rRow) { + $rVideoCodecs[] = $rRow['video_codec']; + } + $_TITLE = 'Streams'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; +echo '' . "\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/admin/table.php b/src/public/Views/admin/table.php similarity index 100% rename from src/admin/table.php rename to src/public/Views/admin/table.php diff --git a/src/public/Views/admin/theft_detection.php b/src/public/Views/admin/theft_detection.php index 966ebace..b8fbd82b 100644 --- a/src/public/Views/admin/theft_detection.php +++ b/src/public/Views/admin/theft_detection.php @@ -1,6 +1,242 @@ ' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n" . ' '; +include 'topbar.php'; +echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

VOD Theft Detection

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n" . ' '; + +foreach ($rTheftDetection[$rRange] as $rRow) { + if ($rRange == 0) { + $rButtons = ''; + } else { + $rDates = date($rSettings['date_format'], time() - intval($rRange)) . ' - ' . date($rSettings['date_format'], time()); + $rButtons = ''; + } + + if (Authorization::check('adv', 'edit_user')) { + $rID = "" . $rRow['user_id'] . ''; + $rUsername = "" . $rRow['username'] . ''; + } else { + $rID = $rRow['user_id']; + $rUsername = $rRow['username']; + } + + echo ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' '; +} +echo ' ' . "\r\n\t\t\t\t\t\t" . '
User IDUsernameView CountActions
'; + echo $rID; + echo ''; + echo $rUsername; + echo ''; + echo $rRow['vod_count']; + echo ''; + echo $rButtons; + echo '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/ticket.php b/src/public/Views/admin/ticket.php index 62ad2856..f24c57e7 100644 --- a/src/public/Views/admin/ticket.php +++ b/src/public/Views/admin/ticket.php @@ -1,7 +1,183 @@ ' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n" . ' '; +include 'topbar.php'; +echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

Ticket Response

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
    ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); +?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/ticket_view.php b/src/public/Views/admin/ticket_view.php index 97215ad6..019393bf 100644 --- a/src/public/Views/admin/ticket_view.php +++ b/src/public/Views/admin/ticket_view.php @@ -1,7 +1,69 @@ query('UPDATE `tickets` SET `admin_read` = 1 WHERE `id` = ?;', RequestManager::getAll()['id']); + } + + $_TITLE = 'View Ticket'; + require_once __DIR__ . '/../layouts/admin.php'; + renderUnifiedLayoutHeader('admin'); +endif; // !$__viewMode +echo '' . "\r\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); diff --git a/src/public/Views/admin/tickets.php b/src/public/Views/admin/tickets.php index 32f617dd..765d4d260 100644 --- a/src/public/Views/admin/tickets.php +++ b/src/public/Views/admin/tickets.php @@ -1,7 +1,254 @@ ' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n" . ' '; +include 'topbar.php'; +echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

Tickets

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t"; +$rTickets = getTickets($rUserInfo['id'], true); + +foreach ($rTickets as $rTicket) { + echo "\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t"; +} +echo "\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t" . '
IDResellerTitleStatusCreated DateLast ReplyAction
'; + echo intval($rTicket['id']); + echo ''; + echo $rTicket['username']; + echo ''; + echo $rTicket['title']; + echo ''; + echo $rStatusArray[$rTicket['status']]; + echo ''; + echo $rTicket['created']; + echo ''; + echo $rTicket['last_reply']; + echo '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; + +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); +?> + + + + + + \ No newline at end of file diff --git a/src/admin/topbar.php b/src/public/Views/admin/topbar.php similarity index 100% rename from src/admin/topbar.php rename to src/public/Views/admin/topbar.php diff --git a/src/public/Views/admin/user.php b/src/public/Views/admin/user.php index 1f4cb780..f3b313e9 100644 --- a/src/public/Views/admin/user.php +++ b/src/public/Views/admin/user.php @@ -1,7 +1,352 @@ + + + + +
> +
+
+
+
+
+ +
+

User

+
+
+
+ +
+
+
+
+
+ + + + +
+ + +
+
+
+
+
+ +
+ +
+
+
+ +
+ + value="" + data-indicator="pwindicator"> +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ + +
+
+
+ 0): ?> +

Leave the override cell blank to disable package override for the selected package.

+ + + + + + + + + + + + + + + + + + + +
#PackageCreditsOverride
+ +


+ + + +
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/user_logs.php b/src/public/Views/admin/user_logs.php index 194c63af..c97dbf16 100644 --- a/src/public/Views/admin/user_logs.php +++ b/src/public/Views/admin/user_logs.php @@ -1,7 +1,198 @@ ' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n" . ' '; +include 'topbar.php'; +echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

Reseller Logs

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n" . '
' . "\r\n" . ' ' . "\r\n" . '
' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t" . '
IDResellerLine / DeviceActionCostCredits RemainingDate
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; + +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); +?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/user_mass.php b/src/public/Views/admin/user_mass.php index dfa7daaf..110ed6b1 100644 --- a/src/public/Views/admin/user_mass.php +++ b/src/public/Views/admin/user_mass.php @@ -1,7 +1,236 @@ ' . "\r\n" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n" . ' '; +include 'topbar.php'; +echo "\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '

Mass Edit Users

' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t\t\t"; + +if (!(isset($_STATUS) && $_STATUS == STATUS_SUCCESS)) { +} else { + echo "\t\t\t\t" . '' . "\r\n\t\t\t\t"; +} + +echo "\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n" . '
' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
IDUsernameOwnerIPStatusTypeCreditsUsersLinesMAGsEnigmasLast LoginActions
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '

' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . 'To mass edit any of the below options, tick the checkbox next to it and change the input value.' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '

' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
    ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . 'Previous' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . 'Next' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . ' ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; + +foreach (getPackages() as $rPackage) { + if (!$rPackage['is_official']) { + } else { + echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; + } +} +echo "\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
#PackageCreditsOverride
'; + echo intval($rPackage['id']); + echo ''; + echo $rPackage['package_name']; + echo ''; + echo intval($rPackage['official_credits']); + echo '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n" . '
' . "\r\n" . ' ' . "\r\n" . ' ' . "\r\n" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
    ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . 'Previous' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t" . '
' . "\r\n\t\t" . '
' . "\r\n\t" . '
' . "\r\n" . '' . "\r\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/useragent.php b/src/public/Views/admin/useragent.php index fc0c86ec..b68f4127 100644 --- a/src/public/Views/admin/useragent.php +++ b/src/public/Views/admin/useragent.php @@ -1,7 +1,225 @@ ' . "\n" . '
' . "\n\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n" . ' '; +include 'topbar.php'; +echo "\t\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '

'; + +if (isset($rUAArr)) { + echo 'Edit'; +} else { + echo 'Block'; +} + +echo ' User-Agent

' . "\n\t\t\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t" . '
' . "\n\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t"; + +if (!isset($rUAArr)) { +} else { + echo "\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t"; +} + +echo "\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t" . '
    ' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\n\t\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '
  • ' . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t" . '
' . "\n\t" . '
' . "\n" . '' . "\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); ?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/useragents.php b/src/public/Views/admin/useragents.php index 57beb1ed..303a320f 100644 --- a/src/public/Views/admin/useragents.php +++ b/src/public/Views/admin/useragents.php @@ -1,7 +1,248 @@ ' . "\n" . '
' . "\n\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n" . ' '; +include 'topbar.php'; +echo "\t\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '

Blocked User-Agents

' . "\n\t\t\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t" . '
' . "\n\t\t" . '
' . "\n\t\t\t" . '
' . "\n" . ' '; + +if (!(isset($_STATUS) && $_STATUS == STATUS_SUCCESS)) { +} else { + echo ' ' . "\n" . ' '; +} + +echo "\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t"; + +foreach (getUserAgents() as $rUserAgent) { + echo "\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t"; +} +echo "\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t" . '
IDUser-AgentExact MatchActions
'; + echo intval($rUserAgent['id']); + echo ''; + echo $rUserAgent['user_agent']; + echo '' . "\n\t\t\t\t\t\t\t\t\t\t"; + + if ($rUserAgent['exact_match']) { + echo "\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t"; + } else { + echo "\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t"; + } + + echo "\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '' . "\n\t\t\t\t\t\t\t\t\t\t\t" . '" . "\n\t\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t\t\t\t\t" . '
' . "\n\t\t\t\t\t" . '
' . "\n\t\t\t\t" . '
' . "\n\t\t\t" . '
' . "\n\t\t" . '
' . "\n\t" . '
' . "\n" . '' . "\n"; +require_once __DIR__ . '/../layouts/footer.php'; +renderUnifiedLayoutFooter('admin'); +?> + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/users.php b/src/public/Views/admin/users.php index 2b07869c..e882450b 100644 --- a/src/public/Views/admin/users.php +++ b/src/public/Views/admin/users.php @@ -1,7 +1,288 @@ + + + + +
> +
+
+
+
+
+ +
+

Users

+
+
+
+ +
+
+ + + + +
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
IDUsernameOwnerIPStatusTypeCreditsUsersLinesMAGsEnigmasLast LoginActions
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/public/Views/admin/watch.php b/src/public/Views/admin/watch.php index 3055de07..470cd0da 100644 --- a/src/public/Views/admin/watch.php +++ b/src/public/Views/admin/watch.php @@ -1,7 +1,24 @@ dispatch($pageName, $method)) { - exit; - } - http_response_code(404); - echo '404 Not Found'; + // Загружаем только autoloader (без full bootstrap) + require_once MAIN_HOME . 'autoload.php'; + $router = Router::getInstance(); + require_once __DIR__ . '/routes/' . $scope . '.php'; + $method = $_SERVER['REQUEST_METHOD'] ?? 'GET'; + if ($router->dispatch($pageName, $method)) { exit; } - - // Admin: legacy fallback - $legacyFile = $adminDir . $pageName . '.php'; - if (file_exists($legacyFile)) { - require $legacyFile; - exit; - } - // Файл не найден http_response_code(404); echo '404 Not Found'; exit; @@ -320,6 +315,7 @@ if (file_exists($apiRouteFile)) { // ───────────────────────────────────────────────────────────────── $method = $_SERVER['REQUEST_METHOD'] ?? 'GET'; +$useLegacyFallback = ($rSettings['use_legacy_fallback'] ?? true); // Страничные маршруты (reseller: api/table/post и прочие идут сюда) if ($router->dispatch($pageName, $method)) { @@ -327,6 +323,8 @@ if ($router->dispatch($pageName, $method)) { } // API-запросы: /admin/api?action=... обрабатываются отдельно (admin legacy) +// Примечание: если маршрут 'api' зарегистрирован в Router (Phase 10.4), +// dispatch() выше уже обработал запрос и мы сюда не попадём. if ($pageName === 'api' && !empty($_REQUEST['action'])) { $action = $_REQUEST['action']; @@ -334,32 +332,38 @@ if ($pageName === 'api' && !empty($_REQUEST['action'])) { exit; // Router обработал API-запрос } - // Fallback: передаём в legacy admin/api.php - $legacyApi = $adminDir . 'api.php'; - if (file_exists($legacyApi)) { - require $legacyApi; - exit; + // Fallback: передаём в legacy admin/api.php (feature-flagged) + if ($useLegacyFallback) { + $legacyApi = $adminDir . 'api.php'; + if (file_exists($legacyApi)) { + require $legacyApi; + exit; + } } Response::jsonError('Unknown action: ' . $action, 404); } // ───────────────────────────────────────────────────────────────── -// 7. Fallback — legacy include +// 7. Fallback — legacy include (feature-flagged) // ───────────────────────────────────────────────────────────────── // // Если Router не знает маршрут, подключаем legacy PHP-файл. // Bootstrap уже загружен (шаг 4b), поэтому session/functions доступны. // -// По мере миграции (Step 6.3) страницы будут регистрироваться -// в Router и fallback перестанет использоваться. +// Feature flag: use_legacy_fallback (default: true). +// Когда все страницы зарегистрированы в Router, переключить на false +// чтобы полностью отключить fallback. // ───────────────────────────────────────────────────────────────── -$legacyFile = $adminDir . $pageName . '.php'; - -if (file_exists($legacyFile)) { - require $legacyFile; - exit; +if ($useLegacyFallback) { + $legacyFile = $adminDir . $pageName . '.php'; + if (file_exists($legacyFile)) { + // Предотвращаем повторный bootstrap — FC уже загрузил сессию и функции (шаг 4b). + $__viewMode = true; + require $legacyFile; + exit; + } } // ───────────────────────────────────────────────────────────────── diff --git a/src/public/routes/admin.php b/src/public/routes/admin.php index 7a7baad9..5c05d4b5 100644 --- a/src/public/routes/admin.php +++ b/src/public/routes/admin.php @@ -166,3 +166,17 @@ $router->any('record', [RecordController::class, 'index']); $router->any('review', [ReviewController::class, 'index']); $router->any('archive', [ArchiveController::class, 'index']); $router->get('asns', [AsnsController::class, 'index']); + +// ─── Phase 10: Formerly unrouted pages ───────────────────────── + +$router->get('logout', [LogoutController::class, 'index']); +$router->any('player', [PlayerEmbedController::class, 'index']); +$router->any('post', [PostController::class, 'index']); +$router->any('api', [AjaxController::class, 'index']); + +// ─── Phase 10: No-bootstrap pages (login, setup, database) ──── + +$router->any('login', [LoginController::class, 'index']); +$router->any('setup', [SetupController::class, 'index']); +$router->any('database', [SetupController::class, 'database']); +$router->get('index', [LoginController::class, 'index']); diff --git a/src/www/stream/vod.php b/src/www/stream/vod.php index 3204ae4d..d66a02db 100644 --- a/src/www/stream/vod.php +++ b/src/www/stream/vod.php @@ -527,6 +527,7 @@ function shutdown() { global $rTokenData; global $rPID; global $db; + global $rServers; $rSettings = CacheReader::get('settings'); if (!$rCloseCon) {