 <!-- Navbar -->
 <?php $activePage = basename($_SERVER['PHP_SELF'], ".php");  ?>
 <header class="externalHeader">
        <div id="left">
            <a href="../" class="logoMenu">
                <img src="../images/rxconnections.jpg" width="100%" alt="" role="presentation">
            </a>
                <?php 
                  $navigationTitle='NAVIGATION';
                  $navigationColor='btn-warning';
                  $token=1;
                  if(isset($_GET['token'])){
                     $token=$_GET['token'];
                  }
                  if(($token == '1') && ($activePage == 'index' || $activePage == '' || $activePage == 'add_patient' || $activePage == 'edit_patient' || $activePage == 'edit_de_patient' || $activePage == 'view_patient' || $activePage == 'add_existing_patient')) { 
                    $navigationTitle='NAVIGATION';
                    $navigationColor='btn-warning';
                  }elseif($activePage == 'physicians' || $activePage == 'edit_physician' || $activePage == 'add_physician'  || $activePage == 'view_physician') {
                    $navigationTitle='NAVIGATION';
                    $navigationColor='btn-warning';
                  }elseif($token == '2'  && ($activePage == 'edit_patient' ||  $activePage == 'view_patient') ) {
                    $navigationTitle='PHARMACY';
                    $navigationColor='btn-primary';
                  }
                  elseif(($token == '3' || $token == '4')  && ($activePage == 'edit_patient' ||  $activePage == 'view_patient')) {
                    $navigationTitle='NAVIGATION';
                    $navigationColor='btn-warning';
                  }
                  elseif($activePage == 'chat') {
                    $navigationTitle='NAVIGATION';
                    $navigationColor='btn-warning';
                  }
                  else{
                     echo 'ND';
                  }  
                  ?>
            <div class="btn <?=$navigationColor;?> text-white titleMenu" bis_skin_checked="1">
           <?=$navigationTitle;?>
            </div>
            <ul id="headerUl">
              
                <li class="menuItem btn-group">
                <button type="button" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
                    ADMIN
                </button>
                <ul class="dropdown-menu">
                    <li data-id="admin"><a class="dropdown-item" href="../copay_reconcile/index.php">AR SOFTWARE</a></li>
                    <?php if($_SESSION['empType']=='S' || $_SESSION['empType']=='A' ){ ?>
                    <li data-id="admin"><a class="dropdown-item" href="../billing">BILLING SOFTWARE</a></li>
                    <?php } else { ?>
                    <li data-id="admin"><a class="dropdown-item" href="../billing/billing_patient.php">BILLING SOFTWARE</a></li>
                    <?php } ?>
                    <li><hr class="dropdown-divider"></li>
                </ul>
                </li>

                <li class="menuItem btn-group">
                <button type="button" class="btn btn-info dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
                    CLINIC
                </button>
                <ul class="dropdown-menu">
                    <li data-id="clinic"><a class="dropdown-item" href="../nursing">Nursing</a></li>
                    <li data-id="clinic"><a class="dropdown-item" href="../cs">Clinic Scheduler</a></li>

                    <li><hr class="dropdown-divider"></li>
                </ul>
                </li>

                <li class="menuItem btn-group">
                <button type="button" class="btn btn-success dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
                    LOGISTICS
                </button>
                <ul class="dropdown-menu">
                    <li data-id="logistics"><a class="dropdown-item" href="#">Pharmacy Ordering Portal</a></li>
                    <!-- <li data-id="logistics"><a class="dropdown-item" href="#">Specialty Connect Logistics(SL) Software </a></li>
                    <li data-id="logistics"><a class="dropdown-item" href="#">FOC Tracker </a></li> -->
                    <li><hr class="dropdown-divider"></li>
                </ul>
                </li>
                <!--------------->
                <li class="menuItem btn-group">
                    <button type="button" class="btn btn-warning dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
                    NAVIGATION
                    </button>
                    <ul class="dropdown-menu">
                        <li data-id="navigation"><a class="dropdown-item" href="../de/">Data Entry</a></li>
                        <li data-id="navigation"><a class="dropdown-item" href="../reimbursement/">Reimbursement</a></li>
                        <!-- <li data-id="navigation"><a class="dropdown-item" href="../de/physicians.php">Physicians</a></li> -->
                       
                        <li><hr class="dropdown-divider"></li>
                    </ul>
                </li>
                <!--------------->
                <li class="menuItem btn-group">
                <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
                PHARMACY
                </button>
                <ul class="dropdown-menu">
                   
                    <li data-id="pharmacy"><a class="dropdown-item" href="../copay/">Copay Calculator</a></li>
                    <li data-id="pharmacy"><a class="dropdown-item" href="../pharmacy/index.php">Pharmacist</a></li>
                    <li data-id="pharmacy"><a class="dropdown-item" href="../inventory/">FOC Tracker</a></li>  
                    <li data-id="pharmacy"><a class="dropdown-item" href="../delivery/">Delivery Portal</a></li> 

                    <!-- <li data-id="pharmacy"><a class="dropdown-item" href="#">Delivery Portal</a></li> -->
                    <li><hr class="dropdown-divider"></li>
      
                </ul>
                </li>

                <?php if($_SESSION['empType']=='S'){ ?>
                <li class="menuItem btn-group">
                    <a type="button" class="btn btn-secondary" href="../superadmin/">
                    SUPERADMIN
                    </a>
                </li>
                <?php } ?>
                <li class="menuItem" id="moreMenu">...</li>
            </ul>
            <div id="hiddenMenu">
                
            </div>
        </div>
        <div id="right">
            <!-- <span class="btn" title="<?=$_SESSION['userName'];?>"><?=$_SESSION['userName'];?></span> -->
            <a href="../">
            <svg width="30px" height="30px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
               <rect x="0" fill="none" width="20" height="20"></rect>
               <g>
               <path d="M13 3v2h2v10h-2v2h4V3h-4zm0 8V9H5.4l4.3-4.3-1.4-1.4L1.6 10l6.7 6.7 1.4-1.4L5.4 11H13z"></path>
               </g>
            </svg>
         </a>

<a title="Logout" href="../logout.php">
<svg width="28" height="28" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" version="1.1">

<g style="fill:none;stroke:#AE0100;stroke-width:12px;stroke-linecap:round;stroke-linejoin:round;">
  <path d="m 50,10 0,35"/>
  <path d="M 26,20 C -3,48 16,90 51,90 79,90 89,67 89,52 89,37 81,26 74,20"/>
</g>

</svg>
</a>
            
        </div>
    </header>