0% found this document useful (0 votes)
30 views35 pages

Library Management System

The document outlines a comprehensive Library Management System (LMS) project, detailing the identification of the software system, requirements specification, use case modeling, and design diagrams. It includes functionalities for catalog management, member management, book circulation, and user interfaces for different user classes. The document also describes the implementation process, including coding examples for user authentication and system operations.

Uploaded by

mappalaiking
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views35 pages

Library Management System

The document outlines a comprehensive Library Management System (LMS) project, detailing the identification of the software system, requirements specification, use case modeling, and design diagrams. It includes functionalities for catalog management, member management, book circulation, and user interfaces for different user classes. The document also describes the implementation process, including coding examples for user authentication and system operations.

Uploaded by

mappalaiking
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CCS356

OBJECT ORIENTED SOFTWARE


ENGINEERING

1
2
TABLE OF CONTENTS

[Link] DATE EXPERIMENT TITLE PAGENO MARKS SIGN

Identify the software system that


1. 4
needs to be developed
Software Requirements
2. 5
Specification

3. Identify use cases and develop the 8


Use Case model

Identify the conceptual classes and


4. develop a Domain Model and also 10

derive a Class Diagram


Sequence and Collaboration
5. 12
Diagram

6. State Chart and Activity Diagram 14

Implement the system as per the


7. 16
detailed design

8. Test the software system 22

Improve the reusability and


9. 24
maintainability

10. Implement the modified system 26

3
[Link]
IDENTIFICATION OF SOFTWARE SYSTEM
DATE:

AIM:
To identify the software system that needs to be developed.

PROBLEM STATEMENT:
Libraries face challenges in efficiently managing their resources, including books, journals,
and other materials, as well as in providing a seamless borrowing and returning experience for users.
Existing manual systems are often time-consuming, error-prone, and lack real-time visibility into
inventory. There is a need for a comprehensive Library Management System that automates library
processes, improves resource utilization, enhances user experience, and provides accurate and up-to-
date information for effective decision-making.
.

RESULT:

Thus, the software system that needs to be developed was successfully identified.

4
[Link]
SOFTWARE REQUIREMENTS SPECIFICATION
DATE:

AIM:
To write a software requirements specification for the library management system.

PURPOSE:
The objective of this project is to develop a comprehensive library management system that
automates the library's operations, improves efficiency, and enhances the user experience. The
system should allow librarians to manage the library's catalog, track book circulation, manage
member information, and generate reports. It should also provide a user-friendly interface for library
users to search for books, place holds, and view their borrowing history.

SCOPE:
The system will include functionalities such as catalog management for librarians to add, edit,
and delete books; member management for user registration and membership renewal; book
circulation tracking for loans, returns, and fines; a reservation system for users to reserve books;
reporting and analytics for insights into library usage; and a user-friendly interface for easy
navigation.

OVERALL DESCRIPTION:
Product Perspective
It is an integrated online platform designed to modernize library operations. It will serve
as a central hub for managing resources and providing users with seamless access to books,
journals, and digital materials. The system will be scalable, adaptable, and integrate with
existing library systems, revolutionizing the way libraries interact with users.
Product Functions
1. Catalog Management: Add, edit, delete, and search books in the library catalog.
2. Member Management: Register, update, and renew memberships for library users.
3. Book Circulation: Check out, check in, and manage book loans and returns.
4. Reservation System: Allow users to reserve books and manage the reservation queue.
5. Reporting and Analytics: Generate reports on book circulation, popular books, and member
statistics.
6. User Interface: Provide a user-friendly interface for easy navigation and interaction.
7. System Administration: Manage system settings, monitor performance, and ensure data
security.
8. Integration and Compatibility: Integrate with existing systems and support data migration.

User Classes and Characteristics


The system will cater to four main user classes:
1. Librarians:
 Admin access.
 Cataloging, membership management.
 Report generation, system maintenance.
 Need advanced search and management features.
2. Students:
 Search, check availability, place holds.
5
 View borrowing history, renew books.
 Need a simple, user-friendly interface.
3. Faculty Members:
 Similar to students but with extended privileges.
 Place holds, request new acquisitions.
 Need access to academic and research materials.
4. Administrators:
 Overall system control, user management.
 System customization.
 Advanced reporting and analytics tools.
Design and Implementation Constraints
The system will be developed using PHP technologies and will follow a Model-View-
Controller (MVC) architecture. It will rely on a mysql database management system for data
storage and will be deployed on Apache server.
Assumptions and Dependencies
The successful development and deployment of the L i b r a r y Management System
depend on the following assumptions:
● Availability of required hardware and software resources for development and
deployment.
● Timely completion of development tasks by the development team.
● Access to necessary data for populating the system during testing.

EXTERNAL INTERFACE REQUIREMENTS:


User Interface
The system will have user interfaces for Librarian, Students, Faculty Members,
Administrators. Each interface will provide access to the relevant functionality based on the user's role.
Hardware Interface
The system will require standard hardware components such as computers and mobile
devices with internet connectivity.
Software Interface
The system will interact with a MySQL database for data storage and retrieval. It will
also use Apache Tomcat as the web server and servlet container.
Communication Interface
The system will communicate with users through web browsers using HTTP and
HTTPS protocols.

FUNCTIONAL REQUIREMENTS:
1. Librarians:
Manage catalog: Add, edit, delete books.
Member management: Register, update, manage fines.
Book circulation: Check in/out, renew, manage holds.
System admin: Configure settings, monitor performance.
2. Students:
Search and browse books.
Account management: View history, renew loans.
Interactions: Place holds, receive notifications.
Provide feedback and suggestions.
6
3. Faculty Members:
Similar to students with extended privileges.
Request new acquisitions for the library.
4. Administrators:
Configure system settings, manage users.
Reporting and analytics.
Integration and compatibility with other systems registrations.

NON-FUNCTIONAL REQUIREMENTS
 Reliability: The system is reliable, ensuring no damage to the operating system and capable of
recovering from malfunctions.

 Availability: It is available at user-preferred locations for uninterrupted access.

 Security: The system is secure, user-friendly, and resilient against system attacks.

 Maintainability: Updates are verified daily for secure data and easy maintenance.

 Portability: The software is easily installable on systems meeting its requirements, ensuring
portability.

 Usability: It is user-friendly, providing ease of use for customers.

RESULT:
Thus, the software requirement specification for the Conference Management system
was done successfully.

7
[Link] IDENTIFY USE CASES AND DEVELOP THE USE
CASE MODEL
DATE:

AIM:
To draw a use case diagram for Library Management system.

USE CASES:
● Primary Actors:
Member
● Secondary Actors:
Librarian
● Use Cases:
Login:
Allows users (members and librarians) to authenticate and access the system.
● Inquiry of Membership:
Members can check their membership status and details.
● Request for Book/Return:
Members can request to borrow a book or return a book they have borrowed.
● Pay Fine:
Members can pay fines for overdue books.
● Add Book:
Librarians can add new books to the library catalog.
● Remove Book:
Librarians can remove books from the library catalog.
● Issue Book:
Librarians can issue books to members.
● Return Book:
Librarians can process the return of books from members.
● Update Member Details:
Librarians can update member information such as contact details.
● Maintain Book Record:
Librarians can maintain records of book availability, loans, and returns.
● Logout:
Allows users to securely log out of the system

8
OUTPUT:

RESULT:
Thus the use case diagram for the Library Management system was done successfully.

9
[Link] IDENTIFY THE CONCEPTUAL CLASSES AND
DEVELOP A DOMAIN MODEL AND ALSO DERIVE
DATE: CLASS DIAGRAM

AIM:
To identify the conceptual classes and develop a Domain Model and also derive a Class
Diagram for Library Management system.

CLASSES:

Book class:
Represents the books available in the Library and has the composition relationship with
Member class and Fine class. The Book class contains the methods like add_book, remove_book,
show_book_details, show_issue_history.

Library class:
Represents the information of the library name, location and contact details. It contains
view_detail method.

Fine class:
Represents the due amount to be paid by the member on a particular book. It contains methods
like issue_fine and update.

Member class:
Represents the members of the Library and has Aggregation relationship with the Fine class.
It contains methods like search, request, cancel, reserve, return.

10
OUTPUT:

RESULT:
Thus, the conceptual class was identified and class diagram for Library
management system was developed successfully

11
[Link]
DATE: SEQUENCE AND COLLABORATION DIAGRAM

AIM:
To find the interaction between objects and represent them using UML Sequence and
Collaboration Diagram.

SEQUENCE DIAGRAM FOR CONFERENCE MANAGEMENT SYSTEM:


 The Member submits their User id and password to the Librarian.
 The Librarian validates the submitted credentials. If they are invalid, it returns an "Invalid, enter
correct details" message to the Member.
 If the credentials are valid, the Member request book or return book to the librarian.
 Then Librarian checks whether the requested book is available in the Book and if the book is
available then send “Book available” message to Librarian.
 Then the returned book is Updated in the Book.
 The Librarian checks for Fine in the Transaction and the Notifies the Member.
 The Member pays fine to the Transaction and it is Updated.
 The books is issued and it is Updated.

OUTPUT:

12
COLLABORATION DIAGRAM FOR CONFERENCE MANAGEMENT
SYSTEM:

 A collaboration diagram in the context of a Library Management system illustrates how


different objects within the system interact with each other to accomplish various tasks.

 Each object is represented by a lifeline, which shows its existence and participation in
the collaboration over time. Communication channels or associations between objects
are depicted as solid lines, while messages exchanged between objects are shown as
arrows.

 Activation bars on lifelines indicate when an object is active or processing a message.


Overall, the collaboration diagram provides a visual representation of how objects
collaborate to achieve specific functionalities within the system.

OUTPUT:

RESULT:
Thus, the UML Sequence and collaboration diagram for Library Management system
was done successfully.
13
[Link]
DATE: STATE CHART AND ACTIVITY DIAGRAM

AIM
To draw a state chart and activity diagram for Library Management system.

STATE CHART DIAGRAM FOR LIBRARY MANAGEMENT SYSTEM:


1. States:
 Login: Represents the initial state when the system is waiting for user input.
 Validate: Indicates the state where admin validates the details.
 Book: Details of all book collections and updates.
 Return book: It represents the details of books to be returned.
 Request book: It represents the details of books that has been requested.
 Transaction: Indicates the penalty details.
 Issue book: It represents the details of books that are issued.
 Update: Represents all the updated details.
 Pay fine: The member pays the due fine.
 Logout: Final state reached when the activities are come to end.

2. Transitions:
 Start: Transition from login to validate when the system is initiated.
 Book requested: Transition occurs when the member needs a book.
 Book returned: Transition occurs when the need for book comes to end.
 Transaction: Transition from request book to pay fine when old fine details are
checked.
 Issue book: Transition occurs when the librarian is ready to issue.
 Update: Transition occurs each time when any changes are made in lms.
 Stop: Transition when user or librarian has come to end.

OUTPUT:

14
ACTIVITY DIAGRAM FOR CONFERENCE MANAGEMENT SYSTEM:
1. Login: Represents the beginning of the signin/signup process.
2. Validate: Happens once the details are entered by user.
3. Books: This include various activities like issue,return,request.
4. Transaction: Fine should be paid if the user uses the book even after due date.
5. Paper Submitted: Authors submit their full papers after abstract selection.
6. Check availability: The librarian checks for the availability of books when its requested by
user.
7. Update: Each and every details of books,transaction ,profile updates are added.
8. Logout: The system comes to end when user and librarian’s work is over.

OUTPUT:

RESULT:
Thus, the state chart and activity diagram for Library Management System was done
successfully.

15
[Link]
IMPLEMENTATION OF THE SYSTEM
DATE:

AIM
To implement the system as per the detailed design.

CODING:
FORM 1:
[Link]

<?php
session_start();
error_reporting(0);
include('includes/[Link]');
if($_SESSION['alogin']!=''){
$_SESSION['alogin']='';
}
if(isset($_POST['login']))
{
//code for captach verification
if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') {
echo "<script>alert('Incorrect verification code');</script>" ;
}
else {

$username=$_POST['username'];
$password=md5($_POST['password']);
$sql ="SELECT UserName,Password FROM admin WHERE UserName=:username and
Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':username', $username, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
$_SESSION['alogin']=$_POST['username'];
echo "<script type='text/javascript'> [Link] ='admin/[Link]'; </script>";
} else{
echo "<script>alert('Invalid Details');</script>";
}
}
}
?>
</div>
<div class="panel-body">
<form role="form" method="post">
<div class="form-group">
<label>Enter Username</label>
<input class="form-control" type="text" name="username" autocomplete="off" required />
</div>
16
<div class="form-group">
<label>Password</label>
<input class="form-control" type="password" name="password" autocomplete="off" required />
</div>
<div class="form-group">
<label>Verification code : </label>
<input type="text" name="vercode" maxlength="5" autocomplete="off" required style="width: 150px;
height: 25px;" />&nbsp;<img src="[Link]">
</div>
<button type="submit" name="login" class="btn btn-info">LOGIN </button>
</form>
</div>
</div>
</div>
</div>

User [Link]
<?php
session_start();
error_reporting(0);
include('includes/[Link]');
if($_SESSION['login']!=''){
$_SESSION['login']='';
}
if(isset($_POST['login']))
{
if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') {
echo "<script>alert('Incorrect verification code');</script>" ;
}
else {
$email=$_POST['emailid'];
$password=md5($_POST['password']);
$sql ="SELECT FullName,EmailId,Password,StudentId,Status FROM tblstudents WHERE EmailId=:email
and Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
foreach ($results as $result) {
$_SESSION['stdid']=$result->StudentId;
$_SESSION['username']=$result->FullName;
if($result->Status==1)
{
$_SESSION['login']=$_POST['emailid'];
echo "<script type='text/javascript'> [Link] ='[Link]'; </script>";
} else {
echo "<script>alert('Your Account Has been blocked .Please contact admin');</script>";

}
}

17
else{
echo "<script>alert('Invalid Details');</script>";
}
}
}
?>

[Link]
<?php
session_start();
include('includes/[Link]');
error_reporting(0);
if(isset($_POST['signup']))
{
//code for captach verification
if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') {
echo "<script>alert('Incorrect verification code');</script>" ;
}
else {
//Code for student ID
$count_my_page = ("[Link]");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]");
fclose($fp);
$StudentId= $hits[0];
$fname=$_POST['fullanme'];
$mobileno=$_POST['mobileno'];
$email=$_POST['email'];
$password=md5($_POST['password']);
$status=1;
$sql="INSERT INTO tblstudents(StudentId,FullName,MobileNumber,EmailId,Password,Status)
VALUES(:StudentId,:fname,:mobileno,:email,:password,:status)";
$query = $dbh->prepare($sql);
$query->bindParam(':StudentId',$StudentId,PDO::PARAM_STR);
$query->bindParam(':fname',$fname,PDO::PARAM_STR);
$query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':password',$password,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
echo '<script>alert("Your Registration successfull and your student id is "+"'.$StudentId.'")</script>';
}
else
{
echo "<script>alert('Something went wrong. Please try again');</script>";
}
}
}
?>

18
[Link]
<?php
session_start();
error_reporting(0);
include('includes/[Link]');
if(strlen($_SESSION['login'])==0)
{
header('location:[Link]');
}
else{?>
<!DOCTYPE html>
<html xmlns="[Link]
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Online Library Management System | User Dash Board</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/[Link]" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/[Link]" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/[Link]" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='[Link] rel='stylesheet' type='text/css' />

</head>
<body>
<!------MENU SECTION START-->
<?php include('includes/[Link]');?>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">User DASHBOARD</h4>

</div>
</div>

<div class="row">
<div class="col-md-3 col-sm-3 col-xs-6">
<div class="alert alert-info back-widget-set text-center">
<i class="fa fa-bars fa-5x"></i>
<?php
$sid=$_SESSION['stdid'];
$sql1 ="SELECT id from tblissuedbookdetails where StudentID=:sid";
$query1 = $dbh -> prepare($sql1);
$query1->bindParam(':sid',$sid,PDO::PARAM_STR);
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$issuedbooks=$query1->rowCount();
?>
<h3><?php echo htmlentities($issuedbooks);?> </h3>
Book Issued
19
</div>
</div>
<div class="col-md-3 col-sm-3 col-xs-6">
<div class="alert alert-warning back-widget-set text-center">
<i class="fa fa-recycle fa-5x"></i>

[Link]
<?php
session_start();
include('includes/[Link]');
error_reporting(0);
if(strlen($_SESSION['login'])==0)
{
header('location:[Link]');
}
else{
if(isset($_POST['update']))
{
$sid=$_SESSION['stdid'];
$fname=$_POST['fullanme'];
$mobileno=$_POST['mobileno'];

$sql="update tblstudents set FullName=:fname,MobileNumber=:mobileno where StudentId=:sid";


$query = $dbh->prepare($sql);
$query->bindParam(':sid',$sid,PDO::PARAM_STR);
$query->bindParam(':fname',$fname,PDO::PARAM_STR);
$query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR);
$query->execute();

echo '<script>alert("Your profile has been updated")</script>';


}

?>

<?php } ?>
<div class="form-group">
<label>Profile Status : </label>
<?php if($result->Status==1){?>
<span style="color: green">Active</span>
<?php } else { ?>
<span style="color: red">Blocked</span>
<?php }?>
</div>
<div class="form-group">
<label>Enter Full Name</label>
<input class="form-control" type="text" name="fullanme" value="<?php echo htmlentities($result-
>FullName);?>" autocomplete="off" required />
</div>
<div class="form-group">
<label>Mobile Number :</label>
<input class="form-control" type="text" name="mobileno" maxlength="10" value="<?php ech
htmlentities($result->MobileNumber);?>" autocomplete="off" required />
</div>

<div class="form-group">
<label>Enter Email</label>
20
<input class="form-control" type="email" name="email" id="emailid" value="<?php echo
htmlentities($result->EmailId);?>" autocomplete="off" required readonly />
</div>
<?php }} ?>

OUTPUT:

21
RESULT:
Thus the system was implemented as per design.

22
[Link]
DATE: PROJECT TESTING

AIM

To test the implemented system for various scenario as per usecase.

TESTING

Test 1: If a user signs in with an incorrect password, the system should respond with a "Password
incorrect" message rather than "Not found."

Test 2: If a user tries to sign up with an email address that already exists, the system should respond
with a "Email address already in use" message.

23
Test 3:Request for a new book.

Test 4: Issued books will be displayed on screen.

Test 4: List of book details will be displayed on user’s dashboard.

24
RESULT:
Thus for various use case scenario were tested for the system.

25
[Link]
DATE: IMPROVING REUSABILITY AND MAINTAINABILITY

AIM:
To improve the reusability and maintainability of the system.

INTRODUCTION:
In our library management system, we prioritize efficiency and scalability. To enhance
our system's reusability and maintainability, we've implemented modular login and registration
components. This decision aims to streamline development efforts and ensure long- term system
stability.

CODING:
[Link]:
<?php
session_start();
error_reporting(0);
include('includes/[Link]');
if($_SESSION['login']!=''){
$_SESSION['login']='';
}
if(isset($_POST['login']))
{
if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') {
echo "<script>alert('Incorrect verification code');</script>" ;
}
else {
$email=$_POST['emailid'];
$password=md5($_POST['password']);
$sql ="SELECT FullName,EmailId,Password,StudentId,Status FROM tblstudents WHERE
EmailId=:email and Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
foreach ($results as $result) {
$_SESSION['stdid']=$result->StudentId;
$_SESSION['username']=$result->FullName;
if($result->Status==1)
{
$_SESSION['login']=$_POST['emailid'];
echo "<script type='text/javascript'> [Link] ='[Link]'; </script>";
} else {
echo "<script>alert('Your Account Has been blocked .Please contact admin');</script>";

?>
<!DOCTYPE html>
<html xmlns="[Link]
<head>
26
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
</head>
<body>
<div class="panel-body">
<form role="form" method="post">
<div class="form-group">
<label>Enter Email id</label>
<input class="form-control" type="text" name="emailid" required autocomplete="off" />
</div>
<div class="form-group">
<label>Password</label>
<input class="form-control" type="password" name="password" required autocomplete="off" />
<p class="help-block"><a href="[Link]">Forgot Password</a></p>
</div>
</body>
</html>

[Link]:
<?php
session_start();
include('includes/[Link]');
error_reporting(0);
if(isset($_POST['signup']))
{
//code for captach verification
if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') {
echo "<script>alert('Incorrect verification code');</script>" ;
}
else {
//Code for student ID
$count_my_page = ("[Link]");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]");
fclose($fp);
$StudentId= $hits[0];
$fname=$_POST['fullanme'];
$mobileno=$_POST['mobileno'];
$email=$_POST['email'];
$password=md5($_POST['password']);
$status=1;
$sql="INSERT INTO tblstudents(StudentId,FullName,MobileNumber,EmailId,Password,Status)
VALUES(:StudentId,:fname,:mobileno,:email,:password,:status)";
$query = $dbh->prepare($sql);
$query->bindParam(':StudentId',$StudentId,PDO::PARAM_STR);
$query->bindParam(':fname',$fname,PDO::PARAM_STR);
$query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':password',$password,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
27
<label>Enter Full Name</label>
<input class="form-control" type="text" name="fullanme" autocomplete="off" required />
</div>
<div class="form-group">
<label>Mobile Number :</label>
<input class="form-control" type="text" name="mobileno" maxlength="10" autocomplete="off" required />
</div>
<div class="form-group">
<label>Enter Email</label>
<input class="form-control" type="email" name="email" id="emailid" onBlur="checkAvailability()"
autocomplete="off" required />
<span id="user-availability-status" style="font-size:12px;"></span>
</div>
<div class="form-group">
<label>Enter Password</label>
<input class="form-control" type="password" name="password" autocomplete="off" required />
</div>
<div class="form-group">
<label>Confirm Password </label>
<input class="form-control" type="password" name="confirmpassword" autocomplete="off" required />
</div>
<div class="form-group">
<label>Verification code : </label>
<button type="submit" name="signup" class="btn btn-danger" id="submit">Register Now </button>
</form>
</body>
</html>

REUSABILITY:
By encapsulating login and registration functionality into modular components, we've
significantly boosted reusability. These modules serve as standalone entities that can be
seamlessly integrated into various projects or sections of our library management system. This
approach eliminates redundant code and promotes consistency across different features.
MAINTAINABILITY:
Modular code inherently enhances maintainability. With our login and registration
modules neatly organized, maintaining and updating these functionalities becomes a
straightforward task. Should any issues arise or improvements be necessary, we can focus on
specific modules without disrupting the rest of the system. This ensures that our system remains
agile and adaptable to evolving requirements.
FUTURE DEVELOPMENT:
Looking ahead, our modular approach lays a solid foundation for future development
endeavors. As we continue to evolve our library management system, having reusable
authentication components will expedite the integration of new features and functionalities. This
strategic investment in code reusability sets us on a path towards sustainable growth and
innovation.

28
OUTPUT:

RESULT:
Thus improvements were done to the software for reusability and maintainability.

29
[Link]
IMPLEMENT THE MODIFIED SYSTEM AND
DATE: TEST IT FOR VARIOUS SCENARIOS.

AIM:
To implement the modified system and testing it with various scenarios.

INTRODUCTION:
In our ongoing efforts to refine our library management system, we've recently introduced edit
and update options . This enhancement aims to empower librarian and user with greater control and
flexibility over book-related data.

IMPROVED CODE:

[Link]:
<?php
session_start();
error_reporting(0);
include('includes/[Link]');
if(strlen($_SESSION['alogin'])==0)
{
header('location:[Link]');
}
else{

if(isset($_POST['update']))
{
$bookname=$_POST['bookname'];
$category=$_POST['category'];
$author=$_POST['author'];
$isbn=$_POST['isbn'];
$price=$_POST['price'];
$bookid=intval($_GET['bookid']);
$Copies=($_GET['Copies']);
$sql="update tblbooks set
BookName=:bookname,CatId=:category,AuthorId=:author,ISBNNumber=:isbn,BookPrice=:price,Copies=:Cop
ies where id=:bookid";
$query = $dbh->prepare($sql);
$query->bindParam(':bookname',$bookname,PDO::PARAM_STR);
$query->bindParam(':category',$category,PDO::PARAM_STR);
$query->bindParam(':author',$author,PDO::PARAM_STR);
$query->bindParam(':isbn',$isbn,PDO::PARAM_STR);
$query->bindParam(':price',$price,PDO::PARAM_STR);
$query->bindParam(':bookid',$bookid,PDO::PARAM_STR);
$query->bindParam(':Copies',$Copies,PDO::PARAM_STR);
$query->execute();
$_SESSION['msg']="Book info updated successfully";
header('location:[Link]');?>
<!DOCTYPE html>
<html xmlns="[Link]
<head>
<link href='[Link] rel='stylesheet' type='text/css' />

</head>
<option value="<?php echo htmlentities($row->id);?>"><?php echo htmlentities($row-
30
>CategoryName);?></option>
<?php }}} ?>
</select>
</div>
<div class="form-group">
<label> Publication<span style="color:red;">*</span></label>
<select class="form-control" name="author" required="required">
<option value="<?php echo htmlentities($result->athrid);?>"> <?php echo htmlentities($athrname=$result-
>AuthorName);?></option>
<?php

$sql2 = "SELECT * from tblauthors ";


$query2 = $dbh -> prepare($sql2);
$query2->execute();
$result2=$query2->fetchAll(PDO::FETCH_OBJ);
if($query2->rowCount() > 0)
{
foreach($result2 as $ret)
{
if($athrname==$ret->AuthorName)
{
continue;
} else{
<script src="assets/js/[Link]"></script>
</body>
</html>
<?php } ?>

[Link]:
<?php
session_start();
error_reporting(0);
include('includes/[Link]');
if(strlen($_SESSION['alogin'])==0)
{
header('location:[Link]');
}
else{
$status=$_GET['status'];
$days=$_GET['days'];
if(isset($_POST['return']))
{
$rid=intval($_GET['rid']);
$fine=$_POST['fine'];
$ISBNNumber=$_GET['ISBNNumber'];

$rstatus=1;
$sql="update tblissuedbookdetails set fine=:fine,ReturnStatus=:rstatus where id=:rid";
$query = $dbh->prepare($sql);
$query->bindParam(':rid',$rid,PDO::PARAM_STR);
$query->bindParam(':fine',$fine,PDO::PARAM_STR);
$query->bindParam(':rstatus',$rstatus,PDO::PARAM_STR);
$query->execute();
$sql="update tblbooks set IssuedCopies=IssuedCopies-1 where ISBNNumber=:ISBNNumber";
$query = $dbh->prepare($sql);
$query->bindParam(':ISBNNumber',$ISBNNumber,PDO::PARAM_STR);
31
$query->execute();
$_SESSION['msg']="Book Returned successfully";
header('location:[Link]');
}
}
?>
<!DOCTYPE html>
<link href='[Link] rel='stylesheet' type='text/css' />
<script>
// function for get student name
function getstudent() {
$("#loaderIcon").show();
[Link]({
url: "get_student.php",
data:'studentid='+$("#studentid").val(),
type: "POST",
success:function(data){
$("#get_student_name").html(data);
$("#loaderIcon").hide();
},
<?php
<script src="assets/js/[Link]"></script>
</body>
</html>

EDIT FUNCTIONALITY:
With the introduction of the edit button, administrators now have the ability to modify libraray
details such as books,user details,request,issue,password. This feature ensures that library information
remains accurate and up-to-date, enhancing the overall user experience and credibility of our system.

UPDATE FUNCTIONALITY:
The update option provides administrators with the capability to update details from the system
entirely. Whether it's due to adding,deleting,changing or any other reason, this functionality allows for
the efficient management of library data. It helps maintain an updated and organized database, preventing
clutter and confusion.

OUTPUT:

32
33
34
RESULT:
Thus to implement the modified system and testing it for various scenarios was done
successfully.

35

You might also like