Beispiel #1
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../PedidoInformacao.class.php';
include_once '../DAO/PedidoInformacaoDAO.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
if (!in_array(234, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$pedidoInformacao = new PedidoInformacao();
$DAO = new PedidoInformacaoDAO();
$pedidoInformacao->setId(limpaTexto($_GET['id']));
$id_empresa = 0;
$resultado = $DAO->Listar("SELECT \r\n\t\t\t\t\t\t\t\tpi.*, e.nome, \r\n\t\t\t\t\t\t\t\t(SELECT nome_completo FROM " . MYSQL_BASE_PESSOAS . " WHERE id = pi.id_responsavel) as responsavel, p.nome_completo FROM " . MYSQL_BASE_PEDIDO_INFORMACAO . " pi, \r\n\t\t\t\t\t\t\t" . MYSQL_BASE_EMPRESAS . " e, " . MYSQL_BASE_PESSOAS . " p WHERE pi.id_usuario = p.id AND pi.id_empresa = e.id AND pi.id = " . $pedidoInformacao->getId());
foreach ($resultado as $item) {
    $pedidoInformacao->setEmpresa($item['nome']);
    $pedidoInformacao->setResponsavel($item['responsavel']);
    $pedidoInformacao->setUsuario($item['nome_completo']);
    $pedidoInformacao->setAssunto($item['assunto']);
    $pedidoInformacao->setCriado(dataBrasil($item['criado'], null));
    $pedidoInformacao->setFinalizado("");
    $id_empresa = $item['id_empresa'];
    $id_responsavel = $item['id_responsavel'];
    $id_usuario = $item['id_usuario'];
    if (!empty($item['fim'])) {
        $pedidoInformacao->setFinalizado(dataBrasil($item['fim'], false));
    }
}
?>
Beispiel #2
0
        //Verifica se o nome esta em branco
        if ($contrato->getNome() != "" && $contrato->getCodigo() != "") {
            $retorno = $DAO->Atualizar($contrato);
            if ($retorno == true) {
                echo '<script language= "JavaScript">alert("Registro alterado com sucesso");</script>';
                echo '<script language= "JavaScript">location.href="index.php";</script>';
            } else {
                echo $retorno . 'asdasd';
            }
        }
    } else {
        $msg = utf8_encode("O Código deve ser alfanúmerico");
        echo '<script language= "JavaScript">alert("' . $msg . '");</script>';
    }
} else {
    $contrato->setId(limpaTexto($_GET['id']));
    $resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_PROJETO_CONTRATO . " WHERE status = 'S' AND id =" . $contrato->getId() . " LIMIT 1");
    if ($resultado) {
        foreach ($resultado as $item) {
            $contrato->setNome($item['nome']);
            $contrato->setCodigo($item['codigo']);
            $contrato->setId($item['id']);
        }
    } else {
        $contrato->setNome("");
        $contrato->setCodigo("");
    }
}
?>
<!-- topbar ends -->
<div class="container-fluid">
Beispiel #3
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once "../DAO/ProjetoDAO.php";
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(20, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="disciplina.php";</script>';
}
$projeto = new Projeto();
$DAO = new ProjetoDAO();
if (!empty($_POST['cmd']) && $_POST['cmd'] == "pesquisa") {
    $projeto->setDocDataProcessamento($_POST['data_processamento'], 'converter');
    $projeto->setDocObservacao(limpaTexto($_POST['observacao']));
    $projeto->setFaseProjeto($_POST['fase_projeto']);
    $projeto->setCodigoProjeto($_POST['codigo_projeto']);
    $projeto->setNucleo($_POST['nucleo']);
    $projeto->setContrato($_POST['contrato']);
    $projeto->setObra($_POST['obra']);
    $projeto->setTrecho($_POST['trecho_inicio']);
    $projeto->setTrechoFinal($_POST['trecho_fim']);
    $projeto->setDisciplina($_POST['disciplina']);
    $projeto->setTipoDocumento($_POST['tipo_documento']);
    $projeto->setStatus($_POST['status']);
    if (!empty($_POST['data_inicio'])) {
        $explode = explode("-", $_POST['data_inicio']);
        $dataInicio = $explode[2] . '-' . $explode[1] . '-' . $explode[0];
    }
    if (!empty($_POST['data_fim'])) {
        $explode = explode("-", $_POST['data_fim']);
Beispiel #4
0
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_CONTRATO, limpaTexto($_GET['id']));
} else {
    $campos = array('id' => 'id', 'cod_contrato' => 'Contrato', 'lote' => 'Lote', 'supervisora' => 'Supervisora', 'construtora' => 'Construtora');
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
?>

<div class="container">
Beispiel #5
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/MaoDeObraDAO.php';
include_once '../MaoDeObra.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(294, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$mao_de_obra = new MaoDeObra();
$DAO = new MaoDeObraDAO();
//Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $mao_de_obra->setNome(limpaTexto($_POST['nome']));
    $mao_de_obra->setTipo($_POST['mao_de_obra']);
    $mao_de_obra->setIdUsuario(userId());
    $resultado = $DAO->Gravar($mao_de_obra);
    if ($resultado == 1) {
        echo '<script language= "JavaScript">alert("Registro cadastrado com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="new.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Erro ao cadastrar o documento");</script>';
    }
}
?>
<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid"> 
Beispiel #6
0
include_once '../head.php';
include_once '../includes.sys/faxada.class.php';
$faxada = new Faxada();
if (!empty($_POST) && $_POST['cmd'] == 'editar') {
    $data = array('id' => $_POST['id'], 'nome' => $_POST['nome']);
    $resultado = $faxada->atualizar(MYSQL_BASE_AREAS, $data);
    if ($resultado == 1) {
        echo '<script language= "JavaScript">alert("Registro atualizado com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Ocorreu um problema para atualizar o registro, favor entrar em contato com o suporte.");</script>';
    }
} else {
    $campos = array('id' => 'id', 'nome' => 'nome');
    $where = ' id = ' . limpaTexto($_GET['id']);
    $data = $faxada->listar(MYSQL_BASE_AREAS, $campos, $where, 1);
    $data = $data[0];
}
?>

<div class="container">

	<!-- Main component for a primary marketing message or call to action -->
	<div class="table-responsive">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4>Alterar Área</h4>
			</div>
			<div class="panel-body">
				<form action="edit.php?id=<?php 
Beispiel #7
0
include_once '../Cargo.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$permissoes = listarAcesso();
if (!in_array(228, $permissoes)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
$cargo = new Cargo();
$DAO = new CargoDAO();
$cargo->setId(limpaTexto($_GET['id']));
// Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'editar') {
    // Verifica se o campo nome foi digitado
    if (!empty($_POST['nome']) && !empty($_POST['empresa'])) {
        $cargo->setNome(limpaTexto($_POST['nome']));
        $cargo->setIdEmpresa(limpaTexto($_POST['empresa']));
        $retorno = $DAO->Atualizar($cargo);
        if ($retorno == true) {
            echo '<script language= "JavaScript">alert("Cargo editado com sucesso");</script>';
            echo '<script language= "JavaScript">location.href="index.php";</script>';
        } else {
            print_r($retorno);
        }
    }
} else {
    $resultado = $DAO->Listar("SELECT c.nome, c.id_empresa FROM " . MYSQL_BASE_CARGOS . " c, " . MYSQL_BASE_EMPRESAS . " e WHERE c.id_empresa=e.id AND c.ativo='S' AND c.id=" . $cargo->getId());
    //Verifica se a consulta e valida
    if ($resultado) {
        //Guarda as informações do banco
        foreach ($resultado as $item) {
            $cargo->setNome($item['nome']);
Beispiel #8
0
                } else {
                    echo '<script language= "JavaScript">alert("Registro alterado com sucesso");</script>';
                    echo '<script language= "JavaScript">location.href="index.php";</script>';
                }
            } else {
                echo '<script language= "JavaScript">alert("Erro ao alterar o registro");</script>';
            }
        } else {
            $msg = "Erro - Registro não foi salvo";
            echo '<script language= "JavaScript">alert("' . $msg . '");</script>';
        }
    } else {
        echo '<script language= "JavaScript">alert("Preenchas todos os campos.");</script>';
    }
} else {
    $ListagemRelacionamento->setId(limpaTexto($_GET['id']));
    //Pegando o descricao do relacionamento
    $retorno = $DAO->Listar("SELECT descricao FROM " . MYSQL_BASE_RELACIONAMENTO_GED . " pn WHERE id=" . $ListagemRelacionamento->getId());
    foreach ($retorno as $item) {
        $ListagemRelacionamento->setDescricao($item['descricao']);
    }
    //Pegando todos os documento associados ao relacionamento
    $retorno = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_RELACIONAMENTO_GED_DOCUMENTO . " WHERE dat_excluido = '0000-00-00 00:00:00' AND id_relacionamento_ged = " . $ListagemRelacionamento->getId());
    foreach ($retorno as $item) {
        $arquivos[] = $item['id_documento_arquivo'];
    }
    $ListagemRelacionamento->setArquivos($arquivos);
}
?>
<!-- topbar ends -->
<div class="container-fluid">
Beispiel #9
0
$setorFinaliza = new SetorFinaliza();
$DAO = new SetorFinalizaDAO();
//Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'editar') {
    $setorFinaliza->setUsuario(userId());
    $setorFinaliza->setSetor($_POST['setor']);
    $setorFinaliza->setId($_POST['id']);
    $resultado = $DAO->Atualizar($setorFinaliza);
    if ($resultado == 1) {
        echo '<script language= "JavaScript">alert("Registro alterado com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Erro ao subir o arquivo");</script>';
    }
} else {
    $setorFinaliza->setId(limpaTexto($_GET['id']));
    $resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_SETOR_FINALIZA . " WHERE status = 'S'");
    if ($resultado || $resultado->rowCount() > 0) {
        foreach ($resultado as $item) {
            $setorFinaliza->setSetor($item['id_setor']);
        }
    } else {
        $setorFinaliza->setSetor(0);
    }
}
?>
<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid"> 

		<!-- left menu starts -->
Beispiel #10
0
include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once "../DAO/PatrimonioDAO.php";
include_once "../Patrimonio.class.php";
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$patrimonio = new Patrimonio();
$DAO = new PatrimonioDAO();
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'pesquisar') {
    $patrimonio->setnome(limpaTexto($_POST['nome']));
    $patrimonio->setCodigo(limpaTexto($_POST['codigo']));
    $patrimonio->setIdPessoa(limpaTexto($_POST['pessoa']));
    $patrimonio->setIdFornecedor(limpaTexto($_POST['fornecedor']));
    $patrimonio->setNotaFiscal(limpaTexto($_POST['nota_fiscal']));
    $patrimonio->setDataAquisicao($_POST['data_aquisicao'], 'converter');
    $patrimonio->setDescricao(limpaTexto($_POST['descricao']));
    if (!empty($_POST['data_inicio'])) {
        $explode = explode("-", $_POST['data_inicio']);
        $dataInicio = $explode[2] . '-' . $explode[1] . '-' . $explode[0];
    }
    if (!empty($_POST['data_fim'])) {
        $explode = explode("-", $_POST['data_fim']);
        $dataFim = $explode[2] . '-' . $explode[1] . '-' . $explode[0];
    }
    $query = "SELECT A.id, A.codigo, A.num_nota_fiscal, A.nome, B.nome AS fornecedor, C.nome_completo AS pessoa\r\n\t\t\t\tFROM tb_patrimonio A\r\n\t\t\t\t\tINNER JOIN tb_fornecedor B ON A.id_fornecedor = B.id\r\n\t\t\t\t\tINNER JOIN tb_pessoa \t C ON A.id_pessoa = C.id\r\n\t\t\t\tWHERE A.dat_Exclusao = '0000-00-00 00:00:00' ";
    $confirm = "return confirm('Deseja remover esse registro?');";
    // Verifica se foi digitado nome
    if ($patrimonio->getNome() != null) {
        $query .= " AND A.nome LIKE '%" . $patrimonio->getnome() . "%'";
    }
    // Verifica se foi digitado o codigo do documento
Beispiel #11
0
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(220, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
$pessoa = new Pessoa();
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $DAO = new PessoaDAO();
    $pessoa->setNomeCompleto(limpaTexto($_POST['nome']));
    $pessoa->setEmail(limpaTexto($_POST['email']));
    $pessoa->setUsuario(userId());
    $pessoa->setIdCargo($_POST['cargo']);
    $pessoa->setRegime($_POST['regime']);
    $pessoa->setSetor($_POST['setor']);
    $pessoa->setMatricula(limpaTexto($_POST['matricula']));
    if (validaEmail($_POST['email']) == false) {
        echo '<script language= "JavaScript">alert("E-mail inv&aacute;lido");</script>';
    } else {
        //Verifica se o nome foi preenchido
        if ($pessoa->validaCadastro($pessoa)) {
            $retorno = $DAO->Gravar($pessoa);
            if ($retorno == true) {
                echo '<script language= "JavaScript">alert("Registro cadastrado com sucesso");</script>';
                echo '<script language= "JavaScript">location.href="new.php";</script>';
            } else {
                print_r($retorno);
            }
        } else {
            echo '<script language= "JavaScript">alert("Preencha todos os campos");</script>';
        }
Beispiel #12
0
$DAO = new PendenciaDAO();
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'finalizar') {
    $pendencia->setDocumentoCorrigido($_POST['documento']);
    $pendencia->setId(limpaTexto($_POST['id']));
    if ($pendencia->getDocumentoCorrigido() != NULL) {
        $retorno = $DAO->Atualizar($pendencia);
        if ($retorno == true) {
            echo '<script language= "JavaScript">alert("Registro alterado com sucesso");</script>';
            echo '<script language= "JavaScript">location.href="index.php";</script>';
        }
    } else {
        echo '<script language= "JavaScript">alert("Escolha o documento");</script>';
    }
} else {
    $pendencia->setId(limpaTexto($_GET['id']));
    $resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_PENDENCIA . " WHERE concluido='N' AND id=" . $pendencia->getId());
    foreach ($resultado as $item) {
        $pendencia->setUsuario($item['id_documento_pendente']);
        $pendencia->setDescricao($item['descricao']);
        $pendencia->setDocumentoPendente($item['id_documento_pendente']);
    }
}
?>
<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
		<div class="span2 main-menu-span">
				<?php 
Beispiel #13
0
include_once '../../includes.sys/metodos.php';
include_once '../DAO/GrupoPessoaDAO.php';
include_once '../GrupoPessoa.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$acesso = listarAcesso();
if (!in_array(142, $acesso)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
$grupo = new GrupoPessoa();
$DAO = new GrupoPessoaDAO();
// Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    // Verifica se o campo nome foi digitado
    if (!empty($_POST['nome'])) {
        $grupo->setNome(limpaTexto($_POST['nome']));
        $grupo->setUsuario(userId());
        $grupo->setPessoa($_POST['interessados']);
        $retorno = $DAO->GravarGrupo($grupo);
        if ($retorno > 0) {
            foreach ($grupo->getPessoa() as $item) {
                $request = $DAO->GravarGrupoPessoa($retorno, $item);
                if ($request != 1) {
                    die(print_r($request));
                }
            }
            echo '<script language= "JavaScript">alert("Grupo cadastrado com sucesso");</script>';
            echo '<script language= "JavaScript">location.href="new.php";</script>';
        } else {
            print_r($retorno);
        }
Beispiel #14
0
<?php

include_once '../includes.sys/ini.php';
include_once '../includes.sys/metodos.php';
include_once 'DAO/MensagemDAO.php';
include_once 'Mensagem.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../head.php';
if (!in_array(10, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$mensagem = new Mensagem();
$DAO = new MensagemDAO();
$mensagem->setId(limpaTexto($_GET['id']));
if (!empty($_GET['cmd']) && $_GET['cmd'] == 'vis') {
    $id = ValidateInteger(INPUT_GET, 'id');
    $retorno = $DAO->Visualizado($id);
    $titulo = "Caixa de Entrada";
    $pagina = "index";
} else {
    $titulo = "Caixa de Saida";
    $pagina = "saida";
}
$resultado = $DAO->Listar("SELECT A.*, B.nome_completo \r\n\t\t\t\t\t\t\t\tFROM " . MYSQL_BASE_MENSAGENS . " A \r\n\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_PESSOAS . " B ON A.id_pessoa_remetente = B.id \r\n\t\t\t\t\t\t\tWHERE A.id=" . $mensagem->getId());
if ($resultado) {
    foreach ($resultado as $item) {
        $mensagem->setDestinatario($item['nome_completo']);
        $mensagem->setAssunto($item['assunto']);
        $mensagem->setConteudo($item['conteudo']);
        $mensagem->setDataCriado($item['dat_criado'], true);
        $file = $DAO->Listar("SELECT id, file FROM " . MYSQL_BASE_MENSAGEM_ARQUIVOS . " WHERE id_mensagem=" . $mensagem->getId());
Beispiel #15
0
include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/ProjetoDAO.php';
include_once '../Projeto.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(21, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="pesquisa.php";</script>';
}
$projeto = new Projeto();
$DAO = new ProjetoDAO();
$projeto->setId(limpaTexto($_GET['id']));
// Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'editar') {
    $projeto->setDocLocal(limpaTexto($_POST['caixa']));
    $projeto->setDocumento($_POST['id_documento']);
    $retorno = $DAO->AtualizarGED($projeto);
    //Verifica se conseguiu salvar no banco de documentos
    if ($retorno == true) {
        echo '<script language= "JavaScript">alert("Registro editado com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Erro, contate a TI.");</script>';
    }
} else {
    $resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_PROJETOS . " WHERE id=" . $projeto->getId());
    if ($resultado) {
        foreach ($resultado as $item) {
            $projeto->setDocumento($item['id_documento']);
        }
Beispiel #16
0
            } else {
                $res = $DAO->Atualizar($remessa);
                $msg_sucesso = utf8_encode("O registro foi alterado com sucesso.");
            }
        } else {
            $msg_erro = utf8_encode('Não foi possivel fazer o upload do arquivo, entrar em contato com a TI.');
        }
    } else {
        $resultado = $DAO->Listar("SELECT file FROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " WHERE id = " . $remessa->getId());
        foreach ($resultado as $item) {
            $remessa->setFile($item['file']);
        }
        $msg_erro = utf8_encode('O nome do arquivo não é igual ao que está na base de dados.<ul><li>O arquivo original é "<b>' . $remessa->getFile() . '</b>"</li><li>O arquivo para alteração é "<b>' . $file['name'] . '</b>"</li></ul>');
    }
} else {
    $remessa->setIdArquivo(limpaTexto($_GET['id']));
    $resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " WHERE id = " . $remessa->getIdArquivo());
    if ($resultado) {
        foreach ($resultado as $item) {
            $remessa->setFile($item['file']);
            $remessa->setTitulo($item['titulo']);
            if ($item['finalizado'] != NULL || $item['excluido'] != NULL) {
                echo '<script language= "JavaScript">location.href="view.php?id=' . $remessa->getId() . '";</script>';
            }
        }
    } else {
        $remessa->setFile("");
        $remessa->setTitulo("");
    }
}
?>
Beispiel #17
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/ListagemProjetoDAO.php';
include_once '../ListagemProjeto.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$listagemProjeto = new ListagemProjeto();
$DAO = new ListagemProjetoDao();
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $listagemProjeto->setNome(limpaTexto($_POST['nome']));
    $listagemProjeto->setUsuario(userId());
    $listagemProjeto->setArquivos($_POST['arquivos']);
    //Verifica se o nome foi preenchido
    if ($listagemProjeto->getNome() != null || $listagemProjeto->getArquivos() != null) {
        $retorno = $DAO->Gravar($listagemProjeto);
        if ($retorno > 0) {
            $listagemProjeto->setId($retorno);
            foreach ($listagemProjeto->getArquivos() as $arquivo) {
                $retorno = $DAO->GravarArquivos($arquivo, userId(), $listagemProjeto->getId());
                if ($retorno == false) {
                    break;
                }
            }
            if ($retorno == false) {
                echo '<script language= "JavaScript">alert("Erro ao cadastrar os documentos");</script>';
            } else {
                echo '<script language= "JavaScript">alert("Registro cadastrado com sucesso");</script>';
                echo '<script language= "JavaScript">location.href="new.php";</script>';
Beispiel #18
0
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada->deletar(MYSQL_BASE_FORNECEDORES, limpaTexto($_GET['id']));
} else {
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND razao_social LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem categoria
        if (!empty($_GET['email'])) {
            $where .= " AND cnpj LIKE '%" . $_GET['email'] . "%'";
        }
    }
    $campos = array('id' => 'id', 'razao_social' => 'Razão Social', 'telefone' => 'Telefone', 'email' => 'Email', 'cnpj' => 'CNPJ');
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\r\n\t\t\t\t\trazao_social REGEXP '" . $q . "' OR\r\n\t\t\t\t\ttelefone REGEXP\t'" . $q . "' OR\r\n\t\t\t\t\temail REGEXP '" . $q . "' OR\r\n\t\t\t\t\tcnpj REGEXP '" . $q . "')";
}
?>

<div class="container">
Beispiel #19
0
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada->deletar(MYSQL_BASE_USUARIOS, limpaTexto($_GET['id']));
} else {
    $where = "excluido IS NULL AND id != 1";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_guerra LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem categoria
        if (!empty($_GET['email'])) {
            $where .= " AND email LIKE '%" . $_GET['email'] . "%'";
        }
    }
    $campos = array('id' => 'id', 'nome_guerra' => 'Nome', 'email' => 'Email');
}
?>

<div class="container">

	<!-- Main component for a primary marketing message or call to action -->
	<div class="table-responsive">
		<div class="panel panel-default">
			<div class="panel-heading">
Beispiel #20
0
    function gerarGrid($tabela, $campos, $where = null, $query = null, $acao = null)
    {
        $DAO = new GenericoDAO();
        $keys = array_values($campos);
        unset($keys['acao']);
        $qnt = 10;
        !empty($_GET['p']) ? $pagina = limpaTexto($_GET['p']) : ($pagina = 1);
        $inicio = $pagina * $qnt - $qnt;
        $limit = " LIMIT " . $inicio . ", " . $qnt;
        $confirm = "return confirm('Deseja remover esse registro?');";
        $tabela_html = '<table class="table table-striped table-condensed table-bordered">';
        $tabela_html .= '	<thead>';
        $tabela_html .= '		<tr>';
        //Criando o cabe��alho da tabela baseado nos campos do select
        foreach ($campos as $item) {
            if ($item != 'id' && !is_array($item)) {
                $tabela_html .= ' <th>' . str_replace('_', ' ', $item) . '</th>';
            }
        }
        $tabela_html .= '<th>Ação</th>';
        $tabela_html .= '</tr></thead>';
        $tabela_html .= '<tbody>';
        //Faz a consulta no banco
        $resultado = $DAO->Listar($tabela, $campos, $where . $limit, $query);
        $rows = $resultado->fetchAll();
        //Percorre cada linha do select
        foreach ($rows as $row) {
            $tabela_html .= '<tr>';
            //Percorre cada coluna da linha atual do select
            foreach ($keys as $item) {
                if ($item != 'id' && !is_array($item)) {
                    $value = $row[str_replace(' ', '_', $item)];
                    //Verifica se precisa formatar para o tipo de n��mero brasileiro
                    if (is_numeric($value)) {
                        $tabela_html .= '<td>' . number_format($value, 2, ',', '.') . '</td>';
                    } elseif ($item == 'Imagem') {
                        if (!empty($value) && file_exists(INTERNAL_ROOT_PORTAL . "/arquivos/estoque/thumb/" . $value)) {
                            $img = '<img src="' . EXTERNAL_ROOT_PORTAL . '/arquivos/estoque/thumb/' . $value . '"/>';
                        } else {
                            $img = '<img width="60" height="60" src="' . EXTERNAL_ROOT_PORTAL . '/img/sem_img.png"/>';
                        }
                        $tabela_html .= '<td><a data-gallery href="#" class="thumbnail col-xs-6 col-md-6">' . $img . '</a></td>';
                    } elseif (strripos($value, '.pdf')) {
                        $tabela_html .= '<td><a href="' . EXTERNAL_ROOT_PORTAL . '/arquivos/nf/' . $value . '" target="_blank">Visualizar</a></td>';
                    } else {
                        $tabela_html .= '<td>' . $value . '</td>';
                    }
                }
            }
            //Cria a acao dos botoes
            $tabela_html .= '<td>';
            if ($campos['acao'] == null) {
                $tabela_html .= '	<a class="btn btn-warning" href="edit.php?id=' . $row['id'] . '"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> Editar</a>
									<a onclick="' . $confirm . '" class="btn btn-danger" href="index.php?id=' . $row['id'] . '&cmd=del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Remover</a>';
            } else {
                //Seta a cor do botao
                if ($campos['acao']['cor'] != null) {
                    $tabela_html .= ' <a class="btn btn-' . $campos['acao']['cor'] . '"';
                } else {
                    $tabela_html .= ' <a class="btn btn-default"';
                }
                //Seta o target
                if ($campos['acao']['target'] != NULL) {
                    $tabela_html .= ' target="' . $campos['acao']['target'] . '"';
                }
                //Seta o link (Acao)
                $tabela_html .= ' href="' . $campos['acao']['link'] . $row['id'] . '">';
                //Seta o icone do botao
                if ($campos['acao']['icone'] != null) {
                    $tabela_html .= ' <span class="glyphicon ' . $campos['acao']['icone'] . '" aria-hidden="true"></span>';
                }
                //Seta o Texto do Botao
                $tabela_html .= ' ' . $campos['acao']['texto'] . '</a>';
                // 				$chaves = array_keys($acao);
                // 				foreach ($chaves as $item){
                // 					$tabela_html .=	'	<a class="btn btn-success" href="'.$item.$row['id'].'"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> '.$acao[$item].'</a>';
                // 				}
            }
            $tabela_html .= '</td>';
            $tabela_html .= '</tr>';
        }
        $tabela_html .= '</table>';
        $url = $_SERVER['PHP_SELF'];
        $array = explode('/', $url);
        $posicao = count($array) - 1;
        $url = $array[$posicao];
        if (!empty($_GET['id'])) {
            $id = '<input type="hidden" name="id" value="' . $_GET['id'] . '">';
        } else {
            $id = "";
        }
        ?>
		<form action="<?php 
        echo $url;
        ?>
" method="get" class="form-inline">
			<?php 
        echo $id;
        ?>
			<input name="q" type="text" size="50" placeholder="Pesquise por palavra" class="form-control" id="typeahead" data-provide="typeahead" data-items="4" value="<?php 
        if (!empty($_GET['q'])) {
            echo $_GET['q'];
        }
        ?>
">
			<input class="btn btn-info" type="submit" value="Buscar">
		</form>
		<br>
		<?php 
        echo $tabela_html;
        //Gerando a paginacao
        $stmt = $DAO->Listar($tabela, $campos, $where, $query);
        $total_registros = $stmt->rowCount();
        $pags = ceil($total_registros / $qnt);
        // Número máximos de botões de paginação
        $max_links = 3;
        $get = "";
        //Montando os gets para paginacao
        // 		if(!empty($_GET['q'])){
        $keys = array_keys($_GET);
        foreach ($keys as $value) {
            if ($value != 'p') {
                $get .= '&' . $value . '=' . $_GET[$value];
            }
        }
        // 		}
        echo '<nav>
					<ul class="pagination"><li><a href="' . EXTERNAL_ROOT_PORTAL . str_replace(PATH, '', $_SERVER['PHP_SELF']) . '?p=1' . $get . '">Inicio</a></li>';
        //Gera as duas paginacao anterior
        for ($i = $pagina - 2; $i < $pagina; $i++) {
            if ($i > 0 && $i != $pagina) {
                echo '<li><a href="' . EXTERNAL_ROOT_PORTAL . str_replace(PATH, '', $_SERVER['PHP_SELF']) . '?p=' . $i . $get . '" target="_self">' . $i . '</a></li>';
            }
        }
        //Gera a paginacao atual e as duas proximas
        for ($i = $pagina; $i <= $pagina + $max_links - 1; $i++) {
            // Se o número da página for menor ou igual a zero, não faz nada
            // (afinal, não existe página 0, -1, -2..)
            if ($i <= 0) {
                //faz nada
                // Se estiver tudo OK, cria o link para outra página
            } else {
                if ($i == $pagina) {
                    echo '<li class="active"><a href="#" target="_self">' . $i . '</a></li>';
                } elseif ($pags >= $i) {
                    echo '<li><a href="' . EXTERNAL_ROOT_PORTAL . str_replace(PATH, '', $_SERVER['PHP_SELF']) . '?p=' . $i . $get . '" target="_self">' . $i . '</a></li>';
                }
            }
        }
        echo '<li><a href="' . EXTERNAL_ROOT_PORTAL . str_replace(PATH, '', $_SERVER['PHP_SELF']) . '?p=' . $pags . $get . '" target="_self">Fim</a></li></ul></nav>';
    }
Beispiel #21
0
    header("Content-type: application/x-msexcel; charset=utf-8");
    header("Content-type: application/force-download");
    header("Content-Disposition: attachment; filename={$nome_arquivo}.xls");
    header("Pragma: no-cache");
    $validacao = true;
    echo 'entrou';
} else {
    $validacao = false;
}
?>

<?php 
include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
connectSQL();
$id = limpaTexto($_POST['medicao']);
$query = mysql_query("SELECT * FROM " . MYSQL_BASE_MEDICAO . " WHERE id=" . $id);
$id_contrato = 0;
while ($row = mysql_fetch_array($query)) {
    $dt_inicio = dataBrasil($row['ref_inicio'], false);
    $dt_fim = dataBrasil($row['ref_fim'], false);
    $id_contrato = $row['id_contrato'];
    $numero_med = $row['numero'];
}
if ($_POST['empresa'] == 1 || $_POST['empresa'] == 3) {
    $grupo = 1;
} else {
    $grupo = 2;
}
$empresa = $_POST['empresa'];
$casas = 2;
Beispiel #22
0
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_CLIENTES, limpaTexto($_GET['id']));
} else {
    $tabela = MYSQL_BASE_CLIENTES;
    $campos = array('id' => 'id', 'nome_completo' => 'Nome', 'tel_1' => 'Telefone', 'endereco' => 'Endereço');
    $where = " excluido IS NULL ";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\r\n\t\t\t\t\tnome_completo REGEXP '" . $q . "' OR\r\n\t\t\t\t\trg REGEXP '" . $q . "' OR\r\n\t\t\t\t\ttel_1 REGEXP '" . $q . "' OR\r\n\t\t\t\t\ttel_2 REGEXP '" . $q . "' OR\r\n\t\t\t\t\ttel_3 REGEXP '" . $q . "' OR\r\n\t\t\t\t\tendereco REGEXP '" . $q . "' OR\r\n\t\t\t\t\tcpf REGEXP '" . $q . "')";
}
?>
Beispiel #23
0
$acesso = listarAcesso();
if (!in_array(177, $acesso)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/projeto/documentos/fase_projeto.php";</script>';
}
$DAO = new ProjetoDAO();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    connectSQL();
    $query = mysql_query("SELECT id_documento FROM tb_projeto WHERE id=" . limpaTexto($_GET['id']) . " LIMIT 1");
    while ($row = mysql_fetch_array($query)) {
        $DAO->Deletar($row['id_documento']);
    }
    echo '<script language= "JavaScript">alert("Registro removido com sucesso");</script>';
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
if (!empty($_GET) && $_GET['cmd'] == 'liberar') {
    $request = $DAO->Liberar(limpaTexto($_GET['id']));
    echo '<script language= "JavaScript">alert("Registro liberado com sucesso");</script>';
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$aprovado = mysql_query("SELECT * FROM " . MYSQL_BASE_CHECK_LISTS . " WHERE status = 'A' AND aprovado_por=1 AND ativo = 'S'");
$num_aprovado = mysql_num_rows($aprovado);
?>
	<!-- topbar ends -->
		<div class="container-fluid">
		<div class="row-fluid">
				
			<!-- left menu starts -->
			<div class="span2 main-menu-span">
				<?php 
include_once '../menu.php';
?>
Beispiel #24
0
        //Verifica se o nome esta em branco
        if ($trecho->getNome() != "" && $trecho->getCodigo() != "") {
            $retorno = $DAO->Atualizar($trecho);
            if ($retorno == true) {
                echo '<script language= "JavaScript">alert("Registro alterado com sucesso");</script>';
                echo '<script language= "JavaScript">location.href="index.php";</script>';
            } else {
                echo $retorno . 'asdasd';
            }
        }
    } else {
        $msg = utf8_encode("O Código deve ser númerico");
        echo '<script language= "JavaScript">alert("' . $msg . '");</script>';
    }
} else {
    $trecho->setId(limpaTexto($_GET['id']));
    $resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_PROJETO_TRECHO . " WHERE status = 'S' AND id =" . $trecho->getId() . " LIMIT 1");
    if ($resultado) {
        foreach ($resultado as $item) {
            $trecho->setNome($item['nome']);
            $trecho->setCodigo($item['codigo']);
            $trecho->setId($item['id']);
        }
    } else {
        $trecho->setNome("");
        $trecho->setCodigo("");
    }
}
?>
<!-- topbar ends -->
<div class="container-fluid">
Beispiel #25
0
include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/ResponsavelDisciplinaDAO.php';
include_once '../ResponsavelDisciplina.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$acesso = listarAcesso();
if (!in_array(258, $acesso)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/projeto/documentos/fase_projeto.php";</script>';
}
$disciplina = new Disciplina();
$DAO = new DisciplinaDAO();
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $disciplina->setDisciplina(limpaTexto($_POST['disciplina']));
    $disciplina->setVerificador(strtoupper(limpaTexto($_POST['responsavel'])));
    $disciplina->setAprovadorVerificador($_POST['aprovador_1']);
    $disciplina->setUsuario(userId());
    //Verifica se o nome foi preenchido
    if ($disciplina->getDisciplina() == 0 || $disciplina->getVerificador() == 0) {
        $msg = utf8_encode("Preencha todos os campos!");
        echo '<script language= "JavaScript">alert("' . $msg . '");</script>';
    } else {
        foreach ($disciplina->getDisciplina() as $produto => $value) {
            $retorno = $DAO->Gravar($disciplina, $value);
        }
        if ($retorno == 1) {
            echo '<script language= "JavaScript">alert("Registro cadastrado com sucesso");</script>';
            echo '<script language= "JavaScript">location.href="new.php";</script>';
        } else {
            $msg = utf8_encode("Erro ao salvar!");
Beispiel #26
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/ChamadasDAO.php';
include_once '../Chamadas.class.php';
include_once '../Atendimento.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(184, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$chamadas = new Chamadas();
$DAO = new ChamadasDAO();
$atendimento = new Atendimento();
$chamadas->setId(limpaTexto($_GET['id']));
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'atender') {
    $atendimento = $DAO->IniciaAtendimento($chamadas);
    if ($atendimento > 0) {
        echo '<script language= "JavaScript">alert("Atendimento Iniciado !");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Falha ao Iniciar o Atendimento");</script>';
    }
}
// $resultado = $DAO->ListarChamados( "SELECT C.*, P.nome_completo
// 									FROM ".MYSQL_BASE_CHAMADAS." C
// 									INNER JOIN
// 										".MYSQL_BASE_PESSOAS." P ON C.id_usuario = P.id
// 									WHERE
// 										dat_finalizar IS NULL AND
Beispiel #27
0
include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/TrechoDAO.php';
include_once '../Trecho.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$acesso = listarAcesso();
if (!in_array(120, $acesso)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/projeto/documentos/fase_projeto.php";</script>';
}
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $trecho = new Trecho();
    $DAO = new TrechoDAO();
    $trecho->setNome(limpaTexto($_POST['nome']));
    $trecho->setCodigo(strtoupper(limpaTexto($_POST['codigo'])));
    $trecho->setUsuario(userId());
    //Verifica se o nome foi preenchido
    if ($trecho->getCodigo() != "") {
        if ($trecho->getNome() != "" && $trecho->getCodigo() != "") {
            $retorno = $DAO->Gravar($trecho);
            if ($retorno == true) {
                echo '<script language= "JavaScript">alert("Registro cadastrado com sucesso");</script>';
                echo '<script language= "JavaScript">location.href="new.php";</script>';
            }
        } else {
            echo '<script language= "JavaScript">alert("Preencha o(s) campo(s)");</script>';
        }
    } else {
        $msg = utf8_encode("O Código deve ser informado");
        echo '<script language= "JavaScript">alert("' . $msg . '");</script>';
Beispiel #28
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/DocumentoDAO.php';
include_once '../Documento.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(10, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$documento = new Documento();
$DAO = new DocumentoDAO();
$documento->setId(limpaTexto($_GET['id']));
$resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_DOCUMENTOS . " WHERE ativo='S' AND id=" . $documento->getId());
if ($resultado) {
    foreach ($resultado as $item) {
        $documento->setAssunto($item['assunto']);
        $documento->setCodDoc($item['cod_documento']);
        $documento->setDataProcessamento($item['data_processamento']);
        $documento->setIdCategoria($item['id_categoria']);
        $documento->setRemetente($item['remetente']);
        $documento->setDestinatario($item['destinatario']);
        $documento->setIdLocal($item['id_local']);
        $documento->setStatus($item['status']);
        $documento->setObservacao($item['obs']);
        $file = $DAO->Listar("SELECT file, versao, id_documento FROM " . MYSQL_BASE_ARQUIVOS . " WHERE principal='S' AND id_documento=" . $documento->getId());
        if ($file->rowCount() > 0) {
            foreach ($file as $row) {
                if (!empty($row['file'])) {
                    $onclick = "window.open('" . EXTERNAL_ROOT_PORTAL . "/download.php?documento=" . $row['id_documento'] . "', '_blank');";
Beispiel #29
0
<?php

if (!empty($_GET['download']) && $_GET['download'] == 's') {
    $nome_arquivo = 'relatorio_reembolsavel';
    header("Content-type: application/vnd.ms-excel");
    header("Content-type: application/force-download");
    header("Content-Disposition: attachment; filename={$nome_arquivo}.xls");
    header("Pragma: no-cache");
}
include_once '../../includes.sys/ini.php';
include_once INTERNAL_ROOT_PORTAL . '/includes.sys/metodos.php';
connectSQL();
$id = limpaTexto($_GET['id']);
if ($_GET['grupo'] == 1) {
    $grupo = 1;
    $moeda = "R\$";
    $moeda2 = "R\$";
    $casas = 2;
    $nome_grupo = "- GROUPS 1 AND 3";
} else {
    $grupo = 2;
    $moeda = "JPY";
    $moeda2 = "";
    $casas = 0;
    $nome_grupo = "- GROUP 2";
}
$query = mysql_query("SELECT * FROM " . MYSQL_BASE_MEDICAO . " WHERE id=" . $id);
while ($row = mysql_fetch_array($query)) {
    $dt_inicio = dataBrasil($row['ref_inicio'], false);
    $dt_fim = dataBrasil($row['ref_fim'], false);
    $numero_med = $row['numero'];
Beispiel #30
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/ProjetoDAO.php';
include_once '../Projeto.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(20, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="pesquisa.php";</script>';
}
$projeto = new Projeto();
$DAO = new ProjetoDAO();
$projeto->setId(limpaTexto($_GET['id']));
$resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_PROJETOS . " WHERE id=" . $projeto->getId());
if ($resultado) {
    foreach ($resultado as $item) {
        $projeto->setCheckList($item['id_check_list']);
        $projeto->setDocumento($item['id_documento']);
        $projeto->setCodigoProjeto($item['id_codigo_projeto']);
        $projeto->setFaseProjeto($item['id_fase_projeto']);
        $projeto->setNucleo($item['id_nucleo']);
        $projeto->setDisciplina($item['id_disciplina']);
        $projeto->setTipoDocumento($item['id_tipo_documento']);
        if ($item['versao'] == null) {
            $projeto->setVersao("(Sem Vers&atilde;o)");
        } else {
            $projeto->setVersao($item['versao']);
        }
    }
}