From f1c13ea8d8a9fc0d056c9044c44232b4b0ffc673 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 26 Nov 2025 19:33:57 +0000 Subject: [PATCH] 1.2 --- admin.php | 3 + admin_upload.php | 169 +++++++++++++++++ assets/img/icon-192.png | Bin 0 -> 293 bytes assets/img/icon-512.png | Bin 0 -> 319 bytes index.php | 21 +++ manifest.json | 20 ++ premium_content.json | 407 ++++++++++++++++++++++++++++++++++++++-- sw.js | 31 +++ 8 files changed, 640 insertions(+), 11 deletions(-) create mode 100644 admin_upload.php create mode 100644 assets/img/icon-192.png create mode 100644 assets/img/icon-512.png create mode 100644 manifest.json create mode 100644 sw.js diff --git a/admin.php b/admin.php index 6ac0043..1e03990 100644 --- a/admin.php +++ b/admin.php @@ -73,6 +73,9 @@ if (file_exists('premium_content.json')) {
  • Premium Content
  • +
  • + Upload Channels +
  • App Settings
  • diff --git a/admin_upload.php b/admin_upload.php new file mode 100644 index 0000000..1aa464c --- /dev/null +++ b/admin_upload.php @@ -0,0 +1,169 @@ + $attributes['title'], + 'category' => $attributes['group-title'] ?? 'General', + 'poster_url' => $attributes['tvg-logo'] ?? '', + 'stream_url' => $stream_url, + ]; + $i++; // Skip the next line as it's the URL + } else { + $malformed_entries++; + } + } + } + + if (!empty($new_channels)) { + $content_file = 'premium_content.json'; + $existing_channels = []; + if (!$overwrite && file_exists($content_file)) { + $existing_content = json_decode(file_get_contents($content_file), true); + if (is_array($existing_content)) { + $existing_channels = $existing_content; + } + } + + $last_id = 0; + if (!empty($existing_channels)) { + $last_item = end($existing_channels); + $last_id = $last_item['id'] ?? 0; + } + + foreach($new_channels as &$channel) { + $last_id++; + $channel['id'] = $last_id; + } + + $all_channels = array_merge($existing_channels, $new_channels); + + if (json_encode($all_channels, JSON_PRETTY_PRINT)) { + file_put_contents($content_file, json_encode($all_channels, JSON_PRETTY_PRINT)); + $message = 'Successfully uploaded and processed ' . count($new_channels) . ' new channels.'; + if ($malformed_entries > 0) { + $error = $malformed_entries . ' entries in your file were malformed and could not be imported.'; + } + } else { + $error = 'Failed to encode data to JSON. Check for special characters.'; + } + + } else { + $error = 'No valid channel data found in the uploaded M3U file.'; + if ($malformed_entries > 0) { + $error .= ' All entries appear to be malformed.'; + } + } + } + } else { + $error = 'File upload failed with error code: ' . $file['error']; + } +} +?> + + + + + + Admin - Upload M3U Playlist + + + + + +
    +

    Upload Premium Channels

    + + +
    + + +
    + + +
    +
    +
    Upload an M3U Playlist File
    +

    + The file should be a valid M3U playlist (starting with #EXTM3U). The parser will attempt to extract channel information from #EXTINF lines. +

    +
    +
    + + +
    +
    + + + If checked, all current premium channels will be replaced by the ones in this file. If unchecked, new channels will be added to the existing list. +
    + +
    +
    +
    + + + +
    + + + + diff --git a/assets/img/icon-192.png b/assets/img/icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..4f255bd0d59fdbcbc7d456e3856344d6b1eafe43 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^2SAvS8AxUb{c{0QEa{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8Uxs6XI%|e(nGN|NK(R zj{!v(lf2zs82>Zr-UD*jOFVsD*wgPf^a;u=wsl30>zm0Xkxq!^40j7)V64RwvoLJTdf3=FJ{ nEwzE9fkE+xs)Z;Ta`RI%(<*UmV0wE<7G$BPtDnm{r-UW|Qcz6~ literal 0 HcmV?d00001 diff --git a/assets/img/icon-512.png b/assets/img/icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..7d771951a0b0705bf36ae386f65d70d64b3997d8 GIT binary patch literal 319 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7#Nv>)VXbLJAo8Sx}&cn1H;CC?mvmFK)yn< zN02WALzNl>LqiJ#!!Mvv!wUw6QUeBtR|yOZRx=nF#0%!^3bX-Aum$*pxEiNl`~Uwx zztr+$KoQ0yZ+92Q|4h2~fE@M`PhVH|m)ugq4C;K1=bV5-W}YsNAr-gY9%N($@|qO> zug~*v05S1_8tEpW$;qVwOMt3WOI#yLQW8s2t&)pUffR$0fsv`Mp`oskS%{&fm4Shk ov86VUG%zUMP_+<6LvDUbW?Cg~4NPwj$%5SB>FVdQ&MBb@0Os^cSO5S3 literal 0 HcmV?d00001 diff --git a/index.php b/index.php index 1f19c40..5bc14e5 100644 --- a/index.php +++ b/index.php @@ -34,9 +34,19 @@ height: 70px; } + + +
    + + + watch latest movies + + +
    +