include_once INTERNAL_ROOT_PORTAL . '/medicao/DAO/AcompanhamentoDAO.php'; include_once INTERNAL_ROOT_PORTAL . '/medicao/Acompanhamento.class.php'; checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true'); include_once INTERNAL_ROOT_PORTAL . '/head.php'; $acesso = listarAcesso(); if (!in_array(139, $acesso)) { echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>'; } $id = limpaTexto($_GET['id']); $acompanhamento = new Acompanhamento(); //Verifica se a opcao de salvar foi iniciada if (!empty($_POST['cmd']) && $_POST['cmd'] == 'editar') { $acompanhamento->editar($_POST); } else { $DAO = new AcompanhamentoDAO(); $resultado = $DAO->listar("SELECT * FROM " . MYSQL_BASE_MEDICAO_ACOMPANHAMENTO . " WHERE principal = 'S' AND id=" . $id); if ($resultado) { foreach ($resultado as $item) { $acompanhamento->setGrupo($item['grupo']); $acompanhamento->setReembolso($item['reembolso']); $acompanhamento->setRemuneracao($item['remuneracao']); $acompanhamento->setCriado($item['criado']); } } else { $acompanhamento->setGrupo(0); $acompanhamento->setReembolso(0); $acompanhamento->setRemuneracao(0); $acompanhamento->setCriado(""); } } ?>
</div> <div class="box-content"> <table class="table table-striped table-bordered bootstrap-datatable datatable"> <thead> <tr> <th width="10%">Grupo</th> <th width="15%">Mês - Ano</th> <th>Remuneracação</th> <th>Reembolso</th> <th width="20%">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 INTERNAL_ROOT_PORTAL . '/footer.php';