Пример #1
0
<?php

session_start();
$toRoot = "../../";
$nivelAcesso = $toRoot . ":1:3:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("cadEmpresa.php");
$voltar = $_SESSION["voltar"];
$cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL;
if ($cadastrar == "sim") {
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    include_once $toRoot . "beans/Empresa.class.php";
    include_once $toRoot . "beans/Funcionario.class.php";
    include_once $toRoot . "beans/Log.class.php";
    include_once $toRoot . "dao/DAOEmpresa.class.php";
    include_once $toRoot . "dao/DAOFuncionario.class.php";
    include_once $toRoot . "dao/DAOLog.class.php";
    $conexao = new ConectarMySql($toRoot);
    $empresa = new Empresa($tfNomEmp);
    $daoEmpresa = new DAOEmpresa($empresa, $conexao);
    $daoEmpresa->cadastrar();
    $empresa = $daoEmpresa->getAtual();
    $log = new Log(3, 7, $tfNomEmp . " cadastrado!");
    $daoLog = new DAOLog($log, $conexao);
    $daoLog->cadastrar();
    $funcionario = new Funcionario($empresa->codigo, $_SESSION["codigo"]);
Пример #2
0
<?php

session_start();
$toRoot = "../../";
$nivelAcesso = $toRoot . ":1:3:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("cadBanco.php");
$voltar = $_SESSION["voltar"];
$cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL;
if ($cadastrar == "sim") {
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    include_once $toRoot . "beans/Banco.class.php";
    include_once $toRoot . "beans/Log.class.php";
    include_once $toRoot . "dao/DAOBanco.class.php";
    include_once $toRoot . "dao/DAOLog.class.php";
    $conexao = new ConectarMySql($toRoot);
    $tfNomBan = strtoupper($tfNomBan);
    $banco = new Banco($tfNomBan);
    $daoBanco = new DAOBanco($banco, $conexao);
    $daoBanco->cadastrar();
    $log = new Log(3, 18, $tfNomBan . " cadastrado!");
    $daoLog = new DAOLog($log, $conexao);
    $daoLog->cadastrar();
    $conexao->fechar();
    $cadastrar = true;
}
Пример #3
0
<?php

session_start();
$toRoot = "../../";
$nivelAcesso = $toRoot . ":1:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("cadPlanoConta.php");
$voltar = $_SESSION["voltar"];
$cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL;
if ($cadastrar == "sim") {
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    include_once $toRoot . "beans/PlanoConta.class.php";
    include_once $toRoot . "beans/Log.class.php";
    include_once $toRoot . "dao/DAOPlanoConta.class.php";
    include_once $toRoot . "dao/DAOLog.class.php";
    $conexao = new ConectarMySql($toRoot);
    $planoConta = new PlanoConta($tfDes);
    $daoPlanoConta = new DAOPlanoConta($planoConta, $conexao);
    $daoPlanoConta->cadastrar();
    $log = new Log(3, 12, $tfDes . " cadastrado!");
    $daoLog = new DAOLog($log, $conexao);
    $daoLog->cadastrar();
    $conexao->fechar();
    $cadastrar = true;
}
Пример #4
0
<?php

session_start();
$toRoot = "../../";
$nivelAcesso = $toRoot . ":1:3:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("cadTecnico.php");
$voltar = $_SESSION["voltar"];
$cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL;
if ($cadastrar == "sim") {
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    include_once $toRoot . "beans/Email.class.php";
    include_once $toRoot . "beans/Log.class.php";
    include_once $toRoot . "beans/Pessoa.class.php";
    include_once $toRoot . "beans/Tecnico.class.php";
    include_once $toRoot . "beans/Telefone.class.php";
    include_once $toRoot . "dao/DAOEmail.class.php";
    include_once $toRoot . "dao/DAOLog.class.php";
    include_once $toRoot . "dao/DAOPessoa.class.php";
    include_once $toRoot . "dao/DAOTecnico.class.php";
    include_once $toRoot . "dao/DAOTelefone.class.php";
    $conexao = new ConectarMySql($toRoot);
    $log = new Log(3, NULL, NULL);
    $daoLog = new DAOLog($log, $conexao);
    if ($cbSel == "novo") {
        $pessoa = new Pessoa($tfNom, $tfCPF, $tfRG);
Пример #5
0
<?php

session_start();
$toRoot = "../../";
$nivelAcesso = $toRoot . ":1:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("cadClasse.php");
$voltar = $_SESSION["voltar"];
$cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL;
if ($cadastrar == "sim") {
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    include_once $toRoot . "beans/Classe.class.php";
    include_once $toRoot . "beans/Log.class.php";
    include_once $toRoot . "dao/DAOClasse.class.php";
    include_once $toRoot . "dao/DAOLog.class.php";
    $conexao = new ConectarMySql($toRoot);
    $tfPor = converterValor($tfPor);
    $classe = new Classe($tfDes, $tfPor);
    $daoClasse = new DAOClasse($classe, $conexao);
    $daoClasse->cadastrar();
    $log = new Log(3, 8, $tfDes . " cadastrado!");
    $daoLog = new DAOLog($log, $conexao);
    $daoLog->cadastrar();
    $conexao->fechar();
    $cadastrar = true;
}
<?php

session_start();
$toRoot = "../../";
$nivelAcesso = $toRoot . ":1:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("cadFormaPagamento.php");
$voltar = $_SESSION["voltar"];
$cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL;
if ($cadastrar == "sim") {
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    include_once $toRoot . "beans/FormaPagamento.class.php";
    include_once $toRoot . "beans/Log.class.php";
    include_once $toRoot . "dao/DAOFormaPagamento.class.php";
    include_once $toRoot . "dao/DAOLog.class.php";
    $conexao = new ConectarMySql($toRoot);
    $formaPagamento = new FormaPagamento($tfPer, $tfDes);
    $daoFormaPagamento = new DAOFormaPagamento($formaPagamento, $conexao);
    $daoFormaPagamento->cadastrar();
    $log = new Log(3, 9, $tfNom . " cadastrado!");
    $daoLog = new DAOLog($log, $conexao);
    $daoLog->cadastrar();
    $conexao->fechar();
    $cadastrar = true;
}
<?php

session_start();
$toRoot = "../";
$nivelAcesso = $toRoot . ":1:3:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("selecionarEmpresa.php");
$voltar = $_SESSION["voltar"];
$selecionar = isset($_GET["selecionar"]) ? $_GET["selecionar"] : NULL;
if ($selecionar == "sim") {
    include_once $toRoot . "beans/Empresa.class.php";
    include_once $toRoot . "dao/DAOEmpresa.class.php";
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    $conexao = new ConectarMySql($toRoot);
    $bean = new Empresa();
    $dao = new DAOEmpresa($bean, $conexao);
    $bean = $dao->getEmpresa($slEmp);
    $_SESSION["empresa"] = $bean->codigo;
    $_SESSION["empresaNome"] = $bean->nome;
    $conexao->fechar();
    $selecionar = "ok";
}
Пример #8
0
<?php

session_start();
$toRoot = "../../";
$nivelAcesso = $toRoot . ":1:3:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("cadProduto.php");
$voltar = $_SESSION["voltar"];
$cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL;
if ($cadastrar == "sim") {
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    include_once $toRoot . "beans/Produto.class.php";
    include_once $toRoot . "beans/Log.class.php";
    include_once $toRoot . "dao/DAOProduto.class.php";
    include_once $toRoot . "dao/DAOLog.class.php";
    $conexao = new ConectarMySql($toRoot);
    $tfVal = converterValor($tfVal);
    $produto = new Produto($slEmp, $tfDes, $tfMod, $tfVal);
    $daoProduto = new DAOProduto($produto, $conexao);
    $daoProduto->cadastrar();
    $log = new Log(3, 16, $tfDes . " cadastrado!");
    $daoLog = new DAOLog($log, $conexao);
    $daoLog->cadastrar();
    $conexao->fechar();
    $cadastrar = true;
}
Пример #9
0
<?php

session_start();
$toRoot = "../../";
$nivelAcesso = $toRoot . ":1:4";
include_once $toRoot . "utils/controladorAcesso.php";
include_once $toRoot . "utils/funcoes.php";
setVoltar("cadServico.php");
$voltar = $_SESSION["voltar"];
$cadastrar = isset($_GET["cadastrar"]) ? $_GET["cadastrar"] : NULL;
if ($cadastrar == "sim") {
    foreach ($_POST as $nomeCampo => $valor) {
        $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);";
        eval($comando);
    }
    include_once $toRoot . "utils/ConectarMySQL.class.php";
    include_once $toRoot . "beans/Servico.class.php";
    include_once $toRoot . "beans/Log.class.php";
    include_once $toRoot . "dao/DAOServico.class.php";
    include_once $toRoot . "dao/DAOLog.class.php";
    $conexao = new ConectarMySql($toRoot);
    $servido = new Servico($tfDes);
    $daoServico = new DAOServico($servido, $conexao);
    $daoServico->cadastrar();
    $log = new Log(3, 13, $tfDes . " cadastrado!");
    $daoLog = new DAOLog($log, $conexao);
    $daoLog->cadastrar();
    $conexao->fechar();
    $cadastrar = true;
}