Dashboard
+Welcome to the Admin Panel. Here you can manage your application.
+ +diff --git a/admin.php b/admin.php new file mode 100644 index 0000000..6ac0043 --- /dev/null +++ b/admin.php @@ -0,0 +1,166 @@ +query('SELECT count(*) FROM users')->fetchColumn(); + $playlist_count = $db->query('SELECT count(*) FROM user_playlists')->fetchColumn(); +} catch (PDOException $e) { + // DB connection error is handled gracefully +} + +if (file_exists('premium_content.json')) { + $premium_content = json_decode(file_get_contents('premium_content.json'), true); + $content_count = is_array($premium_content) ? count($premium_content) : 0; +} + +?> + + +
+ + +Welcome to the Admin Panel. Here you can manage your application.
+ +Settings to save: '; + print_r($settings); + echo ''; + + if (is_writable($settings_file)) { + echo '
settings.json is writable.
'; + } else { + echo 'settings.json is NOT writable.
'; + } + + $result = file_put_contents($settings_file, json_encode($settings, JSON_PRETTY_PRINT)); + + if ($result === false) { + echo 'Error saving settings!
'; + $error = error_get_last(); + if ($error) { + echo 'Error details: '; + print_r($error); + echo ''; + } + } else { + echo '
Settings saved successfully.
'; + header('Location: admin_settings.php?success=1'); + exit; + } + exit; // Stop execution to see debug output +} + +?> + + + + + +| ID | +Username | +Registration Date | +Actions | +
|---|---|---|---|
| No users found. | +|||
| + | + | + | + + + | +
Loading...
'; + let playlists = []; + if (isLoggedIn) { + const response = await fetch('playlist_manager.php?action=get'); + playlists = await response.json(); + } else { + playlists = getLocalPlaylists(); + } + + playlistsList.innerHTML = ''; + if (playlists.length === 0) { + playlistsList.innerHTML = 'Your added playlists will appear here.
'; + if (!isLoggedIn) { + playlistsList.innerHTML += 'Sign up to save your playlists to your account.
'; + } + return; + } + + playlists.forEach((playlist, index) => { + const playlistEl = document.createElement('div'); + playlistEl.className = 'card playlist-card mb-3'; + const playlistId = isLoggedIn ? playlist.id : index; + playlistEl.innerHTML = ` +${escapeHTML(playlist.url)}
+Have questions? We'd love to hear from you. Fill out the form below and we'll get back to you as soon as possible.
+ + + + + + + + + += ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-This page will update automatically as the plan is implemented.
-Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
Add your playlists and enjoy seamless streaming. Simple, fast, and modern.
+Go to "My Playlists" and add your M3U URL or log in with your credentials. Your channels will be loaded automatically.
+Browse your channels, search for your favorite content, and start watching instantly with our advanced built-in player.
+