0% found this document useful (0 votes)
14 views33 pages

lms report

Uploaded by

m31s21.samsung
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)
14 views33 pages

lms report

Uploaded by

m31s21.samsung
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
You are on page 1/ 33

SRI SIDDARTHA INSTITUTE OF TECHNOLOGY, MARLUR

TUMAKURU-572105
(A Constitute College of Sri Siddartha Academy of Higher Education)

Mini-Project(CS5MP1) Report On

“LIBRARY MANAGEMENT SYSTEM USING


PHP”

submitted in partial fulfillment of the requirement for the completion of


V semester of
BACHELOR OF ENGINEERING
in
Computer Science
Submitted by

THEJAS K U (21CS122)
MONISH S (21CS123)

Under the guidance of:


Mrs.Bharathi N
Assistant Professor
Department of CSE
SSIT, Tumakuru-03

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


2023-24
SRI SIDDHARTHA INSTITUTE OF TECHNOLOGY,
TUMAKURU-572105
DEPARTMENT OF COMPUTER SCIENCE& ENGINEERING

CERTIFICATE

Certified that the mini project work entitled “LIBRARY MANAGEMENT SYSTEM US-
ING PHP” is a bonafide work being carried out by THEJAS K U (21CS122),MONISH S
(21CS123) in partial fulfillment for the completion of V Semister of Bachelor of Engineer-
ing in Department of Computer Science & Engineering from Sri Siddhartha Institute of
Technology,A Constitute College of Sri Siddartha Academy of Higher Education during
the academic year 2023-24. It is certified that all corrections/suggestions indicated for
internal assessment have been incorporated in the report deposited in the department
library. The mini Project report has been approved as it satisfies the academic require-
ments in respect of mini project work prescribed for the Bachelor of Engineering degree.

Signature of the Guide Signature of the HOD


Mrs.Bharathi N DR.RENUKALATHA S
Assistant Professor, Dept of CSE Professor & Head, Dept of CSE
ACKNOWLEDGEMENT

THEJAS K U(21CS122) and MONISH S(21CS123) of fifth semester, Department


of Computer Science and Engineering of Sri Siddhartha Institute of Technology, Tu-
makuru, hereby declare that this Mini project titled, “Library management system
using PHP”, has been carried out by us under the supervision of Mrs.Bharathi N
Assistant Professor, Dept of CSE , Department of Computer Science and Engineering, Sri
Siddhartha Institute of Technology, Tumakuru in partial fulfilment of the requirement for
the completion of V semester in Computer Science and Engineering.

THEJAS K U (21CS122)
MONISH S (21CS123)
Contents
Abstract 1

1 Introduction 2
1.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Literature Survey 4
2.1 Existing System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Proposed System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Requirements 6
3.1 System Hardware: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Software Requirements: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 Design 8
4.1 ER Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 Data Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5 Source Code 10
5.1 Connection Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2 Login Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.3 Logout Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.4 Book Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.5 Add Book Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.6 Book Issue Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.7 Book Return Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

6 Snapshots 24
6.1 Login Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Library management system 2023-24
6.2 Dashboard Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.3 View Book Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.4 Issue Book Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.5 Return Book Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.6 View User Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Conclusion 26

Bibliography 27

Dept. of CSE, S.S.I.T., Tumakuru-03 0


Abstract

Library management system is a project which aims in developing a computerized system


to maintain all the daily work of library, so that their valuable data/information can be
stored for a longer period with easy accessing and manipulation of the same. The required
software and hardware are easily available and easy to work with. Library Management
System, as described above, can lead to error free, secure, reliable and fast management
system. It can assist the user to concentrate on their other activities rather to concentrate
on the record keeping so it will help organization in better utilization of resources. The
organization can maintain computerized records without redundant entries. It comprises
interconnected modules that handle various tasks within a library ecosystem.Overall this
project of ours is being developed to help the students as well as staff of library to maintain
the library in the best way possible and also reduce the human efforts.

1
Chapter 1
Introduction
Library Management System is a comprehensive library management solution that is
suitable for both large and small libraries. Its flexible design enables Library Management
System to be installed in a range of Library organizations, ranging from public libraries,
through to academic, joint use and special libraries. This Library Management System
Software is capable of handling Books with equal ease and efficiency. This is a Windows-
based Library Management System, utilizing the latest advancements in the Information
Technology to provide and improve Library Services .As the modern organizations are
automated and computers are working as per the instruction, it becomes essential for the
coordination of human beings, commodity and computers in a modern organization. This
information helps the distributor to purchase or sell the product very efficiently.

The administrator and all other can communicate with the system through this project.
This facilitates effective implementation and monitoring of various activities of the distrib-
utor of supermarket.In traditional library management systems, there exists a significant
challenge of scalabil- ity, accessibility, and cost-effectiveness in maintaining and provid-
ing seamless access to a vast array of resources while ensuring robust security measures.
Moreover, the increasing volume of digital content and the demand for remote access to
library services require a more agile and scalable solution

1.1 Problem Statement


The problem statement outlines the core issues faced by conventional library systems and
sets the stage for proposing a solution centered around this technology to mitigate these
challenges and improve the overall efficiency and effectiveness of library services.Therefore,
the objective is to develop and implement a library management system using PHP that
enhance accessibility, and ensure data security while providing efficient and user-friendly
services to patrons and stakeholders.

2
Library management system 2023-24

1.2 Aim
1.Enhanced Accessibility: To provide ubiquitous access to library resources and ser-
vices from anywhere at any time using PHP.
2.Scalability and Flexibility: To create a system capable of accommodating the in-
creasing volume of digital content and resources while being flexible enough to adapt to
changing demands.
3.Cataloging: Organizing and cataloging books systematically within the library database.
4.Tracking and management: Keeping track of book details such as title, author,
ISBN, availability, etc. and managing book inventory, including additions, deletions, and up-
dates.
5.Improved User Experience: To enhance user satisfaction by offering intuitive inter-
faces, efficient search functionalities, and personalized services.

1.3 Objectives
1.Efficient Information Organization: Database management structuring a database
to store and manage book details, user information, borrowing history, etc
2.Data Security and Privacy: To implement robust security measures, including en-
cryption, access controls, and compliance with relevant regulations, to ensure the safety
and privacy of library resources and patron information.
3.Simplified User Experience: Providing a user-friendly interface for users and librar-
ians to navigate and manage library resources effortlessly.
4.Collaboration and Sharing: To facilitate collaboration among libraries and patrons
by enabling resource sharing and interlibrary loan services through this technology .
5.Monitoring and Maintenance: To establish monitoring mechanisms for system per-
formance, conduct regular maintenance, and ensure high availability and reliability.
6.Reduces human effort:The goal of the system is to bring down the work load with
the increased efficiency and to speed up the activities.

Dept. of CSE, S.S.I.T., Tumakuru-03 3


Chapter 2
Literature Survey
1. “Modern Library Management Systems”:
Authors: Smith J
Lack of real-time integration with emerging technologies like RFID for efficient book
tracking and user authentication.
2. “The Future of Libraries”
Authors: Johnson S
Emphasis on the need for seamless integration of digital resources and e-books, but limited
discussion on user-centric interface design.
3. “Information Science and Technology” Authors: Patel R
Highlights the challenges in maintaining data integrity and security, but doesn’t delve
into specific solutions for data management.
4. “Library Information Systems” Authors: Wang H
Discusses the trends in Library Systems but lacks a comprehensive analysis of the role of
artificial intelligence in optimizing library operations.
5. “Open Source Solutions for Libraries”
Authors: Garcia L
Identifies the benefits of open-source systems but overlooks the potential issues related to
the support and maintenance of such systems.

2.1 Existing System

Early days Libraries are managed manually. It required lot of time to record or to retrieve
he 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.

4
Library management system 2023-24
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.

2.2 Proposed System

To solve the inconveniences as mentioned in the existing system, an Online Library is


proposed. The proposed system contains the following features:
Individually each member will have his account through which he can access the informa-
tion 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 in-
formation 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 se-
curity.

Dept. of CSE, S.S.I.T., Tumakuru-03 5


Chapter 3
Requirements

3.1 System Hardware:

1.Computers or Devices : Devices such as desktops, laptops, tablets, or smartphones


for accessing the cloud-based LMS.
2. Internet Connectivity: Stable and reliable internet connection to access the Library
management system and its features.
3. Processor : x86 or x64
4. Clock Speed: 1.7 GHz or more
5. System Bus : 64 bits
6. RAM: 16GB
7. Windows 10,Windows 8,7
8. HDD: up to 3 GB of free space may be required
9. Monitor: LCD Monitor
10. Keyboard: Standard keyboard
11. Mouse: Compatible mouse

3.2 Software Requirements:

1. Operating System: Compatibility with common operating systems like Windows,


macOS, Linux, iOS, or Android for devices used to access the cloud-based LMS.
2. Web Browsers: Compatibility with modern web browsers (e.g., Chrome, Firefox,
Safari, Edge) to access the LMS through its web interface.
3. MYSQL: MySQL is the worlds most popular open source database. With its proven
performance, reliability, and ease-ofuse, MySQL has become the leading database choice

6
Library management system 2023-24
for webbased applications, used by high profile web properties including Facebook, Twit-
ter, YouTube, and all five of the top five websites. Additionally, it is an extremely popular
choice as embedded database, distributed by thousands of ISVs and OEMs.
4. Javascript: JavaScript is a programming language for use in HTML pages Invented
in 1995 at Netscape Corporation (LiveScript) JavaScript has nothing to do with Java
JavaScript programs are run by an interpreter built into the user’s web browser (not on
the server).
5. PHP: PHP is a server-side scripting language, it is scripts are executed on the server
and supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL
).PHP is open source software and it is free to download . It runs on different platforms
(Windows, Linux, Unix, etc.) and it is compatible with almost all servers used today
(Apache, IIS, etc.). PHP is easy to learn and runs efficiently on the server side .
6.CSS : Understand what a style sheet is and how it actually styles a web page. Know
how to create a style sheet and link an html document to the style sheet. Understand
the basic building blocks of any style sheet: rules, selectors, properties and values. Un-
derstand how to control the basic appearance of text. Demonstrate how to customize the
appearance of link Define background properties.
7. XAMPP : XAMPP is a software distribution which provides the Apache web server,
MySQL database (actually MariaDB), Php and Perl (as Command-line executables and
Apche modules) all in one package. It is available for Windows, MAC and Linux sys-
tems. No configuration is necessary to integrate Php with MySQL. It is a great fit for
this course and provides a relatively painless installation and way to manage the con-
figuration changes. Also provided is PhpMyadmin which gives a GUI tool for manag-
ing your MySQL databases. I would highly recommend installing this for Windows or
MAC. It doesn’t exclude you from other competing software installations, it just gives
an easy way to get going. For Ubuntu Linux systems, I still would recommend installing
Apache/MySQL/Php/PhpMyadmin through Ubuntu packages. The XAMPP download
site which I use is: https://www.apachefriends.org/

Dept. of CSE, S.S.I.T., Tumakuru-03 7


Chapter 4

Design

4.1 ER Diagram

8
Library management system 2023-24

4.2 Use Case Diagram

4.3 Data Flow Diagram

Dept. of CSE, S.S.I.T., Tumakuru-03 9


Chapter 5
Source Code
5.1 Connection Module
1 <? php
2 $server = " localhost " ;
3 $username = " root " ;
4 $password = " " ;
5 $databasename = " l i b r a r y _ m a n a g e m e n t _ d b " ;
6

7 $conn = mysqli_connect ( $server , $username , $password ) ;


8

9 $abc = mysqli_select_db ( $conn , $databasename ) ;


10

11 if (! $abc )
12 {
13 die ( " disconnect " ) ;
14 }
15 else
16 {
17 // die (" successfull ") ;
18 }
19 ?>
20 \ vspace { -1 cm }

10
Library management system 2023-24

5.2 Login Module


1 <? php
2 session_start () ;
3 include ( ’ connection . php ’) ;
4 if ( isset ( $_REQUEST [ ’ login_btn ’ ]) )
5 {
6 $uname = $_POST [ ’ email ’ ];
7 $upwd = md5 ( $_POST [ ’ pwd ’ ]) ;
8

10 $select_query = mysqli_query ( $conn , " select user_name , id from


tbl_users where emailid = ’ $uname ’ and password = ’ $upwd ’ and role =2 and
status =1 " ) ;
11 $username = mysqli_fetch_row ( $select_query ) ;
12 if (! empty ( $username ) )
13 {
14 $_SESSION [ ’ user_name ’] = $username [0];
15 $_SESSION [ ’ id ’] = $username [1];
16 }
17 $rows = mysqli_num_rows ( $select_query ) ;
18

19 if ( $rows > 0)
20 {
21

22 header ( " Location : dashboard . php " ) ;


23 }
24 else
25 { ?>
26 < script >
27 alert ( " You have entered wrong emailid or password . " ) ;
28 </ script >
29

30 <? php
31

32 }
33

34 }
35

Dept. of CSE, S.S.I.T., Tumakuru-03 11


Library management system 2023-24

36 ?>
37

38 <! DOCTYPE html >


39 < html lang = " en " >
40

41 < head > < meta http - equiv = " Content - Type " content = " text / html ; charset = utf -8 "
>
42

43

44 < meta http - equiv = "X - UA - Compatible " content = " IE = edge " >
45 < meta name = " viewport " content = " width = device - width , initial - scale =1 ,
shrink - to - fit = no " >
46 < meta name = " description " content = " " >
47 < meta name = " author " content = " " >
48

49 < title > Library Management System </ title >


50 <! - - Custom fonts for this template - - >
51 < link href = " vendor / fontawesome - free / css / all . min . css " rel = " stylesheet "
type = " text / css " >
52

53 <! - - Custom styles for this template - - >


54 < link href = " css / sb - admin . css " rel = " stylesheet " >
55 < link href = " css / custom_style . css ? ver =1.1 " rel = " stylesheet " >
56 < link rel = " stylesheet " href = " https :// cdnjs . cloudflare . com / ajax / libs /
font - awesome /4.7.0/ css / font - awesome . min . css " >
57 < link href = ’ https :// cdnjs . cloudflare . com / ajax / libs / fullcalendar /3.9.0/
fullcalendar . min . css ’ rel = ’ stylesheet ’ / >
58 < link href = " vendor / datatables / dataTables . bootstrap4 . css " rel = "
stylesheet " >
59 </ head >
60

61 < body class = " bg - dark " style = " background : url ( img / library - img - bg . jpg ) no -
repeat ; background - size : cover " >
62

63 < div class = " container " >


64 < div class = " card card - login mx - auto mt -5 " >
65 < div class = " card - header " >
66 <h2 > < center style = " color : coral ; " > User Login </ center > </ h2 >
67 </ div >

Dept. of CSE, S.S.I.T., Tumakuru-03 12


Library management system 2023-24

68 < div class = " card - body " >


69 < form name = " login " method = " post " action = " " >
70 < div class = " form - group " >
71 < div class = " form - label - group " >
72 < input type = " email " id = " inputEmail " class = " form - control "
name = " email " placeholder = " Email address " required = " required "
autofocus = " autofocus " >
73 < label for = " inputEmail " > Email address </ label >
74 </ div >
75 </ div >
76 < div class = " form - group " >
77 < div class = " form - label - group " >
78 < input type = " password " id = " inputPassword " class = " form -
control " placeholder = " Password " name = " pwd " required = " required " >
79 < label for = " inputPassword " > Password </ label >
80 </ div >
81 </ div >
82

83 < input type = " submit " class = " btn btn - primary btn - block " name = "
login_btn " value = " Login " >
84 </ form >
85

86 </ div >


87 </ div >
88 </ div >
89

90

91 </ body >


92

93 </ html >

Dept. of CSE, S.S.I.T., Tumakuru-03 13


Library management system 2023-24

5.3 Logout Module


1 <? php
2 session_start () ;
3 session_destroy () ;
4 header ( " Location : index . php " ) ;
5 ?>

5.4 Book Module


1 <? php
2 session_start () ;
3 include ( ’ connection . php ’) ;
4 $name = $_SESSION [ ’ user_name ’ ];
5 $ids = $_SESSION [ ’ id ’ ];
6 if ( empty ( $ids ) )
7 {
8 header ( " Location : index . php " ) ;
9 }
10

11 ?>
12

13 <? php include ( ’ include / header . php ’) ; ? >


14 < div id = " wrapper " >
15

16 <? php include ( ’ include / side - bar . php ’) ; ? >


17

18 < div id = " content - wrapper " >


19

20 < div class = " container - fluid " >


21

22 <! - - Breadcrumbs - - >


23 < ol class = " breadcrumb " >
24 < li class = " breadcrumb - item " >
25 <a href = " # " > View Book </ a >
26 </ li >
27

28 </ ol >
29

Dept. of CSE, S.S.I.T., Tumakuru-03 14


Library management system 2023-24

30 < div class = " card mb -3 " >


31 < div class = " card - header " >
32 <i class = " fa fa - info - circle " > </i >
33 View Book Details </ div >
34 < div class = " card - body " >
35 < div class = " table - responsive " >
36 < table class = " table table - bordered " id = " dataTable " width = "
100% " cellspacing = " 0 " >
37 < thead >
38 <tr >
39 <th > S . No . </ th >
40 <th > Name </ th >
41 <th > Category </ th >
42 <th > Availability </ th >
43 <th > Action </ th >
44 </ tr >
45 </ thead >
46 < tbody >
47 <? php
48 if ( isset ( $_GET [ ’ ids ’ ]) ) {
49 $id = $_GET [ ’ ids ’ ];
50 $delete_query = mysqli_query ( $conn , " delete from
tbl_book where id = ’ $id ’" ) ;
51 }
52 $select_query = mysqli_query ( $conn , " select * from
tbl_book where availability =1 " ) ;
53 $sn = 1;
54 while ( $row = mys ql i_ fe tc h_ ar ra y ( $select_query ) )
55 {
56 ?>
57 <tr >
58 <td > <? php echo $sn ; ? > </
td >
59 <td > <? php echo $row [ ’
book_name ’ ]; ? > </ td >
60

61 <td > <? php echo $row [ ’


category ’ ]; ? > </ td >
62 <? php if ( $row [ ’

Dept. of CSE, S.S.I.T., Tumakuru-03 15


Library management system 2023-24

availability ’ ]==1) {
63 ? > < td > < span class = "
badge badge - success " > Available </ span > </ td >
64 <? php } else { ? > < td > < span class
= " badge badge - danger " > Not Available </ span > </ td >
65 <? php }
66 $id = $row [ ’ id ’ ];
67

68 $f e t c h _ i s s u e _ d e t a i l s =
mysqli_query ( $conn , " select status from tbl_issue where user_id = ’ $ids
’ and book_id = ’ $id ’" ) ;
69 $res = mysqli_fetch_row (
$fetch_issue_details );
70 if (! empty ( $res ) ) {
71 $res = $res [0];
72 }
73 if ( $res ==1) {
74 ?>
75 <td > < span class = " badge badge -
success " > Issued </ span >
76 </ td >
77 <? php
78 } else if ( $res ==2) {
79 ?>
80 <td > < span class = " badge badge -
danger " > Rejected </ span >
81 </ td >
82 <? php }
83 else if ( $res ==3) {
84 ?>
85 <td > < span class = " badge badge -
primary " > Request Sent </ span >
86 </ td >
87 <? php }
88 else { ? >
89 <td > < a href = " book - issue .
php ? id = <? php echo $row [ ’ id ’]; ? > " >< button class = " btn btn - success " >
Issue </ button > </a >
90 </ td >

Dept. of CSE, S.S.I.T., Tumakuru-03 16


Library management system 2023-24

91 <? php } ? >


92 </ tr >
93 <? php $sn ++; } ? >
94 </ tbody >
95 </ table >
96 </ div >
97 </ div >
98 </ div >
99 </ div >
100 </ div >
101 <a class = " scroll - to - top rounded " href = " # page - top " >
102 <i class = " fas fa - angle - up " > </i >
103 </a >
104 <? php include ( ’ include / footer . php ’) ; ? >
105 < script language = " JavaScript " type = " text / javascript " >
106 function confirmDelete () {
107 return confirm ( ’ Are you sure want to delete this Book ? ’) ;
108 }
109 </ script >

5.5 Add Book Module


1 <? php
2 session_start () ;
3 include ( ’ ../ connection . php ’) ;
4 $name = $_SESSION [ ’ name ’ ];
5 $id = $_SESSION [ ’ id ’ ];
6 if ( empty ( $id ) )
7 {
8 header ( " Location : index . php " ) ;
9 }
10 if ( isset ( $_REQUEST [ ’sbt - book - btn ’ ]) )
11 {
12

13 $book_name = $_POST [ ’ book_name ’ ];


14 $category_name = $_POST [ ’ category_name ’ ];
15 $isbn = $_POST [ ’ isbn ’ ];
16 $author_name = $_POST [ ’ author_name ’ ];
17 $publisher_name = $_POST [ ’ publisher_name ’ ];

Dept. of CSE, S.S.I.T., Tumakuru-03 17


Library management system 2023-24

18 $price = $_POST [ ’ price ’ ];


19 $quantity = $_POST [ ’ quantity ’ ];
20 $location_name = $_POST [ ’ location_name ’ ];
21 $availability = $_POST [ ’ availability ’ ];
22

23 $insert_book = mysqli_query ( $conn , " insert into tbl_book set


book_name = ’ $book_name ’, category = ’ $category_name ’, isbnno = ’ $isbn ’,
author = ’ $author_name ’, publisher = ’ $publisher_name ’, price = ’ $price ’,
quantity = ’ $quantity ’, place = ’ $location_name ’, availability = ’
$availability ’" ) ;
24

25 if ( $insert_book > 0)
26 {
27 ?>
28 < script type = " text / javascript " >
29 alert ( " Book added successfully . " )
30 </ script >
31 <? php
32 }
33 }
34 ?>
35 <? php include ( ’ include / header . php ’) ; ? >
36 < div id = " wrapper " >
37 <? php include ( ’ include / side - bar . php ’) ; ? >
38

39 < div id = " content - wrapper " >


40

41 < div class = " container - fluid " >


42

43 <! - - Breadcrumbs - - >


44 < ol class = " breadcrumb " >
45 < li class = " breadcrumb - item " >
46 <a href = " # " > Add Book </ a >
47 </ li >
48

49 </ ol >
50

51 < div class = " card mb -3 " >


52 < div class = " card - header " >

Dept. of CSE, S.S.I.T., Tumakuru-03 18


Library management system 2023-24

53 <i class = " fa fa - info - circle " > </i >


54 Submit Book Details </ div >
55

56 < form method = " post " class = " form - valide " >
57 < div class = " card - body " >
58 < div class = " form - group row " >
59 < label class = " col - lg -4 col - form -
label " for = " item " > Book Name < span class = " text - danger " >* </ span > </ label
>
60 < div class = " col - lg -6 " >
61 < input type = " text " name = " book_name
" id = " book_name " class = " form - control " placeholder = " Enter Book Name "
required >
62 </ div >
63 </ div >
64 < div class = " form - group row " >
65 < label class = " col - lg -4 col -
form - label " for = " leave - type " > Category < span class = " text - danger " >* </
span >
66 </ label >
67 < div class = " col - lg -6 " >
68 < select class = " form - control " id = "
category_name " name = " category_name " required >
69 < option value = " " > Select Category
</ option >
70 <? php
71 $fetch_category = mysqli_query (
$conn , " select * from tbl_category where status =1 " ) ;
72 while ( $row = my sql i_ fe tc h_ arra y
( $fetch_category ) ) {
73 ?>
74 < option > <? php echo $row [ ’
category_name ’ ]; ? > </ option >
75 <? php } ? >
76 </ select >
77 </ div >
78 </ div >
79 < div class = " form - group row " >
80 < label class = " col - lg -4 col - form -

Dept. of CSE, S.S.I.T., Tumakuru-03 19


Library management system 2023-24

label " for = " price " > ISBN < span class = " text - danger " >* </ span > </ label >
81 < div class = " col - lg -6 " >
82 < input type = " text " name = " isbn " id =
" isbn " class = " form - control " placeholder = " Enter ISBN " required >
83 </ div >
84 </ div >
85

86 < div class = " form - group row " >


87 < label class = " col - lg -4 col - form -
label " for = " price " > Author < span class = " text - danger " >* </ span > </ label >
88 < div class = " col - lg -6 " >
89 < input type = " text " name = "
author_name " id = " author_name " class = " form - control " placeholder = " Enter
Author Name " required >
90 </ div >
91 </ div >
92 < div class = " form - group row " >
93 < label class = " col - lg -4 col - form -
label " for = " price " > Publisher < span class = " text - danger " >* </ span > </
label >
94 < div class = " col - lg -6 " >
95 < input type = " text " name = "
publisher_name " id = " publisher_name " class = " form - control " placeholder =
" Enter Publisher Name " required >
96 </ div >
97 </ div >
98 < div class = " form - group row " >
99 < label class = " col - lg -4 col - form -
label " for = " price " > Price < span class = " text - danger " >* </ span > </ label >
100 < div class = " col - lg -6 " >
101 < input type = " text " name = " price " id
= " price " class = " form - control " placeholder = " Enter Price " required >
102 </ div >
103 </ div >
104 < div class = " form - group row " >
105 < label class = " col - lg -4 col - form -
label " for = " price " > Quantity < span class = " text - danger " >* </ span > </ label
>
106 < div class = " col - lg -6 " >

Dept. of CSE, S.S.I.T., Tumakuru-03 20


Library management system 2023-24

107 < input type = " text " name = " quantity "
id = " quantity " class = " form - control " placeholder = " Enter Quantity "
required >
108 </ div >
109 </ div >
110 < div class = " form - group row " >
111 < label class = " col - lg -4 col -
form - label " for = " leave - type " > Location < span class = " text - danger " >* </
span >
112 </ label >
113 < div class = " col - lg -6 " >
114 < select class = " form - control " id = "
location_name " name = " location_name " required >
115 < option value = " " > Select Location
</ option >
116 <? php
117 $fetch_category = mysqli_query (
$conn , " select * from tbl_location where status =1 " ) ;
118 while ( $row = my sql i_ fe tc h_ ar ra y
( $fetch_category ) ) {
119 ?>
120 < option > <? php echo $row [ ’ name ’ ];
? > </ option >
121 <? php } ? >
122 </ select >
123 </ div >
124 </ div >
125 < div class = " form - group row " >
126 < label class = " col - lg -4 col -
form - label " for = " status " > Availability < span class = " text - danger " >* </
span >
127 </ label >
128 < div class = " col - lg -6 " >
129 < select class = " form -
control " id = " availability " name = " availability " required >
130 < option value = " " >
Select Status </ option >
131 < option value = " 1 " >
Available </ option >

Dept. of CSE, S.S.I.T., Tumakuru-03 21


Library management system 2023-24

132 < option value = " 0 " >


Not Available </ option >
133

134 </ select >


135 </ div >
136 </ div >
137 < div class = " form - group row " >
138 < div class = " col - lg -8 ml - auto
">
139 < button type = " submit "
name = " sbt - book - btn " class = " btn btn - primary " > Submit </ button >
140 </ div >
141 </ div >
142

143 </ div >


144 </ form >
145 </ div >
146

147 </ div >


148

149 </ div >


150

151 <a class = " scroll - to - top rounded " href = " # page - top " >
152 <i class = " fas fa - angle - up " > </i >
153 </a >
154

155 <? php include ( ’ include / footer . php ’) ; ? >

5.6 Book Issue Module


1 <? php
2 session_start () ;
3 include ( ’ connection . php ’) ;
4 $name = $_SESSION [ ’ user_name ’ ];
5 $ids = $_SESSION [ ’ id ’ ];
6 $id = $_GET [ ’ id ’ ];
7 $insert_issue = mysqli_query ( $conn , " insert into tbl_issue set book_id = ’
$id ’, user_id = ’ $ids ’, user_name = ’ $name ’, status =3 " ) ;
8 if ( $insert_issue > 0)

Dept. of CSE, S.S.I.T., Tumakuru-03 22


Library management system 2023-24

9 {
10 ?>
11 < script type = " text / javascript " >
12 alert ( " Request sent successfully . " ) ;
13 window . location . href = " book . php " ;
14 </ script >
15 <? php
16 }

5.7 Book Return Module


1 <? php
2 session_start () ;
3 include ( ’ connection . php ’) ;
4 $name = $_SESSION [ ’ user_name ’ ];
5 $ids = $_SESSION [ ’ id ’ ];
6 $id = $_GET [ ’ id ’ ];
7 $delete_book = mysqli_query ( $conn , " delete from tbl_issue where book_id
= ’ $id ’ and user_id = ’ $ids ’" ) ;
8 $return_book = mysqli_query ( $conn , " insert into tbl_return set book_id = ’
$id ’, user_id = ’ $ids ’, user_name = ’ $name ’, return_date = CURDATE () " ) ;
9 $select_quantity = mysqli_query ( $conn , " select quantity from tbl_book
where id = ’ $id ’" ) ;
10 $number = mysqli_fetch_row ( $select_quantity ) ;
11 $count = $number [0];
12 $count = $count +1;
13 $update_book = mysqli_query ( $conn , " update tbl_book set quantity = ’ $count
’ where id = ’ $id ’" ) ;
14 $u p d a t e _ i s s u e _ s t a t u s = mysqli_query ( $conn , " update tbl_issue set status
=0 where book_id = ’ $id ’" ) ;
15 if ( $update_book > 0)
16 {
17 ?>
18 < script type = " text / javascript " >
19 alert ( " Book Returned successfully . " ) ;
20 window . location . href = " issued - book . php " ;
21 </ script >
22 <? php
23 } ?>

Dept. of CSE, S.S.I.T., Tumakuru-03 23


Chapter 6

Snapshots

6.1 Login Page

6.2 Dashboard Page

24
Library management system 2023-24

6.3 View Book Page

6.4 Issue Book Page

Dept. of CSE, S.S.I.T., Tumakuru-03 25


Library management system 2023-24

6.5 Return Book Page

6.6 View User Page

Dept. of CSE, S.S.I.T., Tumakuru-03 26


Conclusion
Library management system which will benefit the students as well as the staff of the
library.The adoption of Library Management Systems marks a significant leap forward
in modernizing library operations.Libraries can achieve enhanced accessibility, scalabil-
ity, and cost-effectiveness in managing resources. This transition empowers librarians and
users alike, facilitating seamless access to information from diverse locations.Additionally,
the implementation of library management systems ensures robust data security measures,
safeguarding sensitive library information against potential threats.The implementation
of a library management system has revolutionized traditional library operations by au-
tomating tasks, streamlining book cataloging, facilitating user interactions, and providing
efficient administrative tools.

27
Bibliography

1.“Database Systems: Design, Implementation, and Management” by Carlos Coronel,


Steven Morris, and Peter Rob (2016).
2.“Modern Database Management” by Jeffrey A. Hoffer, Ramesh Venkataraman, and
Heikki Topi (2020).
3.“Database Processing: Fundamentals, Design, and Implementation” by David M.
Kroenke and David J. Auer (2018).
4.“PHP and MySQL Web Development” by Luke Welling and Laura Thomson
(2016). 5.“Programming PHP” by Kevin Tatroe, Peter MacIntyre, and Rasmus
Lerdorf (2013).
6.“Introduction to Information Retrieval” by Christopher D. Manning, Prabhakar
Raghavan, and Hinrich Schütze (2008).
7.“Managing and Using Information Systems: A Strategic Approach” by Keri E.
Pearlson and Carol S. Saunders (2019).
8.“Library Management: A Case Study Approach” by John M. Budd (2017).

28

You might also like