-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibrary.php
More file actions
49 lines (37 loc) · 762 Bytes
/
Copy pathlibrary.php
File metadata and controls
49 lines (37 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
include 'functions.php';
$users = [
"Alice" => [
"fine" => 50,
"books" => []
],
"Bob" => [
"fine" => 250,
"books" => []
],
"Charlie" => [
"fine" => 0,
"books" => []
]
];
// Borrow books
borrowBook($users, "Alice", "PHP Basics", "Textbook");
borrowBook($users, "Bob", "Advanced Networks", "Journal");
borrowBook($users, "Charlie", "Database Systems", "Reference Book");
// Return books
returnBook($users, "Alice", 0, 4);
returnBook($users, "Charlie", 0, 2);
?>
<!DOCTYPE html>
<html>
<head>
<title>Library Module</title>
</head>
<body>
<h1>Library Borrowing & Fine Module</h1>
<?php
printUserSummary($users);
?>
<a href="index.php">Back to Main Menu</a>
</body>
</html>