<!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar user panel -->
<?php
include_once('../controller/config.php');

$index=$_SESSION["index_number"];

$sql="SELECT * FROM teacher WHERE index_number='$index'";
$result=mysqli_query($conn,$sql);
$row=mysqli_fetch_assoc($result);
$name=$row['i_name'];
$image=$row['image_name'];

?>      
      
      <div class="user-panel">
      	<div class="pull-left image">
        	<img src="../<?php echo $image; ?>" class="img-circle" alt="User Image">
        </div>
        <div class="pull-left info">
        	<p><?php echo $name; ?></p>
            <a href="#"><i class="fa fa-circle text-success"></i> En ligne</a>
        </div>
      </div>
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu">
        <li class="header">NAVIGATION PRINCIPALE</li>
       <li class="active treeview">
          <a href="dashboard_med.php">
            <i class="fa fa-dashboard"></i> <span>Tableau de bord</span>
          </a>
        </li>
         <li>
          <a href="profile_dpt.php">
            <i class="fa fa-flag"></i> <span>Mon profil</span>
          </a>
        </li>


<?php
// تعريف المتغير لمنع ظهور الخطأ (Notice: Undefined variable)
$page = basename($_SERVER['PHP_SELF']); 
?>

<li class="header" style="background-color: #1a2226; color: #4b646f; padding: 10px 15px; font-size: 12px;">SERVICES MÉDICAUX</li>

<li class="<?php echo ($page == 'clinic_appointments.php') ? 'active' : ''; ?>">
    <a href="../clinic/clinic_appointments.php">
        <i class="fa fa-calendar-check-o" style="color: #00c0ef;"></i> 
        <span>Rendez-vous</span>
    </a>
</li>

<li class="<?php echo ($page == 'clinic_consultations.php') ? 'active' : ''; ?>">
    <a href="../clinic/clinic_consultations.php">
        <i class="fa fa-stethoscope" style="color: #00c0ef;"></i> 
        <span>Consultations</span>
    </a>
</li>

<li class="<?php echo ($page == 'clinic_fiches.php') ? 'active' : ''; ?>">
    <a href="../clinic/clinic_fiches.php">
        <i class="fa fa-user-md" style="color: #00c0ef;"></i> 
        <span>Fiche médical</span>
    </a>
</li>

<li class="<?php echo ($page == 'clinic_certificates.php') ? 'active' : ''; ?>">
    <a href="../clinic/clinic_certificates.php">
        <i class="fa fa-file-text-o" style="color: #00c0ef;"></i> 
        <span>Certificats</span>
    </a>
</li>

<li class="<?php echo ($page == 'clinic_pharmacy.php') ? 'active' : ''; ?>">
    <a href="../clinic/clinic_pharmacy.php">
        <i class="fa fa-medkit" style="color: #00c0ef;"></i> 
        <span>Stock Pharmacie</span>
    </a>
</li>



	   

      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>