Cannot save: User not authenticated'; } } # Did the user add a season? if ($series !== false && isset($_POST['AddSeason'])) { # Require auth (or for the time being, specific IP addresses) if (preg_match('/^(?:172\.19\.[17]\.|2602:3f:e50d:76|74\.93\.97\.65)/', $_SERVER['REMOTE_ADDR'])) { # Add a season folder $season = intval($_POST['season_add']); addSeason($series, $season); } else { echo '

Cannot save: User not authenticated

'; } } # Did the user delete a season? if ($series !== false) { $season = false; foreach (array_keys($_POST) as $key) { if (preg_match('/season_del_(\d+)/', $key, $matches)) { $season = intval($matches[1]); last; } } if ($season !== false) { # Require auth (or for the time being, specific IP addresses) if (preg_match('/^(?:172\.19\.[17]\.|2602:3f:e50d:76|74\.93\.97\.65)/', $_SERVER['REMOTE_ADDR'])) { # Remove a season folder (if empty) delSeason($series, $season); } else { echo '

Cannot save: User not authenticated

'; } } } # Did the user add a series? if ($series === false && isset($_POST['series_add'])) { # Require auth (or for the time being, specific IP addresses) if (preg_match('/^(?:172\.19\.[17]\.|2602:3f:e50d:76|74\.93\.97\.65)/', $_SERVER['REMOTE_ADDR'])) { # Add a series folder $series = addSeries($_POST['series_add']); } else { echo '

Cannot save: User not authenticated

'; } } #========================================================================================= # Generic XHTML 1.1 header print << UberZach TV ENDOLA; if ($series === false) { printAllSeries(); } else { printSeries($series); } # Generic XHTML 1.1 footer print << ENDOLA; ?>