<?php

$menu = 12;
//INSTACIA CLASSES
$obj = new Documento();
$grupo = $obj::ID_GRUPO_ATAS;
$tpl = new Template("view/servicos/list.html");
$tpl->GRUPO = $obj->get_pasta_grupo($grupo);
$user = $_SESSION['zurc.userPerfilId'] != Perfil::SINDICO ? $_SESSION['zurc.userId'] : "";
$pesquisa = isset($_REQUEST['pesquisa']) ? $_REQUEST['pesquisa'] : "";
$pagina = isset($_REQUEST['pagina']) ? $_REQUEST['pagina'] : "1";
$totalPesquisa = $obj->recuperaTotal($pesquisa, $grupo, $user);
$configPaginacao = $obj->paginar($totalPesquisa, $pagina);
$alist = $obj->listar($configPaginacao['primeiroRegistro'], $configPaginacao['quantidadePorPagina'], $pesquisa, $grupo, $user);
if (count($alist) > 0) {
    foreach ($alist as $key => $publicacao) {
        $tpl->nome = $publicacao->titulo;
        $tpl->data = $obj->getData($publicacao->data);
        $tpl->ID_HASH = $obj->md5_encrypt($publicacao->id);
        $tpl->block("BLOCK_ITEM_LISTA");
    }
}
$tpl->paginar_class = 'paginar';
$tpl->TOTAL_PAGINAS = $configPaginacao['totalPaginas'];
$tpl->PAGINA_ANTERIOR = $configPaginacao['paginaAnterior'];
$tpl->PROXIMA_PAGINA = $configPaginacao['proximaPagina'];
$tpl->PAGINA = $pagina;
if ($configPaginacao['totalPaginas'] > 1) {
    $tpl->block("BLOCK_PAGINACAO");
}
$tpl->show();
Beispiel #2
0
?>
						
						<table class="table table-striped table-bordered bootstrap-datatable datatable">
						  <thead>
							  <tr>
								  <th style="display: none;" width="10%"nowrap>DATA PARA ORDENAR</th>
								  <th nowrap>Nome Documento</th>
								  <th nowrap>Disciplina</th>
								  <th nowrap>Obra</th>
								  <th nowrap>Arquivo</th>
								  <th width="8%">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