<!---------   
=== Theme Author : Evan Ahmed EMon
=== Theme Designed By: TWG
=== Contact Whatsapp: +8801864614704
 ----------->  
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="big5">
    <base href="<?= site_url() ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width">
    <title><?= $settings["site_name"] ?></title>
    
    
 
    
<!-- CDN Links -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/11.10.6/sweetalert2.css"/> 
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.18/summernote.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.8.1/css/bootstrap-select.css">
<link rel="stylesheet" href="https://itsjavi.com/fontawesome-iconpicker/dist/css/fontawesome-iconpicker.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">

<!-- Custom Admin Assets -->
<link href="<?php echo site_url('assets/admin/bootstrap.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/style.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/toastDemo.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/tooltip.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/tinytoggle.min.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/iziToast.min.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/image-picker.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/maint.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/adcustom.css'); ?>" rel="stylesheet">
<link href="<?php echo site_url('assets/admin/fontawesome5pro.css'); ?>" rel="stylesheet">

<!-- Scripts -->
<script src="https://kit.fontawesome.com/e1d6cf68d9.js" crossorigin="anonymous"></script>
<script src="<?php echo site_url('assets/admin/iziToast.min.js'); ?>"></script>

<style>
 .badge.badge-primary {
 color: white; /* Ensures the text is visible */
    
 }
.far {
    font-family: "Font Awesome 5 Pro";
    font-weight: 400;
}
.fa,.fas {
    font-family: "Font Awesome 5 Pro";
    font-weight: 900
}
</style>
<style>
    
</style>



</head>

<body>

 


<body class="<?php if($admin["mode"]=="dark" ): echo "dark-mode" ; endif; ?>">

<nav class="navbar navbar-static-top navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
              aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <div id="navbar" class="collapse navbar-collapse">

      <ul class="nav navbar-nav navbar-left-block">
        <?php if ($admin["access"]["admin_access"] && $_SESSION["msmbilisim_adminlogin"]) : ?>

          <?php if ($admin["access"]["admin_access"]): ?>
            <li class="<?php if(route(1) == "index"): echo 'active' ; endif; ?>">
              <a class="ajax-link" href="<?php echo site_url("admin") ?>"><i class="bi bi-house-door"></i> Dashboard </a>
            </li>
          <?php endif; ?>

          <?php if ($admin["access"]["admin_access"] && $admin["access"]["users"]): ?>
  <li class="<?php if (route(1) == "clients") : echo 'active' ; endif; ?>">
        <a class="ajax-link" href="<?php echo site_url("admin/clients") ?>">
          <i class="bi bi-person-lines-fill"></i><span> Clients</span>
        </a>
      </li>

<?php endif; ?>

<?php if ($admin["access"]["admin_access"]): ?>
  <li class="<?php if (route(1) == "fund-add-history") : echo 'active' ; endif; ?>">
    <a class="ajax-link" href="<?php echo site_url("admin/fund-add-history"); ?>">
      <i class="bi bi-cash-stack"></i> Payments
    </a>
  </li>
<?php endif; ?>

          <?php if ($admin["access"]["admin_access"] && $admin["access"]["services"]): ?>
    <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> 
            <i class="bi bi-list-task"></i> Services <span class="caret"></span>
        </a>
        <ul class="dropdown-menu dropdown-max-height">
            <li class="<?php if (route(1) == "services") : echo 'active'; endif; ?>">
                <a class="ajax-link" href="<?php echo site_url("admin/services") ?>">
                    <i class="bi bi-list-columns"></i><span> Services</span>
                </a>
            </li>
            <li class="<?php if (route(1) == "update-prices") : echo 'active'; endif; ?>">
                <a class="ajax-link" href="<?php echo site_url("admin/update-prices") ?>">
                    <i class="bi bi-cloud-upload"></i><span> Update Prices</span>
                </a>
            </li>
            <li class="<?php if (route(1) == "bulk") : echo 'active'; endif; ?>">
                <a class="ajax-link" href="<?php echo site_url("admin/bulk") ?>">
                    <i class="bi bi-file-earmark-spreadsheet"></i><span> Bulk Services Editor</span>
                </a>
            </li>
                <!-- Newly Added Menu Items -->
            <li class="<?php if (route(1) == "bulkc") : echo 'active'; endif; ?>">
                <a class="ajax-link" href="<?php echo site_url("admin/bulkc") ?>">
                    <i class="fa fa-list-ol"></i><span> Bulk Category Editor</span>
                </a>
            </li>
            <li class="<?php if (route(1) == "category-sort") : echo 'active'; endif; ?>">
                <a class="ajax-link" href="<?php echo site_url("admin/category-sort") ?>">
                    <i class="bi bi-sort-alpha-down"></i><span> Category Sort</span>
                </a>
            </li>
        
        
        </ul>
    </li>
<?php endif; ?>

          <?php if ($admin["access"]["admin_access"] && $admin["access"]["orders"]): ?>
    <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
            <i class="bi bi-bag-check"></i> Orders 
            <span class='badge' style='background-color: #6d47bb'><?= countRow(['table' => 'tasks', 'where' => ['task_status' => 'inprogress']]); ?></span>
        </a>
        <ul class="dropdown-menu dropdown-max-height">
            <li class="<?php if (route(1) == "orders") : echo 'active'; endif; ?>">
                <a class="ajax-link" href="<?php echo site_url("admin/orders") ?>">
                    <i class="bi bi-bag"></i><span> Orders</span>
                </a>
            </li>
            <li>
                <a href="<?php echo site_url('admin/tasks') ?>">
                    <i class="bi bi-x-circle"></i> Cancel 
                    <span class='badge' style='background-color: #6d47bb'>
                        <?= countRow(['table' => 'tasks', 'where' => ['task_status' => 'inprogress']]); ?>
                    </span>
                </a>
            </li> 
        </ul>
    </li>
<?php endif; ?>



          <?php if ($admin["access"]["admin_access"] && $admin["access"]["tickets"]): ?>
            <li class="<?php if (route(1) == "tickets") : echo 'active' ; endif; ?>"><a class="ajax-link" href="<?php echo site_url("admin/tickets") ?>"><i class="bi bi-headset"></i><span> Tickets 
            <?php if(countRow(["table"=>"tickets","where"=>["client_new"=>2]])>0){ ?>
            <span class="badge" style="background: linear-gradient(to right, #ff0000, #ff4d4d);"><?=countRow(["table"=>"tickets","where"=>["client_new"=>2]]);?></span>
            <?php } ?></span></a></li>
          <?php endif; ?>

<?php if ($admin["access"]["admin_access"] && $admin["access"]["additionals"]): ?>
  <li class="dropdown">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
      <i class="bi bi-question-circle"></i> Additionals <span class="caret"></span>
    </a>
    <ul class="dropdown-menu dropdown-max-height">
      <li class="<?php if (route(1) == "referrals") : echo 'active' ; endif; ?>">
        <a class="ajax-link" href="<?php echo site_url("admin/referrals") ?>"><i class="bi bi-award"></i><span> Affiliates</span></a>
      </li>
      <li class="<?php if (route(1) == "broadcasts") : echo 'active' ; endif; ?>">
        <a class="ajax-link" href="<?php echo site_url("admin/broadcasts") ?>"><i class="bi bi-megaphone"></i><span> Broadcasts</span></a>
      </li>
      <li class="<?php if (route(1) == "logs") : echo 'active' ; endif; ?>">
        <a class="ajax-link" href="<?php echo site_url("admin/logs") ?>"><i class="bi bi-file-earmark-text"></i><span> Panel Logs</span></a>
      </li>

      <li class="<?php if (route(1) == "reports") : echo 'active' ; endif; ?>">
        <a class="ajax-link" href="<?php echo site_url("admin/reports") ?>"><i class="bi bi-bar-chart-line"></i><span> Reports</span></a>
      </li>
      <!-- Added Updates option -->
      <li class="<?php if (route(1) == "updates") : echo 'active' ; endif; ?>">
        <a class="ajax-link" href="<?php echo site_url("admin/updates") ?>"><i class="bi bi-cloud-arrow-down"></i><span> Updates</span></a>
      </li>
    </ul>
  </li>
<?php endif; ?>


          <?php if ($admin["access"]["admin_access"] && $admin["access"]["appearance"]): ?>
            <li class="<?php if (route(1) == "appearance") : echo 'active' ; endif; ?>"><a class="ajax-link" href="<?php echo site_url("admin/appearance") ?>"><i class="bi bi-sun"></i><span> Appearance</span></a></li>
          <?php endif; ?>

          <?php if ($admin["access"]["admin_access"] && $admin["access"]["settings"]): ?>
            <li class="<?php if (route(1) == "settings") : echo 'active' ; endif; ?>"><a class="ajax-link" href="<?php echo site_url("admin/settings") ?>"><i class="bi bi-gear"></i><span> Settings</span></a></li>
          <?php endif; ?>

          <?php if ($admin["access"]["admin_access"] && $admin["access"]["feedback"]): ?>
            <li class="<?php if (route(1) == "feedback") : echo 'active' ; endif; ?>"><a class="ajax-link" href="<?php echo site_url("admin/feedback") ?>"><i class="bi bi-chat-left-dots"></i><span> Feedback</span></a></li>
          <?php endif; ?>


 
 <?php if ($admin["mode"] == "dark") : ?>

<li><a id="enable-light-mode" href="javascript:void(0)"><i class="bi bi-sun"></i><span> Light Mode</span></a></li>

<?php else: ?>

<li><a id="enable-dark-mode" href="javascript:void(0)"><i class="bi bi-moon"></i><span> Dark Mode</span></a></li>

<?php endif; ?>


<li class="dropdown">
  <a class="ajax-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">
    <i class="bi bi-person-circle"></i><span class="caret"></span>
  </a>
  <ul class="dropdown-menu">

    <?php if ($admin["access"]["admin_access"] && $admin["access"]["manager"]): ?>
    <li class="<?php if(route(1) == "manager") : echo "active" ; endif;?>">
      <a href="<?php echo site_url("admin/manager"); ?>" class="ajax-link"><i class="bi bi-shield-lock"></i> Manager</a>
    </li>
    <?php endif; ?>

    <li role="separator" class="divider"></li>
    <li class="<?php if (route(1) == "account") : echo 'active' ; endif; ?>">
      <a class="ajax-link" href="<?php echo site_url("admin/account") ?>"><i class="bi bi-person"></i><span> Account</span></a>
    </li>
    <li>
      <a class="ajax-link" href="admin/logout"><i class="bi bi-box-arrow-right"></i> Logout</a>
    </li>
  </ul>
</li>


<?php endif; ?>






</ul>
    </div>

</div>
</nav>