} else {
         }
     }
 }
 if (isset($_POST['Go_Back'])) {
     header("Location: ../Librarian.php?page=add_new_student");
     exit;
 }
 if (isset($_POST['confirm_cd_borrow'])) {
     require_once '../private/LMS_Engine.php';
     $engine = new LMS_Engine();
     $user_id = $_POST['user_id'];
     $cd_id = $_POST['cds_id'];
     $pocket_id = $_POST['pocket_id'];
     $user_type = $_POST['user_type'];
     $The_CD = $engine->get_CDs($cd_id);
     $librarian_id = $_COOKIE['user_id'];
     if ($user_type == "student") {
         $user_type = "S";
         $The_STD = $engine->get_student_by_pid($pocket_id);
         $librarian_id = $_COOKIE['user_id'];
         $stat = $engine->insert_cds_borrows($user_id, $user_type, $cd_id, $librarian_id);
         if ($stat) {
             header("Location: ../Librarian.php?page=search_cd_dvd");
             exit;
         } else {
             header("Location: ../Librarian.php?page=search_cd_dvd");
             exit;
         }
     } else {
         $user_type = "T";
<?php

if (isset($_POST['Update_Book'])) {
    require_once 'private/LMS_Engine.php';
    $engine = new LMS_Engine();
    $engine->update_cd($_POST['lib_cd_id'], $_POST['title'], $_POST['subject'], $_POST['publisher'], $_POST['cat_id'], $_POST['num_cd'], $_POST['copy_num'], $_POST['call_num'], $_POST['shelf_store']);
    $The_CD = $engine->get_CDs($_POST['lib_cd_id']);
}
?>
<br>
<br>
<br>
<div class="container">
    <div class="row">
        <div class="col-sm-12">
        <form class="form-horizontal"  method="post" action="Librarian.php?page=library_cd_dvd">
            <div class="col-lg-4" >
            </div>
            <div class="col-lg-4" >
            </div>
            <div class="col-lg-4T" >
                <div class="col-lg-4 pull-right" style="margin-top: 10px">
                    <input class="form-control btn-"name="Go_To_Library" type="submit" value="Go To Library"><br>
                </div>
            </div>
        </form>
        </div>
        </div>

        <h3>Edit Book Parameters</h3>
        <hr>