<!doctype html>
<html lang="en" class="h-100" data-bs-theme="auto">
  <head>
    <script src="js/color-modes.js"></script>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Hugo 0.112.5">
    <title>Dashboard</title>

    <link rel="canonical" href="https://getbootstrap.com/docs/5.3/examples/features/">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">

    <!-- Favicons -->
    <link rel="icon" href="images/book.svg" sizes="32x32" type="image/svg">
    <link rel="icon" href="images/book.svg" sizes="16x16" type="image/svg">
    <link rel="icon" href="images/book.svg">
    <meta name="theme-color" content="#712cf9">


    <style>
      .bd-placeholder-img {
        font-size: 1.125rem;
        text-anchor: middle;
        -webkit-user-select: none;
        -moz-user-select: none;
        user-select: none;
      }

      @media (min-width: 768px) {
        .bd-placeholder-img-lg {
          font-size: 3.5rem;
        }
      }

      .b-example-divider {
        width: 100%;
        height: 3rem;
        background-color: rgba(0, 0, 0, .1);
        border: solid rgba(0, 0, 0, .15);
        border-width: 1px 0;
        box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
      }

      .b-example-vr {
        flex-shrink: 0;
        width: 1.5rem;
        height: 100vh;
      }

      .bi {
        vertical-align: -.125em;
        fill: currentColor;
      }

      .nav-scroller {
        position: relative;
        z-index: 2;
        height: 2.75rem;
        overflow-y: hidden;
      }

      .nav-scroller .nav {
        display: flex;
        flex-wrap: nowrap;
        padding-bottom: 1rem;
        margin-top: -1px;
        overflow-x: auto;
        text-align: center;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
      }

      .btn-bd-primary {
        --bd-violet-bg: #712cf9;
        --bd-violet-rgb: 112.520718, 44.062154, 249.437846;

        --bs-btn-font-weight: 600;
        --bs-btn-color: var(--bs-white);
        --bs-btn-bg: var(--bd-violet-bg);
        --bs-btn-border-color: var(--bd-violet-bg);
        --bs-btn-hover-color: var(--bs-white);
        --bs-btn-hover-bg: #6528e0;
        --bs-btn-hover-border-color: #6528e0;
        --bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
        --bs-btn-active-color: var(--bs-btn-hover-color);
        --bs-btn-active-bg: #5a23c8;
        --bs-btn-active-border-color: #5a23c8;
      }
      .bd-mode-toggle {
        z-index: 1500;
      }
    </style>


    <!-- Custom styles for this template -->
    <link href="css/dashboards.css" rel="stylesheet">
  </head>

  <body class="h-100 d-flex flex-column">
    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
      <symbol id="check2" viewBox="0 0 16 16">
        <path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/>
      </symbol>
      <symbol id="circle-half" viewBox="0 0 16 16">
        <path d="M8 15A7 7 0 1 0 8 1v14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"/>
      </symbol>
      <symbol id="moon-stars-fill" viewBox="0 0 16 16">
        <path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/>
        <path d="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z"/>
      </symbol>
      <symbol id="sun-fill" viewBox="0 0 16 16">
        <path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/>
      </symbol>
    </svg>

    <!-- Color modes -->
    <div class="dropdown position-fixed bottom-0 end-0 mb-3 me-3 bd-mode-toggle">
      <button class="btn btn-bd-primary py-2 dropdown-toggle d-flex align-items-center"
              id="bd-theme"
              type="button"
              aria-expanded="false"
              data-bs-toggle="dropdown"
              aria-label="Toggle theme (auto)">
        <svg class="bi my-1 theme-icon-active" width="1em" height="1em"><use href="#circle-half"></use></svg>
        <span class="visually-hidden" id="bd-theme-text">Toggle theme</span>
      </button>
      <ul class="dropdown-menu dropdown-menu-end shadow" aria-labelledby="bd-theme-text">
        <li>
          <button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false">
            <svg class="bi me-2 opacity-50 theme-icon" width="1em" height="1em"><use href="#sun-fill"></use></svg>
            Light
            <svg class="bi ms-auto d-none" width="1em" height="1em"><use href="#check2"></use></svg>
          </button>
        </li>
        <li>
          <button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="dark" aria-pressed="false">
            <svg class="bi me-2 opacity-50 theme-icon" width="1em" height="1em"><use href="#moon-stars-fill"></use></svg>
            Dark
            <svg class="bi ms-auto d-none" width="1em" height="1em"><use href="#check2"></use></svg>
          </button>
        </li>
        <li>
          <button type="button" class="dropdown-item d-flex align-items-center active" data-bs-theme-value="auto" aria-pressed="true">
            <svg class="bi me-2 opacity-50 theme-icon" width="1em" height="1em"><use href="#circle-half"></use></svg>
            Auto
            <svg class="bi ms-auto d-none" width="1em" height="1em"><use href="#check2"></use></svg>
          </button>
        </li>
      </ul>
    </div>

    <!-- header -->
    <%- include('header', {user: user}) -%>


<!-- My icons -->
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  <symbol id="db-down" viewBox="0 0 16 16">
    <path d="M12.5 9a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm.354 5.854 1.5-1.5a.5.5 0 0 0-.708-.708l-.646.647V10.5a.5.5 0 0 0-1 0v2.793l-.646-.647a.5.5 0 0 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0Z"/>
    <path d="M12.096 6.223A4.92 4.92 0 0 0 13 5.698V7c0 .289-.213.654-.753 1.007a4.493 4.493 0 0 1 1.753.25V4c0-1.007-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1s-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4v9c0 1.007.875 1.755 1.904 2.223C4.978 15.71 6.427 16 8 16c.536 0 1.058-.034 1.555-.097a4.525 4.525 0 0 1-.813-.927C8.5 14.992 8.252 15 8 15c-1.464 0-2.766-.27-3.682-.687C3.356 13.875 3 13.373 3 13v-1.302c.271.202.58.378.904.525C4.978 12.71 6.427 13 8 13h.027a4.552 4.552 0 0 1 0-1H8c-1.464 0-2.766-.27-3.682-.687C3.356 10.875 3 10.373 3 10V8.698c.271.202.58.378.904.525C4.978 9.71 6.427 10 8 10c.262 0 .52-.008.774-.024a4.525 4.525 0 0 1 1.102-1.132C9.298 8.944 8.666 9 8 9c-1.464 0-2.766-.27-3.682-.687C3.356 7.875 3 7.373 3 7V5.698c.271.202.58.378.904.525C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777ZM3 4c0-.374.356-.875 1.318-1.313C5.234 2.271 6.536 2 8 2s2.766.27 3.682.687C12.644 3.125 13 3.627 13 4c0 .374-.356.875-1.318 1.313C10.766 5.729 9.464 6 8 6s-2.766-.27-3.682-.687C3.356 4.875 3 4.373 3 4Z"/>
  </symbol>
  <symbol id="db-up" viewBox="0 0 16 16">
    <path d="M12.5 16a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm.354-5.854 1.5 1.5a.5.5 0 0 1-.708.708L13 11.707V14.5a.5.5 0 0 1-1 0v-2.793l-.646.647a.5.5 0 0 1-.708-.708l1.5-1.5a.5.5 0 0 1 .708 0Z"/>
    <path d="M12.096 6.223A4.92 4.92 0 0 0 13 5.698V7c0 .289-.213.654-.753 1.007a4.493 4.493 0 0 1 1.753.25V4c0-1.007-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1s-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4v9c0 1.007.875 1.755 1.904 2.223C4.978 15.71 6.427 16 8 16c.536 0 1.058-.034 1.555-.097a4.525 4.525 0 0 1-.813-.927C8.5 14.992 8.252 15 8 15c-1.464 0-2.766-.27-3.682-.687C3.356 13.875 3 13.373 3 13v-1.302c.271.202.58.378.904.525C4.978 12.71 6.427 13 8 13h.027a4.552 4.552 0 0 1 0-1H8c-1.464 0-2.766-.27-3.682-.687C3.356 10.875 3 10.373 3 10V8.698c.271.202.58.378.904.525C4.978 9.71 6.427 10 8 10c.262 0 .52-.008.774-.024a4.525 4.525 0 0 1 1.102-1.132C9.298 8.944 8.666 9 8 9c-1.464 0-2.766-.27-3.682-.687C3.356 7.875 3 7.373 3 7V5.698c.271.202.58.378.904.525C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777ZM3 4c0-.374.356-.875 1.318-1.313C5.234 2.271 6.536 2 8 2s2.766.27 3.682.687C12.644 3.125 13 3.627 13 4c0 .374-.356.875-1.318 1.313C10.766 5.729 9.464 6 8 6s-2.766-.27-3.682-.687C3.356 4.875 3 4.373 3 4Z"/>
  </symbol>
  <symbol id="add" viewBox="0 0 16 16">
    <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
    <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
  </symbol>
  <symbol id="modify" viewBox="0 0 16 16">
    <path d="M9.465 10H12a2 2 0 1 1 0 4H9.465c.34-.588.535-1.271.535-2 0-.729-.195-1.412-.535-2z"/>
    <path d="M6 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm.535-10a3.975 3.975 0 0 1-.409-1H4a1 1 0 0 1 0-2h2.126c.091-.355.23-.69.41-1H4a2 2 0 1 0 0 4h2.535z"/>
    <path d="M14 4a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/>
  </symbol>
  <symbol id="face" viewBox="0 0 16 16">
    <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
    <path d="M4.285 9.567a.5.5 0 0 1 .683.183A3.498 3.498 0 0 0 8 11.5a3.498 3.498 0 0 0 3.032-1.75.5.5 0 1 1 .866.5A4.498 4.498 0 0 1 8 12.5a4.498 4.498 0 0 1-3.898-2.25.5.5 0 0 1 .183-.683zM7 6.5C7 7.328 6.552 8 6 8s-1-.672-1-1.5S5.448 5 6 5s1 .672 1 1.5zm4 0c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5S9.448 5 10 5s1 .672 1 1.5z"/>
  </symbol>
  <symbol id="key" viewBox="0 0 16 16">
    <path d="M0 8a4 4 0 0 1 7.465-2H14a.5.5 0 0 1 .354.146l1.5 1.5a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0L13 9.207l-.646.647a.5.5 0 0 1-.708 0L11 9.207l-.646.647a.5.5 0 0 1-.708 0L9 9.207l-.646.647A.5.5 0 0 1 8 10h-.535A4 4 0 0 1 0 8zm4-3a3 3 0 1 0 2.712 4.285A.5.5 0 0 1 7.163 9h.63l.853-.854a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.793-.793-1-1h-6.63a.5.5 0 0 1-.451-.285A3 3 0 0 0 4 5z"/>
    <path d="M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
  </symbol>
  <symbol id="profile" viewBox="0 0 16 16">
    <path d="M6 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-5 6s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zM11 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4zm2 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm0 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2z"/>
  </symbol>
  <symbol id="user" viewBox="0 0 16 16">
    <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/>
    <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/>
  </symbol>
  <symbol id="db-fill" viewBox="0 0 16 16">
    <path d="M3.904 1.777C4.978 1.289 6.427 1 8 1s3.022.289 4.096.777C13.125 2.245 14 2.993 14 4s-.875 1.755-1.904 2.223C11.022 6.711 9.573 7 8 7s-3.022-.289-4.096-.777C2.875 5.755 2 5.007 2 4s.875-1.755 1.904-2.223Z"/>
    <path d="M2 6.161V7c0 1.007.875 1.755 1.904 2.223C4.978 9.71 6.427 10 8 10s3.022-.289 4.096-.777C13.125 8.755 14 8.007 14 7v-.839c-.457.432-1.004.751-1.49.972C11.278 7.693 9.682 8 8 8s-3.278-.307-4.51-.867c-.486-.22-1.033-.54-1.49-.972Z"/>
    <path d="M2 9.161V10c0 1.007.875 1.755 1.904 2.223C4.978 12.711 6.427 13 8 13s3.022-.289 4.096-.777C13.125 11.755 14 11.007 14 10v-.839c-.457.432-1.004.751-1.49.972-1.232.56-2.828.867-4.51.867s-3.278-.307-4.51-.867c-.486-.22-1.033-.54-1.49-.972Z"/>
    <path d="M2 12.161V13c0 1.007.875 1.755 1.904 2.223C4.978 15.711 6.427 16 8 16s3.022-.289 4.096-.777C13.125 14.755 14 14.007 14 13v-.839c-.457.432-1.004.751-1.49.972-1.232.56-2.828.867-4.51.867s-3.278-.307-4.51-.867c-.486-.22-1.033-.54-1.49-.972Z"/>
  </symbol>
</svg>


<main>
  <h1 class="visually-hidden">Dashboard</h1>

  <!-- Username, Password and Profile -->
  <div class="container px-4 py-4">
    <h2 class="pb-2 border-bottom">Dashboard</h2>
    <div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
      <div class="col d-flex align-items-center">
        <div class="icon-square text-body-emphasis bg-body-secondary d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
          <svg class="bi" width="1em" height="1em"><use xlink:href="#user"/></svg>
        </div>
        <div>
          <a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#user-change">Change username</a>
        </div>
      </div>
      <div class="col d-flex align-items-center">
        <div class="icon-square text-body-emphasis bg-body-secondary d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
          <svg class="bi" width="1em" height="1em"><use xlink:href="#key"/></svg>
        </div>
        <div>
          <a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#pswd-change">Change password</a>
        </div>
      </div>
      <div class="col d-flex align-items-center">
        <div class="icon-square text-body-emphasis bg-body-secondary d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
          <svg class="bi" width="1em" height="1em"><use xlink:href="#profile"/></svg>
        </div>
        <div>
          <a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#profile-modal">My profile</a>
        </div>
      </div>

    </div>
  </div>

  <div class="container">
    <div class="border-bottom mx-4"></div>
  </div>

  <!-- DB Restore and Backup-->
  <div class="container px-4 py-4">
    <div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
      <div class="col d-flex align-items-start">
        <div class="icon-square text-body-emphasis bg-body-secondary d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
          <svg class="bi" width="1em" height="1em"><use xlink:href="#db-down"/></svg>
        </div>
        <div>
          <h3 class="fs-2 text-body-emphasis">Database Backup</h3>
          <a href="/dbbackup" class="btn btn-primary">Create Backup</a>
        </div>
      </div>
      <!-- <div class="col d-flex align-items-start">
        <div class="icon-square text-body-emphasis bg-body-secondary d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
          <svg class="bi" width="1em" height="1em"><use xlink:href="#db-up"/></svg>
        </div>
        <div>
          <h3 class="fs-2 text-body-emphasis">Database Restore</h3>
          <a href="#" class="btn btn-primary">Upload SQL file</a>

          <form id="sqlupload" action="/dbrestore" method="POST" style="display: none;">

          </form>

          <script> //js to send signout post request
            function sqlrestore() {
              const form = document.getElementById('sqlupload');
              form.submit();
            }
          </script>
        </div>
      </div> -->
    </div>
  </div>

  <div class="container">
    <div class="border-bottom mx-4"></div>
  </div>

  <!-- Add School, Modify School and view library operators -->
  <div class="container px-4 py-4">
    <div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
      <div class="col d-flex align-items-start">
        <div class="icon-square text-body-emphasis bg-body-secondary d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
          <svg class="bi" width="1em" height="1em"><use xlink:href="#add"/></svg>
        </div>
        <div>
          <h3 class="fs-2 text-body-emphasis">Add School</h3>
          <a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#add-school">Start</a>
        </div>
      </div>
      <!-- <div class="col d-flex align-items-start">
        <div class="icon-square text-body-emphasis bg-body-secondary d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
          <svg class="bi" width="1em" height="1em"><use xlink:href="#modify"/></svg>
        </div>
        <div>
          <h3 class="fs-2 text-body-emphasis">Modify School</h3>
          <a href="#" class="btn btn-primary">Start</a>
        </div>
      </div> -->
      <!-- <div class="col d-flex align-items-start">
        <div class="icon-square text-body-emphasis bg-body-secondary d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
          <svg class="bi" width="1em" height="1em"><use xlink:href="#face"/></svg>
        </div>
        <div>
          <h3 class="fs-2 text-body-emphasis">Library Operators</h3>
          <a href="#" class="btn btn-primary">Requests</a>
        </div>
      </div> -->
    </div>
  </div>




  <!-- Queries -->
  <div class="b-example-divider"></div>

  <div class="container px-4 py-4">
    <h2 class="pb-2 border-bottom">Administration</h2>
    <div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
      <div class="col d-flex align-items-center"> <!-- Column 1 -->
        <div>
          <h3 class="fs-2 text-body-emphasis">View loans per school</h3>
          <form action="/admin-loans" method="POST">
            <div class="input-group input-group-sm mb-3">
              <span class="input-group-text">Month - Year</span>
              <input type="month" class="form-control" name="my">
            </div>
            <div class="d-flex justify-content-center">
              <input class="btn btn-primary" type="submit" value="Go!">
            </div>
          </form>
        </div>
      </div>

      <div class="col d-flex align-items-center"> <!-- Column 2 -->
        <div>
          <h3 class="fs-2 text-body-emphasis">View authors per category</h3>
          <form action="/admin-author-categories" method="POST">
            <div class="input-group input-group-sm mb-3">
              <span class="input-group-text">Category</span>
              <select name="category">
                <option>Action and Adventure</option>
                <option>Art</option>
                <option>Biography</option>
                <option>Business and Economics</option>
                <option>Comics and Graphic Novels</option>
                <option>Computing and Technology</option>
                <option>Cookbooks and Food</option>
                <option>Crafts and Hobbies</option>
                <option>Crime and Mystery</option>
                <option>Drama</option>
                <option>Education and Teaching</option>
                <option>Fantasy</option>
                <option>Fiction</option>
                <option>Health and Wellness</option>
                <option>Historical Fiction</option>
                <option>History</option>
                <option>Horror</option>
                <option>Humor</option>
                <option>Inspirational and Motivational</option>
                <option>LGBTQ+</option>
                <option>Literary Fiction</option>
                <option>Music</option>
                <option>Parenting and Family</option>
                <option>Philosophy</option>
                <option>Poetry</option>
                <option>Politics and Social Sciences</option>
                <option>Religion and Spirituality</option>
                <option>Romance</option>
                <option>Science</option>
                <option>Science Fiction</option>
                <option>Self-Help and Personal Development</option>
                <option>Sports</option>
                <option>Thriller</option>
                <option>Travel</option>
                <option>True Crime</option>
                <option>Western</option>
              </select>
            </div>
            <div class="d-flex justify-content-center">
              <input class="btn btn-primary" type="submit" value="Go!">
            </div>
          </form>
        </div>
      </div>

      <div class="col d-flex align-items-center"> <!-- Column 3 -->
        <div>
          <h3 class="fs-2 text-body-emphasis">View teachers who have rented books per category</h3>
          <form action="/admin-teacher-categories" method="POST">
            <div class="input-group input-group-sm mb-3">
              <span class="input-group-text">Category</span>
              <select name="category">
                <option>Action and Adventure</option>
                <option>Art</option>
                <option>Biography</option>
                <option>Business and Economics</option>
                <option>Comics and Graphic Novels</option>
                <option>Computing and Technology</option>
                <option>Cookbooks and Food</option>
                <option>Crafts and Hobbies</option>
                <option>Crime and Mystery</option>
                <option>Drama</option>
                <option>Education and Teaching</option>
                <option>Fantasy</option>
                <option>Fiction</option>
                <option>Health and Wadmin-young-teachersellness</option>
                <option>Historical Fiction</option>
                <option>History</option>
                <option>Horror</option>
                <option>Humor</option>
                <option>Inspirational and Motivational</option>
                <option>LGBTQ+</option>
                <option>Literary Fiction</option>
                <option>Music</option>
                <option>Parenting and Family</option>
                <option>Philosophy</option>
                <option>Poetry</option>
                <option>Politics and Social Sciences</option>
                <option>Religion and Spirituality</option>
                <option>Romance</option>
                <option>Science</option>
                <option>Science Fiction</option>
                <option>Self-Help and Personal Development</option>
                <option>Sports</option>
                <option>Thriller</option>
                <option>Travel</option>
                <option>True Crime</option>
                <option>Western</option>
              </select>
            </div>
            <div class="d-flex justify-content-center">
              <input class="btn btn-primary" type="submit" value="Go!">
            </div>
          </form>
        </div>
      </div><!-- first row ends here -->
    </div>

    <div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
      <div class="col d-flex align-items-center">  <!-- Column 4-->
        <div>
          <h3 class="fs-2 text-body-emphasis text-center">View young teachers with most loans</h3>
          <div class="d-flex justify-content-center">
            <a href="/admin-young-teachers" class="btn btn-primary">Go!</a>
          </div>
        </div>
      </div>

      <div class="col d-flex align-items-center"> <!-- Column 5 -->
        <div>
          <h3 class="fs-2 text-body-emphasis text-center">View authors whose books have never been rented</h3>
          <div class="d-flex justify-content-center">
            <a href="/admin-authors-noloans" class="btn btn-primary">Go!</a>
          </div>
        </div>
      </div>

      <div class="col d-flex align-items-center"> <!-- Column 6 -->
        <div>
          <h3 class="fs-2 text-body-emphasis text-center">View operators who have approved more than 20 loans</h3>
          <div class="d-flex justify-content-center">
            <a href="/admin-ops-20loans" class="btn btn-primary">Go!</a>
          </div>
        </div>
      </div>
    </div>

    <div class="row g-4 py-5 row-cols-1 row-cols-lg-2">
      <div class="col d-flex align-items-center"> <!-- Column 7 -->
        <div>
          <h3 class="fs-2 text-body-emphasis text-center">View top-3 category pairs that have appeared in loans</h3>
          <div class="d-flex justify-content-center">
            <a href="/admin-top3-cat" class="btn btn-primary">Go!</a>
          </div>
        </div>
      </div>

      <div class="col d-flex align-items-center"> <!-- Column 8 -->
        <div>
          <h3 class="fs-2 text-body-emphasis text-center">View authors with at least 5 books less than the author with the most books</h3>
          <div class="d-flex justify-content-center">
            <a href="/admin-5books-less" class="btn btn-primary">Go!</a>
          </div>
        </div>
      </div>
    </div>
  </div>


</main>

<!-- Modals -->
<div class="modal fade" id="pswd-change" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
      <div class="modal-content">
        <div class="modal-header">
          <h1 class="modal-title fs-5">Change your password</h1>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
            <form id="pswd-form" action="/password-change" method="POST">
                <div class="form-floating mb-3">
                  <input type="password" class="form-control rounded-3" id="password" name="password" placeholder="New Password" required>
                  <label for="password">New Password</label>
                </div>
            </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-primary" onclick="pswd_send()">Save changes</button>
          <script>
            function pswd_send() {
              const form = document.getElementById('pswd-form');
              const input = form.querySelector('input');
  
              if (input.value === '') {
                alert('Please fill in the field'); 
                return;
              } else {
                 form.submit();
              }
            }
          </script>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="user-change" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
      <div class="modal-content">
        <div class="modal-header">
          <h1 class="modal-title fs-5">Change your username</h1>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
            <form id="user-form" action="/username-change" method="POST">
                <div class="form-floating mb-3">
                  <input type="text" class="form-control rounded-3" id="username" name="username" placeholder="New username" required>
                  <label for="username">New username</label>
                </div>
            </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-primary" onclick="user_send()">Save changes</button>
          <script>
            function user_send() {
              const form = document.getElementById('user-form');
              const input = form.querySelector('input');
  
              if (input.value === '') {
                alert('Please fill in the field'); 
                return;
              } else {
                 form.submit();
              }
            }
          </script>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="profile-modal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
      <div class="modal-content">
        <div class="modal-header">
          <h2 class="modal-title fs-5">View your profile data</h2>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
             <ul class="d-grid gap-4 my-3 list-unstyled small">
                <li class="d-flex gap-4">
                  <div>
                    <h5 class="mb-0">Username</h5>
                    <%=user.username%>
                  </div>
                </li>
                <li class="d-flex gap-4">
                  <div>
                    <h5 class="mb-0">Name</h5>
                    <%=user.name%>
                  </div>
                </li>
                <li class="d-flex gap-4">
                  <div>
                    <h5 class="mb-0">Age</h5>
                    <%=user.age%>
                  </div>
                </li>
                <li class="d-flex gap-4">
                    <div>
                      <h5 class="mb-0">Type</h5>
                      <%=user.type%>
                    </div>
                  </li>
            </ul>
        </div>
        <div class="modal-footer">

        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="add-school" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
      <div class="modal-content">
        <div class="modal-header">
          <h1 class="modal-title fs-5">Register a new school</h1>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
            <form id="school-form" action="/admin-add-school" method="POST">
                <div class="form-floating mb-3">
                  <input type="text" class="form-control rounded-3" name="name" placeholder="Name" required>
                  <label for="name">Name</label>
                </div>
                <div class="form-floating mb-3">
                  <input type="text" class="form-control rounded-3" name="address" placeholder="Address" required>
                  <label for="address">Address</label>
                </div>
                <div class="form-floating mb-3">
                  <input type="text" class="form-control rounded-3" name="city" placeholder="City" required>
                  <label for="city">City</label>
                </div>
                <div class="form-floating mb-3">
                  <input type="text" class="form-control rounded-3" name="phone" placeholder="Phone" required>
                  <label for="phone">Phone</label>
                </div>
                <div class="form-floating mb-3">
                  <input type="text" class="form-control rounded-3" name="mail" placeholder="Mail" required>
                  <label for="mail">Mail</label>
                </div>
            </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-primary" onclick="add_school()">Save changes</button>
          <script>
            function add_school() {
              const form = document.getElementById('school-form');
              const inputs = form.getElementsByTagName('input');
  
              let isEmpty = false;
              for (input of inputs) { 
                if (input.value === '') {
                  isEmpty = true; 
                  break; 
                }
              }
              if (isEmpty) {
                alert('Please fill in all the fields'); 
                return;
              }

              form.submit();
            }
          </script>
        </div>
      </div>
    </div>
  </div>

  <!-- Footer -->
  <%- include('footer') -%>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>

    </body>
</html>
