core_second/functions/functions.index.php
/* Creates the menu for the <nav> bar in index */
Creates the menu for the  bar in index
Creates the menu for the bar in index
function create_menu()
 {
  $nav =  '<a href="index.php?page=index"> Accueil </a>';
  $nav .= '<a href="index.php?page=contact"> Contact </a>';
  if(!logged())
  {
    $nav .= '<a href="index.php?page=register"> Inscription </a>';
    $nav .= '<a href="index.php?page=login"> Connexion </a>';
  }
  else
  {
    $nav .= '<a href="index.php?page=profile"> Profil </a>';
    if(is_admin($_SESSION['user']))
    {
      $nav .= '<a href="index.php?page=administration"> Administration </a>';
    }
    $nav .= '<a href="index.php?page=logout"> Déconnexion </a>';
  }
  echo $nav;
 }
function create_menu ( ) { $ nav = '<a href="index.php?page=index"> Accueil </a>' ; $ nav .= '<a href="index.php?page=contact"> Contact </a>' ; if ( ! logged ( ) ) { $ nav .= '<a href="index.php?page=register"> Inscription </a>' ; $ nav .= '<a href="index.php?page=login"> Connexion </a>' ; } else { $ nav .= '<a href="index.php?page=profile"> Profil </a>' ; if ( is_admin ( $ _SESSION [ 'user' ] ) ) { $ nav .= '<a href="index.php?page=administration"> Administration </a>' ; } $ nav .= '<a href="index.php?page=logout"> Déconnexion </a>'; } echo $ nav ; }
Creates the menu for the <nav> bar in index
Creates the menu for the <nav > bar in index