本文整理汇总了PHP中antiSQL函数的典型用法代码示例。如果您正苦于以下问题:PHP antiSQL函数的具体用法?PHP antiSQL怎么用?PHP antiSQL使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了antiSQL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DAOLog
include_once "../../dao/DAOLog.class.php";
$log = new DAOLog($_SESSION["pessoa"], 3, $_SESSION["nivel"], $_SESSION["codigo"], 13, "num ext=\\'" . $tfNumExt . "\\'", "../../", $conexao);
if (!$dao->cadastrar() || !$log->cadastrar()) {
$comitar = false;
}
}
if ($comitar) {
$conexao->commit();
} else {
$conexao->rollback();
}
$_SESSION["numeroExt"] = $tfNumExt;
header("Location: cadAverbacao.php?ave=ok");
die;
}
$ave = antiSQL(isset($_GET["ave"]) ? $_GET["ave"] : 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">
<!--
@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/averbacao.js"></script>
<script type="text/javascript" language="javascript">
<!--
示例2: DAOAverbacao
}
$comitar = true;
$dao = new DAOAverbacao(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "../../", $conexao);
$log = new DAOLog($_SESSION["pessoa"], 7, $_SESSION["nivel"], $_SESSION["codigo"], 12, "id=\\'" . $slEmpRef . "\\'", "../../", $conexao);
if (!$dao->deletar($slAveRef) || !$log->cadastrar()) {
$comitar = false;
}
if ($comitar == true) {
$conexao->commit();
} else {
$conexao->rollback();
}
header("Location: delAverbacao.php?can=ok");
die;
}
$can = antiSQL(isset($_GET["can"]) ? $_GET["can"] : 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">
<!--
@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/empresa.js"></script>
</head>
<body>
示例3: ConectarMySQL
if ($empDel != 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"], 2, "id=\\'" . $slEmpRef . "\\'", "../../", $conexao);
include_once "../../dao/DAOEmpresa.class.php";
$dao = new DAOEmpresa(NULL, "../../", $conexao);
if ($dao->deletar($empDel) && $log->cadastrar()) {
$conexao->commit();
} else {
$conexao->rollback();
}
header("Location: delEmpresa.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">
<!--
@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/empresa.js"></script>
<script type="text/javascript" language="javascript">
window.onload = function(){
示例4: session_start
<?php
session_start();
$nivelAcesso = "../../:4";
include_once "../../utils/controladorAcesso.php";
include_once "../../utils/funcoes.php";
$periodo = antiSQL(isset($_POST["slPer"]) ? $_POST["slPer"] : NULL);
include_once "../../utils/ConectarMySQL.class.php";
$conexao = new ConectarMySQL();
?>
<!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>
</head>
<body>
No banco: <?php
echo $_SESSION["banco_nome"];
?>
<br />
<br />
<table width="623" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="309" height="80" valign="top"><div align="center"><span class="texto2">Relatório analítico geral por periodo em .xls<br />
</span> <img src="../../imagens/xls.png" width="50" height="51" onclick="javascript: window.location = '../relatorioGeralXLS.php?per=<?php
echo $periodo;
?>
';" style="cursor:pointer"/> <br />
Periodo: <?php
示例5: antiSQL
<?php
include "config.php";
$login = antiSQL(@$_POST['login']);
$login_ = strtolower($login);
$senha = md5(antiSQL(@$_POST['senha']));
$query = @mysql_query("SELECT * FROM users WHERE login = '{$login}' AND senha = '{$senha}' OR login = '{$login_}' AND senha = '{$senha}' ORDER BY id DESC LIMIT 1");
$ct = @mysql_num_rows($query);
if ($ct == 0) {
header("location: login.php?msg=Login / Senha incorretos! ({$ct})");
} else {
setCookie('login', $login);
setCookie('cad', 'true');
header('location: main.php');
}
示例6: session_start
<?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!";
}
示例7: session_start
<?php
session_start();
$toRoot = "../";
include_once $toRoot . "beans/Produto.class.php";
include_once $toRoot . "dao/DAOProduto.class.php";
include_once $toRoot . "utils/ConectarMySQL.class.php";
include_once $toRoot . "utils/funcoes.php";
$valRef = antiSQL(isset($_GET["valRef"]) ? $_GET["valRef"] : NULL);
if ($valRef != NULL) {
$conexao = new ConectarMySql($toRoot);
$bean = new Produto();
$dao = new DAOProduto($bean, $conexao);
$bean = $dao->getProduto($valRef);
$conexao->fechar();
echo '<div id="A">' . $bean->codigo . '</div>';
echo '<div id="B">' . $bean->empCodigo . '</div>';
echo '<div id="C">' . utf8_encode($bean->descricao) . '</div>';
echo '<div id="D">' . utf8_encode($bean->modelo) . '</div>';
echo '<div id="E">' . inverterValor($bean->valorVenda) . '</div>';
} else {
echo "ERRO!";
}
示例8: header
}
header("Location: cadPessoa.php?cad=ok");
die;
} else {
$comitar = false;
}
break;
}
if ($comitar) {
$conexao->commit();
} else {
$conexao->rollback();
}
}
$destino = "cadPessoa.php?tipo=" . $tipo . "&cadastrar=ok";
$cad = antiSQL(isset($_GET["cad"]) ? $_GET["cad"] : 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">
<!--
@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/pessoa.js"></script>
<script type="text/javascript" language="javascript">
window.onload = function(){
示例9: header
$servidor = $dao->getServidor($linha["pes_codigo"], "%");
$servidor->setUtilizada($servidor->getUtilizada() - $parcela->getValor());
$servidor->setDisponivel($servidor->getDisponivel() + $parcela->getValor());
$dao->setServidor($servidor);
if (!$dao->alterar($servidor->getPesCodigo() . ":" . $servidor->getMatricula())) {
$comitar = false;
}
if ($comitar == true) {
$conexao->commit();
} else {
$conexao->rollback();
}
header("Location: altAverbacao.php?liq=ok");
die;
}
$liq = antiSQL(isset($_GET["liq"]) ? $_GET["liq"] : 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">
<!--
@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/empresa.js"></script>
<script type="text/javascript" language="javascript">
window.onload = function(){
示例10: session_start
<?php
session_start();
$nivelAcesso = "../../:2:3:4";
include_once "../../utils/controladorAcesso.php";
include_once "../../utils/funcoes.php";
$tipo = antiSQL(isset($_GET["tipo"]) ? $_GET["tipo"] : NULL);
$slTipo = antiSQL(isset($_POST["slTipo"]) ? $_POST["slTipo"] : NULL);
$slPesRef = antiSQL(isset($_POST["slPesRef"]) ? $_POST["slPesRef"] : NULL);
if ($slTipo != NULL && $slPesRef != NULL) {
include_once "../../utils/ConectarMySQL.class.php";
$conexao = new ConectarMySQL();
include_once "../../dao/DAOPessoa.class.php";
include_once "../../beans/Pessoa.class.php";
$dao = new DAOPessoa(NULL, NULL, NULL, "../../", $conexao);
$pessoa = new Pessoa(NULL, NULL, NULL, NULL);
$pessoa = $dao->getPessoa($slPesRef);
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());
示例11: antiSQL
<?php
include "config.php";
$avatar = "../img/icon/avatar.png";
$login = antiSQL(@$_POST['login']);
$login_ = strtolower($login);
$senha = md5(antiSQL(@$_POST['senha']));
$email = antiSQL(@$_POST['email']);
$query = @mysql_query("SELECT * FROM users WHERE login = '{$login}'") or die(mysql_error());
$ct = @mysql_num_rows($query);
if ($ct == 1) {
header("location: cadastro?msg=Usuário Existente! ({$ct})");
die('');
}
$query = "INSERT INTO users(login, senha, email, nuggets, avatar, last) VALUES";
$query .= "('{$login}', '{$senha}', '{$email}', '0', '{$avatar}', '')";
mysql_query($query) or die(mysql_error());
mysql_query("INSERT INTO stats (login, store) VALUES ('{$login}', '0')") or die(mysql_error());
setCookie('login', $login);
setCookie('cad', time());
header('location: main.php');
示例12: session_start
<?php
session_start();
include_once "../../utils/funcoes.php";
$tfCPF = antiSQL(isset($_POST["tfCPF"]) ? $_POST["tfCPF"] : NULL);
include_once "../../utils/ConectarMySQL.class.php";
$conexao = new ConectarMySQL();
?>
<!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>
</head>
<body>
No banco: <?php
echo $_SESSION["banco_nome"];
?>
<table width="583" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="242" height="80" valign="bottom"><span class="texto2">Relatório geral em .xls</span> <img src="../../imagens/xls.png" width="50" height="51" onclick="javascript: window.location = '../relatorioGeralXLSCPF.php?cpf=<?php
echo $tfCPF;
?>
';" style="cursor:pointer"/> </td>
<td width="341" valign="bottom"><span class="texto2">Veja o esquema desse arquivo em PDF aqui</span> <img src="../../imagens/pdf.png" width="50" height="77" onclick="javascript: window.location = '../../downloads/esquema-arquivo-xls.pdf';" style="cursor:pointer"/> </td>
</tr>
</table>
<p><br />
Voltar <img src="../../imagens/voltar.gif" width="40" height="35" onclick="javascript: history.back(-1);" style="cursor:pointer"/>
<br />
示例13: ConectarMySQL
<?php
include_once "../../utils/ConectarMySQL.class.php";
$conexao = new ConectarMySQL();
include_once "../../utils/funcoes.php";
$classe = antiSQL(isset($_GET["classe"]) ? $_GET["classe"] : "%");
switch ($classe) {
case "B":
case "contato":
$sql = "SELECT distinct p.pes_codigo, p.pes_nome FROM pessoas p INNER JOIN bancos_pessoas bp ON p.pes_codigo = bp.pes_codigo ORDER BY pes_nome";
break;
case "A":
case "admin":
$sql = "SELECT * FROM pessoas p INNER JOIN administradores a ON p.pes_codigo = a.pes_codigo ORDER BY pes_nome";
break;
default:
$sql = "SELECT * FROM pessoas ORDER BY pes_nome";
break;
}
$resultado = $conexao->selecionar($sql);
if ($resultado == false) {
die("Não foi possivel realizar a busca!");
}
echo '<option value="---">-----------------------------</option>';
while ($linha = mysqli_fetch_array($resultado)) {
echo '<option value="' . $linha["pes_codigo"] . '">' . utf8_encode($linha["pes_nome"]) . '</option>';
}
示例14: session_start
<?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(){
示例15: antiSQL
<?php
include_once "../../utils/ConectarMySQL.class.php";
include_once "../../utils/funcoes.php";
$status = antiSQL(isset($_GET["status"]) ? $_GET["status"] : NULL);
$conexao = new ConectarMySQL();
$data = date("Y-m-d");
$dataMenor = $data . " 00:00:00";
$dataMaior = $data . "24:59:59";
if ($status == "aberto") {
$resultado = $conexao->selecionar("SELECT ave_numero_externo FROM averbacoes WHERE sta_codigo = 1");
} else {
$resultado = $conexao->selecionar("SELECT ave_numero_externo FROM averbacoes WHERE ave_data_criacao > '" . $dataMenor . "' AND ave_data_criacao < '" . $dataMaior . "'");
}
echo $sql;
if ($resultado == false) {
die("Não foi possivel realizar a busca!");
}
echo '<option value="---">-------------------------------------------------------</option>';
while ($linha = mysqli_fetch_array($resultado)) {
echo '<option value="' . $linha["ave_numero_externo"] . '">' . $linha["ave_numero_externo"] . '</option>';
}