fix
This commit is contained in:
parent
8162c89051
commit
67ac104b4b
|
@ -19,17 +19,17 @@ if(isset($_POST['aLogin'])){
|
||||||
$_SESSION['userName'] = $userName;
|
$_SESSION['userName'] = $userName;
|
||||||
$_SESSION['admin'] = true;
|
$_SESSION['admin'] = true;
|
||||||
$_SESSION['success'] = "You are now logged in";
|
$_SESSION['success'] = "You are now logged in";
|
||||||
header('location: ../../../Frontend/index.php?login=success');
|
header('location: ../../../Frontend/index.html?login=success');
|
||||||
}else{
|
}else{
|
||||||
session_destroy();
|
session_destroy();
|
||||||
header('location: ../../../Frontend/index.php?login=failed?reason=password');
|
header('location: ../../../Frontend/index.html?login=failed?reason=password');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
session_destroy();
|
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)){
|
if(in_array($headerType,$headerTypeMatch)){
|
||||||
$gameFileNewName = uniqid("", true). "." . $fileActualExtGame;
|
$gameFileNewName = uniqid("", true). "." . $fileActualExtGame;
|
||||||
if(empty($gameFileName)){
|
if(empty($gameFileName)){
|
||||||
header("location: ../../../Frontend/index.php?error=emptyFile");
|
header("location: ../../../Frontend/index.html?error=emptyFile");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
rename($gameFileTmp,"../../Games/".$gameFileNewName);
|
rename($gameFileTmp,"../../Games/".$gameFileNewName);
|
||||||
return $gameFileNewName;
|
return $gameFileNewName;
|
||||||
}else{
|
}else{
|
||||||
header("location: location: ../../../Frontend/index.php?error=Wrong%20File%20Type");
|
header("location: location: ../../../Frontend/index.html?error=Wrong%20File%20Type");
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -41,13 +41,13 @@ function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){
|
||||||
if(in_array($headerType,$headerTypeMatch)){
|
if(in_array($headerType,$headerTypeMatch)){
|
||||||
$thumbnailFileNewName = uniqid("", true). "." . $fileActualExtThumb;
|
$thumbnailFileNewName = uniqid("", true). "." . $fileActualExtThumb;
|
||||||
if(empty($thumbnailFileName)){
|
if(empty($thumbnailFileName)){
|
||||||
header("location: ../../../Frontend/index.php?error=emptyFile");
|
header("location: ../../../Frontend/index.html?error=emptyFile");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
rename($thumbnailFileTmp,"../../../Frontend/images/".$thumbnailFileNewName);
|
rename($thumbnailFileTmp,"../../../Frontend/images/".$thumbnailFileNewName);
|
||||||
return $thumbnailFileNewName;
|
return $thumbnailFileNewName;
|
||||||
}else{
|
}else{
|
||||||
header("location: location: ../../../Frontend/index.php?error=Wrong%20File%20Type");
|
header("location: location: ../../../Frontend/index.html?error=Wrong%20File%20Type");
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
|
@ -2,9 +2,6 @@
|
||||||
require_once "../../../bootstrap.php";
|
require_once "../../../bootstrap.php";
|
||||||
use \Backend\Models\GameData;
|
use \Backend\Models\GameData;
|
||||||
use \Backend\Models\Group;
|
use \Backend\Models\Group;
|
||||||
use \Backend\Models\GameJam;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(isset($_GET['gameDataId'])){
|
if(isset($_GET['gameDataId'])){
|
||||||
$openGameDataStream = GameData::find($_GET['gameDataId']);
|
$openGameDataStream = GameData::find($_GET['gameDataId']);
|
||||||
|
|
|
@ -4,9 +4,7 @@ require_once('../Group/Group.php');
|
||||||
require_once('FileHandler.php');
|
require_once('FileHandler.php');
|
||||||
use Backend\Models\GameData;
|
use Backend\Models\GameData;
|
||||||
|
|
||||||
session_start();
|
if(isLogin()){
|
||||||
|
|
||||||
if(isset($_SESSION['token'])){
|
|
||||||
if(isset($_POST['submitUpdate'])){
|
if(isset($_POST['submitUpdate'])){
|
||||||
$gameFile = $_FILES['gameFile'];
|
$gameFile = $_FILES['gameFile'];
|
||||||
$desc = $_POST['description'];
|
$desc = $_POST['description'];
|
||||||
|
@ -41,5 +39,5 @@ if(isset($_SESSION['token'])){
|
||||||
$gameData->save();
|
$gameData->save();
|
||||||
}
|
}
|
||||||
}else{
|
}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;
|
$isImages = false;
|
||||||
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
if(isLogin()){
|
if(isLogin()){
|
||||||
|
|
||||||
|
@ -46,8 +45,8 @@ if(isLogin()){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
header("location: ../../../Frontend/group.php?error=TooManyUploads");
|
header("location: ../../../Frontend/index.html?error=TooManyUploads");
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
header("location: ../../../Main.php?error=NoLogin");
|
header("location: ../../../Frontend/index.html?error=NoLogin");
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require "../../../bootstrap.php";
|
require_once "../../../bootstrap.php";
|
||||||
|
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
use Backend\Models\Password;
|
use Backend\Models\Password;
|
||||||
|
@ -25,7 +25,8 @@ if(isset($_POST['login'])){
|
||||||
$_SESSION['groupName'] = $groupName;
|
$_SESSION['groupName'] = $groupName;
|
||||||
$_SESSION['token'] = $token;
|
$_SESSION['token'] = $token;
|
||||||
$_SESSION['success'] = "You are now logged in";
|
$_SESSION['success'] = "You are now logged in";
|
||||||
header('location: ../../../Frontend/index.php?login=success');
|
//header('location: ../../../Frontend/index.php?login=success');
|
||||||
|
echo "YES";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require "../../../bootstrap.php";
|
require_once "../../../bootstrap.php";
|
||||||
require_once "Group.php";
|
require_once "Group.php";
|
||||||
|
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
|
@ -8,8 +8,6 @@ use Backend\Models\Password;
|
||||||
use Backend\Models\GameJam;
|
use Backend\Models\GameJam;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
$groupName = "";
|
$groupName = "";
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
|
@ -45,8 +43,8 @@ if(isset($_POST['regGroup'])){
|
||||||
$_SESSION['groupName'] = $groupName;
|
$_SESSION['groupName'] = $groupName;
|
||||||
$_SESSION['token'] = $token;
|
$_SESSION['token'] = $token;
|
||||||
$_SESSION['success'] = "You are now logged in";
|
$_SESSION['success'] = "You are now logged in";
|
||||||
header('location: ../../../Frontend/index.php');
|
header('location: ../../../Frontend/index.html');
|
||||||
}else{
|
}else{
|
||||||
echo "asdasd";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
require "../../../bootstrap.php";
|
require_once "../../../bootstrap.php";
|
||||||
require_once "Group.php";
|
require_once "Group.php";
|
||||||
|
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
use Backend\Models\Vote;
|
use Backend\Models\Vote;
|
||||||
require "../../../bootstrap.php";
|
require_once "../../../bootstrap.php";
|
||||||
|
|
||||||
|
|
||||||
if(isset($_POST['321Vote'])){
|
if(isset($_POST['321Vote'])){
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
use Backend\Models\Vote;
|
use Backend\Models\Vote;
|
||||||
require "../../../bootstrap.php";
|
require_once "../../../bootstrap.php";
|
||||||
require_once "../Group/Group.php";
|
require_once "../Group/Group.php";
|
||||||
|
|
||||||
if(isLogin()){
|
if(isLogin()){
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
require "../../../bootstrap.php";
|
require_once "../../../bootstrap.php";
|
||||||
use \Backend\Models\Group;
|
use \Backend\Models\Group;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
require "../../../bootstrap.php";
|
require_once "../../../bootstrap.php";
|
||||||
require_once "../Group/Group.php";
|
require_once "../Group/Group.php";
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
use Backend\Models\KeyWord;
|
use Backend\Models\KeyWord;
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
if (session_status() === PHP_SESSION_ACTIVE) {
|
if (isLogin()) {
|
||||||
if(isset($_POST['submitKeyWord'])){
|
if(isset($_POST['submitKeyWord'])){
|
||||||
//Find the group id
|
//Find the group id
|
||||||
$group = groupViaToken($_SESSION['token']);
|
$group = groupViaToken($_SESSION['token']);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
use Backend\Models\GameJam;
|
use Backend\Models\GameJam;
|
||||||
|
use Illuminate\Contracts\Config;
|
||||||
|
|
||||||
require_once('../bootstrap.php');
|
require_once('../bootstrap.php');
|
||||||
|
|
||||||
|
@ -9,6 +10,7 @@ $gameJam = GameJam::firstOrCreate([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"illuminate/database": "^8.30",
|
"illuminate/database": "^8.30"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
|
|
|
@ -103,16 +103,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "illuminate/collections",
|
"name": "illuminate/collections",
|
||||||
"version": "v8.31.0",
|
"version": "v8.32.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/illuminate/collections.git",
|
"url": "https://github.com/illuminate/collections.git",
|
||||||
"reference": "ecc881c6dce66e22f2c236374f342d41c7ebeb67"
|
"reference": "d7cc717a00064b40fa63a8ad522042005e1de1ed"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/illuminate/collections/zipball/ecc881c6dce66e22f2c236374f342d41c7ebeb67",
|
"url": "https://api.github.com/repos/illuminate/collections/zipball/d7cc717a00064b40fa63a8ad522042005e1de1ed",
|
||||||
"reference": "ecc881c6dce66e22f2c236374f342d41c7ebeb67",
|
"reference": "d7cc717a00064b40fa63a8ad522042005e1de1ed",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -153,11 +153,11 @@
|
||||||
"issues": "https://github.com/laravel/framework/issues",
|
"issues": "https://github.com/laravel/framework/issues",
|
||||||
"source": "https://github.com/laravel/framework"
|
"source": "https://github.com/laravel/framework"
|
||||||
},
|
},
|
||||||
"time": "2021-03-02T13:34:56+00:00"
|
"time": "2021-03-08T17:22:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "illuminate/container",
|
"name": "illuminate/container",
|
||||||
"version": "v8.31.0",
|
"version": "v8.32.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/illuminate/container.git",
|
"url": "https://github.com/illuminate/container.git",
|
||||||
|
@ -208,7 +208,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "illuminate/contracts",
|
"name": "illuminate/contracts",
|
||||||
"version": "v8.31.0",
|
"version": "v8.32.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/illuminate/contracts.git",
|
"url": "https://github.com/illuminate/contracts.git",
|
||||||
|
@ -256,16 +256,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "illuminate/database",
|
"name": "illuminate/database",
|
||||||
"version": "v8.31.0",
|
"version": "v8.32.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/illuminate/database.git",
|
"url": "https://github.com/illuminate/database.git",
|
||||||
"reference": "87dd6cee1eb159dfcba95bd1d2ed59d3f3244b36"
|
"reference": "f6a10cebd9bbd188ca66993168fb453439dbb50f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/illuminate/database/zipball/87dd6cee1eb159dfcba95bd1d2ed59d3f3244b36",
|
"url": "https://api.github.com/repos/illuminate/database/zipball/f6a10cebd9bbd188ca66993168fb453439dbb50f",
|
||||||
"reference": "87dd6cee1eb159dfcba95bd1d2ed59d3f3244b36",
|
"reference": "f6a10cebd9bbd188ca66993168fb453439dbb50f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -320,11 +320,11 @@
|
||||||
"issues": "https://github.com/laravel/framework/issues",
|
"issues": "https://github.com/laravel/framework/issues",
|
||||||
"source": "https://github.com/laravel/framework"
|
"source": "https://github.com/laravel/framework"
|
||||||
},
|
},
|
||||||
"time": "2021-03-04T13:08:15+00:00"
|
"time": "2021-03-09T14:06:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "illuminate/macroable",
|
"name": "illuminate/macroable",
|
||||||
"version": "v8.31.0",
|
"version": "v8.32.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/illuminate/macroable.git",
|
"url": "https://github.com/illuminate/macroable.git",
|
||||||
|
@ -370,16 +370,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "illuminate/support",
|
"name": "illuminate/support",
|
||||||
"version": "v8.31.0",
|
"version": "v8.32.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/illuminate/support.git",
|
"url": "https://github.com/illuminate/support.git",
|
||||||
"reference": "978e64ffb68189b70fea77e4d401f43e88fa54ca"
|
"reference": "2ef7ff288366a1ebe32f633196a1b90bd443acc3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/illuminate/support/zipball/978e64ffb68189b70fea77e4d401f43e88fa54ca",
|
"url": "https://api.github.com/repos/illuminate/support/zipball/2ef7ff288366a1ebe32f633196a1b90bd443acc3",
|
||||||
"reference": "978e64ffb68189b70fea77e4d401f43e88fa54ca",
|
"reference": "2ef7ff288366a1ebe32f633196a1b90bd443acc3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -434,7 +434,7 @@
|
||||||
"issues": "https://github.com/laravel/framework/issues",
|
"issues": "https://github.com/laravel/framework/issues",
|
||||||
"source": "https://github.com/laravel/framework"
|
"source": "https://github.com/laravel/framework"
|
||||||
},
|
},
|
||||||
"time": "2021-03-04T14:09:31+00:00"
|
"time": "2021-03-05T15:22:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
|
@ -630,16 +630,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v5.2.4",
|
"version": "v5.2.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "d6d0cc30d8c0fda4e7b213c20509b0159a8f4556"
|
"reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/d6d0cc30d8c0fda4e7b213c20509b0159a8f4556",
|
"url": "https://api.github.com/repos/symfony/console/zipball/938ebbadae1b0a9c9d1ec313f87f9708609f1b79",
|
||||||
"reference": "d6d0cc30d8c0fda4e7b213c20509b0159a8f4556",
|
"reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -707,7 +707,7 @@
|
||||||
"terminal"
|
"terminal"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/console/tree/v5.2.4"
|
"source": "https://github.com/symfony/console/tree/v5.2.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -723,7 +723,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-02-23T10:08:49+00:00"
|
"time": "2021-03-06T13:42:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
|
@ -1375,16 +1375,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation",
|
"name": "symfony/translation",
|
||||||
"version": "v5.2.4",
|
"version": "v5.2.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/translation.git",
|
"url": "https://github.com/symfony/translation.git",
|
||||||
"reference": "74b0353ab34ff4cca827a2cf909e325d96815e60"
|
"reference": "0947ab1e3aabd22a6bef393874b2555d2bb976da"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/translation/zipball/74b0353ab34ff4cca827a2cf909e325d96815e60",
|
"url": "https://api.github.com/repos/symfony/translation/zipball/0947ab1e3aabd22a6bef393874b2555d2bb976da",
|
||||||
"reference": "74b0353ab34ff4cca827a2cf909e325d96815e60",
|
"reference": "0947ab1e3aabd22a6bef393874b2555d2bb976da",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1448,7 +1448,7 @@
|
||||||
"description": "Provides tools to internationalize your application",
|
"description": "Provides tools to internationalize your application",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/translation/tree/v5.2.4"
|
"source": "https://github.com/symfony/translation/tree/v5.2.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1464,7 +1464,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-03-04T15:41:09+00:00"
|
"time": "2021-03-06T07:59:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation-contracts",
|
"name": "symfony/translation-contracts",
|
||||||
|
|
Loading…
Reference in New Issue