Exemplo n.º 1
0
        $loja->setComplemento($complemento);
        Loja::editaLoja($loja);
        header("location:../controller/controllerLoja.php");
    } else {
        if ($opc == "Incluir") {
            $loja = new Loja();
            $loja->setNome_loja($nomeLoja);
            $loja->setTelefone($tel);
            $loja->setLogradouro($rua);
            $loja->setBairro($bairro);
            $loja->setCidade($cidade);
            $loja->setCep($cep);
            $loja->setEstado($estado);
            $loja->setNumero($numero);
            $loja->setComplemento($complemento);
            Loja::insereLoja($loja);
            header("location:../controller/controllerLoja.php");
        } else {
            $cod = addslashes(trim($_GET['cod']));
            $escolha = addslashes(trim($_GET['escolha']));
            if ($escolha == "Sim") {
                Loja::deletaLoja($cod);
                header("location:../controller/controllerLoja.php");
            } else {
                header("location:../controller/controllerLoja.php");
            }
        }
    }
} else {
    header("location:../index.php?&erro=\"Login\"");
}