Пример #1
0
 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT mai.*, ci.grupo, e.nome, mi.id_medicao, m.numero FROM " . MYSQL_BASE_MEDICAO_ANEXO_ITENS . " mai, " . MYSQL_BASE_MEDICAO_ITEM . " mi, " . MYSQL_BASE_CONTRATO_ITEM . " ci,\r\n\t\t\t\t\t\t\t\t\t\t" . MYSQL_BASE_EMPRESAS . " e," . MYSQL_BASE_MEDICAO . " m WHERE m.id = mi.id_medicao AND e.id = mai.id_empresa AND mai.id_medicao_item = mi.id AND \r\n\t\t\t\t\t\t\t\t\t\tci.id = mi.id_contrato_item AND mai.status = 'N' AND mai.tipo = 'B' AND m.finalizado = 'N' AND mai.id_superior IS NULL AND mai.dat_aprovado IS NULL AND mai.consideracao_supervisor IS NULl");
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['numero'] . '</td>';
                 echo '	<td>' . $item['grupo'] . '</td>';
                 echo '	<td>' . $item['empresa'] . '</td>';
                 echo '	<td>' . $item['nf_recibo'] . '</td>';
                 echo '	<td>' . number_format($item['valor'], 2, ',', '.') . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if (in_array(176, $permissoes) || in_array(215, $permissoes)) {
                     echo '	<a class="btn btn-info" href="view.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-eye-open icon-white"></i> Visualizar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p->__destruct();
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #2
0
 public function Listar($query = null)
 {
     $acesso = listarAcesso();
     try {
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_FASE_PROJETOS . " WHERE ativo = 'S'");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['codigo'] . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if (in_array(125, $acesso)) {
                     echo ' <a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(126, $acesso)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #3
0
 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_MEDICAO_NAOREEMBOLSAVEL . " WHERE excluido IS NULL ORDER BY id DESC");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td style="display:none;">' . $item['id'] . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if (in_array(270, $permissoes)) {
                     echo '		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(271, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #4
0
 public function Listar($query = null)
 {
     $permissoes = listarAcesso();
     try {
         if ($query == null) {
             $data = Date("Y-m-d");
             $stmt = $this->p->query("SELECT nome, id FROM " . MYSQL_BASE_EMPRESAS . " WHERE ativo='S' ORDER BY id DESC");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if (in_array(224, $permissoes)) {
                     echo '<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(225, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
         }
         $this->p = null;
         return $stmt;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #5
0
 public function Listar($query = null)
 {
     $acesso = listarAcesso();
     try {
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_FERIADOS . " WHERE excluido IS null ORDER BY dia DESC ");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . dataBrasil($item['dia']) . '</td>';
                 echo '		<td>';
                 if (in_array(248, $acesso)) {
                     echo ' 		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(249, $acesso)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #6
0
 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT m.*, p.nome_completo, med.numero, med.id_contrato FROM " . MYSQL_BASE_MEDICAO . " med, " . MYSQL_BASE_MEDICAO_LIBERACAO . " m, " . MYSQL_BASE_PESSOAS . " p WHERE med.id = m.id_medicao AND p.id=m.id_pessoa AND m.status = 'S'");
             $confirm = "return confirm('Deseja remover o acesso?');";
             foreach ($stmt as $item) {
                 if ($item['id_contrato'] == 1) {
                     $contrato = "Contrato";
                 } else {
                     $contrato = "Aditivo";
                 }
                 echo '<tr>';
                 echo '	<td>' . $item['numero'] . ' - ' . $contrato . '</td>';
                 echo '	<td>' . $item['nome_completo'] . '</td>';
                 echo '  <td>';
                 //Verifica se pode editar
                 if (in_array(50, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Remover Acesso';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p->__destruct();
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #7
0
function verificaAlertaMedicao()
{
    connectSQL();
    $msg = "";
    $query = mysql_query("SELECT * FROM " . MYSQL_BASE_MEDICAO_APROVACAO . " WHERE dat_excluido = '0000-00-00 00:00:00'") or die(mysql_error());
    $acesso = listarAcesso();
    if (mysql_num_rows($query) > 0) {
        while ($row = mysql_fetch_array($query)) {
            $data = $row['data'];
            $caminho = $row['caminho'];
            $aprovado = $row['status'];
            switch ($caminho) {
                case 1:
                    $funcionalidade = 41;
                    break;
                case 2:
                    $funcionalidade = 42;
                    break;
                case 3:
                    $funcionalidade = 43;
                    break;
                case 4:
                    $funcionalidade = 46;
                    break;
                case 5:
                    $funcionalidade = 43;
                    break;
                case 6:
                    $funcionalidade = 40;
                    break;
            }
            if ($aprovado == 1) {
                $aprovacao = "";
            } else {
                $aprovacao = "n���������o";
            }
            if (in_array($funcionalidade, $acesso) && date('Y-m-d H:i:s', strtotime("-4 days")) > $data) {
                //&& date('Y-m-d H:i:s', strtotime("-4 days")) > $data
                $num = mysql_num_rows($query);
                if ($num > 1) {
                    if ($funcionalidade == 40) {
                        $msg .= utf8_encode("* A Medi������������������o " . $aprovacao . " foi aprovada.") . '\\n';
                    } else {
                        $msg .= utf8_encode("* Voc��������� possui Medi������������������es para aprovar.") . '\\n';
                    }
                } elseif ($num == 1) {
                    $msg .= utf8_encode("* Voc��������� possui Medi������������������o para aprovar.") . '\\n';
                }
            }
        }
        if (!empty($msg)) {
            echo '<script language= "JavaScript">alert("' . $msg . '");</script>';
        }
    }
}
Пример #8
0
 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             return false;
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p->__destruct();
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #9
0
 public function ListarContratos($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_CONTRATO . " WHERE ativo = 'S' ORDER BY id ASC");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['id'] . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '	<td>';
                 if (in_array(263, $permissoes)) {
                     echo '		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(265, $permissoes)) {
                     echo '		<a class="btn btn-info" href="contratoItem.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Adicionar Itens';
                     echo '		</a>';
                 }
                 if (in_array(264, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #10
0
 public function Listar($query = null)
 {
     $acesso = listarAcesso();
     try {
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_MEDICAO_ACOMPANHAMENTO . " WHERE principal = 'S' and dat_excluido IS NULL");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['grupo'] . '</td>';
                 echo ' 	<td>' . $item['mes'] . '-' . $item['ano'] . '</td>';
                 echo '	<td>' . number_format($item['remuneracao'], 2, ',', '.') . '</td>';
                 echo '	<td>' . number_format($item['reembolso'], 2, ',', '.') . '</td>';
                 echo '		<td>';
                 if (in_array(139, $acesso)) {
                     echo '      <a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(140, $acesso)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #11
0
<?php

include_once '../../includes.sys/ini.php';
include_once INTERNAL_ROOT_PORTAL . '/includes.sys/metodos.php';
include_once INTERNAL_ROOT_PORTAL . '/medicao/DAO/NaoReembolsavelDAO.php';
include_once INTERNAL_ROOT_PORTAL . '/medicao/NaoReembolsavel.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once INTERNAL_ROOT_PORTAL . '/head.php';
if (!in_array(269, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'salvar') {
    $DAO = new NaoReembolsavelDAO();
    $naoreembolsavel = new NaoReembolsavel();
    $naoreembolsavel->setNome($_POST['nome']);
    $naoreembolsavel->setUsuario(userId());
    $resultado = $DAO->Gravar($naoreembolsavel);
    if ($resultado == 1) {
        echo '<script language= "JavaScript">alert("Registro cadastrado com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Erro ao gravar o registro, favor entrar em contato com a TI.");</script>';
    }
}
?>
<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
Пример #12
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(281, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="../documentos/fase_projeto.php";</script>';
}
$projeto = new Projeto();
$DAO = new ProjetoDAO();
?>

<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
		<div class="span2 main-menu-span">
				<?php 
include_once '../menu.php';
?>
			</div>
		<!--/span-->
		<!-- left menu ends -->

		<noscript>
			<div class="alert alert-block span10">
				<h4 class="alert-heading">Warning!</h4>
Пример #13
0
 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_WORK_FLOW_TIPO_DOCUMENTO . " WHERE status = 'S'");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if ($item['editavel'] == 'S') {
                     if (in_array(197, $permissoes)) {
                         echo '		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                         echo '			<i class="icon-edit icon-white"></i> Editar';
                         echo '		</a>';
                     }
                     if (in_array(198, $permissoes)) {
                         echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                         echo '			<i class="icon-trash icon-white"></i> Deletar';
                         echo '		</a>';
                     }
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #14
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');";
Пример #15
0
    ?>
								<div class="control-group">
									<label class="control-label" for="textarea2"><b>T&eacute;cnico</b></label>
									<div class="controls">
										<p style="margin: 4px 0 0 0;"><?php 
    echo $chamadas->getTecnico();
    ?>
</p>
									</div>
								</div>
								<?php 
}
?>
								
								<?php 
if (in_array(216, listarAcesso())) {
    ?>
									<div class="form-actions">
										<input type="hidden" name="cmd" value="atender"> 
										<input type="hidden" name="id" value="<?php 
    echo $chamadas->getId();
    ?>
">
										<?php 
    $iniciaAtd = mysql_query("SELECT id_chamada FROM " . MYSQL_BASE_CHAMADAS_ATENDIMENTO . " WHERE id_chamada = " . $item['id'] . " AND dat_final IS NULL");
    $num = mysql_num_rows($iniciaAtd);
    ?>
										
										<button type="submit" class="btn btn-primary" <?php 
    if ($num > 0) {
        echo 'style="display:none"';
Пример #16
0
 public function Listar($query = null)
 {
     $acesso = listarAcesso();
     try {
         if ($query == null) {
             $stmt = $this->p->query("SELECT \r\n\t\t\t\t\t\t\t\t\t\t\tCK.id, \r\n\t\t\t\t\t\t\t\t\t\t\tCK.aprovado,\r\n\t\t\t\t\t\t\t\t\t\t\tCK.nome_arquivo,\r\n\t\t\t\t\t\t\t\t\t\t\tD.nome as disciplina,\r\n\t\t\t\t\t\t\t\t\t\t\tFP.nome as fase,\r\n\t\t\t\t\t\t\t\t\t\t\tPO.nome as obra\r\n\t\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\t\t\t" . MYSQL_BASE_CHECK_LISTS . " CK\r\n\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_DISCIPLINAS . " D ON D.id = CK.id_disciplina\r\n\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_FASE_PROJETOS . " FP ON FP.id = CK.id_fase_projeto\r\n\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_PROJETO_OBRA . " PO ON PO.id = CK.id_obra_codigo\r\n\t\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\t\tCK.status = 'A' AND \r\n\t\t\t\t\t\t\t\t\t\t\tCK.aprovado_por=1 AND CK.\r\n\t\t\t\t\t\t\t\t\t\t\tativo = 'S'\r\n\t\t\t\t\t\t\t\t\t\tORDER BY CK.id DESC");
             $ordem = 0;
             $confirm = "return confirm('Deseja remover esse registro?');";
             $liberar = "return confirm('Deseja liberar esse registro?');";
             foreach ($stmt as $item) {
                 $nome_arquivo = explode(".", $item['nome_arquivo']);
                 $query2 = mysql_query("SELECT id_remessa_lista \r\n\t\t\t\t\t\t\t\t\t\t\tFROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " \r\n\t\t\t\t\t\t\t\t\t\t   WHERE \r\n\t\t\t\t\t\t\t\t\t\t\t\tfile LIKE '%" . $item['nome_arquivo'] . "' \r\n\t\t\t\t\t\t\t\t\t\t\tAND excluido IS NULL \r\n\t\t\t\t\t\t\t\t\t\t   LIMIT 1");
                 $lista = "";
                 while ($row = mysql_fetch_array($query2)) {
                     $lista = $row['id_remessa_lista'];
                 }
                 echo '<tr>';
                 echo '	<td style="display:none">' . $ordem . '</td>';
                 echo '	<td>' . $item['id'] . '</td>';
                 echo '	<td>' . dataBrasil($item['aprovado'], false) . '</td>';
                 echo '	<td> <a href="../../arquivos/' . $item['nome_arquivo'] . '" target="_blank"> ' . $nome_arquivo[0] . '</a></td>';
                 echo '	<td data-rel="popover" data-content="<b>Verificador:</b> ' . $item['nome_verificador'] . '<br><b>Aprovador:</b> ' . $aprovador . '" title="Respons&aacute;veis">' . $item['disciplina'] . '</td>';
                 echo '	<td>' . $item['fase'] . '</td>';
                 echo '	<td>' . $item['obra'] . '</td>';
                 echo '	<td>' . $lista . '</td>';
                 echo '	<td>';
                 $query2 = mysql_query("SELECT * FROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " WHERE file LIKE '%" . $item['nome_arquivo'] . "' AND excluido IS NULL LIMIT 1");
                 $lista = "";
                 while ($row = mysql_fetch_array($query2)) {
                     $lista = $row['id'];
                 }
                 if (in_array(136, $acesso)) {
                     echo '		<a class="btn btn-success" target="_blank" href="../checklists/print.php?id=' . $item['id'] . '">';
                     echo '			<i data-rel="tooltip" title="Imprimir AC" class="icon-print icon-white"></i>';
                     echo '		</a>';
                 }
                 if ($item['disponivel'] == "N") {
                     echo '		<a data-rel="tooltip" class="btn btn-info" onclick="' . $liberar . '" href="index.php?cmd=liberar&id=' . $item['id'] . '" data-original-title="' . utf8_encode('Liberar Visualiza&ccedil;&atilde;o') . '">';
                     echo '			<i class="icon-ok icon-white"></i>';
                     echo '		</a>';
                 } else {
                     echo '		<a data-rel="tooltip" class="btn btn-warning" onclick="' . $liberar . '" href="index.php?cmd=liberar&id=' . $item['id'] . '" data-original-title="' . utf8_encode('Bloquear Visualiza&ccedil;&atilde;o') . '">';
                     echo '			<i class="icon-remove icon-white"></i>';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
                 $ordem = $ordem + 1;
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p->__destruct();
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #17
0
        $query2 = mysql_query("SELECT id_remessa_lista \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id = " . $item['id_remessa_arquivo'] . " LIMIT 1");
        $lista = "";
        while ($row = mysql_fetch_array($query2)) {
            $lista = $row['id_remessa_lista'];
        }
        echo '<tr>';
        echo '	<td>' . $item['id'] . '</td>';
        echo '	<td>' . dataBrasil($item['aprovado'], false) . '</td>';
        echo '	<td><a href="../../arquivos/' . $item['nome_arquivo'] . '" target="_blank"> ' . $nome_arquivo[0] . '</a></td>';
        echo '	<td data-rel="popover" data-content="<b>Verificador:</b> ' . $item['nome_verificador'] . '<br><b>Aprovador:</b> ' . $aprovador . '" title="Respons&aacute;veis">' . $item['disciplina'] . '</td>';
        echo '	<td>' . $item['fase'] . '</td>';
        echo '	<td>' . $item['obra'] . '</td>';
        echo '	<td>' . $lista . '</td>';
        echo '	<td>' . $status . '</td>';
        echo '	<td>';
        if (in_array(183, listarAcesso())) {
            echo $visualizar;
        }
        echo '	</td>';
        echo '</tr>';
    }
} else {
    echo '<script language= "JavaScript">alert("Nenhum registro encontrado.");</script>';
    echo '<script language= "JavaScript">location.href="pesquisa.php";</script>';
}
?>
						  </tbody>
					  </table>            
					</div>
				</div>
			</div>
Пример #18
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/CartaDAO.php';
include_once '../Documento.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(72, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$projeto = new Documento();
$DAO = new CartaDAO();
?>

<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
		<div class="span2 main-menu-span">
				<?php 
include_once '../menu.php';
?>
			</div>
		<!--/span-->
		<!-- left menu ends -->

		<noscript>
			<div class="alert alert-block span10">
				<h4 class="alert-heading">Warning!</h4>
Пример #19
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/ContratoDAO.php';
include_once '../Contrato.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$acesso = listarAcesso();
if (!in_array(111, $acesso)) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/projeto/documentos/fase_projeto.php";</script>';
}
$contrato = new Contrato();
$DAO = new ContratoDAO();
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);
    }
}
?>
	<!-- topbar ends -->
		<div class="container-fluid">
		<div class="row-fluid">
				
			<!-- left menu starts -->
			<div class="span2 main-menu-span">
Пример #20
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));
    }
}
?>
Пример #21
0
 public function ListarProduto($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $data = Date("Y-m-d");
             $stmt = $this->p->query("SELECT id,\r\n\t\t\t\t\t\tnome,\r\n\t\t\t\t\t\tproduto,\r\n\t\t\t\t\t\tdat_previsto,\r\n\t\t\t\t\t\tstatus\r\n\t\t\t\t\t\tFROM " . MYSQL_BASE_PRODUTOS . " A\r\n\t\t\t\t\t\tWHERE dat_excluido IS NULL\r\n\t\t\t\t\t\tORDER BY id DESC");
             foreach ($stmt as $item) {
                 $confirm = "return confirm('Deseja remover esse registro?');";
                 switch ($item['status']) {
                     case '0':
                         $status = 'A Executar';
                         $class = 'label';
                         break;
                     case '1':
                         $status = 'Em Analise';
                         $class = 'label label-warning';
                         break;
                     case '2':
                         $status = 'Aprovado';
                         $class = 'label label-success';
                         break;
                     case '3':
                         $status = 'Reprovado';
                         $class = 'label label-important';
                         break;
                 }
                 echo '<tr>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '	<td>' . $item['produto'] . '</td>';
                 echo '	<td>' . dataBrasil($item['dat_previsto'], 0) . '</td>';
                 echo '	<td> <span class="' . $class . '">' . $status . '</span></td>';
                 echo '	<td>';
                 //Verifica se pode visualizar
                 if (in_array(75, $permissoes)) {
                     echo '		<a data-rel="tooltip" title="Visualizar" class="btn btn-success" href="view.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-eye-open icon-white"></i>';
                     echo '		</a>';
                 }
                 //Verifica se pode editar
                 if (in_array(76, $permissoes)) {
                     echo '		<a data-rel="tooltip" title="Editar" class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i>';
                     echo '		</a>';
                 }
                 //Verifica se pode excluir
                 if (in_array(77, $permissoes)) {
                     echo '		<a data-rel="tooltip" title="Deletar" class="btn btn-danger"  onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i>';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
         }
         $this->p->__destruct();
         return $stmt;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #22
0
 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $data = Date("Y-m-d");
             $stmt = $this->p->query("SELECT A.id, A.codigo, A.nome, B.nome AS fornecedor, C.nome_completo AS pessoa\r\n\t\t\t\t\t\t\t\t\t\t\tFROM tb_patrimonio A\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN tb_fornecedor B ON A.id_fornecedor = B.id\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN tb_pessoa \t C ON A.id_pessoa = C.id\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE A.dat_Exclusao = '0000-00-00 00:00:00'\r\n\t\t\t\t\t\t\t\t\t\t\tORDER BY A.id DESC");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['codigo'] . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '	<td>' . $item['fornecedor'] . '</td>';
                 echo '	<td>' . $item['pessoa'] . '</td>';
                 echo '	<td>';
                 //Verifica se pode editar
                 if (in_array(10, $permissoes)) {
                     echo '		<a class="btn btn-success" href="view.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-eye-open icon-white"></i> Visualizar';
                     echo '		</a>';
                 }
                 //Verifica se pode editar
                 if (in_array(8, $permissoes)) {
                     echo '		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 //Verifica se pode excluir
                 if (in_array(9, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
         }
         $this->p->__destruct();
         return $stmt;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
Пример #23
0
<?php

include_once '../../includes.sys/ini.php';
include_once INTERNAL_ROOT_PORTAL . '/includes.sys/metodos.php';
include_once INTERNAL_ROOT_PORTAL . '/ged/DAO/DocumentoDAO.php';
include_once INTERNAL_ROOT_PORTAL . '/ged/Documento.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once INTERNAL_ROOT_PORTAL . '/head.php';
if (!in_array(66, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$documento = new Documento();
$DAO = new DocumentoDAO();
$id = limpaTexto($_GET['id']);
$resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_ATAS . " WHERE id =" . $id . " LIMIT 1");
if ($resultado) {
    foreach ($resultado as $item) {
        $documento->setId($item['id']);
        $documento->setCodGRD($item['cod_ata']);
    }
} else {
    $documento->setId("");
    $documento->setCodGRD("");
}
//Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'finaliza') {
    $documento->setDataEntrega($_POST['dat_entrega'], "converter");
    $id = $documento->getId();
    $dat_entrega = $documento->getDataEntrega();
    //Verifica se o nome foi preenchido
    if (!empty($id)) {
Пример #24
0
echo $titulo;
?>
					</li>
				</ul>
			</div>
			
			<div class="row-fluid">
				<div class="box span12">
					<div class="box-header well">
						<h2><i class="icon-file"></i> <?php 
echo $titulo;
?>
</h2>
						<div class="box-icon">
							<?php 
if (in_array(160, listarAcesso())) {
    ?>
							<a class="btn btn-info" href="new.php">
								<i class="icon-plus icon-white"></i>                                  
							</a>
							<?php 
}
?>
						</div>
					</div>
					<div class="box-content">
						<table class="table table-striped table-bordered bootstrap-datatable datatable">
						  <thead>
							  <tr>
								  <th width="10%">C&oacute;digo</th>
								  <th>Nome</th>
Пример #25
0
<?php

$permissoes = listarAcesso();
?>

<ul class="nav nav-tabs nav-stacked main-menu">
	<li class="nav-header hidden-tablet">Menu</li>
	
	<?php 
if (in_array(242, $permissoes) || in_array(237, $permissoes)) {
    ?>
	<li><a class="ajax-link"
		href="<?php 
    echo EXTERNAL_ROOT_PORTAL . '/licitacao/processo_licitatorio/edit.php?id=1';
    ?>
"> <i
			class="icon-folder-close"></i> <span class="hidden-tablet">Audi&ecirc;ncia P&uacute;blica</span>
	</a></li>
	<?php 
}
?>
	
	<?php 
if (in_array(238, $permissoes) || in_array(237, $permissoes)) {
    ?>
	<li><a class="ajax-link"
		href="<?php 
    echo EXTERNAL_ROOT_PORTAL . '/licitacao/processo_licitatorio/edit.php?id=2';
    ?>
"> <i
			class="icon-folder-close"></i> <span class="hidden-tablet">Procedimento Licitat&oacute;rio</span>
Пример #26
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(309, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="../documentos/fase_projeto.php";</script>';
}
$projeto = new Projeto();
$DAO = new ProjetoDAO();
connectSQL();
?>

<script type="text/javascript">
function changeAction()
{
	if($('input[name=finaliza]:checked').val() == 'S'){
		document.getElementById("search-theme-form").action = 'relatorio_analitico_finalizados.php';
	}else{
		document.getElementById("search-theme-form").action = 'relatorio_sintetico_finalizados.php';
	}
}
</script>
<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
Пример #27
0
<?php

include_once '../../includes.sys/ini.php';
include_once INTERNAL_ROOT_PORTAL . '/includes.sys/metodos.php';
include_once INTERNAL_ROOT_PORTAL . '/medicao/DAO/AnexoItemDAO.php';
include_once INTERNAL_ROOT_PORTAL . '/medicao/AnexoItem.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once INTERNAL_ROOT_PORTAL . '/head.php';
if (!in_array(53, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$anexoItem = new AnexoItem();
?>
<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
		<div class="span2 main-menu-span">
				<?php 
include_once INTERNAL_ROOT_PORTAL . '/medicao/menu.php';
?>
			</div>
		<!--/span-->
		<!-- left menu ends -->

		<noscript>
			<div class="alert alert-block span10">
				<h4 class="alert-heading">Warning!</h4>
				<p>
					You need to have <a href="http://en.wikipedia.org/wiki/JavaScript"
Пример #28
0
    $query2 = mysql_query("SELECT id_remessa_lista FROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " WHERE file LIKE '%" . $item['nome_arquivo'] . "' AND excluido IS NULL LIMIT 1");
    $lista = "";
    while ($row = mysql_fetch_array($query2)) {
        $lista = $row['id_remessa_lista'];
    }
    echo '<tr>';
    echo '	<td style="display:none">' . $ordem . '</td>';
    echo '	<td>' . $item['id'] . '</td>';
    echo '	<td>' . dataBrasil($item['aprovado'], false) . '</td>';
    echo '	<td> <a href="../../arquivos/' . $item['nome_arquivo'] . '" target="_blank"> ' . $nome_arquivo[0] . '</a></td>';
    echo '	<td>' . $item['disciplina'] . '</td>';
    echo '	<td>' . $item['fase'] . '</td>';
    echo '	<td>' . $item['obra'] . '</td>';
    echo '	<td>' . $lista . '</td>';
    echo '	<td>';
    if (in_array(179, listarAcesso())) {
        echo $visualizar;
    }
    echo '	</td>';
    echo '</tr>';
    $ordem = $ordem + 1;
}
?>
						  </tbody>
					  </table>            
					</div>
				</div>
			</div>
					
					<!-- content ends -->
			</div><!--/#content.span10-->
Пример #29
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/EquipamentoDAO.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(295, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$DAO = new EquipamentoDAO();
if (!empty($_GET['cmd']) && $_GET['cmd'] == 'del') {
    $id = ValidateInteger(INPUT_GET, 'id');
    $retorno = $DAO->Deletar($id);
    if ($retorno == 1) {
        echo '<script language= "JavaScript">alert("Registro removido com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Erro ao remover o registro");</script>';
    }
}
?>
	<!-- topbar ends -->
		<div class="container-fluid">
		<div class="row-fluid">
				
			<!-- left menu starts -->
			<div class="span2 main-menu-span">
				<?php 
include_once '../menu.php';
?>
Пример #30
0
 public function Listar($query = null)
 {
     $acesso = listarAcesso();
     try {
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_RELACIONAMENTO_GED . " WHERE dat_excluido = '0000-00-00 00:00:00'");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . strip_tags($item['descricao']) . '</td>';
                 echo '		<td>';
                 if (in_array(100, $acesso)) {
                     echo '		<a data-rel="tooltip" title="Visualizar" class="btn btn-success" href="view.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-eye-open icon-white"></i>';
                     echo '		</a>';
                 }
                 if (in_array(97, $acesso)) {
                     echo '		<a data-rel="tooltip" title="Editar" class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i>';
                     echo '		</a>';
                 }
                 if (in_array(97, $acesso)) {
                     echo '		<a data-rel="tooltip" title="Deletar" class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i>';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p->__destruct();
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }