<?php
session_start();
error_reporting('0');
if(isset($_SESSION['teacher'])){
    $username = $_SESSION['teacher'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

    <style>
        .card-title a {
            font-size: 16px;
            border-bottom: 1px solid #707478;
            color: #707478;
        }
        .card-title a:hover{
            border-bottom: 1px solid #1A2229;
            color: #1A2229;
        }
        .btn-app:first-child{
            margin-left:0 !important;
        }
    </style>


  <?php
  include '../admin/includes/styles.php';
  ?> <title>View or Add Marks |  <?php echo $school_name; ?> </title>
    <?php
  $sql = "SELECT * FROM teachers WHERE username =:username";
  $conn->query($sql);
  $conn->bind(":username", $username);

  $result = $conn->fetchSingle();
  $teacher_name = $result->name;
  ?>

</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">

  <!-- Navbar -->
    <?php include 'includes/notifications.php'; ?>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
<?php include "includes/sidebar.php";?>

  <!-- 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">
            <h1 class="m-0">Marks</h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="<?php echo $conn->teacher_url(); ?>">Home</a></li>
              <li class="breadcrumb-item active">marks</li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
   
        <div class="row">
<!--          <section class="col-lg-12 connectedSortable">-->
<!--           <a href="add-class"><button class="btn btn-outline-success">Add a class</button></a>-->
<!--          </section>-->
        <section class="col-lg-12 connectedSortable">
                        <div class="card">
                            <div class="card-header" style="background: #17a2b8; color: white;">
                                <h3 class="card-title" style="font-size: 15px;"> <i class="fa fa-star"></i> Manage Marks </h3>
                            </div>
                            <div class="card-header">
                                <h3 class="card-title"><a href="<?php echo $conn->teacher_url().'add-mark'; ?>"> <i class="fa fa-plus"></i> Add a mark </a> </h3>
                            </div>
                            <!-- /.card-header -->
                            <!-- /.card-body -->
                        </div>


                    </section>
        </div>
             
          </div>
        <!-- /.row (main row) -->
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  <?php include "../admin/includes/footer.php";?>

    <?php
  }else{
      ?>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no">

        <?php include '../admin/includes/styles.php'; ?>
        <title>Login to continue  </title>

        <!-- END PAGE LEVEL PLUGINS/CUSTOM STYLES -->

    </head>
    <body>
    <div class="container" style="margin-top: 20%;">
        <div class="row">
            <div class="col-lg-12 col-md-12">
                <div class="section-title text-center">
                    <h6> You need to login to continue </h6>
                    <div class="spinner-border text-info" role="status">
                        <span class="sr-only">Loading...</span>
                        <meta http-equiv='refresh' content='3; <?php echo $teacher_login_link; ?>'>
                    </div>
                    <p>Redirecting to the login  page...</p>
                </div>
            </div>
        </div>
    </div>

    <?php
    }

  ?>
