fix
This commit is contained in:
@@ -19,17 +19,17 @@ if(isset($_POST['aLogin'])){
|
||||
$_SESSION['userName'] = $userName;
|
||||
$_SESSION['admin'] = true;
|
||||
$_SESSION['success'] = "You are now logged in";
|
||||
header('location: ../../../Frontend/index.php?login=success');
|
||||
header('location: ../../../Frontend/index.html?login=success');
|
||||
}else{
|
||||
session_destroy();
|
||||
header('location: ../../../Frontend/index.php?login=failed?reason=password');
|
||||
header('location: ../../../Frontend/index.html?login=failed?reason=password');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
session_destroy();
|
||||
header('location: ../../../Frontend/index.php?login=failed?reason=username');
|
||||
header('location: ../../../Frontend/index.html?login=failed?reason=username');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
require "../../../bootstrap.php";
|
||||
require_once "../../../bootstrap.php";
|
||||
|
||||
use Backend\Models\Group;
|
||||
use Backend\Models\Password;
|
||||
@@ -25,7 +25,8 @@ if(isset($_POST['login'])){
|
||||
$_SESSION['groupName'] = $groupName;
|
||||
$_SESSION['token'] = $token;
|
||||
$_SESSION['success'] = "You are now logged in";
|
||||
header('location: ../../../Frontend/index.php?login=success');
|
||||
//header('location: ../../../Frontend/index.php?login=success');
|
||||
echo "YES";
|
||||
}
|
||||
else{
|
||||
session_destroy();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
require "../../../bootstrap.php";
|
||||
require_once "../../../bootstrap.php";
|
||||
require_once "Group.php";
|
||||
|
||||
use Backend\Models\Group;
|
||||
@@ -8,8 +8,6 @@ use Backend\Models\Password;
|
||||
use Backend\Models\GameJam;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
session_start();
|
||||
|
||||
$groupName = "";
|
||||
$errors = array();
|
||||
|
||||
@@ -45,8 +43,8 @@ if(isset($_POST['regGroup'])){
|
||||
$_SESSION['groupName'] = $groupName;
|
||||
$_SESSION['token'] = $token;
|
||||
$_SESSION['success'] = "You are now logged in";
|
||||
header('location: ../../../Frontend/index.php');
|
||||
header('location: ../../../Frontend/index.html');
|
||||
}else{
|
||||
echo "asdasd";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require "../../../bootstrap.php";
|
||||
require_once "../../../bootstrap.php";
|
||||
require_once "Group.php";
|
||||
|
||||
use Backend\Models\Group;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use Backend\Models\Group;
|
||||
use Backend\Models\Vote;
|
||||
require "../../../bootstrap.php";
|
||||
require_once "../../../bootstrap.php";
|
||||
|
||||
|
||||
if(isset($_POST['321Vote'])){
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
use Backend\Models\Vote;
|
||||
require "../../../bootstrap.php";
|
||||
require_once "../../../bootstrap.php";
|
||||
require_once "../Group/Group.php";
|
||||
|
||||
if(isLogin()){
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require "../../../bootstrap.php";
|
||||
require_once "../../../bootstrap.php";
|
||||
use \Backend\Models\Group;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
require "../../../bootstrap.php";
|
||||
require_once "../../../bootstrap.php";
|
||||
require_once "../Group/Group.php";
|
||||
use Backend\Models\Group;
|
||||
use Backend\Models\KeyWord;
|
||||
|
||||
session_start();
|
||||
|
||||
if (session_status() === PHP_SESSION_ACTIVE) {
|
||||
if (isLogin()) {
|
||||
if(isset($_POST['submitKeyWord'])){
|
||||
//Find the group id
|
||||
$group = groupViaToken($_SESSION['token']);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
use Backend\Models\GameJam;
|
||||
use Illuminate\Contracts\Config;
|
||||
|
||||
require_once('../bootstrap.php');
|
||||
|
||||
@@ -9,6 +10,7 @@ $gameJam = GameJam::firstOrCreate([
|
||||
]);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
Reference in New Issue
Block a user