<?php

if (isset($_POST['Update_Book'])) {
    require_once 'private/LMS_Engine.php';
    $engine = new LMS_Engine();
    $engine->update_book($_POST['lib_book_id'], $_POST['title'], $_POST['author'], $_POST['publisher'], $_POST['publish_year'], $_POST['publish_address'], $_POST['call_id'], $_POST['copy_number'], $_POST['shelf_store'], $_POST['cat_id']);
    $The_Book = $engine->get_book($_POST['lib_book_id']);
} elseif ($_POST['Delete_Book']) {
    require_once 'private/LMS_Engine.php';
    $engine = new LMS_Engine();
    $engine->delete_book($_POST['lib_book_id']);
}
?>

<div class="container">
    <br>
    <div class="row"><div class="col-lg-12">
        <form class="form-horizontal"  method="post" action="Librarian.php?page=library_books">
            <div class="pull-right"style="margin-top: 20px" >
                    <input class="form-control btn-primary"name="Go_To_Library" type="submit" value="Go To Library"><br>
                </div>
            <br>
            </div>
        </form>
        <hr>
        </div>
        <h3>Edit Book Parameters</h3>
        <hr>
        <form class="form-horizontal"  method="post" action="">
            <div class="col-sm-4 col-md-4 col-lg-4" >
                <div class="col-sm-12 col-md-12 col-lg-12" style="margin: 10px">