<thead> <tr> <th style="display:none">Ordem</th> <th nowrap>Código</th> <th nowrap>Analisado</th> <th nowrap>Nome</th> <th nowrap>Disciplina</th> <th nowrap>Fase do Projeto</th> <th nowrap>Obra</th> <th nowrap>Lista</th> <th nowrap>Ação</th> </tr> </thead> <tbody> <?php $retorno = $DAO->listar("SELECT \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tA.id, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tA.aprovado,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tA.nome_arquivo,\r\n\t\t\t\t\t\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\t\t\t\t\t\tE.nome as fase,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tF.nome as obra\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . MYSQL_BASE_CHECK_LISTS . " A\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_PROJETOS . " B \t\tON A.id = B.id_check_list\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_DISCIPLINAS . " D\t\tON A.id_disciplina = D.id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_FASE_PROJETOS . " E\tON E.id = A.id_fase_projeto\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_PROJETO_OBRA . " F\tON F.id = A.id_obra_codigo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tA.status ='O'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY A.id DESC"); $ordem = 0; foreach ($retorno as $item) { $nome_arquivo = explode(".", $item['nome_arquivo']); $visualizar = ' <a data-rel="tooltip" title="Imprimir AC" class="btn btn-success" target="_blank" href="../checklists/print.php?id=' . $item['id'] . '"><i class="icon-print icon-white"></i></a>'; $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>';
<th nowrap>Nome</th> <th nowrap>Disciplina</th> <th nowrap>Fase do Projeto</th> <th nowrap>Obra</th> <th nowrap>Lista</th> <th nowrap>Status</th> <th nowrap>Ação</th> </tr> </thead> <tbody> <?php $inicio = $pagina * $qnt - $qnt; $limit = "LIMIT " . $inicio . ", " . $qnt; $order_by = " ORDER BY CK.id DESC "; $query = "SELECT \r\n\t\t\t\t\t\t\t\t\t\t\t\tCK.*,\r\n\t\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\t\tFP.nome as fase,\r\n\t\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\t\t\tRA.id_remessa_lista\r\n\t\t\t\t\t\t\t\t\t\t\tFROM \r\n\t\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\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\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\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\t\t\tINNER JOIN " . MYSQL_BASE_REMESSA_ARQUIVOS . " RA ON RA.id = CK.id_remessa_arquivo\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\t\t\tCK.status != '' AND \r\n\t\t\t\t\t\t\t\t\t\t\t\tCK.ativo = 'S' " . $where; $retorno = $DAO->listar($query . $order_by . $limit); foreach ($retorno as $item) { $nome_arquivo = explode(".", $item['nome_arquivo']); if ($item['status'] == 'A') { $status = '<span class="label label-success">Aprovado</span>'; $visualizar = ' <a data-rel="tooltip" data-original-title="Imprimir AC" class="btn btn-success" target="_blank" href="print.php?id=' . $item['id'] . '"><i class="icon-print icon-white"></i></a>'; } elseif ($item['status'] == 'AC') { $status = '<span class="label label-warning">Aprovado com Comentário</span>'; $visualizar = ' <a data-rel="tooltip" data-original-title="Imprimir AC" class="btn btn-success" target="_blank" href="print.php?id=' . $item['id'] . '"><i class="icon-print icon-white"></i></a>'; } elseif ($item['status'] == 'C') { $status = '<span class="label label-warning">Cancelado</span>'; $visualizar = ' <a data-rel="tooltip" data-original-title="Imprimir AC" class="btn btn-danger" target="_blank" href="print.php?id=' . $item['id'] . '"><i class="icon-print icon-white"></i></a>'; } elseif ($item['status'] == 'R') { $obs = 'data-rel="popover" data-content="' . strip_tags($item['consideracoes']) . '" title="Motivo"'; $status = '<span class="label label-important" ' . strip_tags($obs) . '>Reprovado</span>'; $visualizar = ' <a data-rel="tooltip" data-original-title="Imprimir AC" class="btn btn-success" target="_blank" href="print.php?id=' . $item['id'] . '"><i class="icon-print icon-white"></i></a>';
<thead> <tr> <th style="display:none">Ordem</th> <th nowrap>Código</th> <th nowrap>Nome</th> <th nowrap>Lista</th> <th nowrap>Data da verificação</th> <th nowrap>Disciplina</th> <th nowrap>Fase</th> <th nowrap>Obra</th> <th nowrap>Ação</th> </tr> </thead> <tbody> <?php $DAO->listar(); ?> </tbody> </table> </div> </div> </div> <!-- content ends --> </div><!--/#content.span10--> </div><!--/fluid-row--> <hr> <?php include_once '../../footer.php';
<table class="table table-striped table-bordered bootstrap-datatable datatable"> <thead> <tr> <th>Obra</th> <th>Fase do Projeto</th> <th>Disciplina</th> <th>Tipo de Documento</th> <th>Quantidade</th> <th>Versão</th> <th width="10%">Status</th> <th width="35%">Ação</th> </tr> </thead> <tbody> <?php $resultado = $DAO->listar("SELECT \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t A.*,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t C.nome as nome_disciplina,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t D.id_remessa_lista as lista,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tD.revisao,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tC.nome as disciplina,\r\n\t\t\t\t\t\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\t\t\t\t\t\t\tFP.nome as fase,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTD.nome as tipo,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCOUNT(A.id) as quantidade\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t " . MYSQL_BASE_CHECK_LISTS . " A\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_DISCIPLINAS . " C \tON A.id_disciplina = C.id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_PROJETO_OBRA . " PO \tON PO.id = A.id_obra_codigo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_FASE_PROJETOS . " FP \tON FP.id = A.id_fase_projeto\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_TIPO_DOCUMENTOS . " TD ON TD.id = A.id_tipo_documento\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN " . MYSQL_BASE_REMESSA_ARQUIVOS . " D ON D.file = CONCAT('../', A.nome_arquivo)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t A.status = '' AND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tA.ativo != 'N' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tD.excluido IS NULL AND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tA.aprovado IS NULL\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGROUP BY A.id_obra_codigo, A.id_fase_projeto, A.id_tipo_documento, A.id_disciplina"); connectSQL(); $query = mysql_query("SELECT * FROM " . MYSQL_BASE_RESPONSAVEL_DISCIPLINA . " WHERE excluido IS NULL AND aprovador_verificador = 'A' AND verificador = " . userId()); $array = array(); while ($row = mysql_fetch_array($query)) { $array[] = $row['id_disciplina']; } $confirm = "return confirm('Deseja remover esse registro?');"; foreach ($resultado as $item) { $nome_arquivo = explode(".", $item['nome_arquivo']); if ($item['aprovado_por'] == 1) { $btn_arpovar = ''; $status = '<span class="label label-success">Aprovado</span>'; $btn_editar = ""; $deletar = ''; $visualizar = ' <a class="btn btn-success" href="view.php?id=' . $item['id'] . '"><i class="icon-eye-open icon-white"></i> Visualizar</a>';
<thead> <tr> <th style="display:none">Ordem</th> <th nowrap>Código</th> <th nowrap>Analisado</th> <th nowrap>Nome</th> <th nowrap>Disciplina</th> <th nowrap>Fase do Projeto</th> <th nowrap>Obra</th> <th nowrap>Lista</th> <th nowrap>Ação</th> </tr> </thead> <tbody> <?php $retorno = $DAO->listar("SELECT \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCK.id, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCK.aprovado,\r\n\t\t\t\t\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\t\t\t\t\tD.nome as disciplina,\r\n\t\t\t\t\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\t\t\t\t\tPO.nome as obra\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\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\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\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\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\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCK.status = 'AC' AND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCK.aprovado_por=3 AND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCK.ativo = 'S'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY CK.id DESC"); $ordem = 0; foreach ($retorno as $item) { $nome_arquivo = explode(".", $item['nome_arquivo']); $lista = ""; $query2 = mysql_query("SELECT id_remessa_lista FROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " WHERE file LIKE '%" . $item['nome_arquivo'] . "' AND excluido IS NULL LIMIT 1"); while ($row = mysql_fetch_array($query2)) { $lista = $row['id_remessa_lista']; } $visualizar = ' <a data-rel="tooltip" title="Imprimir AC" class="btn btn-success" target="_blank" href="print.php?id=' . $item['id'] . '"><i class="icon-print icon-white"></i></a>'; 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>';