Пример #1
0
<?php

require "../plugins/lof/conf.php";
LOFInit();
require '../plugins/lof/bddConnect.php';
require '../plugins/lof/header.php';
require '../plugins/lof/permissions/permissions.php';
define("inWebSite", true);
//Security verification
if (isset($pageLevel)) {
    if (isset($_SESSION['connect'])) {
        if (!LOF_permissions($pageLevel, $_SESSION['rank'])) {
            echo "Vous n'avez pas accès à cette page.";
            die;
        }
    } else {
        echo "Vous devez être connecté pour accéder à cette page.";
        die;
    }
}
Пример #2
0
                <li><a href="/tutoriels">Tutoriels</a></li>
                <li><a href="/forum">Forums</a></li>
                <li><a href="#">Wiki</a></li>
             </ul>
	            
             <!-- Right nav bar-->
             <ul class="nav navbar-nav navbar-right navbar-nav-fancy">
                 <?php 
if (isset($_SESSION['connect']) && $_SESSION['connect'] == 1) {
    ?>
                    <li><a href="/user/editProfile.php"><?php 
    echo $_SESSION['user'];
    ?>
</a></li>
                    <?php 
    if (LOF_permissions(3, $_SESSION['rank'])) {
        ?>
                        <li><a href="/admin">Administration</a></li>
                    <?php 
    }
    ?>
	                <li><a href="/user/disconnection.php?url=<?php 
    echo urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
    ?>
">Déconnexion</a></li>
                 <?php 
} else {
    ?>
		            <li><a href="/user/register.php">S'inscrire</a></li>
	                <li><a href="/user/login.php?url=<?php 
    echo urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);