commit | author | age | ||
b40e93 | 1 | <?php |
FÁ | 2 | |
3 | include_once "common/base.php"; | |
4 | ||
5 | if (empty($_POST['json'])) { | |
6 | header('Location: /generator/form.php', true, 302); | |
7 | } | |
8 | $teams = new \EOG\Models\TeamList(); | |
9 | ||
10 | $success = false; | |
11 | ||
12 | if ($teams->fromJson($_POST['json'])) { | |
13 | $success = file_put_contents(OVERLAY_DIR . 'teams.json', $teams->getJson()); | |
14 | } | |
15 | ||
16 | if ($success) { | |
17 | header('Location: /generator/form.php', true, 302); | |
18 | } else { | |
19 | echo "Szar van a palacsintában"; | |
20 | } |