<body>
  <div class="loader"></div>
  <div id="app">
    <div class="main-wrapper main-wrapper-1">
      <div class="navbar-bg"></div>
      <nav class="navbar navbar-expand-lg main-navbar sticky">
        <div class="form-inline mr-auto">
          <ul class="navbar-nav mr-3">
            <li>
              <a href="#" data-toggle="sidebar" class="nav-link nav-link-lg collapse-btn">
                <i data-feather="menu"></i>
              </a>
            </li>
          </ul>
        </div>
        <ul class="navbar-nav navbar-right">
          <li>
            <a href="#" class="nav-link nav-link-lg fullscreen-btn">
              <i data-feather="maximize"></i>
            </a>
          </li>
          <li class="dropdown">
            <a href="#" data-toggle="dropdown" class="nav-link dropdown-toggle nav-link-lg nav-link-user">
              <img alt="image" src="<?=siteUrl.LOGO?>" class="user-img-radious-style">
              <span class="d-sm-none d-lg-inline-block"></span>
            </a>
            <div class="dropdown-menu dropdown-menu-right pullDown">
              <div class="dropdown-title">Hello <?=NAME?></div>
              <a href="<?=siteUrl;?>account" class="dropdown-item has-icon">
                <i class="far fa-user"></i> Profile
              </a>
              <a href="<?=siteUrl;?>setting" class="dropdown-item has-icon">
                <i class="fas fa-cog"></i> Settings
              </a>
              <div class="dropdown-divider"></div>
              <a href="javascript:void(0);" onclick="logoff('<?=siteUrl?>');" class="dropdown-item has-icon text-danger">
                <i class="fas fa-sign-out-alt"></i> Logout
              </a>
            </div>
          </li>
        </ul>
      </nav>

      <div class="main-sidebar sidebar-style-2">
        <aside id="sidebar-wrapper">
          <div class="sidebar-brand">
            <a href="<?=siteUrl?>">
              <img alt="image" src="<?=siteUrl.LOGO?>" class="header-logo" />
              <span class="logo-name">PLAYER FOOTER PRO</span>
            </a>
          </div>

          <div class="sidebar-user">
            <div class="sidebar-user-details">
              <div class="user-name"><?=NAME?></div>
              <div class="user-role">Espace réservé à l’équipe</div>
              <div class="sidebar-userpic-btn">
                <a href="<?=siteUrl;?>account" data-toggle="tooltip" title="Profile">
                  <i data-feather="user"></i>
                </a>
                <a href="javascript:void(0);" onclick="logoff('<?=siteUrl?>');" data-toggle="tooltip" title="Log Out">
                  <i data-feather="log-out"></i>
                </a>
              </div>
            </div>
          </div>

          <ul class="sidebar-menu">
            <?php
              // Détermination de la page courante (dernier segment d’URL sans le slash final)
              $script_name = $_SERVER["REQUEST_URI"];
              $script_name = rtrim($script_name, '/');
              $parts = explode('/', $script_name);
              $script_name = $parts[count($parts) - 1];
            ?>

            <li class="dropdown <?=$script_name=="" ? "active": ""; ?>">
              <a href="<?=siteUrl?>" class="nav-link">
                <i data-feather="monitor"></i><span>TABLEAU DE BORD</span>
              </a>
            </li>

            <li class="dropdown <?=$script_name=="user_list" ? "active": ""; ?>">
              <a href="<?=siteUrl;?>user_list">
                <i data-feather="user-plus"></i><span>Gestion des utilisateurs</span>
              </a>
            </li>

            <!-- >>> AJOUT : entrée de menu Radio Player -->
            <li class="dropdown <?=$script_name=="radio" ? "active": ""; ?>">
              <a href="<?=siteUrl;?>radio" class="nav-link">
                <i data-feather="radio"></i><span>Radio Player</span>
              </a>
            </li>
            <!-- <<< -->

            <li class="dropdown <?=$script_name=="setting" || $script_name=="account" ? "active": ""; ?>">
              <a href="#" class="menu-toggle nav-link has-dropdown">
                <i data-feather="settings"></i><span>Configuration</span>
              </a>
              <ul class="dropdown-menu">
                <li><a class="nav-link" href="<?=siteUrl;?>setting">Configuration de l'Appli</a></li>
                <li><a class="nav-link" href="<?=siteUrl;?>account">Configuration du compte</a></li>
              </ul>
            </li>
          </ul>
        </aside>
      </div>
