        <?php
          if ($priviledge == "general" || $priviledge == "staff") {
         ?>
        <!-- page content for general and staff -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
                <h3><a href="main.php">Dashboard</a></h3>
              </div>
            </div>

            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_content" style="color: black">
                    <div class="row">
                  <div class="col-md-4">
                    <div class="tile-stats">
                  <div class="icon"><i style="color: black" class="fa fa-building"></i></div>
                  <?php
                  $query = $conn->query("SELECT * FROM faculty order by 'id' DESC");
                  $fetch = $query->fetchAll(PDO::FETCH_OBJ);
                  $count = $query->rowCount();
                  $num = 1;
                  if ($count > 0) {
                  ?>
                  <div class="count"><?php echo "$count"; ?></div>
                  <h3 style="color: black">Faculty(s)</h3>
                  <p>This is the total number of Faculty</p>
                  <?php
                }else{
                  ?>
                  <div class="count">0</div>
                  <h3 style="color: black">Faculty</h3>
                  <p>This is the total number of Faculty</p>
                  <?php
                }
                  ?>
                  
                </div>
              </div>
              <div class="col-md-4">
                <div class="tile-stats">
                  <div class="icon"><i style="color: black" class="fa fa-home"></i></div>
                  <?php
                  $query = $conn->query("SELECT * FROM department order by 'id' DESC");
                  $fetch = $query->fetchAll(PDO::FETCH_OBJ);
                  $count = $query->rowCount();
                  $num = 1;
                  if ($count > 0) {
                  ?>
                  <div class="count"><?php echo "$count"; ?></div>
                  <h3 style="color: black">Total Department(s)</h3>
                  <p>This is the total number of Departments</p>
                  <?php
                }else{
                  ?>
                  <div class="count">0</div>
                  <h3 style="color: black">Total Department(s)</h3>
                  <p>This is the total number of Departments</p>
                  <?php
                }


                  ?>
                  
                </div>
              </div>

              <div class="col-md-4">
                <div class="tile-stats">
                  <div class="icon"><i style="color: black" class="fa fa-briefcase"></i></div>
                  <?php
                  $query = $conn->query("SELECT * FROM course order by 'id' DESC");
                  $fetch = $query->fetchAll(PDO::FETCH_OBJ);
                  $count = $query->rowCount();
                  $num = 1;
                  if ($count > 0) {
                  ?>
                  <div class="count"><?php echo "$count"; ?></div>
                  <h3 style="color: black">Total Course(s)</h3>
                  <p>This is the total number of Courses</p>
                  <?php
                }else{
                  ?>
                  <div class="count">0</div>
                  <h3 style="color: black">Total Course</h3>
                  <p>This is the total number of Courses</p>
                  <?php
                }


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

              <div class="row">
              <div class="col-md-4">
                <div class="tile-stats">
                  <div class="icon"><i style="color: black" class="fa fa-user"></i></div>
                  <?php
                  $query = $conn->query("SELECT * FROM lecturers");
                  $fetch = $query->fetchAll(PDO::FETCH_OBJ);
                  $count = $query->rowCount();
                  $num = 1;
                  if ($count > 0) {
                  ?>
                  <div class="count"><?php echo "$count"; ?></div>
                  <h3 style="color: black">Total Lecturer(s)</h3>
                  <p>This is the total number of registered Lecturesr</p>
                  <?php
                }else{
                  ?>
                  <div class="count">0</div>
                  <h3 style="color: black">Total Lecturer</h3>
                  <p>This is the total number of registered Lecturers</p>
                  <?php
                }
                  ?>
                  
                </div>
              </div>

              <div class="col-md-4">
                <div class="tile-stats">
                  <div class="icon"><i style="color: black" class="fa fa-users"></i></div>
                  <?php
                  $query = $conn->query("SELECT * FROM students");
                  $fetch = $query->fetchAll(PDO::FETCH_OBJ);
                  $count = $query->rowCount();
                  $num = 1;
                  if ($count > 0) {
                  ?>
                  <div class="count"><?php echo "$count"; ?></div>
                  <h3 style="color: black">Total Student(s)</h3>
                  <p>This is the total number of registered Student</p>
                  <?php
                }else{
                  ?>
                  <div class="count">0</div>
                  <h3 style="color: black">Total Student</h3>
                  <p>This is the total number of registered Students</p>
                  <?php
                }
                  ?>
                  
                </div>
              </div>
              </div>
                </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->
        <?php
        }elseif ($priviledge == "HOD") {
        ?>
        <!-- page content for HOD -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
                <h3><a href="main.php">Dashboard</a></h3>
              </div>
            </div>

            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_content" style="color: black">
                    <div class="row" style="background: url('../img/E-library.jpg'); background-size: cover; width: 100%; min-height: 500px">
                      <h1 style="font-weight: bolder; text-transform: uppercase; left: 0;line-height: 200px; margin-top: -100px; position: absolute; text-align: center; top: 50%; width: 100%; color: #009688;" ><span class="typed-words"></span></h1>
              </div>

                </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->
        <?php
        }
        ?>
        <script src="../homefile/js/typed.js"></script>
        <script>
            var typed = new Typed('.typed-words', {
            strings: ["Welcome To Dominican University E-Classroom","Here is your panel as the Head of Department" , "Please explore"],
            typeSpeed: 80,
            backSpeed: 80,
            backDelay: 4000,
            startDelay: 500,
            loop: true,
            showCursor: true
            });
</script>