<nav class="sidebar vertical-scroll ps-container ps-theme-default ps-active-y">
  <div class="logo d-flex justify-content-space-around">
    <a href="/admin/"><img src="../img2/kp.png" alt="" style="height: 50px; width: 50px" /></a>
    <h6 class="fw-bold header_text mt-3 mx-3">CORASS</h6>

    <!-- <div class="sidebar_close_icon d-lg-none">
      <i class="ti-close"></i>
    </div> -->
  </div>
  <p class="system-confg">
    <script>document.write(new Date())</script>
  </p>
  <br>
  <div class="sidebar_close_icon d-lg-none">
    <i class="ti-close"></i>
  </div>
  <div class="d-flex schoolsett"> <a href="/admin">
      <i class="fa-solid fa-gear text-light" style="margin:12px 0 0 12px"></i>
      <button class="btn text-light"> Dashboard</button>
    </a>
  </div>
  <ul id="sidebar_menu">
    <p class="system-confg">SYSTEM CONFIGURATION</p>
    <% if(user.second_role==1){ %>
      <li class="">

        <a class="has-arrow" href="#" aria-expanded="false">
          <div>
            <img src="../img2/menu-icon/2.svg" alt="" />
          </div>
          <span class="dash-item">Settings</span>
        </a>
        <ul>

          <li class="d-flex"><i class="fa-solid fa-building-columns li-icon"></i>
            <a href="#">Institute</a>
          </li>
          <li class="d-flex"><i class="fa-solid fa-cube li-icon"></i>
            <a href="/admin/department">Department</a>
          </li>
          <li class="d-flex"><i class="fa-solid fa-user-plus li-icon"></i>
            <a href="/admin/supervisor">Staff</a>
          </li>
          <li class="d-flex"><i class="fa-sharp fa-solid fa-layer-group li-icon"></i>
            <a href="#">Level</a>
          </li>
          <li class="d-flex"><i class="fa-solid fa-building-columns li-icon"></i>
            <a href="#">Study Mode</a>
          </li>
          <li class="d-flex"><i class="fa-solid fa-cash-register li-icon"></i>
            <a href="/admin/payment-settings">Payment Plans</a>
          </li>
        </ul>
      </li>
      <%}%>

        <% if(user.second_role==1){ %>
          <li class="">
            <a class="has-arrow" href="#" aria-expanded="false">
              <div>
                <img src="../img2/useracc.png" class="img-fluid" style="width: 20px;" alt="" />
              </div>
              <span class="dash-item">Access & Previledges</span>
            </a>
            <ul>
              <li class="d-flex"><i class="fa-solid fa-shield li-icon"></i>
                <a href="/admin/all-role">Roles</a>
              </li>
              <li class="d-flex"><i class="fa-solid fa-user-plus li-icon"></i>
                <a href="/admin/admin-user">Admin Users</a>
              </li>
            </ul>
          </li>

          <%}%>
            <li class="">
              <a class="has-arrow" href="#" aria-expanded="false">
                <div>
                  <img src="../img2/chart.png" style="width: 24px;" alt="" />
                </div>
                <span class="dash-item">Core Process</span>
              </a>
              <ul>

                <% if(user.second_role==1 || user.second_role==4 || user.second_role==2){ %>
                  <li>
                    <a class="has-arrow">Projects</a>
                    <ul>
                      <%for (const session of sessions){%>
                        <li class="">
                          <a href="/admin/projects/<%= session.id%>" aria-expanded="false">
                            <span>
                              <%= session.name %>
                            </span>
                          </a>
                        </li>
                        <%}%>
                    </ul>
                  </li>
                  <li>
                    <a class="has-arrow">Projects Topics</a>
                    <ul>
                      <%for (const session of sessions){%>
                        <li class="">
                          <a href="/admin/project-topics/<%= session.id%>" aria-expanded="false">
                            <span>
                              <%= session.name %>
                            </span>
                          </a>
                        </li>
                        <%}%>
                    </ul>
                  </li>
                  <%}%>
                    <% if(user.second_role==1 || user.second_role==3 || user.second_role==2){ %>
                      <li>
                        <a class="has-arrow">Payments</a>
                        <ul>
                          <%for (const session of sessions){%>
                            <li class="">
                              <a href="/admin/paymentreport/<%= session.id%>" aria-expanded="false">
                                <span>
                                  <%= session.name %>
                                </span>
                              </a>
                            </li>
                            <%}%>
                        </ul>
                      </li>
                      <%}%>
                        <% if(user.second_role==14 || user.second_role==1 || user.second_role==3 ||
                          user.second_role==2){ %>
                          <li>
                            <a class="has-arrow">Payments Audit</a>
                            <ul>
                              <%for (const session of sessions){%>
                                <li class="">
                                  <a href="/admin/payment-audit/<%= session.id%>" aria-expanded="false">
                                    <span>
                                      <%= session.name %>
                                    </span>
                                  </a>
                                </li>
                                <%}%>
                            </ul>
                          </li>
                          <%}%>
                            <% if(user.second_role==1 || user.second_role==2 || user.second_role==10){ %>
                              <li>
                                <a class="has-arrow">Students</a>
                                <ul>
                                  <%for (const session of sessions){%>
                                    <li class="">
                                      <a href="/admin/students/<%= session.id%>" aria-expanded="false">
                                        <span>
                                          <%= session.name %>
                                        </span>
                                      </a>
                                    </li>
                                    <%}%>
                                </ul>
                              </li>
                              <%}%>

                                <% if(user.second_role==1 || user.second_role==2 || user.second_role==3){ %>
                                  <li class="d-flex"><i class="fa-solid fa-building-columns li-icon"></i>
                                    <a href="/admin/institute-report">Institute</a>
                                  </li>
                                  <%}%>
                                    <% if(user.second_role==1 || user.second_role==5 || user.second_role==2){ %>
                                      <li class="d-flex"><i class="fa-solid fa-book li-icon"></i>
                                        <a href="#">Siwes</a>
                                      </li>
                                      <%}%>
              </ul>
            </li>
            <% if(user.second_role==1 || user.second_role==3 || user.second_role==10 || user.second_role==2 ||
              user.second_role==14 ){ %>
              <li class="">
                <a class="has-arrow" href="#" aria-expanded="false">
                  <div>
                    <img src="../img2/menu-icon/2.svg" alt="" />
                  </div>
                  <span class="dash-item">Support</span>
                </a>

                <ul>
                  <li class="d-flex"><i class="fa-sharp fa-solid fa-credit-card li-icon"></i>
                    <a href="/admin/paymentrequery">Payment Requery</a>
                  </li>
                  <li class="d-flex"><i class="fa-sharp fa-solid fa-credit-card li-icon"></i>
                    <a href="/admin/paymentswap">Payment Swap</a>
                  </li>
                </ul>
              </li>
              <%}%>

                <% if(user.second_role==1 || user.second_role==2 || user.second_role==12) { %>
                  <li class="">
                    <a class="has-arrow" href="#" aria-expanded="false">
                      <div>
                        <img src="../img2/book icon.png" alt="" />
                      </div>
                      <span class="dash-item">Library Management</span>
                    </a>

                    <ul>
                      <li class="d-flex"><i class="fa-sharp fa-solid fa-credit-card li-icon"></i>
                        <a href="/research" class="dash-item">Research Library</a>
                      </li>
                      <li class="d-flex"><i class="fa-sharp fa-solid fa-credit-card li-icon"></i>
                        <a href="/library-access">Library Access</a>
                      </li>
                    </ul>
                  </li>
                  <%}%>
                    <% if(user.second_role==1 || user.second_role==2 || user.second_role==13) { %>
                      <li class="">
                        <a class="has-arrow" href="#" aria-expanded="false">
                          <div>
                            <img src="../img2/book icon.png" alt="" />
                          </div>
                          <span class="dash-item">Project Binding</span>
                        </a>

                        <ul>
                          <li>
                            <a class="has-arrow">Student Details</a>
                            <ul>
                              <%for (const session of sessions){%>
                                <li class="">
                                  <a href="/admin/binding-record/<%= session.id%>" aria-expanded="false">
                                    <span>
                                      <%= session.name %>
                                    </span>
                                  </a>
                                </li>
                                <%}%>
                            </ul>
                          </li>
                          <% if(user.second_role==1 || user.second_role==3 || user.second_role==2) { %>
                            <li>
                              <a class="has-arrow">Payment Summary</a>
                              <ul>
                                <%for (const session of sessions){%>
                                  <li class="">
                                    <a href="/admin/binding-payment/<%= session.id%>" aria-expanded="false">
                                      <span>
                                        <%= session.name %>
                                      </span>
                                    </a>
                                  </li>
                                  <%}%>
                              </ul>
                            </li>
                            <%}%>

                              <li class="d-flex"><i class="fa-solid fa-user-plus li-icon"></i>
                                <a href="/admin/binding-group" class="dash-item">Group</a>
                              </li>
                              <li class="d-flex"><i class="fa-solid fa-user-plus li-icon"></i>
                                <a href="/admin/binding-odfel" class="dash-item">ODFEL</a>
                              </li>
                        </ul>
                      </li>
                      <%}%>
</nav>
<section class="main_content dashboard_part large_header_bg">
  <div class="container-fluid g-0">
    <div class="row">
      <div class="col-lg-12 p-0">
        <div class="header_iner d-flex justify-content-between align-items-center">
          <div class="sidebar_icon d-lg-none">
            <i class="ti-menu"></i>
          </div>
          <div class="serach_field-area d-flex align-items-center">

            <span class="f_s_14 f_w_400 ml_25 white_text text_white">Apps</span>
          </div>
          <div class="header_right d-flex justify-content-between align-items-center">

            <div class="profile_info">
              <!--  <h3>AYODEJI FATAI ABOLARIN</h3>
                  <p>Supervisor</p> -->
              <img src="../img/client_img.png" alt="#">
              <div class="profile_info_iner">
                <div class="profile_author_name">
                  <h5 style="font-size: small;">Admin</h5>
                </div>
                <div class="profile_info_details">
                  <a href="student-account?user_id=<%=user.id%>&type=staff">My Account </a>
                  <!-- <a href="/profile-staff-security">Account Security</a> -->
                  <a href="/user/logout">Log Out </a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>