function printSeries($series) {
require 'config.php';
global $EXISTS_FILES;
global $CONTENT_FILES;
# Ensure our series name is reasonable
$series_html = htmlspecialchars(displayTitle($series));
if (!seriesExists($series)) {
die('Unknown series: ' . $series_html);
}
# Grab the flag and season data
$flags = readFlags($series);
$seasons = findSeasons($series);
# Header
echo '
';
# Sort by "sortTitle" -- an approximation of the Plex sort title
$sorted_series = array();
foreach ($all_series as $series => $seasons) {
$sorted_series[ $series ] = sortTitle($series);
}
asort($sorted_series, SORT_FLAG_CASE | SORT_NATURAL);
# Display all series
echo '
';
# End the sorted/filtered content
echo '
';
# Add a series
echo '