コード例 #1
0
// This program is free software; you can redistribute it and/or modify it under      //
// the terms of the GNU General Public License as published by the Free Software      //
// Foundation; either version 3 of the License, or (at your option) any later         //
// version.                                                                           //
//                                                                                    //
// This program is distributed in the hope that it will be useful, but WITHOUT ANY    // 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A    //
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////


if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$db = new db ( );
$db->connect ();

$validations = new validations ( );

$fechamento = $validations->validNumeric ( $_POST ['f'] );
$valor_caixa = $validations->validStringForm ( $_POST ['v'] );

$sql = "UPDATE mv_caixa SET fechamento=" . $fechamento . ", vr_fechamento='" . $valor_caixa . "' ORDER BY id DESC LIMIT 1";
$db->query ( $sql );

?>
コード例 #2
0
ファイル: autenticacao.php プロジェクト: renatomarinho/ASC
require "config/default.php";

$db = new db();
$db->connect();

$validations = new validations();

?>

<?
if (isset($_SESSION['nomeuser'])) {
	header("Location: index.php");
} else if (isset($_POST) && isset($_POST['usuario_1']) && isset($_POST['senha_1'])) {

    
	$user = $validations->validStringForm(strtoupper($_POST['usuario_1']));
	$senha = md5($_POST['senha_1']);
	$sql = 'SELECT id, autoriza FROM cad_login WHERE ativo = \'ativo\' AND login = \''.$user.'\' AND senha = \''.$senha.'\' LIMIT 1';
	$query = $db->query($sql);
	$row = $db->fetch_assoc($query);
	if ($row['id'] >= 1) {
		$_SESSION['nomeuser'] = $user;
		$_SESSION['idlogin'] = $row['id'];
		$_SESSION['autoriza'] = $row['autoriza'];
		
		$sql = "SELECT turno FROM mv_caixa WHERE fechamento<0 ORDER BY abertura DESC";
		$queryturno = $db->query($sql);
		if ( $db->num_rows($queryturno) ){
			$rowturno = $db->fetch_assoc($queryturno); 
			$_SESSION['turno'] = $rowturno['turno'];
		}		
コード例 #3
0
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A    //
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$usuario = $validations->validStringForm ( $_GET ['usuario'] );
$dinheiro = $validations->validStringForm ( $_GET ['dinheiro'] );
$cheque = $validations->validStringForm ( $_GET ['cheque'] );
$cartao_debito = $validations->validStringForm ( $_GET ['cartao_debito'] );
$cartao_credito = $validations->validStringForm ( $_GET ['cartao_credito'] );
?>

<table width="460">
	<tr>
		<td align="center">
			<?
			if ($dinheiro == 'true' || $cheque == 'true' || $cartao_debito == 'true' || $cartao_credito == 'true') {
				?>
			<table width="100%">
				<?
				if ($dinheiro == 'true') {
コード例 #4
0
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

if (isset ( $_POST ['nomefornec'] ))
	$txtnome = strtoupper ( $validations->validStringForm ( $_POST ['nomefornec'] ) );
if (isset ( $_POST ['cpf'] ))
	$cnpj = $validations->validNumeric ( $_POST ['cpf'] );
if (isset ( $_POST ['estado'] ))
	$txtuf = $validations->validStringForm ( $_POST ['estado'] );
if (isset ( $_POST ['cidade'] ))
	$txtcidade = strtoupper ( $validations->validStringForm ( $_POST ['cidade'] ) );
if (isset ( $_POST ['endereco'] ))
	$txtendereco = strtoupper ( $validations->validStringForm ( $_POST ['endereco'] ) );
if (isset ( $_POST ['contato'] ))
	$txtcontato = strtoupper ( $validations->validStringForm ( $_POST ['contato'] ) );
if (isset ( $_POST ['email'] ))
	$txtemail = strtolower ( $validations->validStringForm ( $_POST ['email'] ) );
if (isset ( $_POST ['telefone'] ))
	$txttelefone = $validations->validNumeric ( $_POST ['telefone'] );
if (isset ( $_POST ['fax'] ))
コード例 #5
0
ファイル: download_file.php プロジェクト: renatomarinho/ASC
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A    //
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$arquivo = $validations->validStringForm ( $_GET ['a'] );
$hash = $validations->validStringForm ( $_GET ['h'] );
$localizacao = $_CONF ['PATH'] . $validations->validStringForm ( $_GET ['l'] ) . '/';
$salvar = $_CONF ['PATH'] . 'repositorio/';

if (file_exists ( $salvar . $arquivo )) {
	unlink ( $salvar . $arquivo );
}

$arquivo_conteudo = file_get_contents ( $_CONF ['PATH_VIRTUAL_SERVER_CA'] . $arquivo );

if ($hash == sha1 ( $arquivo_conteudo )) {
	
	$arquivo_explo = explode ( '.', $arquivo );
	
	$arquivo_conteudo = decrypt ( $arquivo_conteudo, 'rvs' . $arquivo_explo [1] );
コード例 #6
0
ファイル: colecao_salvar.php プロジェクト: renatomarinho/ASC
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A    //
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$colecao = $validations->validStringForm ( $_POST ['colecao'] );
if (! isset ( $_POST ['descricao'] )) {
	$_POST ['descricao'] = '';
}
$descricao = $validations->validStringForm ( $_POST ['descricao'] );
$periodo = str_pad ( $_POST ['mes1'], 2, "0", STR_PAD_LEFT ) . '/' . $_POST ['ano1'];
$periodo2 = str_pad ( $_POST ['mes2'], 2, "0", STR_PAD_LEFT ) . '/' . $_POST ['ano2'];
if ($periodo2 != $periodo)
	$periodo .= ' até ' . $periodo2;

$sql = "INSERT INTO colecao ( txtnome, txtperiodo, txtdescricao ) VALUES ( '" . $colecao . "', '" . $periodo . "', '" . nl2br ( $descricao ) . "' )";
$db->query ( $sql );
$id = $db->insert_id ();

echo $id;
コード例 #7
0
ファイル: fechar_venda.php プロジェクト: renatomarinho/ASC
if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}
//
//    echo "<pre>";
//    print_r($_SESSION);
//    echo "</pre>";
//    


$validations = new validations ( );
$db = new db ( );
$db->connect ();

$usuario = $validations->validNumeric ( $_GET ['u'] );
$valorvenda = $validations->validStringForm ( $_GET ['v'] );

if (isset ( $_GET ['c'] ) && $_GET ['c'] > 0) {
	$cliente = $validations->validNumeric ( $_GET ['c'] );
	$sql = "SELECT idcliente, txtnome FROM cliente WHERE idcliente=" . $cliente . " ";
	$querycliente = $db->query ( $sql );
	$rowcliente = $db->fetch_assoc ( $querycliente );
	$idcliente = $rowcliente ['idcliente'];
	$txtnome = ucwords ( strtolower ( $rowcliente ['txtnome'] ) );
} else {
	$idcliente = 0;
	$txtnome = '';
}

// Distinguindo tipo de venda
$txt_tipo_venda = "";
コード例 #8
0
// Copyright (C) 2008 onwards Renato Marinho ( renato.marinho@greyland.com.br )         //
//                                                                                    //
// This program is free software; you can redistribute it and/or modify it under      //
// the terms of the GNU General Public License as published by the Free Software      //
// Foundation; either version 3 of the License, or (at your option) any later         //
// version.                                                                           //
//                                                                                    //
// This program is distributed in the hope that it will be useful, but WITHOUT ANY    // 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A    //
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////


if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$idusuario = $validations->validNumeric ( $_GET ['i'] );
$permissoes = $validations->validStringForm ( $_GET ['p'] );

$sql = "UPDATE cad_login SET autoriza='" . $permissoes . "' WHERE id=" . $idusuario . "";
$db->query ( $sql );

?>
コード例 #9
0
$db->connect ();

$nome = $_SESSION ['produto'] ['nome'];
$codigo = $_SESSION ['produto'] ['codigo'];
$vlcusto = $_SESSION ['produto'] ['vlcusto'];
$vlpentrega = $_SESSION ['produto'] ['vlpentrega'];
$vlatacado = $_SESSION ['produto'] ['vlatacado'];
$vlvarejo = $_SESSION ['produto'] ['vlvarejo'];
$qtdestoque = $_SESSION ['produto'] ['qtdestoque'];
$categoria = $_SESSION ['produto'] ['categoria'];
$fornecedor = $_SESSION ['produto'] ['fornecedor'];
$colecao = $_SESSION ['produto'] ['colecao'];
$codbarra = $_SESSION ['produto'] ['codbarra'];

$nnota = ($_POST ['nnota']) ? $validations->validNumeric ( $_POST ['nnota'] ) : 0;
$icms = ($_POST ['icms']) ? $validations->validStringForm ( $_POST ['icms'] ) : 0;
$frete = ($_POST ['frete']) ? $validations->validStringForm ( $_POST ['frete'] ) : 0;
$vldesc = ($_POST ['vldesc']) ? $validations->validStringForm ( $_POST ['vldesc'] ) : 0;
$icmssub = ($_POST ['icmssub']) ? $validations->validStringForm ( $_POST ['icmssub'] ) : 0;
$ipi = ($_POST ['ipi']) ? $validations->validStringForm ( $_POST ['ipi'] ) : 0;
$vltotal = ($_POST ['vltotal']) ? $validations->validStringForm ( $_POST ['vltotal'] ) : 0;
$dtnota = $validations->validNumeric ( $_POST ['anonota'] ) . '-' . $validations->validNumeric ( $_POST ['mesnota'] ) . '-' . $validations->validNumeric ( $_POST ['dianota'] );

if ($fornecedor == 0)
	$fornecedor = $validations->validNumeric ( $_POST ['fornecedor'] );

if (isset ( $_SESSION ['gradeproduto'] ))
	$grade = 1;
else
	$grade = 0;
コード例 #10
0
// Foundation; either version 3 of the License, or (at your option) any later         //
// version.                                                                           //
//                                                                                    //
// This program is distributed in the hope that it will be useful, but WITHOUT ANY    // 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A    //
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}
$validations = new validations ( );
$db = new db ( );
$db->connect ();

$_SESSION ['produto']['nome'] = strtoupper($validations->validStringForm($_POST['nome']));
$_SESSION ['produto']['codigo'] = strtoupper($validations->validStringForm($_POST['codigo']));
$_SESSION ['produto']['vlcusto'] = $validations->validStringForm($_POST['vlcusto']);
$_SESSION ['produto']['vlpentrega'] = $validations->validStringForm($_POST['vlpentrega']);
$_SESSION ['produto']['vlatacado'] = $validations->validStringForm($_POST['vlatacado']);
$_SESSION ['produto']['vlvarejo'] = $validations->validStringForm($_POST['vlvarejo']);
$_SESSION ['produto']['qtdestoque'] = $validations->validStringForm($_POST['qtdestoque']);
$_SESSION ['produto']['categoria'] = $validations->validNumeric($_POST['categoria']);
$_SESSION ['produto']['fornecedor'] = $validations->validNumeric($_POST['fornecedor']);
$_SESSION ['produto']['colecao'] = $validations->validNumeric($_POST['colecao']);
$_SESSION ['produto']['codbarra'] = $validations->validNumeric($_POST['codbarra']);

?>
コード例 #11
0
// version.                                                                           //
//                                                                                    //
// This program is distributed in the hope that it will be useful, but WITHOUT ANY    // 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A    //
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$cliente = $validations->validNumeric ( $_POST ['cliente'] );
$usuario = $validations->validNumeric ( $_POST ['usuario'] );
$controle = $validations->validNumeric ( $_POST ['controle'] );
$valortotal = $validations->validStringForm ( $_POST ['valortotal'] );
$statusmotivo = $validations->validNumeric ( $_POST ['statusmotivo'] );
$textomotivo = $validations->validStringForm ( $_POST ['textomotivo'] );

$produtos_carrinho = print_r ( $_SESSION ['carrinho_venda'], true );

$sql = "INSERT INTO motivocancelamentovenda ( id_login, controle, vr_total, txtmotivo, idcliente, stmotivo, produtoscarrinho ) VALUES ( " . $usuario . ", '" . $controle . "', '" . $valortotal . "', '" . $textomotivo . "', " . $cliente . ", " . $statusmotivo . ", '" . $produtos_carrinho . "' )";
$db->query ( $sql );

?>
コード例 #12
0
ファイル: grade_salvar.php プロジェクト: renatomarinho/ASC
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$idgrade = $validations->validNumeric ( $_POST ['idgrade'] );
$descricao = strtoupper ( $validations->validStringForm ( $_POST ['descricao'] ) );
$quantidade = $validations->validNumeric ( $_POST ['quantidade'] );
$totalestoque = $validations->validNumeric ( $_POST ['totalestoque'] );
$vlprodgrade = $_POST ['vlprodgrade'];

$sql = "UPDATE cad_produtos_grade SET descricao='" . $descricao . "', quantidade='" . $quantidade . "', vlprodgrade='" . $vlprodgrade . "' WHERE id=" . $idgrade . "";
$db->query ( $sql );

$sql = "SELECT id_produto FROM cad_produtos_grade WHERE id=" . $idgrade . "";
$query = $db->query ( $sql );
$rowproduto = $db->fetch_assoc ( $query );

$sql = "UPDATE estoque SET nquantidade=" . $totalestoque . " WHERE produto_idproduto=" . $rowproduto ['id_produto'] . "";
$db->query ( $sql );

?>
コード例 #13
0
// the terms of the GNU General Public License as published by the Free Software      //
// Foundation; either version 3 of the License, or (at your option) any later         //
// version.                                                                           //
//                                                                                    //
// This program is distributed in the hope that it will be useful, but WITHOUT ANY    // 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A    //
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$idfornecedor = $validations->validNumeric ( $_GET ['f'] );
$produtos = $validations->validStringForm ( $_GET ['p'] );

$p = explode ( '|', $produtos );

foreach ( $p as $key => $value ) {
	$sql = "UPDATE produto SET fornecedor_idfornecedor=" . $idfornecedor . " WHERE idproduto=" . $p [$key] . "";
	$db->query ( $sql );
}

?>
コード例 #14
0
$db->connect ();

/*
 * FIXME Change cad_empresa_id to dinamic id
 */

$sql = "SELECT reducao_estoque AS auth FROM configuracao WHERE cad_empresa_id=1";
$query = $db->query($sql);
$row = $db->fetch_assoc($query);
$auth = $row['auth'];

$idproduto = $validations->validNumeric ( $_GET ['id'] );

if (isset ( $_GET ['add_nomegrade'] ) && isset ( $_GET ['add_qtdgrade'] )) {
	
	$add_nomegrade = $validations->validStringForm ( $_GET ['add_nomegrade'] );
	$add_qtdgrade = $validations->validNumeric ( $_GET ['add_qtdgrade'] );
	$add_precounico = $validations->validStringForm ( $_GET ['add_precounico'] );
	
	$sql = "INSERT INTO cad_produtos_grade ( id_produto, descricao, quantidade, vlprodgrade ) VALUES ( " . $idproduto . ", '" . strtoupper ( $add_nomegrade ) . "', " . $add_qtdgrade . ", '" . $add_precounico . "' )";
	$db->query ( $sql );
	
	$sql = "UPDATE estoque SET nquantidade=nquantidade+" . $add_qtdgrade . " WHERE produto_idproduto=" . $idproduto . "";
	$db->query ( $sql );

}

$sql = "SELECT id, id_produto, descricao, quantidade, vlprodgrade FROM cad_produtos_grade WHERE id_produto=" . $idproduto . " ORDER BY descricao ASC";
$querygrade = $db->query ( $sql );
$total = 0;
while ( $rowgrade = $db->fetch_assoc ( $querygrade ) ) {
コード例 #15
0
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$retirados = $validations->validNumeric ( $_GET ['retirados'] );

$id = $validations->validStringForm ( $_GET ['id'] );
$idgrade = $validations->validStringForm ( $_GET ['idgrade'] );
$total = $validations->validStringForm ( $_GET ['total'] );

?>
<table>
	<tr>
		<td><b style="color: blue">Para retirar "<?php 
echo $retirados;
?>
 ite<?php 
echo $retirados > 1 ? 'ns' : 'm';
?>
" do estoque, confirme os dados :</b></td>
	</tr>
	<tr>
コード例 #16
0
ファイル: cliente_salvar.php プロジェクト: renatomarinho/ASC
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

if (isset ( $_POST ['idcliente'] )) {
	
	$idcliente = $validations->validNumeric ( $_POST ['idcliente'] );
	
	$nome = strtoupper ( $validations->validStringForm ( $_POST ['nome'] ) );
	$endereco = strtoupper ( $validations->validStringForm ( $_POST ['endereco'] ) );
	$bairro = strtoupper ( $validations->validStringForm ( $_POST ['bairro'] ) );
	$cidade = strtoupper ( $validations->validStringForm ( $_POST ['cidade'] ) );
	$estado = strtoupper ( $validations->validStringForm ( $_POST ['estado'] ) );
	$dddtel = $validations->validNumeric ( $_POST ['dddtel'] );
	$tel1 = $validations->validNumeric ( $_POST ['tel1'] );
	$tel2 = $validations->validNumeric ( $_POST ['tel2'] );
	$dddcel = $validations->validNumeric ( $_POST ['dddcel'] );
	$cel1 = $validations->validNumeric ( $_POST ['cel1'] );
	$cel2 = $validations->validNumeric ( $_POST ['cel2'] );
	$cep = $validations->validNumeric ( $_POST ['cep'] . $_POST ['cepdv'] );
	$email = strtolower ( $validations->validStringForm ( $_POST ['email'] ) );
	$cpf = $validations->validStringForm ( $_POST ['cpf'] );
	
	$cpf = str_replace ( '.', '', str_replace ( '-', '', $cpf ) );
コード例 #17
0
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$idusuario = $validations->validNumeric ( $_POST ['i'] );
$nome = strtoupper ( $validations->validStringForm ( $_POST ['nome'] ) );
$login = strtoupper ( $validations->validStringForm ( $_POST ['login'] ) );

$sql = "SELECT id FROM cad_login WHERE login='******' AND id!=" . $idusuario . "";
$query = $db->query ( $sql );

if (! $db->num_rows ( $query )) {
	
	$senha = md5 ($_POST['senha']);
	
	if (strlen($_POST['senha'])>3) {
		$sql_senha = ", senha='" . $senha . "' ";
	} else {
		$sql_senha = '';
	}
	
コード例 #18
0
ファイル: empresa_salvar.php プロジェクト: renatomarinho/ASC
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

require "_language.php";

if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$cnpj = $validations->validStringForm ( $_POST ['cnpj'] );
$ie = $validations->validStringForm ( $_POST ['ie'] );
$endereco = $validations->validStringForm ( $_POST ['endereco'] );
$bairro = $validations->validStringForm ( $_POST ['bairro'] );
$cidade = $validations->validStringForm ( $_POST ['cidade'] );
$estado = $validations->validStringForm ( $_POST ['estado'] );
$cep = $validations->validStringForm ( $_POST ['cep'] );
$tel = $validations->validStringForm ( $_POST ['tel'] );
$fax = $validations->validStringForm ( $_POST ['fax'] );
$email = $validations->validStringForm ( $_POST ['email'] );
$site = $validations->validStringForm ( $_POST ['site'] );
$filiais = ($validations->validNumeric ( $_POST ['filiais'] ) < 1) ? 1 : $validations->validNumeric ( $_POST ['filiais'] );
$qtdturnos = ($validations->validNumeric ( $_POST ['qtdturnos'] ) < 1) ? 1 : $validations->validNumeric ( $_POST ['qtdturnos'] );
$qtdterminais = ($validations->validNumeric ( $_POST ['qtdterminais'] ) < 1) ? 1 : $validations->validNumeric ( $_POST ['qtdterminais'] );

$sql = "UPDATE cad_empresa SET cnpj = '$cnpj', ie = '$ie', endereco = '$endereco', bairro = '$bairro', cidade = '$cidade', uf = '$estado', cep  = '$cep', telefone = '$tel', fax = '$fax', email = '$email', site = '$site', qtd_turnos = '$qtdturnos', qtd_terminal = '$qtdterminais', filiais=" . $filiais . " WHERE id = 1 LIMIT 1 ;";
コード例 #19
0
ファイル: salva.php プロジェクト: renatomarinho/ASC
// PARTICULAR PURPOSE.  See the GNU General Public License for more details:          //
//                                                                                    //
//  http://www.gnu.org/copyleft/gpl.html                                              //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////


if (! isset ( $_CONF ['PATH'] )) {
	require "../../config/default.php";
}

$validations = new validations ( );
$db = new db ( );
$db->connect ();

$tarefa = $validations->validStringForm ( $_POST ['tarefa'] );

$horaescolhida1 = $validations->validNumeric ( $_POST ['he1'] );
$minutoescolhido1 = $validations->validNumeric ( $_POST ['mi1'] );
$diaescolhido1 = $validations->validNumeric ( $_POST ['de1'] );
$mesescolhido1 = $validations->validNumeric ( $_POST ['me1'] );
$anoescolhido1 = $validations->validNumeric ( $_POST ['ae1'] );

$horaescolhida2 = $validations->validNumeric ( $_POST ['he2'] );
$minutoescolhido2 = $validations->validNumeric ( $_POST ['mi2'] );
$diaescolhido2 = $validations->validNumeric ( $_POST ['de2'] );
$mesescolhido2 = $validations->validNumeric ( $_POST ['me2'] );
$anoescolhido2 = $validations->validNumeric ( $_POST ['ae2'] );

$acompanhamento = $validations->validNumeric ( $_POST ['acompanhamento'] );