示例#1
0
<?php

session_start();
$nivelAcesso = "../../:2:3:4";
include_once "../../utils/controladorAcesso.php";
include_once "../../utils/funcoes.php";
$slEmpRef = antiSQL(isset($_POST["slEmpRef"]) ? $_POST["slEmpRef"] : NULL);
$desc = antiSQL(isset($_POST["tfEmpDesc"]) ? $_POST["tfEmpDesc"] : NULL);
if ($desc != NULL && $slEmpRef != NULL) {
    include_once "../../utils/ConectarMySQL.class.php";
    $conexao = new ConectarMySQL();
    include_once "../../dao/DAOEmpresa.class.php";
    include_once "../../dao/DAOLog.class.php";
    $dao = new DAOEmpresa($desc, "../../", $conexao);
    $log = new DAOLog($_SESSION["pessoa"], 4, $_SESSION["nivel"], $_SESSION["codigo"], 2, "id=\\'" . $slEmpRef . "\\'", "../../", $conexao);
    if ($dao->alterar($slEmpRef) && $log->cadastrar()) {
        $conexao->commit();
    } else {
        $conexao->rollback();
    }
    header("Location: altEmpresa.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">