<?= $this->extend("templates/hod_base"); ?>

<?= $this->section("content"); ?>
<?php $page_session = \Config\Services::session(); ?>
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h3 class="card-title badge badge-primary">Dapartment of <?= $page_session->get('name'); ?>, Faculty of <?= $page_session->get('faculty_name'); ?></h3>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="<?= base_url()?>/lecturer/dashboard">Home</a></li>
              <li class="breadcrumb-item active">Dashboard</li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">

        <!-- Small boxes (Stat box) -->
        <div class="row">
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-info">
              <div class="inner">
                <h3><?= $staff?></h3>

                <p>Staff</p>
              </div>
              <div class="icon">
                <i class="ion ion-bag"></i>
              </div>
              <a href="<?= base_url()?>/hod/view_staffs" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
          <!-- ./col -->
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-success">
              <div class="inner">
                <h3><?= $students?></h3>

                <p>Active Students</p>
              </div>
              <div class="icon">
                <i class="ion ion-stats-bars"></i>
              </div>
              <a href="<?= base_url()?>/hod/view_students_page" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
          <!-- ./col -->
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-warning">
              <div class="inner">
                <h3><?= $programmes ?></h3>

                <p>Programmes</p>
              </div>
              <div class="icon">
                <i class="ion ion-person-add"></i>
              </div>
              <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
          <!-- ./col -->
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-danger">
              <div class="inner">
                <h3><?= $courses ?></h3>

                <p>Courses</p>
              </div>
              <div class="icon">
                <i class="ion ion-pie-graph"></i>
              </div>
              <a href="<?= base_url()?>/hod/view_courses" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
          <!-- ./col -->
        </div>
        <!-- /.row -->
        <div class="row">
          <div class="col-lg-6 col-sm-12 col-md-12">
            <div class="card">
              <div class="card-header">
                <h5 class="card-title text-bold">List of Programmes</h5>
              </div>
              <div class="card-body">
                <table class="table example3 table-bordered table-striped">
                  <thead>
                    <th>SN</th>
                    <th>Programme</th>
                  </thead>
                  <tbody>
                    <?php
                      if($plist){
                        $i = 1;
                        foreach($plist as $list){ ?>
                          <tr>
                            <td><?=$i++?></td>
                            <td><?=$list->title?></td>
                          </tr>
                    <?php 
                        } 
                      }
                    ?>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
          <div class="col-lg-6 col-sm-12 col-md-12">
            <div class="card">
              <div class="card-header">
                <h5 class="card-title text-bold">List of Courses</h5>
              </div>
              <div class="card-body">
                <table class="table example3 table-bordered table-striped">
                  <thead>
                    <th>SN</th>
                    <th>Code</th>
                    <th>Title</th>
                  </thead>
                  <tbody>
                    <?php
                      if($clist){
                        $i = 1;
                        foreach($clist as $list){ ?>
                          <tr>
                            <td><?=$i++?></td>
                            <td><?=$list->id?></td>
                            <td><?=$list->title?></td>
                          </tr>
                    <?php 
                        } 
                      }
                    ?>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>
<!-- /.content -->
</div>

<?= $this->endSection(); ?>