Fibinger Ádám
2019-10-16 1867e166c90eb8366707c48a6f8540c3f91a1957
form.php
@@ -25,27 +25,11 @@
{
   $s->loadFromArray($_POST['stripe']);
    if (!empty($s->getState())) {
   if (!empty($s->getState()))
   {
        file_put_contents($last_json, $s->getJson());
    }
   switch ($s->stripe['class'])
   {
      case 'simple':
         $html_content = $twig->render('templates/overlay-base.twig', ['stripe' => $s]);
         file_put_contents(OVERLAY_DIR . 'simple.html', $html_content);
         break;
      case 'team':
         $s->setClass('simple');
         $html_content = $twig->render('templates/overlay-base.twig', ['stripe' => $s]);
         file_put_contents(OVERLAY_DIR . 'simple.html', $html_content);
         $s->setClass('team');
         $html_content = $twig->render('templates/overlay-base.twig', ['stripe' => $s]);
         file_put_contents(OVERLAY_DIR . 'team.html', $html_content);
         break;
      case 'team-ban':
         $s->setClass('simple');
         $html_content = $twig->render('templates/overlay-base.twig', ['stripe' => $s]);
         file_put_contents(OVERLAY_DIR . 'simple.html', $html_content);
@@ -57,21 +41,20 @@
         $s->setClass('team-ban');
         $html_content = $twig->render('templates/overlay-base.twig', ['stripe' => $s]);
         file_put_contents(OVERLAY_DIR . 'team-ban.html', $html_content);
         break;
   }
} else {
    if (file_exists($last_json)) {
else
{
   if (file_exists($last_json))
   {
        $raw_json = file_get_contents($last_json);
        $stateArray = json_decode($raw_json, true);
        if (is_array($stateArray)) {
      if (is_array($stateArray))
      {
            $s->loadFromArray($stateArray);
        }
    }
}
echo "<pre>State:".PHP_EOL;
var_dump($s->getState());
echo "</pre>";
$var = [
   'stripe'    => $s,