Exemplo n.º 1
0
function redirectIfNotLoggedIn()
{
    $actionNavigator = new ActionNavigator(null);
    if (!isLogInActive()) {
        $actionNavigator->logOutAndRedirect();
    }
}
Exemplo n.º 2
0
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="#">
            <span style="color: #269abc;">UPT </span>MarksManager
        </a>
    </div>
    <!-- /.navbar-header -->

    <?php 
if (isLogInActive()) {
    ?>
        <ul class="nav navbar-top-links navbar-right">
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-user fa-fw"></i> <?php 
    echo $loggedInUser->getDisplayName();
    ?>
 <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-user">
                    <li>
                        <a href="<?php 
    echo $baseURL . 'personal/changePasswordView.php';
    ?>