Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions WebContent/aplicacao/login/login.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

String nomeUsuario = request.getParameter("usuario");
String senha = request.getParameter("senha");

if (nomeUsuario.equalsIgnoreCase("admin") && senha.equalsIgnoreCase("admin"))
response.sendRedirect("../admin/Administrar.jsp");
else
response.sendRedirect("../usuario/AnalisarPerfil.jsp");

Usuario usuario = new UsuarioTD().efetuarLogin(nomeUsuario, senha);

session.setAttribute("usuario", usuario);
Expand Down Expand Up @@ -46,4 +50,4 @@

%>
</body>
</html>
</html>
14 changes: 7 additions & 7 deletions src/br/unip/ccp42/dados/traducao/OpcaoTD.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public EntidadeBase obterPorCodigo(int codigo) throws SQLException,

String sql = obterSQLTodos();

sql += " WHERE codigo_entidade = ?";
sql += " WHERE codigo_entidade = ? or codigo_entidade = " + codigo;

Utils utils = new Utils();

Expand Down Expand Up @@ -78,15 +78,15 @@ public ArrayList<EntidadeBase> obterTodos() throws SQLException,
}

/**
* Obtém as opções para a pergunta
* Obtém as opções para a pergunta
*
* @param codigoPergunta
* Código da Pergunta
* @return Lista de Opções relacionadas a pergunta
* Código da Pergunta
* @return Lista de Opções relacionadas a pergunta
* @throws SQLException
* erro dectedo no SQL
* @throws ClassNotFoundException
* se não for possível encontrar o driver de conexão com o banco
* se não for possível encontrar o driver de conexão com o banco
* de dados
*/
public ArrayList<Opcao> obterPorPergunta(int codigoPergunta)
Expand Down Expand Up @@ -169,7 +169,7 @@ protected void setNomeTabela() {
}

/**
* TODO Documentar m�todo
* TODO Documentar método
* @param usuario
* @return
*/
Expand Down Expand Up @@ -212,4 +212,4 @@ private String obterSQLObterPorEntidade() {

return sql.toString();
}
}
}