Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Green University of Bangladesh

Department of Computer Science and Engineering (CSE)


Semester: (Spring, Year: 2024), B.Sc. in CSE (Day)

GUB Library E- Locker System

Course Title: Web Programming Lab


Course Code: CSE 302
Section: 213 D11

Students Details
Name ID
PUJA BARMAN 212902053
ANIK HASAN 212902050

Submission Date: 06/11/2024


Course Teacher’s Name: Rusmita Halim Chaity

[For teachers use only: Don’t write anything inside this box]

Lab Project Status

Marks: Signature:

Comments: Date:
Contents

1 Introduction 3
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Design Goals/Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Design/Development/Implementation of the Project 6


2.1 Introductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Database Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Functionalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5.1 User Registration and Authentication . . . . . . . . . . . . . . 7
2.5.2 Locker Booking . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5.3 Real-Time Locker Status . . . . . . . . . . . . . . . . . . . . . 8
2.5.4 Booking Management . . . . . . . . . . . . . . . . . . . . . . 8
2.6 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.6.1 Backend PHP Functions . . . . . . . . . . . . . . . . . . . . . 8
2.7 Neccesary Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.7.1 Backend Code: . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.7.2 lockerhistory.php: . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.7.3 Simulation Php code . . . . . . . . . . . . . . . . . . . . . . . 11
2.7.4 Reserve.php . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Performance Evaluation 13
3.1 Software Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1
3.2 Results Analysis/Testing . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Home page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 Reserve page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5 Simulation page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.6 Locker page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.7 Results Overall Discussion . . . . . . . . . . . . . . . . . . . . . . . . 17
3.8 Security Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.9 Testing and Deployment . . . . . . . . . . . . . . . . . . . . . . . . . 18

4 Conclusion 19
4.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Scope of Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3.1 Mobile Application . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3.2 Advanced Security Features . . . . . . . . . . . . . . . . . . . 20
4.3.3 User Interface Improvements . . . . . . . . . . . . . . . . . . . 20
4.3.4 Offline Functionality . . . . . . . . . . . . . . . . . . . . . . . 20
4.3.5 Enhanced Error Handling . . . . . . . . . . . . . . . . . . . . 20
4.3.6 Integration with Existing Systems . . . . . . . . . . . . . . . . 21

2
Chapter 1

Introduction

1.1 Overview
"The GUB Automated Library Locker Security System", intended to meet all the needs
of the students, staff, and the online students, is aimed at facilitating a smooth study
room. These students and personnel can make online table advance reservations, re-
ceive the information about reservations at their e-mail and get access to their goods by
individual codes. This implies that a person does not need physical keys anymore and
has a less stressful situation because this way it is not possible to get lost or to be bro-
ken. Also, the system has real-time booking management, which frequently is not used,
lockers can be used for its benefit and the whole library efficiency will be improved.
Using mobile app or website students can book lockers which could be very much
smooth . By using the app, a user can conveniently check whether a locker is avail-
able for use, reserve a locker for a specific time period which he or she can access
conveniently, and receive notifications on the app about bookings for lockers. The sys-
tem is an opportunity to secure students and staff’s bags and personal items with their
valuables while they study and use related materials.

1.2 Motivation
Sometimes, the private lockers in libraries give people this same feeling of being frus-
trated. Because they may don’t remember where they leave their item. It is a common
case from the point of view of the students and employees of the Green University,
but we experience it all the time. Therefore, we adopted the development of GUB
Automated Library Locker Security System which eases the process of check-out and
returns.

3
1.3 Problem Definition
Our project revolves around locker security, allowing students to easily book lockers
as needed. We primarily utilized JavaScript, PHP, HTML, and CSS to address this
challenge. When a student requests to book a locker, access is granted only if the
locker is available. The request is then sent to the database, granting access if any
locker is free; otherwise, the student can reserve a locker and use it once it’s available.
Each locker is assigned a unique QR code or key value generated randomly by the
database. Students receive this code via mobile phone message, ensuring secure access.
Additionally, there’s a maximum usage time for each locker. Once exceeded, students
are automatically notified, preventing extensions if the locker is pre-booked.
Set up a MySQL or similar database to store all vital information about lockers such
as reservation status, user authentication, and reservation management. Establish ways
of connecting the database through PHP and execute the queries essential for these data
as needed.
PHP language to create the back-end logic of the system, this functionality includes
verification of users, submitting booking request and managing the database.

1.4 Design Goals/Objectives


Our objective and ideas for the hardware part of our project involve creating a real-time
system that shows the current position of the locker. Let’s say there will be three LED
lights: Red, Green, and Blue. The red light indicates that the locker is already booked,
the green light indicates that the locker is available for booking, and the yellow light
shows that the locker cannot be booked because it’s already reserved by a student. This
is the initial design we’re considering.
Moreover, my project is not aimed only at simplifying the process, but rather it is
driven by much more serious and fundamental ideas of much better security and greater
confidence for all the library users. The application of high-end safety procedures with
installed security equipment, when fully functional and running in real time provides a
way of solving the rising and growing issue of safety for the valuable properties stored
for public use.

1.5 Application
Green University library: As our project is based on solving real-life problems, the
initial application will be implemented at the prestigious Green University library.
Green University Common Room : Common rooms at universities serve as
shared spaces for students.These areas often lack secure storage facilities, making it
challenging for students to store their personal belongings safely.
Fitness centers and gyms: Numerous people appreciate their gear such as head-
phones, phones, keys and wallets around them in the gym while engaged in workouts.
The locked system may be an automatized alternative providing secure keeping of what-

4
ever assets a gym member might leave during his workout with this option the client
can completely focus on their training program.
Shopping malls and retail centers: Large shopping centers and shops located in
the malls may offer locker facilities for the customers to place their belongings in while
they shop. Automatic management of these lockers is achievable and can ease the
processes, making it more efficient and convenient for customers.
Airports and train stations: High-traffic areas like airports and train stations can
benefit from automated locker systems. Travelers often need secure places to store lug-
gage or personal items for short periods. Implementing automated lockers can provide
a convenient and secure solution.
Concerts and large events: Venues hosting concerts, festivals, and other large
events can offer automated locker systems for attendees to store their personal items.
This can enhance security and convenience, allowing attendees to enjoy the event with-
out worrying about their belongings.
Office buildings and coworking spaces: In professional environments, automated
lockers can be used by employees and visitors to store personal items securely. This is
especially useful in coworking spaces where individuals may not have a dedicated desk
or storage area.
Schools and educational institutions: Schools can use automated lockers for
students to securely store their books, laptops, and personal items. This reduces the risk
of theft and ensures that students have a secure place for their belongings throughout
the school day.
Public libraries: Public libraries can implement automated locker systems for pa-
trons to store personal items while they study or browse the collection. This enhances
the user experience and provides an added layer of security for library users.
Theme parks and amusement parks: Visitors to theme parks often need a secure
place to store their personal items while enjoying rides and attractions. Automated
locker systems can offer a convenient and safe solution, allowing visitors to have a
worry-free experience.
Sports arenas and stadiums: Fans attending sports events can use automated
lockers to store personal items, making it easier to navigate security checks and enjoy
the event without carrying bulky bags.

5
Chapter 2

Design/Development/Implementation
of the Project

2.1 Introductions
The GUB Automated Library Locker Security System", intended to meet all the needs
of the students, staff, and the online students, is aimed at facilitating a smooth study
room. These students and personnel can make online table advance reservations, re-
ceive the information about reservations at their e-mail and get access to their goods
by individual codes. This implies that a person does not need physical keys anymore
and has a less stressful situation because this way it is not possible to get lost or to be
broken. Also, the system has real-time booking management, which frequently is not
used, lockers can be used for its benefit and the whole library efficiency will be im-
proved. Using mobile app or website students can book lockers which could be very
much smooth. By using the app, a user can conveniently check whether a locker is
available for use, reserve a locker for a specific time period which he or she can access
conveniently, and receive notifications on the app about bookings for lockers. The sys-
tem is an opportunity to secure students and staff’s bags and personal items with their
valuables while they study and use related materials.

2.2 System Overview


The GUB Automated Library Locker Security System is designed to streamline and en-
hance the efficiency of locker management in the Green University library. This system
allows users to book lockers online, manage their reservations, and access lockers se-
curely through generated codes. The system integrates with a backend database to store
and manage locker and user information. Below, we delve into the design, development,
and implementation of the project.

6
2.3 System Architecture
The system architecture is based on a client-server model where the web application
serves as the client interface and the server-side handles business logic and database
interactions.

• Client-Side: HTML, CSS, JavaScript

• Server-Side: PHP

• Database: MySQL

2.4 Database Design


The database schema consists of several tables to manage users, lockers, and bookings.
The primary tables include:

• users: Stores user information such as user_id, name, email, etc.

• lockers: Contains details about each locker, including locker_id, status (avail-
able, booked), and other relevant details.

• locker_bookings: Manages booking details including booking_id, locker_id,


user_id, booking_date, and user details.

2.5 Functionalities

2.5.1 User Registration and Authentication


Users can register on the platform and log in to access locker booking functionalities.
The system verifies user credentials using the data stored in the users table.

2.5.2 Locker Booking


Users can view available lockers and book them for specific periods. The booking
process involves:

1. Checking the availability of the locker.

2. Booking the locker by updating its status in the database.

3. Generating a unique QR code or key for the user to access the locker.

4. Sending booking details to the user via email.

7
2.5.3 Real-Time Locker Status
The system provides real-time updates on locker availability using a color-coded LED
system:

• Red Light: Locker is booked.


• White Light: Locker is available

2.5.4 Booking Management


Users can manage their bookings through the web interface. They can view current
bookings, cancel reservations, and receive notifications for upcoming bookings.

2.6 Implementation Details

2.6.1 Backend PHP Functions


Several PHP functions handle the core logic of the system, including user authenti-
cation, booking management, and database interactions. Below are examples of key
functions:

function get_author_count() {
$connection = mysqli_connect("localhost", "root", "");
$db = mysqli_select_db($connection, "lms");
$author_count = 0;
$query = "SELECT COUNT(*) as author_count FROM authors";
$query_run = mysqli_query($connection, $query);
while ($row = mysqli_fetch_assoc($query_run)) {
$author_count = $row[’author_count’];
}
return $author_count;
}

function book_locker($locker_id, $user_id, $booking_date, $name, $email) {


$connection = mysqli_connect("localhost", "root", "");
$db = mysqli_select_db($connection, "lms");
$query = "INSERT INTO locker_bookings (locker_id, user_id, booking_date, name,
VALUES ($locker_id, $user_id, ’$booking_date’, ’$name’, ’$email’)";
$query_run = mysqli_query($connection, $query);
if ($query_run) {
$update_query = "UPDATE lockers SET status = ’Booked’ WHERE locker_id = $lo
mysqli_query($connection, $update_query);
return true;
}
return false;
}

8
2.7 Neccesary Codes
The implementation of the GUB Automated Library Locker Security System involves
several critical components to ensure a seamless and secure user experience.
The backend logic is developed using PHP, with key functions for user authenti-
cation, booking management, and database interactions. For example, functions are
designed to retrieve author counts or manage locker bookings by inserting booking de-
tails into the database and updating the locker status.
Security is a top priority in this system. Measures include user authentication and
authorization, secure communication through HTTPS, encryption of sensitive data, and
regular security audits and updates to protect against vulnerabilities.
Finally, deployment involves setting up the web application on a secure server, con-
figuring the database, and ensuring all components are properly integrated. The project
is known as the "GUB Automated Library Locker Security System."

2.7.1 Backend Code:


The main backen code that use to connect to the databases

Figure 2.1: Function.php main backed

9
Function.php The functions that significantly contribute to the administration and
management of the GUB Automated Library Locker Security System:

• get_author_count(): Connects to the database and retrieves the total number of


authors. This helps the admin track the number of authors in the library system.

• get_user_count(): Retrieves the total number of users registered in the system.


This is useful for the admin to monitor user registrations and manage the user
base.

• get_book_count(): Counts the total number of books in the library. This function
assists the admin in keeping track of the library’s inventory.

• get_issue_book_count(): Retrieves the total number of issued books. This helps


the admin manage and monitor book loans and returns.

• get_category_count(): Counts the number of different categories in the library.


This is useful for the admin to organize and manage the library’s categorization
system.

• get_locker_count(): Retrieves the total number of lockers available in the sys-


tem. This assists the admin in managing the locker inventory.

2.7.2 lockerhistory.php:
This code enables users to book library lockers by providing their details and selecting
an available locker. It handles user verification, booking management, and dynami-
cally displays locker statuses, providing a user-friendly interface for managing locker
reservations.

Figure 2.2: locker history.php

10
2.7.3 Simulation Php code
Simulation code refer to the locker simulations,and can booked by the student.

Figure 2.3: Simulation code

• Initialization and Data Handling: The script starts by including functions.php,


initializing a session, and handling form submissions via POST requests.

• User Verification: It connects to a MySQL database to verify user credentials


based on the provided name and email.

• Locker Booking: If the user exists, the script attempts to book a locker using the
book_locker function, which updates the database and locker status. It generates
a success or error message based on the outcome.

11
2.7.4 Reserve.php
Collects user information and booking details. It dynamically populates locker options
from the database and submits data via POST.

Figure 2.4: Reserve.php

• Reserve Status Display: Shows the current status of lockers with color-coded
indicators (white for available, red for booked) based on real-time data from the
database.

12
Chapter 3

Performance Evaluation

3.1 Software Setup


Server Environment

A local server environment, such as XAMPP or WAMP, is installed on a development


machine. This server hosts the web application and the database.

Database Configuration

A MySQL database is set up with tables to store user information, locker details, book-
ing records, and access logs. Proper indexing and relational design ensure efficient
query performance.

Web Interface

The web interface is developed using HTML, CSS, JavaScript, and PHP. It provides
functionalities for users to book lockers, view locker status, and manage their bookings.

Simulation Scripts

Python or PHP scripts are created to simulate various user interactions, such as booking
lockers, entering access codes, and releasing lockers. These scripts help in automating
the testing process.

13
3.2 Results Analysis/Testing
This section provides a detailed analysis of the testing results of different aspects of the
system.

3.3 Home page


Test Scenario

This test simulates a user booking a locker. The system checks for available lockers,
updates the locker status, and sends a unique access code to the user.

Figure 3.1: home page of our proposed system

14
3.4 Reserve page
This features for the booking purpose .Student can booked the locker by id and its book
by its type like bag or laptop.

Figure 3.2: reserve locker

3.5 Simulation page


The system has two part one is for reserve that indicate yellow and another is for red
that’s means its booked.

Figure 3.3: Simulation page for locker

15
Book Locker

You can also see the book-time,book-date,unlock-time.

Figure 3.4: booked locker for laptop

The output shows the successful booking status and the time-stamped entry in the
database. The system performed as expected, with all steps completed without errors.

16
3.6 Locker page
Expected Outcome

The system should verify the code, unlock the corresponding locker, and update the
locker status.

Figure 3.5: locker those are booked in the wepage

3.7 Results Overall Discussion


The results from the testing phase demonstrate that the GUB Automated Library Locker
Security System effectively handles booking, access control, real-time status updates,
and error handling. The system’s reliability was confirmed through repeated tests, and
security measures were validated by ensuring that only users with valid codes could
access lockers. Minor issues related to response time and UI feedback were noted and
addressed.

3.8 Security Measures


Security is a crucial aspect of the system, involving:

• User authentication and authorization.

• Secure communication through HTTPS.

17
• Data encryption for sensitive information.

• Regular security audits and updates.

3.9 Testing and Deployment


The system undergoes rigorous testing to ensure functionality, reliability, and security.
Key testing strategies include:

• Unit Testing: Verifying individual functions and modules.

• Integration Testing: Ensuring all components work together seamlessly.

• User Acceptance Testing (UAT): Gathering feedback from actual users to refine
the system.

Deployment involves setting up the web application on a secure server, configuring


the database, and ensuring all components are correctly integrated.

18
Chapter 4

Conclusion

4.1 Discussion
The GUB Automated Library Locker Security System successfully addresses the need
for a secure and efficient locker management system in the library environment. The
system’s real-time booking, user-friendly interface, and robust security measures en-
hance the overall user experience. The project demonstrates the integration of hardware
and software to solve a practical problem, providing a scalable solution that can be im-
plemented in various environments. The system was tested thoroughly under different
scenarios, and the results indicate that it performs reliably in booking lockers, control-
ling access, and updating statuses in real-time. The error handling mechanisms worked
effectively, preventing unauthorized actions and maintaining system integrity.
The implementation of this system has the potential to significantly improve the
management of library lockers, reducing administrative overhead and increasing user
satisfaction. It also highlights the importance of integrating IoT technologies in every-
day applications, demonstrating how such systems can enhance operational efficiency
and security. Throughout the development and testing phases, several valuable lessons
were learned, such as the importance of thorough testing to identify and fix potential
issues before deployment, the need for user feedback to improve system design and
functionality, and the benefits of modular design, allowing for easier updates and scal-
ability.

4.2 Limitations
While the system performs well under test conditions, several limitations were identi-
fied. The current system is designed for a small number of lockers and may require
significant modifications to handle a larger scale. The system relies heavily on network
connectivity, which could be a point of failure in environments with unstable internet
access. Some users reported difficulty navigating the web interface, indicating a need
for further refinement and user testing. Additionally, the hardware components used
are basic and may need upgrading for a more robust, long-term solution. Finally, while
basic security measures are in place, there is always the risk of potential vulnerabilities

19
that could be exploited.

4.3 Scope of Future Work


Future work on the GUB Automated Library Locker Security System could focus on
several areas. Developing a more scalable architecture to support a larger number of
lockers and concurrent users could involve optimizing the database structure, improving
server performance, and ensuring the network can handle increased traffic.

4.3.1 Mobile Application


Creating a dedicated mobile application for Android and iOS to improve user accessi-
bility and convenience.

4.3.2 Advanced Security Features


Implementing biometric authentication (e.g., fingerprint or facial recognition) to en-
hance security.

4.3.3 User Interface Improvements


Conducting extensive user testing and design improvements to make the interface more
intuitive and user-friendly. This could include redesigning the layout, adding tooltips,
and providing more detailed user guides.

4.3.4 Offline Functionality


Developing features that allow the system to function in offline mode, synchronizing
data when the network is available. This would ensure that users can still book and
access lockers even if the internet connection is temporarily unavailable.

4.3.5 Enhanced Error Handling


Adding more sophisticated error detection and correction mechanisms to handle un-
expected scenarios gracefully. This could involve implementing automated diagnostic
tools and providing more detailed error messages to users and administrators. Devel-
oping a maintenance plan to ensure the long-term sustainability of the system could
include regular software updates, hardware checks, and user training sessions. Imple-
menting data analytics tools to monitor system usage and performance could provide
valuable insights into user behavior, locker usage patterns, and potential areas for im-
provement.

20
4.3.6 Integration with Existing Systems
Exploring the possibility of integrating the locker system with existing library manage-
ment systems for a seamless user experience. This could involve synchronizing user
data and borrowing records between the two systems.Exploring the possibility of inte-
grating the locker system with existing library management systems for a seamless user
experience could involve synchronizing user data and borrowing records between the
two systems.
By addressing these areas, the GUB Automated Library Locker Security System
can be further refined and enhanced to provide even greater benefits to library users and
administrators. The project’s success demonstrates the potential for IoT technologies to
revolutionize everyday operations, paving the way for future innovations in this field.

21
References

22

You might also like