<?php

require_once 'private/LMS_Engine.php';
$engine = new LMS_Engine();
if (isset($_POST['add_new_magazine'])) {
    $engine->add_new_magazine($_POST['title'], $_POST['subject'], $_POST['publisher'], $_POST['page_num'], $_POST['publish_date'], $_POST['call_num'], $_POST['copy_num'], 'store', $_POST['cat_id']);
}
$page_num = null;
$from = "All";
$hint = "";
$cat_id = 1;
if (!isset($_GET['page_num'])) {
    $page_num = 0;
    if (isset($_POST['Search_Items'])) {
        $from = $_POST['from'];
        $hint = $_POST['hint'];
        $cat_id = $_POST['cat_id'];
    }
} else {
    $page_num = $_GET['page_num'];
    $from = $_GET['from'];
    $hint = $_GET['hint'];
    $cat_id = $_GET['cat_id'];
}
?>
<div class="container" id="main">
    <div  class="row" id="contact">
        <hr>
        <div class="page-header">
            <h3>Manage Library Magazines </h3>
        </div>