Added routes

This commit is contained in:
neerholt
2021-03-17 09:43:09 +01:00
parent 0d4f161a48
commit a84c7a9258
14 changed files with 148 additions and 54 deletions
+10 -2
View File
@@ -17,10 +17,18 @@ if(isAdmin()){
$gameJam->description = $_POST["description"];
if($gameJam->save()){
header("location: ../../../Frontend/Html/AdminPage.html?success=UploadedFile");
exit();
}
else{
header("location: ../../../Frontend/Html/AdminPage.html?error=FailToSaveGameJam");
exit();
}
}else{
header("location: ../../../Frontend/Html/AdminPage.html?error=FailedToMakeGameJam");
exit();
}
}else{
header("location: ../../../Frontend/index.html?error=NotAdmin");
exit();
}
@@ -22,9 +22,16 @@ if(isAdmin()){
$gameJam->description = $_POST['description'];
if ($gameJam->save()) {
header("location: ../../../Frontend/Html/AdminPage.html?success=UpdatedFile");
exit();
}
}
}else{
header("location: ../../../Frontend/Html/AdminPage.html?error=FailedToUpdatedGameJam");
exit();
}
}else{
header("location: ../../../Frontend/index.html?error=NotAdmin");
exit();
}