Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/monara/public_html/test.athavaneng.com/themes.php on line 99

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
prepare("SELECT * FROM programmes WHERE id=:id"); $stmt->execute([':id' => $id]); $programme = $stmt->fetch(PDO::FETCH_ASSOC); if (!$programme) { die("Programme not found."); } $message = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $title = filter_input(INPUT_POST, 'programme_title', FILTER_SANITIZE_STRING); $description = filter_input(INPUT_POST, 'description', FILTER_SANITIZE_STRING); $youtube_playlist = filter_input(INPUT_POST, 'youtube_playlist', FILTER_SANITIZE_STRING); $cover_image = $programme['cover_image']; if (isset($_FILES['cover_image']) && $_FILES['cover_image']['error'] === UPLOAD_ERR_OK) { $target_dir = $_SERVER['DOCUMENT_ROOT'] . '/uploads/programmes/'; $cover_image = basename($_FILES['cover_image']['name']); $target_file = $target_dir . $cover_image; move_uploaded_file($_FILES['cover_image']['tmp_name'], $target_file); } $stmt = $conn->prepare("UPDATE programmes SET title=:title, description=:description, youtube_playlist=:youtube_playlist, cover_image=:cover_image WHERE id=:id"); $stmt->execute([ ':title' => $title, ':description' => $description, ':youtube_playlist' => $youtube_playlist, ':cover_image' => $cover_image, ':id' => $id ]); $message = "Programme updated successfully!"; $programme['title'] = $title; $programme['description'] = $description; $programme['youtube_playlist'] = $youtube_playlist; $programme['cover_image'] = $cover_image; } ?> Edit Programme

Edit Programme

Back