<?php
// نحدد الصفحة الحالية عشان نعرف أي أيقونة نعملها active
$current_page = basename($_SERVER['PHP_SELF']); 
?>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">



<header class="header" role="banner" aria-label="PageHead">
  <div class="logo-container" aria-label="شعار الشركة">
    <img src="MADADHOLDING.jpeg" class="logo-3d" alt="MADAD HOLDING" style="width: 201px; height:auto;" />
  </div>

  <!-- Navigation -->
  <nav class="user-nav" role="navigation" aria-label="قائمة التنقل الرئيسية">
    
    <div class="nav-icon <?php if($current_page == 'Home.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="مداد القابضة"
         onclick="window.location.href='Home.php'">
      <i class="fas fa-home"></i>
      <span class="tooltip" role="tooltip">مداد القابضة</span>
    </div>

    <div class="nav-icon <?php if($current_page == 'projects.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="المشاريع"
         onclick="window.location.href='projects.php'">
      <i class="fas fa-building"></i>
      <span class="tooltip" role="tooltip">المشاريع</span>
    </div>

    <div class="nav-icon <?php if($current_page == 'fund.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="راس المال"
         onclick="window.location.href='fund.php'">
      <i class="fas fa-chart-line"></i>
      <span class="tooltip" role="tooltip">راس المال</span>
    </div>

      <div class="nav-icon <?php if($current_page == 'Balance.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="المشاريع"
         onclick="window.location.href='Balance.php'">
      <i class="fas fa-wallet"></i>
      <span class="tooltip" role="tooltip">الرصيد</span>
    </div>


    <div class="nav-icon <?php if($current_page == 'revenues.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="الإيرادات"
         onclick="window.location.href='revenues.php'">
      <i class="fas fa-money-bill-wave"></i>
      <span class="tooltip" role="tooltip">الإيرادات</span>
    </div>

    <div class="nav-icon <?php if($current_page == 'expenses.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="المصروفات"
         onclick="window.location.href='expenses.php'">
      <i class="fas fa-receipt"></i>
      <span class="tooltip" role="tooltip">المصروفات</span>
    </div>

    <div class="nav-icon <?php if($current_page == 'profits.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="الأرباح"
         onclick="window.location.href='profits.php'">
      <i class="fas fa-coins"></i>
      <span class="tooltip" role="tooltip">الأرباح</span>
    </div>

    <div class="nav-icon <?php if($current_page == 'custody.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="العهدة"
         onclick="window.location.href='custody.php'">
      <i class="fas fa-sack-dollar"></i>
      <span class="tooltip" role="tooltip">العهدة</span>
    </div>

    <div class="nav-icon <?php if($current_page == 'users.php') echo 'active'; ?>" 
         tabindex="0" role="button" aria-label="المستخدمين"
         onclick="window.location.href='users.php'">
      <i class="fas fa-users-gear"></i>
      <span class="tooltip" role="tooltip">المستخدمين</span>
    </div>

    <div class="nav-icon nav-icon-rtl" tabindex="0" role="button" aria-label="تسجيل الخروج"
         onclick="window.location.href='Login.php'">
      <i class="fas fa-sign-out-alt"></i>
      <span class="tooltip" role="tooltip">تسجيل الخروج</span>
    </div>

  </nav>
</header>

<div class="header-marquee">
  <marquee id="financialMarquee" direction="right" scrollamount="5" onmouseover="this.stop();" onmouseout="this.start();">
    جاري تحميل البيانات المالية...
  </marquee>
</div>


