include_once "../../utils/funcoes.php"; $slVerRef = antiSQL(isset($_POST["slVerRef"]) ? $_POST["slVerRef"] : NULL); $tfVerba = antiSQL(isset($_POST["tfVerba"]) ? $_POST["tfVerba"] : NULL); $slEmpRef = antiSQL(isset($_POST["slEmpRef"]) ? $_POST["slEmpRef"] : NULL); $slBancRef = antiSQL(isset($_POST["slBancRef"]) ? $_POST["slBancRef"] : NULL); $slProRef = antiSQL(isset($_POST["slProRef"]) ? $_POST["slProRef"] : NULL); $tfVerDesc = antiSQL(isset($_POST["tfVerDesc"]) ? $_POST["tfVerDesc"] : NULL); if ($slVerRef != NULL && $tfVerba != NULL && $slEmpRef != NULL && $slBancRef != NULL && $slProRef != NULL && $tfVerDesc != NULL) { include_once "../../utils/ConectarMySQL.class.php"; $conexao = new ConectarMySQL(); include_once "../../dao/DAOVerba.class.php"; include_once "../../dao/DAOLog.class.php"; $dao = new DAOVerba($tfVerba, $slEmpRef, $slBancRef, $slProRef, $tfVerDesc, "../../", $conexao); $log = new DAOLog($_SESSION["pessoa"], 4, $_SESSION["nivel"], $_SESSION["codigo"], 9, "Log id=\\'" . $slVerRef . "\\'", "../../", $conexao); if ($dao->alterar($slVerRef) && $log->cadastrar()) { $conexao->commit(); } else { $conexao->rollback(); } header("Location: altVerba.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> <style type="text/css"> <!--
$comitar = false;*/ if ($linha[3] == $linha[5] && $linha[8] == 4) { $sql = "UPDATE averbacoes SET sta_codigo = 3 WHERE ave_numero_externo='" . $linha[4] . "'"; if (!$mysql->executar($sql)) { $comitar = false; echo "Erro ao alterar status averbacao ne= " . $linha[4]; } else { $comitar = true; } /*$log = new DAOLog($_SESSION["pessoa"], 4, $_SESSION["nivel"], $_SESSION["codigo"], 12, "Log numExt=\'".$linha[4]."\'", "../../", $mysql); if(!$log->cadastrar()) $comitar = false;*/ } } if ($comitar == true) { $mysql->commit(); } else { $mysql->rollback(); } header("Location: altParametro.php?alt=ok"); die; } $cad = 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> <style type="text/css"> <!--