Beispiel #1
0
	<br>
	<div class="book_details">
	<table border="1">
	<?php 
include "../Model/library.php";
include "../Model/student.php";
$library = new library();
if (isset($_SESSION["user_student"])) {
    $student = new student($_SESSION["user"]);
}
$book_loc = $_GET;
if (isset($book_loc['checkout'])) {
    $library->burrow($book_loc['shelf'], $book_loc['book'], $library->shelf[$book_loc['shelf']]->books[$book_loc['book']]->copyID, $student);
}
if (isset($book_loc['return'])) {
    $library->returnbook($book_loc['shelf'], $book_loc['book'], $library->shelf[$book_loc['shelf']]->books[$book_loc['book']]->copyID, $student);
}
echo "<tr>";
echo "<td>";
echo "Book ID";
echo "</td>";
echo "<td>";
echo $library->shelf['shelf' . htmlentities($book_loc["shelf"], ENT_QUOTES, "utf-8")]->books['book' . htmlentities($book_loc["book"]->bookID)];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "Copy ID";
echo "</td>";
echo "<td>";
echo $library->shelf['shelf' . htmlentities($book_loc["shelf"], ENT_QUOTES, "utf-8")]->books['book' . htmlentities($book_loc["book"]->copyID)];