<?php
  function userMenu()
  {
    global $connexion;
    global $txt;

    $html = '';

    $html .= '<ol class="breadcrumb">';
		$html .= '<li class="active">Menu</li>';
	$html .= '</ol>';

	// Avertissement durée session max 24 minutes (1440 secondes)
	$html .= '<div class="alert alert-warning" role="alert">' . $txt['sessionTimeoutMsg'] . '</div>';

    if (isset($_GET['accountUpdated']))
    {
      $html .= '<div class="alert alert-success alert-dismissable" role="alert">';
        $html .= '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
        $html .= '<span class="glyphicon glyphicon-check"></span>' . $txt['infosUpdatedMsg'];
      $html .= '</div>';
    }

    $schoolInfo = getSchoolInfo($_SESSION['usagerEcoleIsoActif']->u_id_ecole);
    $html .= '<p style="font-size:22px;">' . $schoolInfo['NOM'] . '</p>';

    $html .= '<ul>';

      $html .= '<li><a href="' . $_SERVER['PHP_SELF'] . '?fmip">' . $txt['myAccount'] . '</a></li>';

      if ($_SESSION['usagerEcoleIsoActif']->u_form == 'P')
        $html .= '<li><a href="' . $_SERVER['PHP_SELF'] . '?form' . $_SESSION['usagerEcoleIsoActif']->u_form . '">' . $txt['elementaryForm'] . '</a></li>';
      else
      {
        //$html .= '<li>Le formulaire d\'auto-évaluation secondaire sera disponible sous peu.</li>';
        $html .= '<li><a href="' . $_SERVER['PHP_SELF'] . '?form' . $_SESSION['usagerEcoleIsoActif']->u_form . '">' . $txt['highForm'] . '</a></li>';
      }

    $html .= '</ul>';

    return $html;
  }
?>
