예제 #1
0
파일: index.php 프로젝트: hexti/troncal
							  	 <th style="display: none;" width="10%"nowrap>DATA PARA ORDENAR</th>
								  <th>Nome</th>
								  <th>Disciplina</th>
								  <th>Verificador</th>
								  <th>Aprovador</th>
								  <th>Criado</th>
								  <th>Quantidade</th>
								  <th>Status</th>
								  <th>Usu&aacute;rio</th>
								  <th>Empresa</th>
								  <th nowrap>A&ccedil;&atilde;o</th>
							  </tr>
						  </thead>   
						  <tbody>
							<?php 
$resultado = $DAO->listar("SELECT rl.*, p.nome_completo,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(SELECT COUNT(id) FROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " WHERE id_remessa_lista = rl.id) as total,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(SELECT nome FROM " . MYSQL_BASE_EMPRESAS . " WHERE id = rl.id_empresa) as nome\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\tFROM " . MYSQL_BASE_REMESSA_LISTAS . " rl, " . MYSQL_BASE_PESSOAS . " p WHERE rl.excluido IS NULL AND p.id = rl.id_usuario ORDER BY rl.criado DESC");
$count = 0;
foreach ($resultado as $item) {
    $query = mysql_query("SELECT\r\n\t\t\t\t\t\t\t\t\t\t\tD.nome,\r\n\t\t\t\t\t\t\t\t\t\t\tD.id,\r\n\t\t\t\t\t\t\t\t\t\t\tP.nome_completo AS verificador\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_REMESSA_ARQUIVOS . " RA\r\n\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_DISCIPLINAS . " D ON D.codigo = SUBSTRING(REPLACE(RA.file, '../', ''), 23, 3)\r\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN " . MYSQL_BASE_RESPONSAVEL_DISCIPLINA . " RD ON RD.id_disciplina = D.id AND RD.aprovador_verificador = 'V'\r\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN " . MYSQL_BASE_PESSOAS . " P\tON P.id = RD.verificador\r\n\t\t\t\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\t\t\t\tRA.id_remessa_lista = " . $item['id'] . "\r\n\t\t\t\t\t\t\t\t\t\t\tAND RD.excluido IS NULL\r\n\t\t\t\t\t\t\t\t\t\tGROUP BY D.nome");
    $disciplina = " ";
    while ($row = mysql_fetch_array($query)) {
        $disciplina .= " " . $row['nome'] . ',';
        $verificador = $row['verificador'];
        $query_aprovador = mysql_query("SELECT B.nome_completo AS verificador\r\n\t\t\t\t\t\t\t\t\t\t\tFROM " . MYSQL_BASE_RESPONSAVEL_DISCIPLINA . " A\r\n\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_PESSOAS . " B ON A.verificador = B.id\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE A.excluido IS NULL\r\n\t\t\t\t\t\t\t\t\t\t\tAND A.aprovador_verificador = 'A'\r\n\t\t\t\t\t\t\t\t\t\t\tAND A.id_disciplina = " . $row['id'] . "\r\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1");
        while ($row = mysql_fetch_array($query_aprovador)) {
            $aprovador = $row['verificador'];
        }
    }
    $disciplina = substr($disciplina, 0, -1);
    $nome = utf8_encode("Consórcio Troncal");
    if ($item['nome'] != NULL) {
예제 #2
0
파일: index.php 프로젝트: hexti/troncal
								  <th>Obra</th>
								  <th>Fase do Projeto</th>
								  <th>Disciplina</th>
								  <th>Tipo de Documento</th>
								  <th>Verificador</th>
								  <th>Aprovador</th>
								  <th>Criado</th>
								  <th>Quantidade</th>
								  <th>Usu&aacute;rio</th>
								  <th>Empresa</th>
								  <th width="38%">A&ccedil;&atilde;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';
예제 #3
0
파일: view.php 프로젝트: hexti/troncal
					</div>
					<div class="box-content">
						
						<table class="table table-striped table-bordered bootstrap-datatable datatable">
						  <thead>
							  <tr>
								  <th>Arquivo</th>
								  <th>Titulo</th>
								  <th>Status</th>
								  <th>Usu&aacute;rio</th>
								  <th>Empresa</th>
							  </tr>
						  </thead>   
						  <tbody>
							<?php 
$resultado = $DAO->listar("SELECT ra.*, p.nome_completo, e.nome FROM " . MYSQL_BASE_REMESSA_LISTAS . " rl, " . MYSQL_BASE_REMESSA_ARQUIVOS . " ra, " . MYSQL_BASE_PESSOAS . " p,\r\n\t\t\t\t\t\t\t\t\t\t\t" . MYSQL_BASE_EMPRESAS . " e WHERE p.id = ra.id_usuario AND rl.id = ra.id_remessa_lista AND rl.finalizado IS NOT NULL AND \r\n\t\t\t\t\t\t\t\t\t\t\te.id = rl.id_empresa AND ra.id_remessa_lista =" . $remessa->getId());
$confirm = "return confirm('Deseja remover esse registro?');";
foreach ($resultado as $item) {
    if ($item['finalizado'] == NULL) {
        $status = '<span class="label label-warning">Aberto</span>';
    } else {
        $status = utf8_encode('<span class="label label-success">Concluído</span>');
    }
    echo '<tr>';
    echo '	<td><a target="_blank" href="' . EXTERNAL_ROOT_PORTAL . '/arquivos/remessa/' . $item['file'] . '">' . substr($item['file'], 3) . '</a></td>';
    echo '	<td>' . $item['titulo'] . '</td>';
    echo '	<td>' . $status . '</td>';
    echo '	<td>' . $item['nome_completo'] . '</td>';
    echo '	<td>' . $item['nome'] . '</td>';
    // 								echo '	<td>';
    // 								if($item['finalizado'] == NULL){
예제 #4
0
파일: view.php 프로젝트: hexti/troncal
					</div>
					<div class="box-content">
						
						<table class="table table-striped table-bordered bootstrap-datatable datatable">
						  <thead>
							  <tr>
								  <th>Arquivo</th>
								  <th>Titulo</th>
								  <th>Status</th>
								  <th>Usu&aacute;rio</th>
								  <th width="28%">A&ccedil;&atilde;o</th>
							  </tr>
						  </thead>   
						  <tbody>
							<?php 
$resultado = $DAO->listar("SELECT ra.*, p.nome_completo FROM " . MYSQL_BASE_REMESSA_ARQUIVOS . " ra, " . MYSQL_BASE_PESSOAS . " p WHERE excluido IS NULL AND p.id = ra.id_usuario AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tra.id_remessa_lista =" . $remessa->getId());
$confirm = "return confirm('Deseja remover esse registro?');";
foreach ($resultado as $item) {
    if ($item['finalizado'] == NULL) {
        $status = '<span class="label label-warning">Aberto</span>';
    } else {
        $status = utf8_encode('<span class="label label-success">Concluído</span>');
    }
    echo '<tr>';
    echo '	<td><a target="_blank" href="' . EXTERNAL_ROOT_PORTAL . '/arquivos/remessa/' . $item['file'] . '">' . $item['file'] . '</a></td>';
    echo '	<td>' . $item['titulo'] . '</td>';
    echo '	<td>' . $status . '</td>';
    echo '	<td>' . $item['nome_completo'] . '</td>';
    echo '	<td>';
    if ($item['finalizado'] == NULL) {
        if (in_array(167, listarAcesso())) {
예제 #5
0
파일: index.php 프로젝트: hexti/troncal
								  <th nowrap>Disciplina</th>
								  <th nowrap>Tipo de Documento</th>
								  <th nowrap>Quantidade</th>
								  <th nowrap>Criado</th>
								  <th nowrap>Usu&aacute;rio</th>
								  <th nowrap>Empresa</th>
								  <th nowrap>A&ccedil;&atilde;o</th>
							  </tr>
						  </thead>   
						  <tbody>
							<?php 
$inicio = $pagina * $qnt - $qnt;
$limit = "LIMIT " . $inicio . ", " . $qnt;
$order_by = " GROUP BY R.id, P.id, E.id ORDER BY R.criado DESC ";
$query = "\tSELECT  \r\n\t\t\t\t\t\t\t\t\t\t\t\tR.*,\r\n\t\t\t\t\t\t\t\t\t\t\t\tCOUNT(RA.id) as total,\r\n\t\t\t\t\t\t\t\t\t\t\t\tE.nome,\r\n\t\t\t\t\t\t\t\t\t\t\t\tP.nome_completo,\r\n\t\t\t\t\t\t\t\t\t\t        GROUP_CONCAT(DISTINCT D.nome separator '; ') \tAS disciplina,\r\n\t\t\t\t\t\t\t\t\t\t        GROUP_CONCAT(DISTINCT PO.nome separator '; ') \tAS obra,\r\n\t\t\t\t\t\t\t\t\t\t        GROUP_CONCAT(DISTINCT FP.nome separator '; ') \tAS fase,\r\n\t\t\t\t\t\t\t\t\t\t        GROUP_CONCAT(DISTINCT TD.nome separator '; ') \tAS tipo\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_REMESSA_LISTAS . " \t\t\t\tR\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_PESSOAS . "\t\t\tP \tON P.id = R.id_usuario\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_EMPRESAS . "\t\t\tE \tON E.id = R.id_empresa\r\n\t\t\t\t\t\t\t\t\t\t\t    INNER JOIN " . MYSQL_BASE_REMESSA_ARQUIVOS . "\tRA\tON R.id = RA.id_remessa_lista\r\n\t\t\t\t\t\t\t\t\t\t\t    INNER JOIN " . MYSQL_BASE_DISCIPLINAS . "\t\tD\tON D.id = RA.id_disciplina\r\n\t\t\t\t\t\t\t\t\t\t\t    INNER JOIN " . MYSQL_BASE_PROJETO_OBRA . "\t\tPO \tON PO.id = RA.id_obra\r\n\t\t\t\t\t\t\t\t\t\t\t    INNER JOIN " . MYSQL_BASE_FASE_PROJETOS . "\t\tFP\tON FP.id = RA.id_fase_projeto\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_TIPO_DOCUMENTOS . "\tTD \tON TD.id = RA.id_tipo_documento\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\tR.excluido IS NULL AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tR.tipo = 'P' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tRA.excluido IS NULL AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tR.finalizado IS NOT NULL\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . $where;
$retorno = $DAO->listar($query . $order_by . $limit);
foreach ($retorno as $item) {
    echo '<tr>';
    echo '	<td style="display: none;">' . $count . '</td>';
    echo '	<td>Lista ' . $item['id'] . '</td>';
    echo '	<td>' . $item['obra'] . '</td>';
    echo '	<td>' . $item['fase'] . '</td>';
    echo '	<td>' . $item['disciplina'] . '</td>';
    echo '	<td>' . $item['tipo'] . '</td>';
    echo '	<td>' . $item['total'] . '</td>';
    echo '	<td>' . dataBrasil($item['criado'], false) . '</td>';
    echo '	<td>' . $item['nome_completo'] . '</td>';
    echo '	<td>' . $item['nome'] . '</td>';
    echo '	<td nowrap>';
    $count += 1;
    if (in_array(165, listarAcesso())) {