<?php session_start(); $nivelAcesso = "../../:2:3:4"; include_once "../../utils/controladorAcesso.php"; include_once "../../utils/funcoes.php"; $key = antiSQL(isset($_GET["key"]) ? $_GET["key"] : NULL); if ($key != NULL) { include_once "../../utils/ConectarMySQL.class.php"; $conexao = new ConectarMySQL(); include_once "../../dao/DAOBanco.class.php"; include_once "../../beans/Banco.class.php"; $dao = new DAOBanco(NULL, NULL, "../../", $conexao); $banco = new Banco(NULL, NULL); $banco = $dao->getBanco($key); $conexao->commit(); echo '<div id="A">' . $banco->getCodigo() . '</div>'; echo '<div id="B">' . utf8_encode($banco->getDescricao()) . '</div>'; } else { echo "ERRO!"; }
<?php session_start(); $nivelAcesso = "../../:2:3:4"; include_once "../../utils/controladorAcesso.php"; include_once "../../utils/funcoes.php"; $slBancRef = antiSQL(isset($_POST["slBancRef"]) ? $_POST["slBancRef"] : NULL); if ($slBancRef != NULL) { include_once "../../utils/ConectarMySQL.class.php"; $conexao = new ConectarMySQL(); include_once "../../dao/DAOBanco.class.php"; include_once "../../beans/Banco.class.php"; $dao = new DAOBanco(NULL, NULL, "../../", $conexao); $banco = new Banco(NULL, NULL); $banco = $dao->getBanco($slBancRef); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- @import url("../../scripts/css/geral.css"); --> </style> <script type="text/javascript" language="javascript" src="../../scripts/javascript/ajax.js"></script> <script type="text/javascript" language="javascript" src="../../scripts/javascript/banco.js"></script> <script type="text/javascript" language="javascript"> window.onload = function(){
$dao = new DAOAdministrador(NULL, NULL, NULL, NULL, NULL, "../../", $conexao); include_once "../../beans/Administrador.class.php"; $administrador = new Administrador(NULL, NULL, NULL, NULL, NULL, NULL); $administrador = $dao->getAdministrador("codPes", $pessoa->getCodigo()); break; case "contato": include_once "../../dao/DAOBancoPessoa.class.php"; $dao = new DAOBancoPessoa(NULL, NULL, "../../", $conexao); include_once "../../beans/BancoPessoa.class.php"; $bancoPessoa = new BancoPessoa(NULL, NULL); $bancoPessoa = $dao->getBancoPessoa($pessoa->getCodigo()); include_once "../../dao/DAOBanco.class.php"; $dao = new DAOBanco(NULL, NULL, "../../", $conexao); include_once "../../beans/Banco.class.php"; $banco = new Banco(NULL, NULL); $banco = $dao->getBanco($bancoPessoa->getBanCodigo()); break; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- @import url("../../scripts/css/geral.css"); --> </style> <script type="text/javascript" language="javascript" src="../../scripts/javascript/ajax.js"></script>