require_once '../private/LMS_Engine.php';
     $engine = new LMS_Engine();
     $file = $_FILES['upload_image'];
     $uploaded = upload_image($file);
     if (strlen($uploaded) == 34) {
         if ($_POST['user_type'] == 'student') {
             $val = $engine->add_student_user($engine->new_pocket_id(), $_POST['full_name'], $_POST['grade'], $_POST['section'], $uploaded);
             if ($val == 1) {
                 header("Location: ../Librarian.php?page=add_new_student");
                 exit;
             } else {
                 header("Location: ../Librarian.php?page=add_new_student");
                 exit;
             }
         } else {
             $val = $engine->add_new_teacher($_POST['full_name'], $_POST['user_name'], $_POST['user_pass'], $_POST['department']);
             header("Location: ../Librarian.php?page=add_new_student");
             exit;
         }
     } else {
         header("Location: ../Librarian.php?page=add_new_student");
         exit;
     }
 }
 if (isset($_POST['upload_books'])) {
     require_once '../private/File_Manager.php';
     $manager = new File_Manager();
     $file = $_FILES['upload_file'];
     $uploaded = upload_file($file);
     if (strlen($uploaded) == 34) {
         $manager->Upload_Books('../files/' . $uploaded);
<?php

require_once 'private/LMS_Engine.php';
$engine = new LMS_Engine();
if (isset($_POST)) {
    if (isset($_POST['Add_New_Teacher'])) {
        if (strlen($_POST['Full_Name']) > 2 && strlen($_POST['User_Name']) > 2 && strlen($_POST['User_Pass']) > 2) {
            $engine->add_new_teacher($_POST['Full_Name'], $_POST['User_Name'], $_POST['User_Pass'], $_POST['Department']);
        } else {
        }
    } elseif (isset($_POST['Remove_Teacher']) and $_POST['Remove_Teacher'] == "Remove") {
        $engine->remove_user_by($_POST['User_ID']);
    }
}
if (isset($_GET['page_num'])) {
    $page_num = $_GET['page_num'];
} else {
    $page_num = 0;
}
?>
?>
<div class="container" id="main"><br>
    <h3><strong>Registered School Teachers</strong> </h3><hr>
    <div  class="row" id="contact">
        <div class="col-md-3 col-lg-8"  >
            <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
            <div class="table table-responsive ">
                <table class="table table-bordered ">
                    <thead>
                    <tr style="background: #ececec">
                        <th>Full Name</th>