$resultado = $conexao->selecionar($sql); $linha = mysqli_fetch_array($resultado); $dao = new DAOParcela(NULL, NULL, NULL, NULL, NULL, "../../", $conexao); $parcela = new Parcela(NULL, NULL, NULL, NULL, NULL); $parcela = $dao->getParcela("%", $slAveRef); $dao = new DAOServidor(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "../../", $conexao); $servidor = new Servidor(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); $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; } $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">
$comitar = false; } $val = explode(":", $slSerRef); $servidor = $dao->getServidor($val[0], $val[1]); include_once "../../dao/DAOVerba.class.php"; $dao = new DAOVerba(NULL, NULL, NULL, NULL, NULL, "../../", $conexao); $verba = $dao->getVerba($slPro); $data = date("Y-m-d H:i:s"); include_once "../../dao/DAOAverbacao.class.php"; if (strlen($tfMon) == 0) { $tfMon = 0; } if (strlen($tfTxJ) == 0) { $tfTxJ = 0; } $dao = new DAOAverbacao($tfNumExt, 'NULL', $servidor->getEmpCodigo(), $servidor->getPesCodigo(), $val[1], $_SESSION["banco"], $verba->getProCodigo(), $slPer, 1, $data, '0000-00-00', $slPar, $tfMon, $tfTxJ, "../../", $conexao); include_once "../../dao/DAOLog.class.php"; $log = new DAOLog($_SESSION["pessoa"], 3, $_SESSION["nivel"], $_SESSION["codigo"], 12, "noum ext=\\'" . $tfNumExt . "\\'", "../../", $conexao); if (!$dao->cadastrar() || !$log->cadastrar()) { $comitar = false; } for ($x = 1; $x <= $slPar; $x++) { include_once "../../dao/DAOParcela.class.php"; $dao = new DAOParcela($x, $tfNumExt, 1, $slPer, $tfValor, "../../", $conexao); $slPer = avancarPeriodo($slPer); 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; } }