This commit is contained in:
nolanwhy 2023-02-05 12:47:04 +01:00
parent 4755e666c7
commit 4a8afe89d0
1 changed files with 19 additions and 0 deletions

View File

@ -12,8 +12,27 @@ if (isset($_SESSION['user'])) {
$user = new User($con, $_SESSION['user']);
}
$possiblePages = [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
];
if(isset($_GET["p"])) {
$page = (int) $_GET["p"];
if(!in_array($page,$possiblePages)) {
header('location: /catalog');
exit;
}
} else {
$page = 0;
}