<?php \model\usuario\Controlador::redirectLogin(); if (!\lib\auxiliar\Auxiliar::validarAcesso(\lib\constante\Constante::MODULO, \lib\constante\Constante::LISTAR)) { \config\Rotas::redirect('home/'); } try { $arr = \model\factory\Factory::montar('controladormodulo')->listarAtivos(); } catch (\model\modulo\Excecao $e) { $arr = null; } catch (\model\conexao\Excecao $e) { $arr = null; } include BASE_INCLUDES . DS . 'inc.topo.php'; include BASE_INCLUDES . DS . 'inc.menu.php'; $modulo = 'modulo'; ?> <aside class="right-side"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Módulos - <a href="<?php echo BASE_URL; ?> /<?php echo $modulo; ?> /adicionar.php">Adicionar</a> </h1> </section>
?> /img/avatar5.png" class="img-circle" alt="User Image" /> <p> <?php echo \model\usuario\Controlador::getUsuarioLogado()->getNome(); ?> - <?php echo \model\usuario\Controlador::getUsuarioLogado()->getObjetoPerfil(); ?> <small> Cadastrado em - <?php echo \lib\auxiliar\Auxiliar::dataBr(\model\usuario\Controlador::getUsuarioLogado()->getDataCadastro()); ?> <br> Último acesso em - <?php echo \lib\auxiliar\Auxiliar::dataBr(\model\usuario\Controlador::getUsuarioLogado()->getDataUltimoAcesso()); ?> </small> </p> </li> <!-- Menu Body --> <li class="user-body"> <div class="col-xs-4 text-center"> <a href="#">Followers</a> </div> <div class="col-xs-4 text-center"> <a href="#">Sales</a> </div> <div class="col-xs-4 text-center"> <a href="#">Friends</a> </div>
public static function validarAcesso($modulo, $permissao) { $ac = \model\usuario\Controlador::getUsuarioLogado()->getObjetoPerfil()->getObjetoAcoes(); $arrAcessos = array(); foreach ($ac as $acessos) { $arrAcessos[$acessos->getModId()][$acessos->getPermId()] = $acessos->getPermId(); } return !isset($arrAcessos[$modulo][$permissao]) ? false : true; }
?> "> </div> <div class="form-group col-md-6"> <label for="strEmail">Email</label> <input type="email" class="form-control" name="strEmail" id="strEmail" placeholder="" value="<?php echo \model\usuario\Controlador::getUsuarioLogado()->getEmail(); ?> "> </div> <div class="form-group col-md-6"> <label for="strLogin">Login</label> <input type="text" class="form-control" name="strLogin" id="strLogin" placeholder="" value="<?php echo \model\usuario\Controlador::getUsuarioLogado()->getLogin(); ?> "> </div> <div class="form-group col-md-6"> <label for="strSenha">Senha</label> <input type="password" class="form-control" name="strSenha" id="strSenha" placeholder="" value=""> </div> <div class="form-group col-md-6"> <label for="strConfirmeSenha">Confirme Senha</label> <input type="password" class="form-control" name="strConfirmeSenha" id="strConfirmeSenha" placeholder="" value=""> </div> </div><!-- /.box-body -->
<?php \model\usuario\Controlador::logout();