29 lines
750 B
PHP
29 lines
750 B
PHP
<?php
|
|
require_once "../../../bootstrap.php";
|
|
require_once "Group.php";
|
|
|
|
use Backend\Models\Group;
|
|
|
|
if(isLogin()){
|
|
if (isset($_POST['updateGroup'])) {
|
|
if($group = groupViaToken($_SESSION['token'])){
|
|
$group->group_name = $_POST['groupName'];
|
|
$group->group_amount = $_POST['groupAmount'];
|
|
$group->game_jam_id = $_POST['gameJamId'];
|
|
$group->save();
|
|
header("location: ../../../Frontend/index.html?success=YouHaveUpdated");
|
|
exit();
|
|
}
|
|
}else{
|
|
header("location: ../../../Frontend/index.html?error=CouldNotUpdate");
|
|
exit();
|
|
}
|
|
}else{
|
|
header("location: ../../../Frontend/index.html?error=NotLogin");
|
|
exit();
|
|
}
|
|
|
|
|
|
|
|
|