require 'config.php';
function printSeries($series) {
global $EXISTS_FILES;
global $CONTENT_FILES;
# Ensure our series name is reasonable
$series_html = htmlspecialchars($series);
if (!seriesExists($series)) {
die('Unknown series: ' . $series_html);
}
# Grab the flag and season data
$flags = readFlags($series);
$seasons = findSeasons($series);
# Header
echo '
' . $series_html . '
';
echo '';
# TheTVDB Frame
$url_html = htmlspecialchars(TVDBURL($flags['tvdb-id'], $flags['tvdb-lid']));
echo 'The TVDB
';
echo '' . $url_html . '
';
echo '';
}
# Print a DL of all series and note the available and monitored seasons
function printAllSeries() {
global $TV_PATH;
$all_series = allSeries($TV_PATH);
echo "\n";
foreach ($all_series as $series => $seasons) {
echo '- ' . htmlspecialchars($series) . "
\n";
foreach ($seasons as $season => $monitored) {
echo '- Season ' . htmlspecialchars($season);
if ($monitored) {
echo ' (monitored)';
}
echo "
\n";
}
}
echo "
\n";
}
?>