Пример #1
0
<?php

$menu = 2;
include "includes/lock.php";
$tpl = new Template("view/templates/default_bootstrap_lteadmin.html");
$tpl->addFile("CONTENT", "view/perfil/list.html");
include "includes/config.php";
$tpl->HEADER_TITLE = "Lista de Perfis";
$tpl->HEADER_BREAD_CRUMB = '<li><a href="home-home"><i class="fa fa-home"> </i> Home</a></li>
                                        <li><a href="perfil-main"><i class="fa fa-users"> </i> Perfil</a></li>
                                         <li class="active">Listar</li>';
//INSTACIA CLASSES
$perfil = new Perfil();
//CONFIGURA O BREADCRUMB
$alist = $perfil->getRows(0, 9999, array(), array("empresa" => "=" . EMPRESA));
$tpl->QUANTIDADE = count($alist);
foreach ($alist as $key => $perfilario) {
    $tpl->disabled = "";
    $tpl->nome = $perfilario->descricao;
    $tpl->ID_HASH = $perfil->md5_encrypt($perfilario->id);
    $tpl->block("BLOCK_ITEM_LISTA");
}
$tpl->show();
Пример #2
0
include "tupi.template.inicializar.php";
$codAcesso = 6;
include "tupi.seguranca.php";
if (!isset($_REQUEST['ajax'])) {
    $tpl->BREADCRUMB = '    <ul class="breadcrumb">
    <li>
    <a href="home.php">Home</a> <span class="divider">/</span>
    </li>
    <li>
    <a href="#">Cadastro</a> <span class="divider">/</span>
    </li>
    <li class="active">Lista Perfil</li>
    </ul>';
}
$oPerfil = new Perfil();
$totalPerfis = $oPerfil->recuperaTotal();
$configPaginacao = $oPerfil->paginar($totalPerfis, isset($_REQUEST['pagina']) ? $_REQUEST['pagina'] : 1);
$rsPerfis = $oPerfil->getRows($configPaginacao['primeiroRegistro'], $configPaginacao['quantidadePorPagina'], array(), array());
if ($configPaginacao['totalPaginas'] > 1) {
    $tpl->block("BLOCK_PAGINACAO");
}
$tpl->TOTAL_PAGINAS = $configPaginacao['totalPaginas'];
$tpl->PAGINA_ANTERIOR = $configPaginacao['paginaAnterior'];
$tpl->PROXIMA_PAGINA = $configPaginacao['proximaPagina'];
foreach ($rsPerfis as $key => $perfil) {
    $tpl->ID = $perfil->id;
    $tpl->DESCRICAO = $perfil->descricao;
    $tpl->ID_HASH = $oPerfil->md5_encrypt($perfil->id);
    $tpl->block("BLOCK_ITEM_LISTA");
}
include "tupi.template.finalizar.php";