| | |
| | | } |
| | | |
| | | $s->setClass('simple'); |
| | | $html_content = $twig->render('overlay-base.twig', ['stripe' => $s]); |
| | | $html_content = $twig->render('overlays/stripe.twig', ['stripe' => $s]); |
| | | file_put_contents(OVERLAY_DIR . 'simple.html', $html_content); |
| | | |
| | | $s->setClass('team'); |
| | | $html_content = $twig->render('overlay-base.twig', ['stripe' => $s]); |
| | | $html_content = $twig->render('overlays/stripe.twig', ['stripe' => $s]); |
| | | file_put_contents(OVERLAY_DIR . 'team.html', $html_content); |
| | | |
| | | $s->setClass('team-ban'); |
| | | $html_content = $twig->render('overlay-base.twig', ['stripe' => $s]); |
| | | $html_content = $twig->render('overlays/stripe.twig', ['stripe' => $s]); |
| | | file_put_contents(OVERLAY_DIR . 'team-ban.html', $html_content); |
| | | |
| | | $s->setClass('team-ban'); |
| | | $html_content = $twig->render('overlays/stripe.twig', ['stripe' => $s, 'autorefresh' => 30]); |
| | | file_put_contents(OVERLAY_DIR . 'team-ban-refresh.html', $html_content); |
| | | |
| | | $redis = new Redis(); |
| | | $redis->pconnect('127.0.0.1'); |
| | | $redis->publish('overlay', 'update'); |
| | | $redis->close(); |
| | | |
| | | } else { |
| | | if (file_exists(STRIPE_JSON)) { |
| | |
| | | if (file_exists(TEAMS_JSON)) { |
| | | $teams->fromJson(file_get_contents(TEAMS_JSON)); |
| | | } |
| | | $page = isset($_GET['page']) ? $_GET['page'] : 'overlay'; |
| | | $page = in_array($page,['overlay','interview','update']) ? $page : 'overlay'; |
| | | |
| | | $var = [ |
| | | 'page' => $page, |
| | | 'stripe' => $s, |
| | | 'teamNames' => $teams->getTeamNames(), |
| | | 'operators' => $s->getOperators(), |
| | | 'post' => !empty($_POST['stripe']) |
| | | ]; |
| | | |
| | | echo $twig->render('admin/stripe-form.twig', $var); |
| | | echo $twig->render('admin/modules/'.$page .'.twig', $var); |
| | | |