* * You should have received a copy of the GNU General Public License * along with Pusthaka. If not, see <http://www.gnu.org/licenses/>. */ $allow = "ADMIN;LIBSTAFF;PATRON"; $PageTitle = "Book Reservations"; include('../inc/init.php'); include('../classes/Reservations.php'); /** Reserve Book */ if(isset($_REQUEST['BtnReserve'])){ $re = new Reservations; $bid = $_REQUEST['bid']; $mid = $_REQUEST['mid']; $result = $re->MakeReservation($bid, $mid); if(substr($result,0,5) == "ERROR"){ $_SESSION['msg']['title'] = 'Could not Reserve Book!'; $_SESSION['msg']['msg'] = $result; $_SESSION['msg']['backlink'] = $_SERVER['PHP_SELF'] . "?ID=" . $bid; header("Location: reservations_book.php?ID=".$bid); exit(); } else { header("Location: reservations_book.php?ID=".$bid); exit(); } } /** END: Reserve Book */ /** Cancel reservation */ if(isset($_REQUEST['do']) && ($_REQUEST['do'] == "cancel")){