Location: PHPKode > projects > C.A.S.I.M.I.R. > casimir/include/topmenu.php
<?php
function BuildTopMenu($location, $rights, $extra_links = array()) {
    switch ($rights) {
        case 0 :    $locations = array ( 	'Accueil' => 'index.php',
                            'Mes machines' => 'machines.php',
                            'Toutes les machines' => 'allMachines.php',
                            'Utilisateurs' => 'users.php',
                            'Serveurs' => 'servers.php',
                            'Adresses' => 'addresses.php');
            break;
        case 1:     $locations = array ( 	'Accueil' => 'index.php',
                            'Gérer mes machines' => 'machines.php');
            break;
        default :   $locations = array ($location => "#");
    }
        $locations = array_merge($locations, $extra_links);
    foreach ($locations as $caption => $href) {
        if ($caption == $location) {
            $locations[$caption] = $href.'" class="active';
        }
    }
    return $locations;
}
?>
Return current item: C.A.S.I.M.I.R.