 <?php 
 $id=$_GET['Id_2'];
 $student_id=$user_row['student_id'];
   $invoice= mysqli_query($conn,"SELECT * FROM student_soes 
    INNER JOIN exam_invoice 
          ON exam_invoice.student_id = student_soes.student_id  WHERE exam_invoice.course_code ='$id' AND exam_invoice.student_id='$student_id' ")or die(mysqli_error());
      $invoice2 = mysqli_fetch_array($invoice); 

?>

<div class="sidebar" data-background-color="dark">
        <div class="sidebar-logo">
          <!-- Logo Header -->
          <div class="logo-header" data-background-color="dark">
              <?php 
                  if ($user_row['course']!="$id") {
                ?>
            <a href="#" class="logo">
              <img
                src="assets/img/kaiadmin/logo.jpg"
                alt="navbar brand"
                class="navbar-brand"
                height="20"
              />
            </a>
             <?php }else {?>
             <a href="admin.php?page=dashboard&Id_2=<?php echo $user_row['course']; ?>" class="logo">
              <img
                src="assets/img/kaiadmin/logo.jpg"
                alt="navbar brand"
                class="navbar-brand"
                height="20"
              />
            </a>
              <?php }?> 
            <div class="nav-toggle">
              <button class="btn btn-toggle toggle-sidebar">
                <i class="gg-menu-right"></i>
              </button>
              <button class="btn btn-toggle sidenav-toggler">
                <i class="gg-menu-left"></i>
              </button>
            </div>
            <button class="topbar-toggler more">
              <i class="gg-more-vertical-alt"></i>
            </button>
          </div>
          <!-- End Logo Header -->
        </div>
        <div class="sidebar-wrapper scrollbar scrollbar-inner">
          <div class="sidebar-content">
            <ul class="nav nav-secondary">
              
                <?php 
                  if ($user_row['course']!="$id") {
                ?>
                <li class="nav-item active">
                <a href="admin.php?page=index">
                  <i class="fas fa-home"></i>
                  <p>Dashboard</p> 
                </a>
                 </li>
                <?php }else {?> 
                <li class="nav-item active">
                <a href="admin.php?page=dashboard&Id_2=<?php echo $user_row['course']; ?>">
                  <i class="fas fa-home"></i>
                  <p>Dashboard</p> 
                </a>
                 </li>
               <?php }?> 
              <li class="nav-section">
                <span class="sidebar-mini-icon">
                  <i class="fa fa-ellipsis-h"></i>
                </span>
                <h4 class="text-section"> <?php echo $row['code']; ?></h4>
              </li>
              <?php
                
                if ($user_row['course']=="$id") {
                ?>
              <li class="nav-item">
                <a data-bs-toggle="collapse" href="#base">
                  <i class="fas fa-layer-group"></i>
                  <p><?php echo $user_row['course']; ?></p>
                  <span class="caret"></span>
                </a>
                <div class="collapse" id="base">
                  <ul class="nav nav-collapse">
                    <?php 
                      $i = 1;
                      $school_query = mysqli_query($conn,"SELECT * FROM subject_soes 
                      INNER JOIN module_soes 
                      ON module_soes.course_code = subject_soes.course_code WHERE subject_soes.course_code='$id'");
                     while($row = mysqli_fetch_array($school_query)){  
                    ?>
                    <li>
                      <a href="admin.php?page=fgtt5678532srr5567yfsszadt578jjhggfr443w2&Id_2=<?php echo $user_row['course']; ?>&Id_3=<?php echo $row['code']; ?>">
                        <span class="sub-item"><?php echo $row['code']; ?></span>
                      </a>
                    </li>
                    <?php }?>
                   
                  </ul>
                </div>
              </li> 
              <?php }?>  
              <li class="nav-item">
                <a href="https://labs.cybercode.co.tz">
                  <i class="fas fa-th-list"></i>
                  <p>Cybercode Lab</p> 
                </a> 
              </li>
            
                <li class="nav-item" id="kali-linux-item">
  <a href="kali.php">
    <i class="fas fa-terminal"></i>
    <p>Kali Linux</p> 
  </a> 
</li>
  <li class="nav-item">
                <a href="https://warroom-e9bccbb8hcd8a6fn.southafricanorth-01.azurewebsites.net/">
                  <i class="fas fa-users"></i>
                  <p>CyberGaming</p> 
                </a> 
              </li>



<!-- Vexperts Menu Item -->
<li class="nav-item" id="kali-linux-item">
  <a href="javascript:void(0)" id="ask-deepseek">
    <i class="fas fa-comments"></i> <!-- FontAwesome Chat Icon -->
    <p>Ask Deepseek</p> 
  </a> 
</li>

<script>
  // Handle click event for opening the Deepseek popup
  document.getElementById('ask-deepseek').addEventListener('click', function(event) {
    event.preventDefault(); // Prevent the default link behavior
    
    // Open Deepseek in a popup within the same window
    const deepseekPopup = window.open(
      'https://chat.deepseek.com/', // URL of Deepseek
      'deepseek-popup', // Name of the popup window
      'width=800,height=600,left=200,top=200,resizable=yes,scrollbars=yes'
    );
  });
</script>



 <!-- Vexperts Menu Item --
        <li class="nav-item" id="kali-linux-item">
          <a href="https://chat.deepseek.com/">
            <i class="fas fa-terminal"></i>
            <p>Ask Deepseek</p> 
          </a> 
        </li>
--->
<li class="nav-item">
                <a href="https://www.misp-project.org/">
                  <i class="fas fa-th-list"></i>
                  <p>MISP</p> 
                </a> 
              </li>

              <li class="nav-item">
                <a href="#">
                  <i class="fas fa-unlock"></i>
                  <p>CPhisher</p> 
                </a> 
              </li> 
              <li class="nav-item">
                <a href="https://community.cybershield.co.tz">
                  <i class="fas fa-users"></i>
                  <p>Cybercode Community</p> 
                </a> 
              </li>
              <?php if ($invoice2["invoice_status"] == 'Enable'){?>
              <li class="nav-section">
                <span class="sidebar-mini-icon">
                  <i class="fa fa-ellipsis-h"></i>
                </span>
                <h4 class="text-section">eVUE</h4> 
              </li>
              <li class="nav-item active">
                <a href="orbital/exam.php">
                  <i class="fas fa-file-signature"></i>
                  <p>My Examination</p>
                 <span class="badge badge-success">New</span>
                </a>
              </li> 
              <li class="nav-item">
                <a href="https://community.cybershield.co.tz">
                  <i class="fas fa-address-card"></i>
                  <p>My Certificates</p> 
                </a> 
              </li>
              <?php  }?>
            </ul>
          </div>
        </div>
      </div>
      
  