PRESENTATION

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 89

Project Report On

“Library Management System”

Project report submitted in partial fulfillment of the requirement for the award of
the Degree of Bachelor of Computer Application.

Submitted By

Abhishek Sharma
ROLL NO.- 582777
Session: 2022-2025

UNDER THE SUPERVISION OF

Mr. Nikhil Vijay


Proffesor
Department of Bachelor of Computer Application
ST. WILFREDS P.G COLLEGE
University of Rajasthan
Jaipur

DECLARATION

This is to certify that the work reported in the present project entitled “Library
Management System”is a record of work done by me in the Bachelor of
Computer Application, Jaipur. The reports are based on the project work done
entirely by us and not copied from any other source.

VANSHIKA SONI
Class: BCA Part- III
Roll NO. : 582777
Enrolment No. : 2021/112593
Session: 2022-25
Certificate
This is to certify that the project report entitled “Library Management System”
being submitted by VANSHIKA SONI in partial fulfilment for the award of the
degree of Bachelor of Computer Application to the University of Rajasthan is
a record of bonafide work carried out by himself under my guidance and
supervision.

The result embodied in the project report has not been submitted to any other
University or institute for the award of any Degree or Diploma.

Dr.Ruchi Dave
(HOD)
ACKNOWLEDGEMENT

I would like to express my profound gratitude to our guide MR. NIKHIL


VIJAY sir, of Institute for their contributions to the completion of our
project Library Management System.

I would like to express my special thanks to our Vice Principle and mentor for
their time and efforts he provided throughout the year. Your useful advice and
suggestions were really helpful to me during the project’s completion. In this
aspect, we are eternally grateful to you.
TABLE OF CONTENT

TITLE PAGE NO.


Title page I.

Certificate II.

Declaration III.

Acknowledgement IV.

Table of content V.

ABSTRACT VI.
LIST OF CONTENT

 INTRODUCTION
PROJECT AIMS AND OBJECTIVES BACKGROUND OF PROJECT OPERATION
ENVIRONMENT

 SYSTEM ANALYSIS
SOFTWARE REQUIREMENT SPECIFICATION EXISTING VS PROPOSED
SOFTWARE TOOL USED
SYSTEM DESIGN
DATA FLOW DIAGRAM’S
SYSTEM TESTING

 UNIT TESTING INTEGRATION TESTING

CODING
CONCLUSION & FUTURE SCOPE
ABSTRACT

Online Library Management System is a system which maintains the information


about the books present in the library, their authors, the members of library to
whom books are issued, library staff and all. This is very difficult to organize
manually. Maintenance of all this information manually is a very complex task.
Owing to the advancement of technology, organization of an Online Library
becomes much simple. The Online Library Management has been designed to
computerize and automate the operations performed over the information about
the members, book issues and returns and all other operations. This
computerization of library helps in many instances of its maintenances. It reduces
the workload of management as most of the manual work done is reduced.
CHAPTER-1
1:- INTRODUCTION

This chapter gives an overview about the aim , objectives ,background and operation environment of the system.

1.1 PROJECT AIMS AND OBJECTIVES

The project aims and objectives that will be achieved after completion of this project are discussed in this
subchapter. The aims and objectives are as follows:
• Online book reading.
• A search column to search availability of books.
• Facility to download required book.
• Video tutorial for students.
• An Admin login page where admin can add books, videos or page sources
• Open link for Learning Websites

1.2 BACKGROUND OF PROJECT

E-Library Management System is an application which refers to library systems which are generally small or
medium in size. It is used by librarian to manage the library using a computerized system where he/she can
add new books, videos and Page sources.

Books and student maintenance modules are also included in this system which would keep track of the
students using the library and also a detailed description about the books a library contains. With this
computerized system there will be no loss of book record or member record which generally happens when a
non computerized system is used.

All these modules are able to help librarian to manage the library with more convenience and in a more
efficient way as compared to library systems which are not computerized.

PROCESSOR INEL CORE PROCESSOR OR BATTER


PERFOMENCE

OPRATING SYSTEM WINDOWS VISTA,WINDOWS7,UBUNTU

MEMORY 1GB RAM OR MORE

DATABASE MY SQL
CHAPTER-2
2:- SYSTEM ANALYSIS

In this chapter, we will discuss and analyze about the developing process of Library Management System
including software requirement specification (SRS) and comparison between existing and proposed system .
The functional and non functional requirements are included in SRS part to provide complete description and
overview of system requirement before the developing process is carried out. Besides that, existing vs
proposed provides a view of how the proposed system will be more efficient than the existing one.

2.1 SOFTWARE REQUIREMENT SPECIFICATION


2.1.1 GENERAL DESCRIPTION

PRODUCT DESCRIPTION:

Library Management System is a computerized system which


helps user(librarian) to manage the library daily activity in electronic format. It
reduces the risk of paper work such as file lost, file damaged and time consuming.

It can help user to manage the transaction or record more effectively and
time- saving.

PROBLEM STATEMENT:

The problem occurred before having computerized system includes:

• File lost:

When computerized system is not implemented file is always lost because of human
environment.Some times due to some human error there may be a loss of records.
• File damaged
:
When a computerized system is not there file is always lost due to some accdent like
spilling of water by some member on file accidentally.
Besides some natural disaster like floods or fires may also damage the files.

• Difficult to search record:


When there is no computerized system there is always a difficulty in searching of records if the
records are large in number.

• Space consuming:
After the number of records become large the space for physical storage of file and records also
increases if no computerized system is implemented.
• Cost consuming.
As there is no computerized system the to add each record paper will be needed which will
increase the cost for the management of library.

2.1.2 SYSTEM OBJECTIVES

• Improvement in control and performance.


The system is developed to cope up with the current issues and problems of library. The system
can add user, validate user and is also bug free.

• Save cost.

After computerized system is implemented less human force will be required to maintain the
library thus reducing the overall cost.

• Save time.

Librarian is able to search record by using few clicks of mouse and few search keywords thus saving
his valuable time.

• Option of online Notice board.


Librarian will be able to provide a detailed description of workshops going in the college as well
as in nearby colleges.

• Lecture Notes.
Teacher have a facility to upload lectures notes in a pdf file having size not more than 10mb.

2.1.3 SYSTEM REQUIREMENTS

2.1.3.1 NON FUNCTIONAL REQUIREMENTS

Product Requirements.
EFFICIENCY REQUIREMENT
When a library management system will be implemented librarian and user will easily acess as
searching and book transaction will be very faster.
RELIABILITY REQUIREMENT

libraryThe system should accurately performs member registration ,member validation , report
generation, book transaction and search .

USABILITY REQUIREMENT

The system is designed for a user friendly environment so that student and staff of library can
perform the various tasks easily and in an effective way.

ORGANIZATIONAL REQUIREMENT

IMPLEMENTATION REQUIREMNTS

In implementing whole system it uses html in front end with php as server side scripting language
which will be used for database connectivity and the backend ie the database part is developed
using mysql.

DELIVERY REQUIREMENTS

The whole system is expected to be delivered in six months of time with a weekly evaluation by the project
guide.

2.1.3.2 FUNCTIONAL REQUIREMENTS

NORMAL USER

USER LOGIN

Description offeature

This feature used by the user to login into system. They are required to enter user id and password before they
are allowed to enter the system .The user id and password will be verified and if invalid id is there user is
allowed to not enter the system.

Functional requirements

-user id is provided when they register

-The system must only allow user with valid id and password to enter the system

-The system performs authorization process which decides what user level can acess to.
-The user must be able to logout after they finished using

system. REGISTER NEW USER

Description of feature

This feature can be performed by all users to register new user to create account.

Functional requirements

-System must be able to verify information

-System must be able to delete information if information is wrong

REGISTER NEW BOOK

Description of feature

This feature allows to add new books to the library

Functional requirements

-System must be able to verify information

-System must be able to enter number of copies into table.


- System must be able to not allow two books having same book id.

1.5 SEARCH BOOK

DESCRIPTION OF FEATURE
This feature is found in book maintenance part .we can search book based on book id , book name ,
publication or by author name.

Functional requirements

- System must be able to search the database based on select search type

- System must be able to filter book based on keyword enterd

- System must be able to show the filtered book in table

view Functional requirements


-System should be able to add detailed information about events .

-System should be able to display information on notice board available in the homepage of site

2.1.4 SOFTWARE AND HARDWARE REQUIREMENTS


This section describes the software and hardware requirements of the system

2.1.4.1 SOFTWARE REQUIREMENTS

• Operating system- Windows 7 is used as the operating system as it is stable and supports more
features and is more user friendly

• Database MYSQL-MYSQL is used as database as it easy to maintain and retrieve records by simple
queries which are in English language which are easy to understand and easy to write.

• Development tools and Programming language- HTML is used to write the whole code and develop
webpages with css, java script for styling work and php for sever side scripting.

2.1.4.2 HARDWARE REQUIREMENTS

Intel core i5 2 nd generation is used as a processor because it is fast than other processors
an provide reliable and stable and we can run our pc for longtime. By using this processor
we can keep on developing our project without any
worries.
Ram 1 gb is used as it will provide fast reading and writing capabilities and will in turn
support in processing.

Existing System:

 Early days Libraries are managed manually. It required lot of time to record or to retrieve the details.
The employees who have to record the details must perform their job very carefully. Even a small
mistake would create a lot of problems. Security of information is very less. Report generations of all
the information is very tough task.
 Maintenance of Library catalogue and arrangement of the books to the catalogue is very complex task.
In addition to its maintenance of member details, issue dates and return dates etc. manually is a
complex task.
 All the operations must be performed in perfect manner for the maintenance of the library with out any
degradation which may finally result in the failure of the entire system.

Proposed System: To solve the inconveniences as mentioned in the existing system, an Online Library is
proposed. The proposed system contains the following features:
 The students will register them through Online

 Individually each member will have his account through which he can access the information
he needs.

 Book details like authors, number of copies totally maintained by library, present available
number of books, reference books, non-reference books etc. all this information can be made
handy.

 Regarding the members designation, number of books was issued.

 Issue dates and returns of each member is maintained separately and fine charged if there is
any delay in returning the book.

 Administrator can add, update the books.

 Time consuming is low, gives accurate results, reliability can be improved with the help of
security.

2.3 SOFTWARE TOOLS USED

The whole Project is divided in two parts the front end and theback end.

2.3.1 Front end

The front end is designed using of html , Php ,css, Java script

HTML- HTMLorHyper Text Markup Languageis the main markuplanguage for creating web pages and
other information that can be displayed in a web browser.HTML is written in the form of HTML elements
consisting of tags enclosed in angle brackets (like <html>), within the web page content. HTML tags most
commonly come in pairs like <h1> and </h1>, although some tags represent empty elements and so are
unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they
are also called opening tags and closing tags). In between these tags web designers can add text, further tags,
comments and other types of text-based content. The purpose of a web browser is to read HTML documents
and compose them into visible or audible web pages. The browser does not display the HTML tags, but uses
the tags to interpret the content of the page.HTML elements form the building blocks of all websites. HTML
allows images and objects to be embedded and can be used to create interactive forms. It provides a means
to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists,
links, quotes and other items. It can embed scripts written in languages such as JavaScript which affect the
behavior of HTML web pages.
CSS- Cascading Style Sheets(CSS) is a style sheet language used fordescribing the look and
formatting of a document written in a markup language. While most often used to style web
pages and interfaces written in HTML and XHTML, the language can be applied to any kind

of XML document, including plain XML, SVG and XUL. CSS is a cornerstone specification of
the web and almost all web pages use CSS style sheets to describe their presentation.CSS is
designed primarily to enable the separation of document content from document presentation,
including elements such as the layout, colors, and fonts. This separation can improve content
accessibility, provide more flexibility and control in the specification. presentation
characteristics, enable multiple pages to share formatting, and reduce complexity and repetition
in the structural content (such as by allowing for table less web design).CSS can also allow the
same markup page to be presented in different styles for different rendering methods, such as
on-screen, in print, by voice (when read out by a speech-based browser or screen reader) and
on Braille-based, tactile devices. It can also be used to allow the web page to display
differently depending on the screen size or device on which it is being viewed. While the
author of a document typically links that document to a CSS file, readers can use a different
style sheet, perhaps one on their own computer, to override the one the author has specified.
However if the author or the reader did not link the document to a specific style sheet the
default style of the browser will be applied.CSS specifies a priority scheme to determine which
style rules apply if more than one rule matches against a particular element. In this so-called
cascade, priorities or weights are calculated and assigned to rules, so that the results are
predictable.

JAVA SCRIPT- JavaScript(JS) is a dynamic computer programminglanguage. It is most


commonly used as part of web browsers, whose implementations allow clientside scripts to
interact with the user, control the browser, communicate asynchronously, and alter the document
content that is displayed. It is also being used in server-side programming, game development and
the creation of desktop and mobile applications. JavaScript is a prototype-based scripting
language with dynamic typing and has first-class functions. Its syntax was influenced by C.
JavaScript copies many names and naming conventions from Java, but the two languages are

otherwise unrelated and have very different semantics. The key design principles within JavaScript
are taken from

the Self and Scheme programming languages. It is a multiparadigm language,


supporting object-oriented, imperative,

and functional programming styles. The application of JavaScript to use outside of web pages
—for example, in PDF documents, site-specific browsers, and desktop widgets—is also
significant. Newer and faster JavaScript VMs and platforms built upon them (notably
Node.js) have also increased the popularity of JavaScript for server-side web applications.
On the client side, JavaScript was traditionally implemented as an interpreted language but
just-in-time compilation is now performed by recent (post-2012) browsers.
PHP- PHPis a server-side scripting language designed for webdevelopment but also used as a general-purpose
programming language. PHP is now installed on more than 244 million websites and 2.1 million web servers.
Originally created by Rasmus Lerdorf in 1995, the reference implementation of PHP is now produced by The
PHP Group. While PHP originally stood for Personal Home Page, it now stands for PHP:
HypertextPreprocessor, a recursive backronym.PHP code is interpreted by a webserver with a PHP processor
module, which generates the resulting web page: PHP commands can be embedded directly into an HTML
source document rather than calling an external file to process data. It has also evolved to include a command-
line interface capability and can be used

in standalone graphical applications. PHP is free software released under the PHP License. PHP
can be deployed on most web servers and also as a standalone shell on almost every operating
system and platform, free of charge.

MYSQL- MySQL("My S-Q-L", officially, but also called "My Sequel") is (as ofJuly 2013) the world's
second most widely used open-source relational database management system (RDBMS). It is named
after co-founder Michael Widenius daughter, My. The
SQL phrase stands for Structured Query Language. The MySQL development project has made its
source code available under the terms of the GNU General Public License, as well as under a variety

of proprietary agreements. MySQL was owned and sponsored by a single for-profit

firm, the Swedish company MySQL AB, now owned by Oracle Corporation .MySQL is a popular
choice of database for use in web applications, and is a central component of the widely used LAMP
open source web application software stack (and other 'AMP' stacks). LAMP is an acronym for
"Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open source projects that require a full-
featured database management system often use MySQL. For commercial use, several paid editions are
available, and offer additional functionality. Applications which use MySQL

databases

include: TYPO3, MODx, Joomla, WordPress, phpBB, MyBB, Drupal and other

software. MySQL is also used in many high-profile, large-scale websites, including

Wikipedia, Google (though not for searches), Facebook, Twitter, Flickr, and YouTube
CHAPTER-3

3:-SYSTEM DESIGN

3.1 ENTITY RELATIONSHIP DIAGRAM

Entity-Relationship-Diagram

Entity-Relationship-Diagram

After entering to the home page of the website , Admin can choose the Admin Login option where they are
asked to enter username & password , and if he/she is a valid user then a teacher login page will be
displayed.
USE CAESE DIAGRAM FOR USER

After entering to the home page of the website , student can choose the USER LOGIN option where they are
asked to enter username & password , and if he/she is a valid user then a student login page will be displayed.

DATA FLOW DIAGRAM FOR ADMIN


DEPLOYMENT DIAGRAM
SEQUENCE DIAGRAM
CHAPTER-4

4:- SYSTEM TESTING

The aim of the system testing process was to determine all defects in our project .The program was subjected
to a set of test inputs and various observations were made and based on these observations it will be decided
whether the program behaves as expected or not. Our
Project went through two levels of

testing 1.Unit testing

2. integration testing

UNIT TESTING

Unit testing is undertaken when a module has been created and succesfully reviewed .In order to test a single
module we need to provide a complete environment ie besides the module we would require.

• The procedures belonging to other modules that the module under test calls.
• Non local data structures that module accesses.

• A procedure to call the functions of the module under test with appropriate parameters.

Unit testing was done on each and every module that is described under module description of chapter 4

1. Test For the admin module.

• Testing admin login form-This form is used for log in of administrator of the system.In
this we enter the username and password if both are correct administration page will
open other wise if any of data is wrong it will get redirected back to the login page and
again ask for username and password.

• Student account addition- In this section the admin can verify student details from
student academinc info and then only add student details to main library database it
contains add and delete buttons if user click add button data will be added to student
database and if he clicks delete button the student data will be deleted.

• Book Addition- Admin can enter details of book and can add the details to the main
book table also he can view the books requests.
2. Test for Student login module.

• Test for Student login Form-This form is used for log in of Student .In this we enter
thelibraryid, username and password if all these are correct student login page will open
other wise if any of data is wrong it will get redirected back to the login page and again
ask for libraryid, username and password.

• Test for account creation- This form is used for new account creation when student does
not fill the form completely it asks again to fill the whole form when he fill the form fully
it gets redirected to page which show waiting for conformation message as his data will
be only added by administrator after verification.

3. Test for teacher login module.

Test for teacher login form- This form is used for logg in of teacher .In this we enter the username and
password if all these are correct teacher login page will open other wise if any of data is wrong it will get
redirected back to the login page and again ask for username and password.

INTEGRATION TESTING

In this type of testing we test various integration of the project module by providing the input.
The primary objective is to test the module interfaces in order to ensure that no errors are occurring when one
module invokes the other module.
INTERFACE
CODE
5:- ADMIN

Index.php
<?php

session_start();

?>

<!DOCTYPE html>

<html>

<head>

<title>LMS | Login</title>

<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">

<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">

<script type="text/javascript" src="./bootstrap-4.4.1/js/juqery_latest.js"></script>

<script type="text/javascript" src="./bootstrap-4.4.1/js/bootstrap.min.js"></script>

</head>

<style type="text/css">

#main_content{ paddin

g: 50px;

background-color: whitesmoke;

#side_bar{

background-color: whitesmoke;

padding: 50px;

width: 300px;
height: 450px;

</style>

<body>

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">

<div class="container-fluid">

<div class="navbar-header">

<a class="navbar-brand" href="index.php">Library Management System (LMS)</a>

</div>

<ul class="nav navbar-nav navbar-right">

<li class="nav-item">

<a class="nav-link" href="index.php">Admin Login</a>

</li>

<li class="nav-item">

<a class="nav-link" href="../signup.php"></span>Register</a>

</li>

<li class="nav-item">

<a class="nav-link" href="../index.php">Login</a>

</li>

</ul>

</div>

</nav><br>

<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>

<div class="row">

<div class="col-md-4" id="side_bar">

<h5>Library Timing</h5>
<ul>

<li>Opening: 8:00 AM</li>

<li>Closing: 8:00 PM</li>

<li>(Sunday Off)</li>

</ul>

<h5>What We provide ?</h5>

<ul>

<li>Full furniture</li>

<li>Free Wi-fi</li>

<li>News Papers</li>

<li>Discussion Room</li>

<li>RO Water</li>

<li>Peacefull Environment</li>

</ul>

</div>

<div class="col-md-8" id="main_content">

<center><h3><u>Admin Login Form</u></h3></center>

<form action="" method="post">

<div class="form-group">

<label for="email">Email ID:</label>

<input type="text" name="email" class="form-control" required>

</div>

<div class="form-group">

<label for="password">Password:</label>

<input type="password" name="password" class="form-control" required>

</div>

<button type="submit" name="login" class="btn btn-primary">Login</button>


</form>

<?php

if(isset($_POST['login'])){

$connection = mysqli_connect("localhost","root","");

$db = mysqli_select_db($connection,"lms");

$query = "select * from admins where email = '$_POST[email]'";

$query_run = mysqli_query($connection,$query);

while ($row = mysqli_fetch_assoc($query_run)) {

if($row['email'] == $_POST['email']){

if($row['password'] == $_POST['password']){

$_SESSION['name'] = $row['name'];

$_SESSION['email'] = $row['email'];

header("Location: admin_dashboard.php");

else{

?>

<br><br><center><span class="alert-danger">Wrong Password


!!</span></center>

<?php

?>

</div>

</div>

</body>

</html>
Add Author
<?php
require("functions.php");
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Add Author</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
function alertMsg(){
alert(Book added successfully...);
window.location.href = "admin_dashboard.php";
}
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>

</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd">
<div class="container-fluid">

<ul class="nav navbar-nav navbar-center">


<li class="nav-item">
<a class="nav-link" href="admin_dashboard.php">Dashboard</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Books </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_book.php">Add New Book</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_book.php">Manage Books</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Category </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_cat.php">Add New Category</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_cat.php">Manage Category</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Authors</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_author.php">Add New Author</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_author.php">Manage Author</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="issue_book.php">Issue Book</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Add Author</h4><br></center>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form action="" method="post">
<div class="form-group">
<label for="name">Author Name:</label>
<input type="text" class="form-control" name="author_name"
required>
</div>
<button type="submit" name="add_author" class="btn btn-
primary">Add Author</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>

<?php

if(isset($_POST['add_author']))
{
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "insert into authors values(null,'$_POST[author_name]')";
$query_run = mysqli_query($connection,$query);
header("Location:admin_dashboard.php");
}
?>
Add Book
<?php
require("functions.php");
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Add New Book</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
function alertMsg(){
alert(Book added successfully...);
window.location.href = "admin_dashboard.php";
}
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd">
<div class="container-fluid">

<ul class="nav navbar-nav navbar-center">


<li class="nav-item">
<a class="nav-link" href="admin_dashboard.php">Dashboard</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Books </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_book.php">Add New Book</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_book.php">Manage Books</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Category </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_cat.php">Add New Category</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_cat.php">Manage Category</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Authors</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_author.php">Add New Author</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_author.php">Manage Author</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="issue_book.php">Issue Book</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Add a new Book</h4><br></center>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form action="" method="post">
<div class="form-group">
<label for="email">Book Name:</label>
<input type="text" name="book_name" class="form-control"
required>
</div>
<div class="form-group">
<label for="mobile">Author ID:</label>
<input type="text" name="book_author" class="form-control"
required>
</div>
<div class="form-group">
<label for="mobile">Category ID:</label>
<input type="text" name="book_category" class="form-control"
required>
</div>
<div class="form-group">
<label for="mobile">Book Number:</label>
<input type="text" name="book_no" class="form-control"
required>
</div>
<div class="form-group">
<label for="mobile">Book Price:</label>
<input type="text" name="book_price" class="form-control"
required>
</div>
<button type="submit" name="add_book" class="btn btn-primary">Add
Book</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>

<?php

if(isset($_POST['add_book']))
{
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "insert into books
values(null,'$_POST[book_name]','$_POST[book_author]','$_POST[book_category]',$_POST[book_no],$_P
OST[book_price])";
$query_run = mysqli_query($connection,$query);
#header("location:add_book.php");
}
?>
Add Cat
<?php
require("functions.php");
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Add New Category</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
function alertMsg(){
alert(Book added successfully...);
window.location.href = "admin_dashboard.php";
}
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd">
<div class="container-fluid">

<ul class="nav navbar-nav navbar-center">


<li class="nav-item">
<a class="nav-link" href="admin_dashboard.php">Dashboard</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Books </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_book.php">Add New Book</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_book.php">Manage Books</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Category </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_cat.php">Add New Category</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_cat.php">Manage Category</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Authors</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_author.php">Add New Author</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_author.php">Manage Author</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="issue_book.php">Issue Book</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Add a new Category</h4><br></center>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form action="" method="post">
<div class="form-group">
<label for="name">Category Name:</label>
<input type="text" class="form-control" name="cat_name"
required>
</div>
<button type="submit" name="add_cat" class="btn btn-primary">Add
Catogry</button>

</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>

<?php

if(isset($_POST['add_cat']))
{
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "insert into category values('','$_POST[cat_name]')";
$query_run = mysqli_query($connection,$query);
header("Location:admin_dashboard.php");
}
?>
Admin_Dashboard
<?php
require("functions.php");
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="view_profile.php">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="edit_profile.php">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd">
<div class="container-fluid">

<ul class="nav navbar-nav navbar-center">


<li class="nav-item">
<a class="nav-link" href="admin_dashboard.php">Dashboard</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Books </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_book.php">Add New Book</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_book.php">Manage Books</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Category </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_cat.php">Add New Category</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_cat.php">Manage Category</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Authors</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_author.php">Add New Author</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_author.php">Manage Author</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="issue_book.php">Issue Book</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<div class="row">
<div class="col-md-3" style="margin: 0px">
<div class="card bg-light" style="width: 300px">
<div class="card-header">Registered User</div>
<div class="card-body">
<p class="card-text">No. total Users: <?php echo
get_user_count();?></p>
<a class="btn btn-danger" href="Regusers.php" target="_blank">View
Registered Users</a>

</div>
</div>
</div>
<div class="col-md-3" style="margin: 0px">
<div class="card bg-light" style="width: 300px">
<div class="card-header">Total Book</div>
<div class="card-body">
<p class="card-text">No of books available: <?php echo
get_book_count();?></p>

<a class="btn btn-success" href="Regbooks.php" target="_blank">View


All Books</a>

</div>
</div>
</div>
<div class="col-md-3" style="margin: 0px">
<div class="card bg-light" style="width: 300px">
<div class="card-header">Book Categories</div>
<div class="card-body">
<p class="card-text">No of Book's Categories: <?php echo
get_category_count();?></p>
<a class="btn btn-warning" href="Regcat.php" target="_blank">View
Categories</a>

</div>
</div>
</div>
<div class="col-md-3" style="margin: 0px">
<div class="card bg-light" style="width: 300px">
<div class="card-header">No. of Authors</div>
<div class="card-body">
<p class="card-text">No of Authors: <?php echo
get_author_count();?></p>
<a class="btn btn-primary" href="Regauthor.php" target="_blank">View
Authors</a>
</div>
</div>
</div>
</div><br><br>
<div class="row">
<div class="col-md-3" style="margin: 0px">
<div class="card bg-light" style="width: 300px">
<div class="card-header">Book Issued</div>
<div class="card-body">
<p class="card-text">No of book issued: <?php echo
get_issue_book_count();?></p>
<a class="btn btn-success" href="view_issued_book.php"
target="_blank">View Issued Books</a>
</div>
</div>
</div>
<div class="col-md-3"></div>
<div class="col-md-3"></div>
</div>
</body>
</html>
change_password
<?php
require("functions.php");
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>

</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="view_profile.php">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="edit_profile.php">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Change Admin Password</h4><br></center>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form action="update_password.php" method="post">
<div class="form-group">
<label for="password">Enter Password:</label>
<input type="password" class="form-control"
name="old_password">

</div>
<div class="form-group">
<label for="New Password">Enter New Password:</label>
<input type="password" name="new_password" class="form-
control">
</div>
<button type="submit" name="update" class="btn btn-primary">Update
Password</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>
Delete_Author

<?php

$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "delete from authors where author_id = $_GET[aid]";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Author Deleted successfully...");
window.location.href = "manage_author.php";
</script>

Delete_Book
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "delete from books where book_no = $_GET[bn]";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Book Deleted successfully...");
window.location.href = "manage_book.php";
</script>
Delete_Cat
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "delete from category where cat_id = $_GET[cid]";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Category Deleted successfully...");
window.location.href = "manage_cat.php";
</script>
Edit_Author
<?php
session_start();

#fetch data from database


$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$author_id = "";
$author_name = "";
$query = "select * from authors where author_id = $_GET[aid]";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$author_name = $row['author_name'];
$author_id = $row['author_id'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Edit Book</h4><br></center>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form action="" method="post">
<div class="form-group">
<label for="name">Author Name:</label>
<input type="text" class="form-control" name="author_name"
value="<?php echo $author_name; ?>" required>
</div>
<button type="submit" name="update_author" class="btn btn-
primary">Update Author</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>
<?php
if(isset($_POST['update_author'])){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "update authors set author_name = '$_POST[author_name]' where author_id =
$_GET[aid]";
$query_run = mysqli_query($connection,$query);
header("location:manage_author.php");
}

?>

Edit_Book
<?php
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$book_name = "";
$book_no = "";
$author_id = "";
$cat_id = "";
$book_price = "";
$query = "select * from books where book_no = $_GET[bn]";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$book_name = $row['book_name'];
$book_no = $row['book_no'];
$author_id = $row['author_id'];
$cat_id = $row['cat_id'];
$book_price = $row['book_price'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>

</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Edit Book</h4><br></center>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form action="" method="post">
<div class="form-group">
<label for="mobile">Book Number:</label>
<input type="text" name="book_no" value="<?php echo
$book_no;?>" class="form-control" disabled required>
</div>
<div class="form-group">
<label for="email">Book Name:</label>
<input type="text" name="book_name" value="<?php echo
$book_name;?>" class="form-control" required>
</div>
<div class="form-group">
<label for="mobile">Author ID:</label>
<input type="text" name="author_id" value="<?php echo
$author_id;?>" class="form-control" required>
</div>
<div class="form-group">
<label for="mobile">Category ID:</label>
<input type="text" name="cat_id" value="<?php echo
$cat_id;?>" class="form-control" required>
</div>
<div class="form-group">
<label for="mobile">Book Price:</label>
<input type="text" name="book_price" value="<?php echo
$book_price;?>" class="form-control" required>
</div>
<button type="submit" name="update" class="btn btn-primary">Update
Book</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>
<?php
if(isset($_POST['update'])){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "update books set book_name = '$_POST[book_name]',author_id =
$_POST[author_id],cat_id = $_POST[cat_id],book_price = $_POST[book_price] where book_no =
$_GET[bn]";
$query_run = mysqli_query($connection,$query);
header("location:manage_book.php");
}
?>
Edit Cat
<?php
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$cat_id = "";
$cat_name = "";
$query = "select * from category where cat_id = $_GET[cid]";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$cat_name = $row['cat_name'];
$cat_id = $row['cat_id'];
}
?>
<!DOCTYPE html>
<html>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Edit Book</h4><br></center>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form action="" method="post">
<div class="form-group">
<label for="name">Category Name:</label>
<input type="text" class="form-control" name="cat_name"
value="<?php echo $cat_name; ?>" required>
</div>
<button type="submit" name="update_cat" class="btn btn-
primary">Update Catogry</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>
<?php
if(isset($_POST['update_cat'])){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "update category set cat_name = '$_POST[cat_name]' where cat_id = $_GET[cid]";
$query_run = mysqli_query($connection,$query);
header("location:manage_cat.php");
}
?>
Edit_Profile

<?php

require("functions.php");
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>

</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
>

value="<?php echo $mobile;? <input type="text" name="mobile" class="form-control"


>">
</div>
<button type="submit" name="update" class="btn btn-
primary">Update</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>
Functions
<?php
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 get_user_count(){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$user_count = 0;
$query = "select count(*) as user_count from users";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$user_count = $row['user_count'];
}
return($user_count);
}

function get_book_count(){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$book_count = 0;
$query = "select count(*) as book_count from books";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$book_count = $row['book_count'];
}
return($book_count);
}

function get_issue_book_count(){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$issue_book_count = 0;
$query = "select count(*) as issue_book_count from issued_books";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$issue_book_count = $row['issue_book_count'];
}
return($issue_book_count);
}

function get_category_count(){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$cat_count = 0;
$query = "select count(*) as cat_count from category";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$cat_count = $row['cat_count'];
}
return($cat_count);
}
?>
Issue_Book
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Issue Book</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
function alertMsg(){
alert(Book added successfully...);
window.location.href = "admin_dashboard.php";
}
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd">
<div class="container-fluid">
<ul class="nav navbar-nav navbar-center">
<li class="nav-item">
<a class="nav-link" href="admin_dashboard.php">Dashboard</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Books </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_book.php">Add New Book</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_book.php">Manage Books</a>
</div>
</li>

<label for="book_author">Author ID:</label>


<select class="form-control" name="book_author">
<option>-Select author-</option>
<?php
$connection =
mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "select author_name from authors";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
?>
<option><?php echo
$row['author_name'];?></option>
<?php
}
?>
</select>
<!--<input type="text" name="book_author" class="form-
control" required> -->
</div>
<div class="form-group">
<label for="book_no">Book Number:</label>
<input type="text" name="book_no" class="form-control"
required>
</div>
<div class="form-group">
<label for="student_id">Student ID:</label>
<input type="text" name="student_id" class="form-control"
required>
</div>
<div class="form-group">
<label for="issue_date">Issue Date:</label>
<input type="text" name="issue_date" class="form-control"
value="<?php echo date("yy-m-d");?>" required>
</div>
<button type="submit" name="issue_book" class="btn btn-
primary">Issue Book</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>

<?php

if(isset($_POST['issue_book']))
{
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "insert into issued_books
values(null,$_POST[book_no],'$_POST[book_name]','$_POST[book_author]',$_POST[student_id],1,'$_POS
T[issue_date]')";
$query_run = mysqli_query($connection,$query);
#header("Location:admin_dashboard.php");
}
?>
Manage Author
<?php
require("functions.php");
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Manage Author</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>

</a>

<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_author.php">Manage Author</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="issue_book.php">Issue Book</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Manage Author</h4><br></center>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Author ID</th>
<th>Name</th>
<th>Action</th>
</tr>
</thead>
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "select * from authors";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
?>
<tr>
<td><?php echo $row['author_id'];?></td>
<td><?php echo $row['author_name'];?></td>
<td><button class="btn"><a
href="edit_author.php?aid=<?php echo $row['author_id'];?>">Edit</a></button>
<button class="btn"><a
href="delete_author.php?aid=<?php echo $row['author_id'];?>">Delete</a></button></td>
</tr>
<?php
}
?>
</table>
</div>
<div class="col-md-2"></div>
</div>
</body>
</html>
Manage_Book
<?php
require("functions.php");
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Manage Book</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
function alertMsg(){
alert(Book added successfully...);
window.location.href = "admin_dashboard.php";
}
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>

<div class="dropdown-menu">
<a class="dropdown-item" href="add_author.php">Add New Author</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_author.php">Manage Author</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="issue_book.php">Issue Book</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Manage Books</h4><br></center>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Name</th>
<th>Author</th>
<th>Category</th>
<th>ISBN No.</th>
<th>Price</th>
<th>Action</th>
</tr>
</thead>
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "select * from books";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
?>
<tr>
<td><?php echo $row['book_name'];?></td>
<td><?php echo $row['author_id'];?></td>
<td><?php echo $row['cat_id'];?></td>
<td><?php echo $row['book_no'];?></td>
<td><?php echo $row['book_price'];?></td>
<td><button class="btn" name=""><a
href="edit_book.php?bn=<?php echo $row['book_no'];?>">Edit</a></button>
<button class="btn"><a
href="delete_book.php?bn=<?php echo $row['book_no'];?>">Delete</a></button></td>
</tr>
<?php
}
?>
</table>
</div>
<div class="col-md-2"></div>
</div>
</body>
</html>
<? Manage_Cat
php
require("functions.php");
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Manage Category</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd">
<div class="container-fluid">

<ul class="nav navbar-nav navbar-center">


<li class="nav-item">
<a class="nav-link" href="admin_dashboard.php">Dashboard</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Books </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_book.php">Add New Book</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_book.php">Manage Books</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Category </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_cat.php">Add New Category</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_cat.php">Manage Category</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">Authors</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="add_author.php">Add New Author</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="manage_author.php">Manage Author</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="issue_book.php">Issue Book</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Manage Category</h4><br></center>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Name</th>
<th>Action</th>
</tr>
</thead>
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "select * from category";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
?>
<tr>
<td><?php echo $row['cat_name'];?></td>
<td><button class="btn"><a
href="edit_cat.php?cid=<?php echo $row['cat_id'];?>">Edit</a></button>
<button class="btn"><a
href="delete_cat.php?cid=<?php echo $row['cat_id'];?>">Delete</a></button></td>
</tr>
<?php
}
?>
</table>
</div>
<div class="col-md-2"></div>
</div>
</body>
</html>
Regauthor
<?php
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "select * from Authors";
$author_name = "";
?>
<!DOCTYPE html>
<html>
<head>
<title>Reg Authors</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Registered Authors</h4><br></center>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<form>
<table class="table-bordered" width="900px" style="text-align: center">
<tr>
<th>Author Name</th>
</tr>

<?php

$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
?>
<tr>
<td><?php echo $row['author_name'];?></td>
</tr>

<?php
}
?>
</table>
</form>
</div>
<div class="col-md-2"></div>
</div>
</body>
</html>
Regbooks
<?php

session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli
_select_db($connection,"lms");
$book_name = "";
$author = "";
$category = "";
$book_no = "";
$price = "";
$query = "select books.book_name,books.book_no,book_price,authors.author_name from books left
join authors on books.author_id = authors.author_id";
?>
<!DOCTYPE html>
<html>
<head>
<title>All Reg Books</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Registered Book's Detail</h4><br></center>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<form>
<table class="table-bordered" width="900px" style="text-align: center">
<tr>
<th>Name</th>
<th>Author</th>
<th>Price</th>
<th>Number</th>
</tr>

<?php

$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
?>
<tr>
<td><?php echo $row['book_name'];?></td>
<td><?php echo $row['author_name'];?></td>
<td><?php echo $row['book_price'];?></td>
<td><?php echo $row['book_no'];?></td>
</tr>

<?php
}
?>
</table>
</form>
</div>
<div class="col-md-2"></div>
</div>
</body>
</html>
Regcat
<?php
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "select * from category";
$cat_name = "";
?>
<!DOCTYPE html>
<html>
<head>
<title>Book's Category</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Registered Book's Category</h4><br></center>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<form>
<table class="table-bordered" width="900px" style="text-align: center">
<tr>
<th>Category Name</th>
</tr>

<?php

$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
?>
<tr>
<td><?php echo $row['cat_name'];?></td>
</tr>

<?php
}
?>
</table>
</form>
</div>
<div class="col-md-2"></div>
</div>
</body>
</html>
Registered_Book
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$book_count = 0;
$query = "select count(*) as book_count from books";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$book_count = $row['book_count'];
}
?>
Registered_User
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$user_count = 0;
$query = "select count(*) as user_count from users";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$user_count = $row['user_count'];
}
?>
Regusers
<?php
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = ""
;
$email = "";
$password = "";
$mobile = "";
$address = "";
$query = "select * from users";
?>
<!DOCTYPE html>
<html>
<head>
<title>All Reg Users</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>

<ul class="nav navbar-nav navbar-right">


<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Registered Users Detail</h4><br></center>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<form>
<table class="table-bordered" width="900px" style="text-align: center">
<tr>
<th>Name</th>
<th>Mobile</th>
<th>Email</th>
<th>Address</th>
</tr>

<?php

$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
$address = $row['address'];

?>

<tr>
<td><?php echo $name;?></td>
<td><?php echo $email;?></td>
<td><?php echo $mobile;?></td>
<td><?php echo $address;?></td>
</tr>
<?php

}
?>
</table>
</form>
</div>
<div class="col-md-2"></div>
</div>
</body>
</html>
Update
<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$query = "update admins set name = '$_POST[name]',email = '$_POST[email]',mobile =
'$_POST[mobile]'";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Updated successfully...");
window.location.href = "admin_dashboard.php";
</script>
Update_Password
<?php
session_start();
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$password = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){

$password = $row['password'];
}
if($password == $_POST['new_password']){
$query = "update admins set password = '$_POST[new_password]' where email =
'$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Updated successfully...");
window.location.href = "admin_dashboard.php";
</script>
<?php
}
else{
?>
<script type="text/javascript">
alert("Wrong Admin Password...");
window.location.href = "change_password.php";
</script>
<?php
}
?>
View_Issued_Book
<?php
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$book_name = "";
$author = "";
$book_no = "";
$student_name = "";
$query = "select
issued_books.book_name,issued_books.book_author,issued_books.book_no,users.name from issued_books
left join users on issued_books.student_id = users.id where issued_books.status = 1";
?>
<!DOCTYPE html>
<html>
<head>
<title>Issued Books</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>

</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
</body>
</html
View_Profile
<?php
require("functions.php");
session_start();
#fetch data from database
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$query = "select * from admins where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while ($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
}
?>

<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="../bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="../bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="../bootstrap-4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="admin_dashboard.php">Library Management
System (LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo
$_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo
$_SESSION['email'];?></strong></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile </a>
<div class="dropdown-menu">
<a class="dropdown-item" href="view_profile.php">View Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="edit_profile.php">Edit Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../logout.php">Logout</a>
</li>
</ul>
</div>
</nav><br>
<span><marquee>This is library mangement system. Library opens at 8:00 AM and close at 8:00
PM</marquee></span><br><br>
<center><h4>Admin Profile Detail</h4><br></center>

<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form>
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" value="<?php echo
$name;?>" disabled>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="text" value="<?php echo $email;?>" class="form-
<input type="text" class="form-control" value="<?php echo
$name;?>" disabled>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="text" value="<?php echo $email;?>" class="form-
control" disabled>
</div>
<div class="form-group">
<label for="mobile">Mobile:</label>
<input type="text" value="<?php echo $mobile;?>" class="form-
control" disabled>
</div>
<div class="form-group">
<label for="email">Address:</label>
<input type="text" value="<?php echo $address;?>" class="form-
control" disabled>
</div>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>
CHAPTER 6

CONCLUSION & FUTURE SCOPE

This website provides a computerized version of library management system which will
benefit the students as well as the staff of the library.

It makes entire process online where student can search books, staff can generate reports and
do book transactions. It also has a facility for student login where student can login and can
see status of books issued as well request for book or give some suggestions. It has a facility
of teacher’s login where teachers can add lectures notes and also give necessary suggestion
to library and also add info about workshops or events happening in our college or nearby
college in the online notice board.

There is a future scope of this facility that many more features such as online lectures video
tutorials can be added by teachers as well as online assignments submission facility , a feature
Of group chat where students can discuss various issues of engineering can be added to this
project thus making it more interactive more user friendly and project which fulfills each users
need in the best way possible.
REFERENCE FROM:-

HTML & CSS: DESIGN AND CREATE WEBSITE BY JOHN DUCKETT.


JAVASCRIPT: EFFECTIVE JAVA BY JOSHUA BLOCH.
BOOTSTRAP: BY WEBSITE.
PHP: php FOR THE WEB BY LARRY ULLMAN.
XAMPP: BY INTERNE

You might also like