This repository has been archived on 2023-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
web/public/teamtable/edit/update.php
2022-03-07 07:13:17 +01:00

25 lines
643 B
PHP

<?php $app = require '../../../app/inc.php';
use App\Teamtable\Team;
$item = filter_input(INPUT_GET, 'item', FILTER_VALIDATE_INT);
$model = $app->model('Teamtable');
// item is NULL if not set
if ($item !== NULL)
{
// check that team exists
$team = $model->get($item);
if (!$team)
{
// team does not exist
$app->session->flash('Kunne ikke endre lag: Lag finnes ikke', 'danger');
$app->redirect('index.php');
}
}
// lets create a team
$app->view('template/header', ['title' => 'Endre lagdetaljer']);
$app->view('pages/teamtable/edit/update', ["team" => new Team]);
$app->view('template/footer');