Exemple #1
0
         $Servidor->atualizaInfo();
         // Faz update na base de dados do Motd Novo
         if (isset($_GET['Return'])) {
             if ($Servidor->getMapaInicial() == $_GET['MapaInicial']) {
                 header("Location: ../servidor.php?Id=" . $_GET['Id'] . "&Sucesso=6");
             } else {
                 header("Location: ../servidor.php?Id=" . $_GET['Id'] . "&Erro=6");
             }
             die;
         }
         echo json_encode(array("Status" => true, "Id" => $_GET['Id'], "Mensagem" => "Alterado com sucesso!"));
         die;
     } elseif ($_GET['Action'] == "MudaMaxSlots" && isset($_GET['MaxSlots'])) {
         $Servidor = new Servidor($_GET['Id'], $conn);
         // Cria Servidor
         $Servidor->setMaxSlotsDb((int) htmlentities($_GET['MaxSlots']));
         // Mudar PortaQuery.
         $Servidor->atualizaInfo();
         // Faz update na base de dados do Motd Novo
         if (isset($_GET['Return'])) {
             if ($Servidor->getMaxSlotsDb() == $_GET['MaxSlots']) {
                 header("Location: ../servidor.php?Id=" . $_GET['Id'] . "&Sucesso=6");
             } else {
                 header("Location: ../servidor.php?Id=" . $_GET['Id'] . "&Erro=6");
             }
             die;
         }
         echo json_encode(array("Status" => true, "Id" => $_GET['Id'], "Mensagem" => "Alterado com sucesso!"));
         die;
     }
 }