예제 #1
0
include "src/classes/UnidadeCons.class.php";
include "src/classes/Notas.class.php";
include_once "src/classes/Relatorio.class.php";
//$tpl->TESTE = $emp->getServicos()[2]->children();
redirectByPermission(0);
// SETAR PERMISSÃO DA PÁGINA
$inicio = execucao();
$tpl = new Template('html_libs/template_livre.html');
//$tpl->addFile('JSCRIPT','cssjs_libs/js_parts/js_udd_ucDetalhes.html');
$tpl->addFile('CONTEUDO', 'html_libs/resumo_index.html');
$anoAtual = isset($_GET['ano']) && $_GET['ano'] >= 2012 && $_GET['ano'] <= Date('Y') ? $_GET['ano'] : Date('Y');
$anoAnterior = $anoAtual - 1;
$uo = new Unidade($_SESSION['bacia']);
$tpl->MENU_NAME = "Sua Unidade : " . $uo->getSigla();
$tpl->UDD_NAME = "<em>relatório " . $anoAtual . "</em>" . $uo->getSigla() . " : " . $uo->getNome();
$tpl->QTD_ATIVO = $uo->getQtdUcStatus();
$tpl->QTD_INATIVO = $uo->getQtdUcStatus(0);
$tpl->UO_SIGLA = $uo->getSigla();
/***********************
	 MOSTRAR MENU COM ANOS
	***********************/
$iMin = 2012;
$iCalc = $anoAtual - 5;
$iFor = $iCalc < $iMin ? $iMin : $iCalc;
for ($i = $iFor; $i <= Date('Y'); $i++) {
    $tpl->ITEM_MENU_URL = "resumo_index.php?ano=" . $i;
    $tpl->ITEM_MENU_LINK = $i;
    $tpl->block('ITEM_MENU');
}
/***********************
	 MOSTRAR MENU COM ANOS