Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
ffcaa6de21
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
require "../../../bootstrap.php";
|
||||||
|
|
||||||
|
use Backend\Models\Group;
|
||||||
|
use Backend\Models\Password;
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
if(isset($_SESSION['Admin'])){
|
||||||
|
if(isset($_POST['RestPassword'])){
|
||||||
|
$group = Group::find($_POST['groupId']);
|
||||||
|
if($group){
|
||||||
|
$group->password->password = password_hash("Aa123456&", PASSWORD_DEFAULT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
use Backend\Models\Vote;
|
use Backend\Models\Vote;
|
||||||
require "../../bootstrap.php";
|
require "../../../bootstrap.php";
|
||||||
|
|
||||||
|
|
||||||
if(isset($_POST['1vote_for'])){
|
if(isset($_POST['1vote_for'])){
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
use Backend\Models\Vote;
|
use Backend\Models\Vote;
|
||||||
require "../../bootstrap.php";
|
require "../../../bootstrap.php";
|
||||||
|
|
||||||
|
|
||||||
if(isset($_POST['321vote_for'])){
|
if(isset($_POST['321vote_for'])){
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require "../bootstrap.php";
|
require "../../../bootstrap.php";
|
||||||
|
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
use Backend\Models\Password;
|
use Backend\Models\Password;
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require "../bootstrap.php";
|
require "../../../bootstrap.php";
|
||||||
|
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
use Backend\Models\Password;
|
use Backend\Models\Password;
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
require "../bootstrap.php";
|
require "../../bootstrap.php";
|
||||||
use Backend\Models\Group;
|
use Backend\Models\Group;
|
||||||
use Backend\Models\KeyWord;
|
use Backend\Models\KeyWord;
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once "../../bootstrap.php";
|
||||||
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
Capsule::schema()->create("admin_users", function (Blueprint $table){
|
||||||
|
$table->id();
|
||||||
|
$table->string("user_name");
|
||||||
|
$table->string("password");
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
|
@ -8,9 +8,11 @@ use Illuminate\Support\Facades\Schema;
|
||||||
//Create game_data table with the rows as id, gameLink, isWebBased and timestamp
|
//Create game_data table with the rows as id, gameLink, isWebBased and timestamp
|
||||||
Capsule::schema()->create("game_data", function (Blueprint $table){
|
Capsule::schema()->create("game_data", function (Blueprint $table){
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string("gameLink");
|
$table->string('game_name');
|
||||||
$table->boolean("isWebBased");
|
$table->string("game_link");
|
||||||
$table->string("img");
|
$table->boolean("is_web_based");
|
||||||
|
$table->text("description")->nullable();
|
||||||
|
$table->string("img")->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ use Illuminate\Support\Facades\Schema;
|
||||||
Capsule::schema()->create("game_jams", function (Blueprint $table){
|
Capsule::schema()->create("game_jams", function (Blueprint $table){
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string("name");
|
$table->string("name");
|
||||||
$table->dateTime("startTime");
|
$table->dateTime("start_time");
|
||||||
$table->dateTime("endTime");
|
$table->dateTime("end_time");
|
||||||
$table->string("keyWord")->nullable();
|
$table->string("key_word")->nullable();
|
||||||
$table->text("description")->nullable();
|
$table->text("description")->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,8 +8,8 @@ use Illuminate\Support\Facades\Schema;
|
||||||
//Create groups table with the rows as id, groupName, groupAmount, fkGameJam, votes, fkPassword, fkGameData and timestamp
|
//Create groups table with the rows as id, groupName, groupAmount, fkGameJam, votes, fkPassword, fkGameData and timestamp
|
||||||
Capsule::schema()->create("groups", function (Blueprint $table){
|
Capsule::schema()->create("groups", function (Blueprint $table){
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string("groupName");
|
$table->string("group_name");
|
||||||
$table->integer("groupAmount");
|
$table->integer("group_amount");
|
||||||
$table->foreignId("game_jam_id")->constrained("game_jams");
|
$table->foreignId("game_jam_id")->constrained("game_jams");
|
||||||
$table->foreignId("game_data_id")->nullable()->constrained("game_data");
|
$table->foreignId("game_data_id")->nullable()->constrained("game_data");
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Schema;
|
||||||
//Create key_words table with the rows as id, keyWord, fkGroup and timestamp
|
//Create key_words table with the rows as id, keyWord, fkGroup and timestamp
|
||||||
Capsule::schema()->create("key_words", function (Blueprint $table){
|
Capsule::schema()->create("key_words", function (Blueprint $table){
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('keyWord');
|
$table->string('key_word');
|
||||||
$table->foreignId("group_id")->constrained("groups");
|
$table->foreignId("group_id")->constrained("groups");
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,3 +19,4 @@ require "Group.php"; //Group has foreign keys to the GameJam, GameData and Passw
|
||||||
require "Password.php"; //Password has no foreign key
|
require "Password.php"; //Password has no foreign key
|
||||||
require "KeyWord.php"; //Group has foreign keys to the Group
|
require "KeyWord.php"; //Group has foreign keys to the Group
|
||||||
require "Vote.php";
|
require "Vote.php";
|
||||||
|
require "AdminUser.php";
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
namespace Backend\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
|
class AdminUser extends Eloquent
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'user_name'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden =[
|
||||||
|
'password'
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue