# Include the TV functions require_once 'includes/main.php'; # Send our headers early header('Content-type: text/html; charset=utf-8'); # Did the user request a specific show? $show = false; if (isset($_REQUEST['show'])) { # This is not a great filter, but it should make the string safe for use as a quoted path $show = preg_replace('/[\0\n\r]/', '', $_REQUEST['show']); $show = basename($show); } # Did the user request an update? if ($show !== false && isset($_POST['Save'])) { echo '