Example #1
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/WorkFlowDAO.php';
include_once '../WorkFlow.class.php';
include_once '../Fluxo.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$acesso = listarAcesso();
if (!in_array(19, $acesso)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
$DAO = new WorkFlowDAO();
$fluxo = new Fluxo();
if (!empty($_GET['cmd']) && $_GET['cmd'] == 'del') {
    $id = ValidateInteger(INPUT_GET, 'id');
    $retorno = $DAO->Deletar($id);
    if ($retorno == 1) {
        echo '<script language= "JavaScript">alert("Categoria removido com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        print_r($retorno);
    }
}
$pessoa = $DAO->Listar("SELECT id_setor FROM " . MYSQL_BASE_RESPONSAVEIS . " WHERE id_pessoa = " . userId() . " AND dat_excluido IS NULL");
foreach ($pessoa as $item) {
    $fluxo->setIdSetor($item['id_setor']);
}
?>
	<!-- topbar ends -->
Example #2
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/WorkFlowDAO.php';
include_once '../WorkFlow.class.php';
include_once '../Fluxo.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$acesso = listarAcesso();
if (!in_array(189, $acesso)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
$DAO = new WorkFlowDAO();
$fluxo = new Fluxo();
if (!empty($_GET['cmd']) && $_GET['cmd'] == 'del') {
    $id = ValidateInteger(INPUT_GET, 'id');
    $retorno = $DAO->Deletar($id);
    if ($retorno == 1) {
        echo '<script language= "JavaScript">alert("Categoria removido com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        print_r($retorno);
    }
}
$pessoa = $DAO->Listar("SELECT id_setor FROM " . MYSQL_BASE_RESPONSAVEIS . " WHERE id_pessoa = " . userId() . " AND dat_excluido IS NULL");
foreach ($pessoa as $item) {
    $fluxo->setIdSetor($item['id_setor']);
}
?>
	<!-- topbar ends -->
Example #3
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/WorkFlowDAO.php';
include_once '../WorkFlow.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$DAO = new WorkFlowDAO();
$resultado = $DAO->Listar("SELECT \r\n\t\t\t\t\t\t\t\tE.id \r\n\t\t\t\t\t\t\tFROM " . MYSQL_BASE_PESSOAS . " P \r\n\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_CARGOS . " C ON C.id = P.id_cargo\r\n\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_EMPRESAS . " E ON E.id = C.id_empresa\r\n\t\t\t\t\t\t\tWHERE P.id = " . userId());
$id_empresa = 0;
foreach ($resultado as $item) {
    $id_empresa = $item['id'];
}
$query = "SELECT A.*,\r\n\t\t\t\tD.assunto,\r\n\t\t\t\tC.criado,\r\n\t\t\t\tC.id as fid,\r\n\t\t\t\tE.nome as disciplina,\r\n\t\t\t\tF.nome as obra\r\n\t\t\tFROM tb_work_flow A\r\n\t\t\tINNER JOIN tb_work_flow_tipo_documento B\tON B.id = A.id_tipo_documento\r\n\t\t\tINNER JOIN tb_work_flow_fluxo C \t\t\tON C.id_work_flow = A.id\r\n\t\t\tINNER JOIN tb_documento D \t\t\t\t\tON D.id = A.id_documento\r\n\t\t\tLEFT JOIN tb_disciplina E \t\t\t\t\tON E.codigo = SUBSTRING(D.cod_documento, 23, 3)\r\n\t\t\tLEFT JOIN tb_projeto_obra F \t\t\t\tON F.codigo = SUBSTRING(D.cod_documento, 13, 3)\r\n\t\t\tWHERE C.id_pessoa > 0 ";
if ($id_empresa == 1 || $id_empresa == 3) {
    $query = $query . " ";
} else {
    $query = $query . " AND (C.id_setor = (SELECT DISTINCT id_setor as id FROM " . MYSQL_BASE_PESSOAS . " WHERE id=" . userId() . ") OR\r\n\t\tC.id_setor_despachou = (SELECT DISTINCT id_setor as id FROM " . MYSQL_BASE_PESSOAS . " WHERE id=" . userId() . "))";
}
/*
 Verifica o codigo
*/
if ($_GET['codigo'] != '') {
    $query = $query . " AND A.id = " . $_GET['codigo'];
}
/*
 * Verifica o documento
*/
if ($_GET['documento'] > 0) {
    $query = $query . " AND A.id_tipo_documento = " . $_GET['documento'];
Example #4
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/WorkFlowDAO.php';
include_once '../WorkFlow.class.php';
include_once '../Fluxo.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$permissoes = listarAcesso();
if (!in_array(200, $permissoes)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
$DAO = new WorkFlowDAO();
$fluxo = new Fluxo();
if (!empty($_GET['cmd']) && $_GET['cmd'] == 'reat') {
    $id = ValidateInteger(INPUT_GET, 'id');
    $retorno = $DAO->ReativarDespacho($id);
    if ($retorno == 1) {
        echo '<script language= "JavaScript">alert("Despacho reativado com Sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        print_r($retorno);
    }
}
$setor = $DAO->Listar("SELECT id_setor FROM " . MYSQL_BASE_PESSOAS . " WHERE id= " . $userID);
$id_setor = 1;
foreach ($setor as $item) {
    $id_setor = $item['id_setor'];
}
//$pessoa = $DAO->Listar("SELECT id_setor FROM ".MYSQL_BASE_RESPONSAVEIS." WHERE id_pessoa = ".userId()." AND dat_excluido IS NULL");
Example #5
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/WorkFlowDAO.php';
include_once '../WorkFlow.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$pedido = new WorkFlow();
$DAO = new WorkFlowDAO();
// if(!in_array(212, listarAcesso())){
// 	echo '<script language= "JavaScript">location.href="'.EXTERNAL_ROOT_PORTAL.'/modulos.php";</script>';
// }
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $pedido->setLista($_POST['lista']);
    $pedido->setAssunto(limpaTexto($_POST['assunto']));
    $lista_info = $DAO->Listar("SELECT rl.*, nome_completo as responsavel FROM " . MYSQL_BASE_REMESSA_LISTAS . " rl\r\n\t\t\t\t\t\t\t\tINNER JOIN \r\n\t\t\t\t\t\t\t\t\t" . MYSQL_BASE_PESSOAS . " p ON rl.id_usuario = p.id \r\n\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\texcluido IS NULL AND rl.id= " . $pedido->getLista());
    foreach ($lista_info as $lista) {
        $pedido->setResponsavel($lista['id_usuario']);
        $pedido->setEmpresa($lista['id_empresa']);
        $pedido->setUsuario($lista['responsavel']);
    }
    if ($pedido->getLista() != '') {
        if ($pedido->getAssunto() != '') {
            $retorno = $DAO->Gravar($pedido);
            if ($retorno > 0) {
                $post = $_POST;
                foreach (array_keys($post) as $row) {
                    $explode = explode("-", $row);
                    if ($explode[0] == 'pergunta' && !empty($post[$row]) && $post['selecionado' . $explode[1]] == '1') {
                        $pedido->setPedidoInformacao($retorno);
Example #6
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/WorkFlowDAO.php';
include_once '../WorkFlow.class.php';
include_once '../Fluxo.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(195, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
$DAO = new WorkFlowDAO();
$fluxo = new Fluxo();
if (!empty($_GET['cmd']) && $_GET['cmd'] == 'del') {
    $id = limpaTexto($_GET['id']);
    $retorno = $DAO->DeletarFluxo($id);
    if ($retorno == 1) {
        echo '<script language= "JavaScript">alert("Registro cancelado com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="respEdit.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Erro ao cancelar o registro");</script>';
    }
}
$user = userId();
$pessoa = $DAO->Listar("SELECT id_setor FROM " . MYSQL_BASE_RESPONSAVEIS . " WHERE id_pessoa = " . $user . " AND dat_excluido IS NULL");
foreach ($pessoa as $item) {
    $fluxo->setIdSetor($item['id_setor']);
}
?>
	<!-- topbar ends -->
Example #7
0
include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/WorkFlowDAO.php';
include_once '../WorkFlow.class.php';
include_once '../Fluxo.class.php';
include_once '../../mensagem/DAO/MensagemDAO.php';
include_once '../../mensagem/Mensagem.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(189, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$workFlow = new WorkFlow();
$fluxo = new Fluxo();
$DAO = new WorkFlowDAO();
$DAO_MSG = new MensagemDAO();
$mensagem = new Mensagem();
//Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $user = userId();
    $workFlow->setDocumento($_POST['documento']);
    $workFlow->setTipoDocumento($_POST['tipodocumento']);
    $workFlow->setIsProjeto($_POST['is_projeto']);
    $workFlow->setIdCarta($_POST['carta']);
    $fluxo->setIdPessoaDespachou($user);
    $res = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_PESSOAS . " WHERE id = " . $user);
    foreach ($res as $item) {
        $fluxo->setIdSetorDespachou($item['id_setor']);
    }
    if ($workFlow->getIsProjeto() == 'S') {