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"; $librarian_id = $_COOKIE['user_id']; $stat = $engine->insert_cds_borrows($pocket_id, $user_type, $cd_id, $librarian_id); if ($stat) { header("Location: ../Librarian.php?page=search_cd_dvd"); exit; } else {