<?php
session_start();
if(isset($_SESSION['teacher']))
{
  
  $my_id=$_SESSION['teacher']['id'];
?>
<!doctype html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>Malika School</title>

    <!-- Template CSS -->
    <link rel="stylesheet" href="assets/css/style-starter.css">

    <!-- google fonts -->
    <link href="//fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&display=swap" rel="stylesheet">
</head>

<body class="sidebar-menu-collapsed">
    <div class="se-pre-con"></div>
    <section>
        <!-- sidebar menu start -->
        <?php
  include 'navigation.php';
  ?>
        <!-- //sidebar menu end -->
        <!-- header-starts -->
        <?php
  include 'header.php';
  ?>
        <!-- //header-ends -->
        <!-- main content start -->
        <div class="main-content">

            <!-- content -->
            <div class="container-fluid content-top-gap">

                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb my-breadcrumb">
                        <li class="breadcrumb-item"><a href="index.html">Home</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Dashboard</li>
                    </ol>
                </nav>
                <div class="welcome-msg pt-3 pb-4">
                    <h1>Hi <span class="text-primary"><?php 
                    
          $getTch=$connect->query("SELECT * FROM teacher WHERE id='$my_id'")->fetch_assoc();
          
                    echo $getTch['fullname'];
                    ?></p>
                    <!-- <p>Current Session is <b>First term 2021</b></p> -->
                </div>

                <!-- statistics data -->
                <div class="statistics">
                    <div class="row">
                        <!-- <div class="col-xl-6 pr-xl-2">
          <div class="row">
            <div class="col-sm-6 pr-sm-2 statistics-grid">
              <div class="card card_border border-primary-top p-4">
                <i class="lnr lnr-users"> </i>
                <h3 class="text-primary number">2900</h3>
                <p class="stat-text">Total Students</p>
              </div>
            </div>
            <div class="col-sm-6 pl-sm-2 statistics-grid">
              <div class="card card_border border-primary-top p-4">
                <i class="lnr lnr-eye"> </i>
                <h3 class="text-secondary number">50</h3>
                <p class="stat-text">Teachers</p>
              </div>
            </div>
          </div>
        </div>
        
        <div class="col-xl-6 pl-xl-2">
          <div class="row">
            <div class="col-sm-6 pr-sm-2 statistics-grid">
              <div class="card card_border border-primary-top p-4">
                <i class="lnr lnr-cloud-download"> </i>
                <h3 class="text-success number">166.89 M</h3>
                <p class="stat-text">Downloads</p>
              </div>
            </div>
            <div class="col-sm-6 pl-sm-2 statistics-grid">
              <div class="card card_border border-primary-top p-4">
                <i class="lnr lnr-cart"> </i>
                <h3 class="text-danger number">1,250k</h3>
                <p class="stat-text">Purchased</p>
              </div>
            </div>
          </div>
        </div> -->

                        <div class="col-xl-12 pr-xl-2">
                            <div class="row">
                                <div class="col-sm-4 col-6 pr-sm-2 _statistics-grid">
                                    <br>
                                    <div class="card card_border border-primary-top p-4" align="center">
                                        <a href="classes.php">
                                            <i class="fa fa-graduation-cap" style="font-size:96px; padding: 5px"></i>
                                            <h5 class="text-primary_number">Classes</h5>
                                        </a>
                                        <!-- <p class="stat-text">Total Students</p> -->
                                    </div>
                                </div>

                                <div class="col-sm-4 col-6 pr-sm-2 _statistics-grid">
                                    <br>
                                    <div class="card card_border border-primary-top p-4" align="center">
                                        <a href="assessments.php"><i class="fa fa-file-text"
                                                style="font-size:96px; padding: 5px"></i>
                                            <h5 class="text-primary_number">Record Marks</h5>
                                        </a>
                                        <!-- <p class="stat-text">Total Students</p> -->
                                    </div>
                                </div>

                                <div class="col-sm-4 col-6 pr-sm-2 _statistics-grid">
                                    <br>
                                    <div class="card card_border border-primary-top p-4" align="center">
                                        <a href="check_results.php">
                                            <i class="fa fa-files-o" style="font-size:96px; padding: 5px"></i>
                                            <h5 class="text-primary_number">Generate Result</h5>
                                        </a>
                                        <!-- <p class="stat-text">Total Students</p> -->
                                    </div>
                                </div>
                                <div class="col-sm-4 col-6 pr-sm-2 _statistics-grid">
                                    <br>
                                    <div class="card card_border border-primary-top p-4" align="center">
                                        <a href="attendance_option.php">
                                            <i class="fa fa-user-plus" style="font-size:96px; padding: 5px"></i>
                                            <h5 class="text-primary_number">Attendance</h5>
                                        </a>
                                        <!-- <p class="stat-text">Total Students</p> -->
                                    </div>
                                </div>
                                <!-- <div class="col-sm-6 pl-sm-2 statistics-grid">
              <div class="card card_border border-primary-top p-4">
                <i class="lnr lnr-eye"> </i>
                <h3 class="text-secondary number">50</h3>
                <p class="stat-text">Teachers</p>
              </div>
            </div> -->
                            </div>
                        </div>
                    </div>
                </div>
                <!-- //statistics data -->

                <!-- charts -- >
    <div class="chart">
      <div class="row">
        <div class="col-lg-6 pr-lg-2 chart-grid">
          <div class="card text-center card_border">
            <div class="card-header chart-grid__header">
              Bar Chart
            </div>
            <div class="card-body">
              < -- bar chart -- >
              <div id="container">
                <canvas id="barchart"></canvas>
              </div>
              < -- //bar chart -- >
            </div>
            <div class="card-footer text-muted chart-grid__footer">
              Updated 2 hours ago
            </div>
          </div>
        </div>
        <div class="col-lg-6 pl-lg-2 chart-grid">
          <div class="card text-center card_border">
            <div class="card-header chart-grid__header">
              Line Chart
            </div>
            <div class="card-body">
              < -- line chart -- >
              <div id="container">
                <canvas id="linechart"></canvas>
              </div>
              < -- //line chart -- >
            </div>
            <div class="card-footer text-muted chart-grid__footer">
              Updated just now
            </div>
          </div>
        </div>
      </div>
    </div>
    <  -- //charts -- >
    -->
                <!-- Modals -->
                <!-- <section class="template-cards">
      <div class="card card_border">
        <div class="cards__heading">
          <h3>Modals - <span>2 different types of bootstrap modals</span></h3>
        </div>
        <div class="card-body pb-0">
          <div class="row">
            <div class="col-lg-6 pr-lg-2 chart-grid">
              <div class="card text-center card_border">
                <div class="card-header chart-grid__header">
                  Demo modal
                </div>
                <div class="card-body">
                  < -- Button trigger modal -- >
                  <button type="button" class="btn btn-primary btn-style" data-toggle="modal"
                    data-target="#exampleModal">
                    Launch demo
                  </button>

                  < -- Modal -- >
                  <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
                    aria-labelledby="exampleModalLabel" aria-hidden="true">
                    <div class="modal-dialog" role="document">
                      <div class="modal-content">
                        <div class="modal-header">
                          <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
                          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                          </button>
                        </div>
                        <div class="modal-body">
                          ...
                        </div>
                        <div class="modal-footer">
                          <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
                          <button type="button" class="btn btn-success">Save changes</button>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-lg-6 chart-grid">
              <div class="card text-center card_border">
                <div class="card-header chart-grid__header">
                  Vertical centered
                </div>
                <div class="card-body">
                  < -- Button trigger modal -- >
                  <button type="button" class="btn btn-primary btn-style" data-toggle="modal"
                    data-target="#exampleModalCenter">
                    Launch demo
                  </button>
                  < -- Modal -- >
                  <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog"
                    aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
                    <div class="modal-dialog modal-dialog-centered" role="document">
                      <div class="modal-content">
                        <div class="modal-header">
                          <h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
                          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                          </button>
                        </div>
                        <div class="modal-body">
                          ...
                        </div>
                        <div class="modal-footer">
                          <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
                          <button type="button" class="btn btn-success">Save changes</button>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section> -->
                <!-- //modals -->

            </div>
            <!-- //content -->
        </div>
        <!-- main content end-->
    </section>
    <!--footer section start-->
    <?php
include 'footer.php';
?>
    <!--footer section end-->
    <!-- move top -->
    <button onclick="topFunction()" id="movetop" class="bg-primary" title="Go to top">
        <span class="fa fa-angle-up"></span>
    </button>
    <script>
    // When the user scrolls down 20px from the top of the document, show the button
    window.onscroll = function() {
        scrollFunction()
    };

    function scrollFunction() {
        if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
            document.getElementById("movetop").style.display = "block";
        } else {
            document.getElementById("movetop").style.display = "none";
        }
    }

    // When the user clicks on the button, scroll to the top of the document
    function topFunction() {
        document.body.scrollTop = 0;
        document.documentElement.scrollTop = 0;
    }
    </script>
    <!-- /move top -->


    <script src="assets/js/jquery-3.3.1.min.js"></script>
    <script src="assets/js/jquery-1.10.2.min.js"></script>

    <!-- chart js -->
    <script src="assets/js/Chart.min.js"></script>
    <script src="assets/js/utils.js"></script>
    <!-- //chart js -->

    <!-- Different scripts of charts.  Ex.Barchart, Linechart -->
    <script src="assets/js/bar.js"></script>
    <script src="assets/js/linechart.js"></script>
    <!-- //Different scripts of charts.  Ex.Barchart, Linechart -->


    <script src="assets/js/jquery.nicescroll.js"></script>
    <script src="assets/js/scripts.js"></script>

    <!-- close script -->
    <script>
    var closebtns = document.getElementsByClassName("close-grid");
    var i;

    for (i = 0; i < closebtns.length; i++) {
        closebtns[i].addEventListener("click", function() {
            this.parentElement.style.display = 'none';
        });
    }
    </script>
    <!-- //close script -->

    <!-- disable body scroll when navbar is in active -->
    <script>
    $(function() {
        $('.sidebar-menu-collapsed').click(function() {
            $('body').toggleClass('noscroll');
        })
    });
    </script>
    <!-- disable body scroll when navbar is in active -->

    <!-- loading-gif Js -->
    <script src="assets/js/modernizr.js"></script>
    <script>
    $(window).load(function() {
        // Animate loader off screen
        $(".se-pre-con").fadeOut("slow");;
    });
    </script>
    <!--// loading-gif Js -->

    <!-- Bootstrap Core JavaScript -->
    <script src="assets/js/bootstrap.min.js"></script>

</body>

</html>
<?php
}
else
{
  header("location:../index.php");
}
?>