<?php $toRoot = isset($toRoot) ? $toRoot : "../"; include_once $toRoot . "beans/Banco.class.php"; include_once $toRoot . "dao/DAOBanco.class.php"; include_once $toRoot . "utils/ConectarMySQL.class.php"; $conexao = new ConectarMySql($toRoot); $bean = new Banco(); $dao = new DAOBanco($bean, $conexao); $array = $dao->getBancoLista(); if ($array != NULL) { echo '<option value="---" selected="selected" >----------</option>'; foreach ($array as $temp) { $bean = $temp; echo '<option value="' . $bean->codigo . '" >' . $bean->nome . '</option>'; } } else { echo '<option value="---" selected="selected" >Não há bancos cadastrados!</option>'; } $conexao->fechar();
<?php session_start(); $toRoot = "../../"; $nivelAcesso = $toRoot . ":1:3:4"; include_once $toRoot . "utils/controladorAcesso.php"; include_once $toRoot . "utils/funcoes.php"; setVoltar("cadBanco.php"); $voltar = $_SESSION["voltar"]; $cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL; if ($cadastrar == "sim") { foreach ($_POST as $nomeCampo => $valor) { $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);"; eval($comando); } include_once $toRoot . "utils/ConectarMySQL.class.php"; include_once $toRoot . "beans/Banco.class.php"; include_once $toRoot . "beans/Log.class.php"; include_once $toRoot . "dao/DAOBanco.class.php"; include_once $toRoot . "dao/DAOLog.class.php"; $conexao = new ConectarMySql($toRoot); $tfNomBan = strtoupper($tfNomBan); $banco = new Banco($tfNomBan); $daoBanco = new DAOBanco($banco, $conexao); $daoBanco->cadastrar(); $log = new Log(3, 18, $tfNomBan . " cadastrado!"); $daoLog = new DAOLog($log, $conexao); $daoLog->cadastrar(); $conexao->fechar(); $cadastrar = true; }
<?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(){
<?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/DAOLog.class.php"; $log = new DAOLog($_SESSION["pessoa"], 5, $_SESSION["nivel"], $_SESSION["codigo"], 3, "id=\\'" . $slBancRef . "\\'", "../../", $conexao); include_once "../../dao/DAOBanco.class.php"; $dao = new DAOBanco(NULL, NULL, "../../", $conexao); if ($dao->deletar($slBancRef) && $log->cadastrar()) { $conexao->commit(); } else { $conexao->rollback(); } header("Location: delBanco.php?del=ok"); die; } $del = antiSQL(isset($_GET["del"]) ? $_GET["del"] : NULL); ?> <!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"> <!--
switch ($slTipo) { case "admin": include_once "../../dao/DAOAdministrador.class.php"; $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");
<?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); $tfBanCod = antiSQL(isset($_POST["tfBanCod"]) ? $_POST["tfBanCod"] : NULL); $tfBanDesc = antiSQL(isset($_POST["tfBanDesc"]) ? $_POST["tfBanDesc"] : NULL); if ($slBancRef != NULL && $tfBanCod != NULL && $tfBanDesc != NULL) { include_once "../../utils/ConectarMySQL.class.php"; $conexao = new ConectarMySQL(); include_once "../../dao/DAOBanco.class.php"; $dao = new DAOBanco($tfBanCod, $tfBanDesc, "../../", $conexao); include_once "../../dao/DAOLog.class.php"; $log = new DAOLog($_SESSION["pessoa"], 4, $_SESSION["nivel"], $_SESSION["codigo"], 3, "id=\\'" . $slBancRef . "\\'", "../../", $conexao); if ($dao->alterar($slBancRef) && $log->cadastrar()) { $conexao->commit(); } else { $conexao->rollback(); } header("Location: altBanco.php?alt=ok"); die; } $alt = antiSQL(isset($_GET["alt"]) ? $_GET["alt"] : NULL); ?> <!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>
$log = new DAOLog($_SESSION["pessoa"], 3, $_SESSION["nivel"], $_SESSION["codigo"], 6, "numero=\\'" . $tfPesFone[$x] . "\\'", "../../", $conexao); if (!$dao->cadastrar() || !$log->cadastrar()) { $comitar = false; } } else { if (strcmp($tfPesFone[$x], "") != 0) { $comitar = false; } } } } else { $tfBanContat = antiSQL(isset($_POST["slBanContat"]) ? $_POST["slBanContat"] : NULL); } if ($tfBanCod != NULL || $tfBanDesc != NULL) { include_once "../../dao/DAOBanco.class.php"; $dao = new DAOBanco($tfBanCod, $tfBanDesc, "../../", $conexao); include_once "../../dao/DAOLog.class.php"; $log = new DAOLog($_SESSION["pessoa"], 3, $_SESSION["nivel"], $_SESSION["codigo"], 3, "id=\\'" . $tfBanCod . "\\'", "../../", $conexao); if (!$dao->cadastrar() || !$log->cadastrar()) { $comitar = false; } } else { $comitar = false; } if ($tfBanCod != NULL || $tfBanDesc != NULL) { include_once "../../dao/DAOBancoPessoa.class.php"; $dao = new DAOBancoPessoa($tfBanCod, $tfBanContat, "../../", $conexao); include_once "../../dao/DAOLog.class.php"; $log = new DAOLog($_SESSION["pessoa"], 3, $_SESSION["nivel"], $_SESSION["codigo"], 7, "id=\\'" . $tfBanCod . "+" . $tfBanContat . "\\'", "../../", $conexao); if (!$dao->cadastrar() || !$log->cadastrar()) { $comitar = false;