<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Starter Template for Bootstrap</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="frontpage.php">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="anotherpage.php">Another page</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<?php if(isset($this->currentUser)): ?><?php echo \htmlentities($user, ENT_QUOTES, 'UTF-8', false); ?><?php else: ?>NO LOGIN <?php endif; ?>
</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<a class="dropdown-item" href="login.php">login</a>
<a class="dropdown-item" href="logout.php">logout</a>
</div>
</li>
</ul>
</form>
</div>
</nav>
<main role="main" class="container">
<div class="starter-template">
<br><br><br>
<h1>Another Page</h1>
<p>You could browse this page without a session</p>
<?php if(isset($this->currentUser)): ?>
<p>The user is authenticated
@role('admin')is admin @endrole
<?php if (call_user_func($this->authCallBack,'admin')): ?> If you can read it, then you can admin <?php endif; ?>
</p>
<p class="lead">The current user <b><?php echo \htmlentities($name, ENT_QUOTES, 'UTF-8', false); ?></b> is member of the next groups</p>
<table class="table">
<thead><tr><th>Group</th></tr></thead>
<tbody>
<?php $__currentLoopData = $groups; $this->addLoop($__currentLoopData);$this->getFirstLoop();
foreach($__currentLoopData as $group): $loop = $this->incrementLoopIndices(); ?>
<tr><td><?php echo \htmlentities($group, ENT_QUOTES, 'UTF-8', false); ?></td></tr>
<?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
</tbody>
</table>
<?php else: ?>
The user is not authenticated
<?php endif; ?>
</div>
</main><!-- /.container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>
|