Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Trata Logar
- <?php
- require_once 'usuario.php';
- $tipo = $_POST['TipoLogin'];
- $login = $_POST['nome_usuario'];
- $senha = addslashes($_POST['senha']);
- $login = addslashes($_POST['nome_usuario']);
- if ($tipo == 1) {
- $usuario = new Usuario();
- if (!$usuario->logar($login, $senha)):
- echo "<script>alert('Usuario Incorreto');</script>";
- echo "<script>location.href = \"Logar.php\";</script>;";
- else:
- echo "<script>alert('Logado com Sucesso');</script> ";
- echo "<script>location.href = \"../PainelControleUsuario/index_usuario.php\";</script>;";
- endif;
- }else if ($tipo == 2) {
- $adm = new Adm();
- if (!$adm->logar($login, $senha)):
- echo "<script>alert('Usuario Incorreto');</script>";
- echo "<script>location.href = \"Logar.php\";</script>;";
- else:
- echo "<script>alert('Logado com Sucesso');</script> ";
- echo "<script>location.href = \"../PainelControleAdm/index_adm.php\";</script>;";
- endif;
- }
- ?>
Add Comment
Please, Sign In to add comment