2021-03-09 09:45:05 +00:00
|
|
|
<?php
|
2021-03-11 08:28:30 +00:00
|
|
|
require_once "../../../bootstrap.php";
|
|
|
|
require_once "Admin.php";
|
2021-03-09 09:45:05 +00:00
|
|
|
use Backend\Models\GameJam;
|
|
|
|
|
2021-03-11 08:28:30 +00:00
|
|
|
var_dump($_POST);
|
|
|
|
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
if(isAdmin()){
|
|
|
|
if(isset($_POST['newGameJam'])){
|
2021-03-09 09:45:05 +00:00
|
|
|
$gameJam = New GameJam();
|
|
|
|
|
2021-03-11 08:28:30 +00:00
|
|
|
$gameJam->name = $_POST["gameJamName"];
|
|
|
|
$gameJam->start_time = $_POST["startDate"]."T".$_POST["startTime"];
|
|
|
|
$gameJam->end_time = $_POST["endDate"]."T".$_POST["endTime"];
|
2021-03-09 09:45:05 +00:00
|
|
|
$gameJam->description = $_POST["description"];
|
|
|
|
|
|
|
|
if($gameJam->save()){
|
|
|
|
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|