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