commit | author | age
|
b15810
|
1 |
<?php |
FÁ |
2 |
|
|
3 |
include_once "common/base.php"; |
|
4 |
|
|
5 |
if (empty($_POST['interview'])) |
|
6 |
{ |
|
7 |
header('Location: /generator/form.php', true, 302); |
|
8 |
} |
|
9 |
|
|
10 |
$interview = new \EOG\Models\Interview(); |
|
11 |
|
|
12 |
$interview->setTitle("Interrogacioon!"); |
|
13 |
$interview->setTeamName($_POST['interview']['teamName']); |
|
14 |
$interview->setPlayers($_POST['interview']['players']); |
|
15 |
|
|
16 |
$html_content = $twig->render('overlays/interrogacion.twig', |
|
17 |
[ |
|
18 |
'i' => $interview, |
|
19 |
'autorefresh' => 5 |
|
20 |
] |
|
21 |
); |
|
22 |
|
|
23 |
file_put_contents(OVERLAY_DIR . 'interview.html', $html_content); |
|
24 |
file_put_contents(OVERLAY_DIR . 'interview-full.html', $html_content); |
|
25 |
|
|
26 |
var_dump($interview); |
|
27 |
|
|
28 |
if ($success) |
|
29 |
{ |
|
30 |
header('Location: /generator/form.php', true, 302); |
|
31 |
} |
|
32 |
else |
|
33 |
{ |
|
34 |
echo "Szar van a palacsintában. "; |
|
35 |
} |