示例#1
0
                }
            } else {
                $hasErros = true;
                $Erros[] = htmlentities("Preencha as informações pedidas.");
            }
            // Fim Adicionar Utilizador
        } elseif ($Action == "RemoverUtilizador") {
            $UserRem = new Utilizador($_POST['Id'], $conn);
            $ServidoresRem = getServidoresByIdUtilizador($UserRem->getId());
            if ($UserRem->getId() != $User->getId()) {
                // Eliminar todos os servidores do utilizador
                foreach ($ServidoresRem as $ServidorRem) {
                    $ServerRem = new Servidor($ServidorRem['Id'], $conn);
                    $ServerRem->eliminar();
                }
                $UserRem->eliminar();
                // Eliminar Conta do utilizador
            }
        }
        // Fim Actions
    }
    // Fim Post[Action]
}
// Fim Post
if ($_GET && !isset($_GET['Logged'])) {
    if ($_GET['Action']) {
        $Action = $_GET['Action'];
        if ($Action == "Utilizador" && isset($_GET['Id'])) {
            $Id = $_GET['Id'];
            if ($_GET['Option']) {
                $Opcao = $_GET['Option'];