fix
This commit is contained in:
@@ -15,13 +15,13 @@ function ZipFileHandler(string $gameFileName, string $gameFileTmp){
|
||||
if(in_array($headerType,$headerTypeMatch)){
|
||||
$gameFileNewName = uniqid("", true). "." . $fileActualExtGame;
|
||||
if(empty($gameFileName)){
|
||||
header("location: ../../../Frontend/index.php?error=emptyFile");
|
||||
header("location: ../../../Frontend/index.html?error=emptyFile");
|
||||
exit();
|
||||
}
|
||||
rename($gameFileTmp,"../../Games/".$gameFileNewName);
|
||||
return $gameFileNewName;
|
||||
}else{
|
||||
header("location: location: ../../../Frontend/index.php?error=Wrong%20File%20Type");
|
||||
header("location: location: ../../../Frontend/index.html?error=Wrong%20File%20Type");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -41,13 +41,13 @@ function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){
|
||||
if(in_array($headerType,$headerTypeMatch)){
|
||||
$thumbnailFileNewName = uniqid("", true). "." . $fileActualExtThumb;
|
||||
if(empty($thumbnailFileName)){
|
||||
header("location: ../../../Frontend/index.php?error=emptyFile");
|
||||
header("location: ../../../Frontend/index.html?error=emptyFile");
|
||||
exit();
|
||||
}
|
||||
rename($thumbnailFileTmp,"../../../Frontend/images/".$thumbnailFileNewName);
|
||||
return $thumbnailFileNewName;
|
||||
}else{
|
||||
header("location: location: ../../../Frontend/index.php?error=Wrong%20File%20Type");
|
||||
header("location: location: ../../../Frontend/index.html?error=Wrong%20File%20Type");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -2,9 +2,6 @@
|
||||
require_once "../../../bootstrap.php";
|
||||
use \Backend\Models\GameData;
|
||||
use \Backend\Models\Group;
|
||||
use \Backend\Models\GameJam;
|
||||
|
||||
|
||||
|
||||
if(isset($_GET['gameDataId'])){
|
||||
$openGameDataStream = GameData::find($_GET['gameDataId']);
|
||||
|
||||
@@ -4,9 +4,7 @@ require_once('../Group/Group.php');
|
||||
require_once('FileHandler.php');
|
||||
use Backend\Models\GameData;
|
||||
|
||||
session_start();
|
||||
|
||||
if(isset($_SESSION['token'])){
|
||||
if(isLogin()){
|
||||
if(isset($_POST['submitUpdate'])){
|
||||
$gameFile = $_FILES['gameFile'];
|
||||
$desc = $_POST['description'];
|
||||
@@ -41,5 +39,5 @@ if(isset($_SESSION['token'])){
|
||||
$gameData->save();
|
||||
}
|
||||
}else{
|
||||
header("location: ../Backend/Main.php?error=NoLogin");
|
||||
header("location: ../../../Frontend/index.html?error=NoLogin");
|
||||
}
|
||||
@@ -8,7 +8,6 @@ use Backend\Models\Group;
|
||||
|
||||
$isImages = false;
|
||||
|
||||
session_start();
|
||||
|
||||
if(isLogin()){
|
||||
|
||||
@@ -46,8 +45,8 @@ if(isLogin()){
|
||||
}
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/group.php?error=TooManyUploads");
|
||||
header("location: ../../../Frontend/index.html?error=TooManyUploads");
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Main.php?error=NoLogin");
|
||||
header("location: ../../../Frontend/index.html?error=NoLogin");
|
||||
}
|
||||
Reference in New Issue
Block a user