0% found this document useful (0 votes)
1K views151 pages

Capstone Library Management System

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

Capstone Library Management System

Library Management System
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 151

LIBRARY SYSTEM WITH SMS NOTIFICATION FOR BATANGAS

CHRISTIAN SCHOOL

A Capstone Project
Presented to the Faculty of the
Information and Communications Technology Program
STI College Batangas

In Partial Fulfilment
of the Requirements for the Degree
Bachelor of Science in Information Technology

Briones, Liza May B.


Ebora, Anthony James Symon N.
Lalamunan, Kim Harry L.
Leal, John Angelo B.

November 2022
EXECUTIVE SUMMARY

Library System with SMS Notification is recommended to Batangas Christian School.


This proposed computerized library system is designed to help the student, teacher,
librarian and other personnel, and other concerned people in the field. For the school, this
would secured assurance of borrowing books from the library and can easily detect the
borrowed books.
This project aims to provide features on keeping student records, updating the record of
the books, and SMS (Short Message Services) support will notifying the borrowers when
they need to return the book to the library, and borrowers exceed the given deadline the
system/administrator will send an SMS to the borrower.
The developers utilized different data gathering techniques in the conduct of this capstone
project and employed different analytical tools to help justify the conduct of the study.
The data gathering techniques allowed the developers to identify the problem
encountered by the librarian and students. The analytical tools include interviews,
observation, and brainstorming. The data will be analyzed and used as a basic in the
system design and development of the system.
The computerized library system for Batangas Christian School runs using web browser.
The system requires a computer, laptop or smartphone that is compatible with the library
system web page. Thus, the system required an internet connection. The PHP is a server-
side scripting language that is used to develop Static websites or Dynamic websites or
Web applications. PHP stands for Hypertext Preprocessor, which earlier stood for
Personal Home Pages.The technologies that the developers used to perform and execute
all necessary functions that were needed during the development of the system.
The total number of students being surveyed was 90. After the data had been analyzed,
always yielded to above 50%. Hence, it is an indicator that the library being established
passed the high standard of criteria.

ii
ACKNOWLEDGEMENT

This project would not have been possible without the support of many people specially
God. Many thanks to, Mr. Ariel A. Magnaye, the researchers adviser who had been very
patient and understanding with us and all of our struggles in pursuing this study.

The developers would also want to give special thanks to their parents and their family
for their continuous support and understanding when undertaking our research and
writing our project. Also thanks to our panel members, Engr. Kriselle C. Punzalan,
Engr. Rhonnette Amor P. Comia, and to our lead panel Ms. Marivic M. Calanog, Lt.,
MSIT. We are very thankful to our program head, Engr. Rhonnette Amor P. Comia
and Capstone Project Coordinator Mr. Jan Jhariel S. Baroro who offered guidance and
full support.

Thanks to STI College Batangas for being an institution to learn what we have
accomplished and finally thanks to the people that become part of this project. We would
like to thank God, for letting the reasearchers endure and for the constant guidance
through the all difficulties. Thank you so much and God bless.

E.A.J.S.N
B.L.M.B
L.K.H.L
L.J.A.B

iii
TABLE OF CONTENTS
Page

Title Page i

Executive Summary ii

Approval Sheet iii

Acknowledgment iv

Table of Contents v

List of Figures vi

List of Tables vii

List of Notations viii

Introduction 1-5

Project Context 1

Purpose and Description of the Project 3

Objectives of the Study 3

Scope and Limitations of the Study 4-5

Review of Related Literature/Systems 6 - 13

Review of Related Literature 6

Related Studies and/or Systems 9

Synthesis 12

Technical Background 14 - 19

Overview of Current Technologies to be Used in the System 14

Calendar of Activities 17

Resources 19

iv
Methodology, Result and Discussion 21 - 40

Requirements Analysis 21

Requirements Documentation 25

Design of Software, System, Product, and/or Processes 33

Development and Testing 38

Conclusion and Recommendation 42 - 66

Appendix 43

Reference 43

Resource Person 45

Approval Form 47

Endorsement Form 48

Certificate of Grammarian 49

Interview 50

Supporting Details 58

Process Flow 63

Personal Technical Vitae (one page per member) 66 - 69

v
CHAPTER I

INTRODUCTION

Project Context

Library provides suitable documents and information that is helpful in educational


programs and extracurricular activities of the school. It has available textbooks and other
additional reading materials for all subjects as per the requirement of teachers and
students. It procures handy documents, illustrated picture books with bold and large fonts
to create the interest of children in reading. It provides latest teaching learning materials
in the form of books, CD, audio-visual etc. to improve the teaching skills of the teachers.
It keeps reference books, dictionaries, yearbooks, directories, encyclopedias, travel
books, etc. so that students and teachers can get help on these other than the text books. A
library also keeps some books on easy self-learning like how to use computer, to develop
the learning skills of students. Makes available biographies, autobiographies of freedom
fighters and other national and international personalities to develop respect love for
nation and humanity areas.

Batangas Christian School (BCS) is a private school in De Joya Compound, Alangilan,


Batangas. It started in 2000, and the owner/administrator of the school is Rev. Ephraim S.
Camacho. The school is a private Christian institution, which provides a quality Christian
education that promote the spiritual, moral, intellectual, and physical development of the
students so as to produce graduates who are God-fearing, committed and responsible
individuals. BCS implements a K-12 basic education curriculum that offers preschool,
grade school, junior, and senior high school under the new resolution mandated by the
Department of Education (DepEd). It has Humanities and Social Sciences (HUMSS)
strand, Science, Technology, Engineering, and Mathematics (STEM) strand, Technical-
Vocational-Livelihood (TVL) strand and Accountancy, Business and Management
(ABM) strand under the Academic track as well as Sports track and Arts and Design
track for its senior high school program. The library used manual process in preparing the
book inventory that the students will borrow in the library and if the student returned the

Library System with SMS Notification for Batangas Christian School 1


book, they will log it in and out again and again. They have a problem when it comes in
computing the numbers of the borrowers. The process that students need to sign in and
out of the records book seemed to be obsolete. For instance, the papers used in the
manual logging in and out considered so much time and effort. Both of the librarian and
the students have a hard time in tedious manual process, Thus, making the whole process
inefficient and ill-timed.

The project proposed entitled “Library System with SMS Notification for Batangas
Christian School” is a web-based library system for monitoring and controlling the
transactions in a library. It mainly focuses on basic operations in a library like adding
new members, new books and updating new information, searching books and members
and facility to borrow and return books. This helps to keep the records of whole
transactions of the books available in the library. Library System is a web-based system
that displays the books that are available inside the library, and shows which students are
currently borrowing books. It is also notifies the book borrowers the date when the book
must be returned to the library. This system will also notify the users the total penalty if
the book is not returned on the exact date or if the book is lost by the borrower.

Library System helps manage the effective delivery of library services. It will have a role
in planning and implementing library automation projects, keeping these things in mind
to develop a library system for Batangas Christian School. It removes manual process
involved and simplified way of issuing book saving time and effort. Students can also
check the availability status of a particular book online. It will enhance the effectiveness
of the library. A good library system should enable librarian to manage library resources
in a more effective way to save time and effort. This Library system is constructed in
such a way that it completely automates the traditional library process. It will aid in the
maintenance of information about members, books, and all other operations. It will also
aid in maintenance at any time, reducing almost all of the human workload required for
the proper library management. This Library System has the same features as other
library systems, but the researchers added one more feature that characterizes it SMS

Library System with SMS Notification for Batangas Christian School 2


notification. If the borrower always forgets to return the borrowed books, the system will
send a notification to remind the borrower.

Purpose and Description of the Project

Library System is a process of reserving books in the school library through a web-based
system. This system includes the information, policy of the school library, details,
reservation, borrowing, and inventory or records of the books through online. This
project aims to provide features on updating the record of the students, updating the
record of the books, and SMS (Short Message Services) support will be used as
notification for the borrowers when will they need to return the book to the library, and if
they exceed the given deadline the system/administrator will send an SMS to the
borrower.

This system will help the library change their manual process into an online process of
reserving a book, visualize the data of the students, and to get information efficiently.
Furthermore, it will provide database and statistical analysis of the present profile of the
school library. A library should use a software system that helps in effectively managing
the data in a library. The library database includes all relevant information regarding
assets to membership details. The software records details on all reading and reference
material available for reading and lending. Membership information, lending details and
renewal dates are managed by the software. The feature of the software assists in
inventory and circulation management of the books. Books in stock, on the shelves, in
circulation, missing or to be ordered can be tracked by the system. Acquiring new assets
becomes easier with the software. This system provides mobile access to search the
library catalog, books and resources from anywhere at any given time via smartphone or
tablet.

Library System with SMS Notification for Batangas Christian School 3


Objectives of the Study

To design, develop and implement a Library System with SMS Notification for Batangas
Christian School that will store the student’s records such as student’s basic information,
books record, and list of borrowers, returned books, borrowed books, and prescription of
library and to improve the current library system and generate accurate and timely reports
like inventory, acquiring of books and monthly monitoring of borrowed, returned and
inquiry of books.

 To create a module that will monitor the availability of the books in the library.

 To develop a database which could store user details and book details

 To create a module that will remind the borrowers to return the book through
SMS notification.

 To develop a system that will provide and record on necessary reports.

Scope
 User Authentication Module - the log-in module that allows user to enter their
valid username and password to access their own account for the protection of the
system.
 Admin/Librarian – this user can access the overall transaction in the
library.
 Student – this user can search books and reserve books.
 User Management Module – this module allows admin to add and update user
information.
 Book Management Module – allows the librarian to search, add, and edit the book
information.

Library System with SMS Notification for Batangas Christian School 4


 List of books - allows the librarian to view the availability of the books,
the total number of copies and the information of the books.
 Form – allows the librarian to archive the book if the condition of the book
is missing, lost, obsolete and/or damage.
 Borrowing Module – the borrowing module allows the librarian to issue books to
the borrower.
 Borrowing Queue – queuing of the student borrowing request.
 Queue – queuing of the students reserving request.
 Borrow History – view the borrowing history of the system.
 Returning Module – the returning module allows the user to return the
borrowed book in the library.
 Borrower Management Module – this module allows the users to add, edit and
archive the information of the students.
 List of Borrowers – search and view all the list of the students.
 Reports Generated - the system has the capability to produce reports. This
reports includes:
 Borrowing Transaction Report – the user can view the reports the
borrowing transaction.
 Books Master List Report – the system allows the user to view the list of
books information.
 Penalty Report – show the penalty transaction
 Audit Trail – allows the admin to view all the log history of the system.
 Short Message Service (SMS) Notifications – the system will notify the
borrowers who haven’t returning the books and if the book already available it
will notify the borrower who reserved the book. It is also good for all networks
 Computation of Penalty – the system will automatically compute the penalty of
the students.

Limitation
 Library Administrator should manually update the details of the books.

Library System with SMS Notification for Batangas Christian School 5


 The borrowers can only reserve books online.
 The system will not cover Automatic Backup and Restore.
 Cash transaction only during payment of penalty.

Library System with SMS Notification for Batangas Christian School 6


CHAPTER II

REVIEW OF RELATED LITERATURE/SYSTEMS

Review of Related Literature

Foreign Literature

The Library Management System is a system which manages the flow of all books, the
information regarding the books available in the library as well as the records of them.
All this work when done manually requires time and efforts since this is a complex task.
With all the modern techniques available in the 21st century it is important for humans
and computers to be coordinated. The Library management system is designed in such a
manner, that it completely computerizes the whole traditional library process. It will help
in keeping the information about the members, books and all other operations. It will also
help in the maintenance at any instance, which reduces almost all the human workload
which is required for management of traditional library. The findings also indicates that
74% of the respondents want a notification system for library so they are updates as soon
as a book is available or when their return dates is approaching in turn saving them from
some penalties. 100% of the respondents agreed that there should be an app for library
which should also contain the library contents in electronic media format as all of them
like to study on their electronic devices which includes mobile phones, laptops and
computers. Respondents were receptive towards implementing a system that can improve
the traditional library process via mobile technology by the use of a notification system,
as the evaluation from the respondents indicates a positive reaction (Khan, M.T. et al. ,
2021)

Libraries are essential in a process of giving citizens to knowledge. In digital times they
are needed more than ever before. In our country, library systems are written that's why
we make a great use of paper. By making paper we cut trees. It is very harmful for our
environment. For our environment, we take this step to reduce this. It reduces the manual
paperwork through it and gives proper information of books has been recorded

Library System with SMS Notification for Batangas Christian School 7


automatically. Librarian can update the information of books and manage availability and
arriver record of the books. It saves human efforts and time. With the help of library
management system, the student can easily search and find the books. (Sahani, M. , 2021)

As the library and information services community seeks to cope with new patterns of
information provision, new technology and changing financial circumstances, it is critical
to gain new thinking across the profession. The Latest research, innovative theory and
best organizational practice are all presented in Library Management System. Library
Management System website which is used to supply the books to the user. This is done
through JAVA technologies. This has various technical areas. It includes WINDOWS XP
as the operating System, Oracle as Database. The front end deals with GUI and source
code deals with Oracle (Backend). (Prasanna, N.S.N.L. & Gupta, B.N.S. , 2020)

Local Literature

Over time, information and communication technology (ICT) have shown unprecedented
changes to the services ad operations of modern libraries. Today, carrying out library task
and services through information and communication technology (ICT) are established to
complement all types of libraries, but still unsubstantiated in the majority of school
libraries. The Library Information Library Information System aids in borrowing and
returning books and reading materials via shopping cart and provides an organized tool in
performing library tasks and services in public high schools from basic to
complementary. The librarian can add newly acquired library materials in the online
catalog. Library users can easily track reading materials usage and availability through
the system. The librarian can monitor users overdue books and reading materials
borrowed by users. Inventory Report generation in Portable Data Format (PDF),for
submission purposes, can be done by the system without manual counting. (Mayo, A. ,
2016).

The manual library system of Canumay East National High School was directly replaced
with the computerized library system. It is difficult for the librarian to search for a book,

Library System with SMS Notification for Batangas Christian School 8


have a record of the transaction in the library, and manage books. To development life
cycle method or waterfall model. This method included a detailed plan for how to
develop, alter, and maintain a computerized library system. In this method, the
researchers gathered data by conducting surveys and interviews, analyzed the system,
designed the system, determined how they develop the system, tested it to avoid errors,
implemented it, and maintained it to ensure its accuracy. Library Management System
provides knowledge and practical perspectives all aspects of management of libraries and
information services, which will prove invaluable to managing a library or information
services cost effectively, while meeting the needs of its users. Library Management
System is one of the most tedious processes, which involves the regular updating of many
files and records. As new members enroll for membership the management has to issue a
unique membership code for that member. For this they have to keep a track of many
records such as student details, book details and maintain a number of registers. Doing
this manually involves a lot of time and labor. Hence this can be made easy through
automation. (Paden, M. et al. , 2020)

The library used manual process in preparing the book inventory that the student will
borrow in the library and if the student returned the book, they will log it in and out again
and again. They have a problem when it comes in computing the numbers of the
borrowers. The process of the student that will want to borrow a book in the library, is
signing in and out in the record book. In other words, the papers used will be stacked and
it will take much time and effort if the librarian will look to find the record of the students
in their drawer. Both of the librarian and the students have a hard time in tedious manual
process. This system develop a module that the librarian will used and to have a digital
record of the student’s information. Reduce the time and effort in monitoring and
updating the library records. Notify the student’s if the borrowed books are not returned
on the exact date. Print reports of currently borrowed and available books. (De Guzman,
M. & Santos, R. , 2017)

Library System with SMS Notification for Batangas Christian School 9


Related Studies and/or Systems

Foreign Study

In University of Mumbai, India the Library Management System with SMS Auto reply.
In this system the a Library Management software for monitoring and controlling the
flow of books in a library. The operations done by the administrator are adding new
books, removing some books, editing information about the book and viewing member.
The Students can perform the following operations: registration, borrow books, return
books, view books and searching. The software is easy to use for both beginners and
advanced users. The database will consist of information about the books issued and the
available books. There is also a need of verification of users which is done in order to
check that only authorized person is accessing the library. This project proposes SMS
communication for various library purposes, the library notification systems helps
students as a reminder and reduces time and effort. Making “Utilization of Short Message
Services (SMS) for Library Notification System”, Reference conducted a case study at
University of Malaya Library with a total of 110 respondents in which 38% Strongly
agreed while 37% agreed that they should have an SMS system for overdue books, new
books arrival and book reservations. It concluded that findings reveal that 58% concur
that integrating SMS in the proposed notification system would facilitate to resolve the
problem of notifying students on overdue books, arrival of new books and operating
Schedule more efficiently. (Khan, M.T. et al. , 2021)

Library Management System is all about organizing, managing the library and library
oriented tasks. It also involves maintaining the database of entering new books and the
record of the books that have been retrieved or issued, with their respective dates. The
main objective of the Library Management system is organizing and managing the library
tasks. Library is place where all kind of books are available. This web base application

Library System with SMS Notification for Batangas Christian School 10


and only a registered user can access the application. Library Management system is
developed to automate the task of entering the records of new book and retrieving the
details of book available in the system. This system contains list of all the books. Using
this system user can issue book to the library member, maintain their records, and can
check how many books issued and how many books available in library. The system
provides separate interface and login for librarian as students. Library can modify
database. Using the library management system, user can also maintains the late fine of
library member who return the issued book after the due date. Users can search for books
and renewal books online. A library management system (LMS) is a web application that
is developed to handle at least the most basic housekeeping functions of a library. It's a
well-organized software solution for a library which helps to provide information on any
registered materials present in the library to the user as well as staff. The LMS facilitates
technical functions of a library and one such function is electronic cataloguing. With an
LMS, library users can trace desired items electronically without going through shelves.
An LMS also facilitates the lending process by keeping records of items lent and the
borrower's information. LMS supports other administrative task such as inventory and
data processing. The Library management system in nowadays essential for schools,
colleges, private libraries, and other organizations. They can use this software as the
purpose of books issuing and returning for renewal. Moreover, this software helps the
librarian to maintain information about book issuing and returning the book before the
last date. (Sahani, M. , 2021)

The Interface of the Online Library Management System has to be simple to use, as the
target end-users for the system are non-technical persons. This system also aim to provide
a complete IT solution in managing a library. This system automate the functions
performance by the librarian. Operations such as cataloguing the books, managing
member information, searching books, issuing books, collecting fines etc. are included in
this system. This system provide powerful functionalities to the user by making use of
simple easy-to-easy interface. Proposed system is the one that is going to me automated,
so that it is easy retrieve the responses from the system faslty and updating the details
once the response or services are provided. (Prasanna, N.S.N.L. & Gupta, B.N.S. , 2020)

Library System with SMS Notification for Batangas Christian School 11


Local Study

In Public High Schools Online Library System the e system is capable of reducing time
spent and errors associated with the identification and verification library reading
materials as well as charging-in and charging out through the use of computer
technology. Since the system will hold an online public access catalog (OPAC), the
library will be kept organize and library collection will be located immediately, if in case
available on shelf. Nevertheless, whether the book or any other reading material has been
checked-in or checked-out will appear in the book information. Speed of data retrieval for
library users will also be more appreciated. Users should be able to enter/exit the library
with minimal sign in/out time. Also, because of the absence of human intervention, the
report generated by the system is perfect and accurate. Moreover, there is a lack of this
system that will perform some of library tasks and services in public high schools. Due to
changing demand, like the implementation of K-12, there is a necessity to enhance the
quality of education including the library where most students spend time for reading
assignment, research or even past time. So, not only to be recognized as comparable to
other developing countries in Asia but also to be proven efficient in providing quality
basic education. (Mayo, A. , 2016).

In Canumay East National High School developed the computerized library system,
which is a secure, accessible, and accurate system. The computerized library system, the
librarian can now easily manage the library and search for a book. This system had a
login form to make sure that only authorized personnel can use the system to prevent
losing and tricking data. This system has a search bar to search where the book is located.
This system also had a record feature to know the due date of returning books. This
system also has a transaction feature to make borrowing of books fast and accurate.

Library System with SMS Notification for Batangas Christian School 12


Lastly, this system had a print feature to print all the records of borrowing books, lists of
books, and lists of students. Now, the library system of Canumay East National High
School will provide better service to the students. (Paden, M. et al. , 2020)

This Online Library System with SMS Notification is a process of reserving books in the
school library through website. This system includes the information, policy of the school
library, details, reservation, borrowing, and inventory or records of the books through
online. This project aims to provide features on updating the record of the students,
updating the record of the books, and SMS (Short Message Services) support will be used
as notification for the borrowers when will they need to return the book to the library, and
if they exceed the given deadline the system/administrator will send an SMS to the
borrower. This system will help the library change their manual process into an online
process of reserving a book, visualize the data of the students, and to get information
efficiently. Furthermore, it will provide database and statistical analysis of the present
profile of the school library. (De Guzman, M. & Santos, R. , 2017)

Synthesis

In this study, the researchers learned that the library system showed that a digital
computerized system was much better than the manual process. The study stated that
having a database was important lines. In the studies, traditional library management has
been stressful for everyone specially to the librarian, researchers and teachers. Some of
the studies stated that is difficult for the librarian to search for a book, have a record of
the transaction in the library, and manage books in manual process. The studies stated
that the system automate the functions performance by the librarian. Operations such as
cataloguing the books, managing member information, searching books, issuing books,
collecting fines etc are included. This system lessens the work of the librian to monitor
the all transaction in library. Batangas Christian School also used manual process to
create the book inventory that students will borrow from the library, and if they return the
book, they will log it in and out repeatedly. When it comes to computing the borrowers'
numbers, they have a difficulty. Signing in and out in the record book is the process for a

Library System with SMS Notification for Batangas Christian School 13


student who wants to borrow a book from the library. In other words, the papers will be
stacked, and the librarian will have to spend a lot of time and effort looking for the
students' records in their drawer. Both the librarian and the borrowers struggle with the
time-consuming manual process. The researchers come up with a solution to the problem.
They had the same purpose it was to used the modern style of handling a library system
and should have been easy for them to manage and is tested for accuracy and quality. The
studies stated that having an Library System is essential in library in Batangas Christian
School.

Library System with SMS Notification for Batangas Christian School 14


CHAPTER III
TECHNICAL BACKGROUND

Overview of Current Technologies to be Used in the System

The existing library system of the school is manually done. The library does not have an
existing technology that is essential and necessary for fast and easy monitoring, records
keeping, transactions, generation reports and sms notification. Using the computerized
library system with SMS notification is taking advantage of the technology in
monitoring, processing data and record keeping. This Library System with SMS
notification can be used to maintain records of user details like registering books,
checking balance penalty amount and more. This system not only works from admin side
but also from user side. User can also check his/her own details and get the notification
for balance amount of penalty, books returning date, can also check available books. This
application also works by SMS. Users can directly send SMS to a particular phone no.
with some predefined text and value. And he/she will get reply via SMS. He will be
getting all kind of information via SMS, if someone wants the information only through
SMS then the application is not required to be installed.
Futhermore, there are three modules in the system namely, Admin, User and SMS User.
Admin can register user details and provide him/her a login id and password, can also
manage user search and renew activities, he/she can add books as well and can view the
due dates and penalty amount. Users get login id and password, he/she can view his
personal details, check for desire books and get update of due dates, issue date of books
and penalty amount to be paid. Through SMS user can send text message on dedicated
number and he/she can get information about books, penalty, due date, issue date and
more. alert via SMS.

Library System with SMS Notification for Batangas Christian School 15


For Development
The hardware that will be used for the development of the proposed system is as follows:
1. Desktop Computer
 Processor : RYZEN 5 3500X
 Installed Ram: 32GB 3000MHZ
 Storage: 500GB SSD and 1TB HD
2. Laptop
 ASUS X407U
 Processor: Intel(R) Pentium(R) CPU 4417u @ 2.30GHz 2.30
 Installed Ram: 4.00GB
 Storage: 500GB
 System type: 64-bit operating system, x64-based processor

For Deployment
The hardware that will be used for the development of the proposed system is as follows:
 Desktop, Laptop and Smartphone
 Mouse
 Keyboard
 Internet Cable Connection
 Local Area Network connectivity

For Development and Deployment

The software that will be used for the development and deployment of the proposed
system is as follows

 PHP - is a server-side scripting language that is used to develop Static websites or


Dynamic websites or Web applications. PHP stands for Hypertext Preprocessor,
which earlier stood for Personal Home Pages.

Library System with SMS Notification for Batangas Christian School 16


 HTML – is a markup language used to tell your web browser what each part of a
website is. So, using HTML, you can define headers, paragraphs, links, images,
and more, so your browser knows how to structure the web page you're looking
at.
 Vanilla JS – Vanilla JS easily adopt new frameworks and libraries that will
increase the development speed. It is said that Vanilla js will stay forever as
JavaScript lasts for a long time but frameworks and libraries can be replaced.
 CSS Cascading Style Sheets (CSS) - is a stylesheet language used to describe the
presentation of a document written in HTML or XML (including XML dialects
such as SVG, MathML or XHTML).
 Bootstrap 5 Framework – Bootstrap enables designers and developers to build
completely responsive websites quickly.
 MySQL - SQL, in full structured query language, computer language designed
for eliciting information from databases.
 Web Hosting – Hostinger is a reliable web hosting service known for its low
costs and speedy loading times.
 Semaphore - Semaphore lets us send bulk SMS blast with a single line of code.
No complicated setup, no dealing with telecom protocols and procedures

Library System with SMS Notification for Batangas Christian School 17


Gantt Chart of Activities
MONTH SEPTEMBE
MARCH APRIL MAY JUNE JULY AUGUST OCTOBER NOVEMBER DECEMBER
R
ACTIVITY
Groupings
Searching Company
Thesis Title Proposal
Title Defense
Follow-up Interview
Starting of Documentation
Introduction
Purpose and Description
Review of Related System
Synthesis
Technical Background
Overview of Current System
Appendix
Reference
Resource Person
Curriculum Vitae
Mock Defense
Revision
Final Defense of Capstone 1
System Design
System Development

Library System with SMS Notification for Batangas Christian School 18


Quality Assurance
Debugging
System Implementation
Maintenance
Defense
Revision
Final Defense of Capstone 2

Library System with SMS Notification for Batangas Christian School 19


Resources

For Development

Hardware

The hardware that will be used for the development of the proposed system is as follows:

Computer

 Processor : RYZEN 5 3500X

 Installed Ram: 32GB 3000MHZ

 Storage: 500GB SSD and 1TB HD

Laptop

 ASUS X407U

 Processor: Intel(R) Pentium(R) CPU 4417u @ 2.30GHz 2.30

 Installed Ram: 4.00GB

 Storage: 500GB

 System type: 64-bit operating system, x64-based processor

Software

The software that will be used for the development of the proposed system is as follows:

 PHP - is a server-side scripting language that is used to develop Static websites or


Dynamic websites or Web applications. PHP stands for Hypertext Preprocessor, which
earlier stood for Personal Home Pages.

Library System with SMS Notification for Batangas Christian School 20


 HTML – is a markup language used to tell your web browser what each part of a website
is. So, using HTML, you can define headers, paragraphs, links, images, and more, so
your browser knows how to structure the web page you're looking at.
 Vanilla JS – Vanilla JS easily adopt new frameworks and libraries that will increase the
development speed. It is said that Vanilla js will stay forever as JavaScript lasts for a long
time but frameworks and libraries can be replaced.
 CSS Cascading Style Sheets (CSS) - is a stylesheet language used to describe the
presentation of a document written in HTML or XML (including XML dialects such as
SVG, MathML or XHTML).
 Bootstrap 5 Framework – Bootstrap enables designers and developers to build
completely responsive websites quickly.
 MySQL - SQL, in full structured query language, computer language designed for
eliciting information from databases.
 Web Hosting – Hostinger is a reliable web hosting service known for its low costs and
speedy loading times.
 Semaphore - Semaphore lets us send bulk SMS blast with a single line of code. No
complicated setup, no dealing with telecom protocols and procedures.

Library System with SMS Notification for Batangas Christian School 21


CHAPTER IV
METHODOLOGY, RESULT, AND DISCUSSION

This chapter deals with method and techniques used by the developers in conducting the study,
the system development method and its result and discussion.

The developers utilized different data gathering techniques in the conduct of this capstone
project and employed different analytical tools to help justify the conduct of the study. The data
gathering techniques allowed the developers to identify the problem encountered by the librarian
and students. The analytical tools include interviews, observation, and brainstorming. The data
will be analyzed and used as a basic in the system design and development of the system.

The computerized library system for Batangas Christian School runs using web browers. The
system requires a computer, laptop or smartphone that is compatible with the Library System
web page. Thus, the system requires internet connection.

The PHP is a server-side scripting language that is used to develop Static websites or Dynamic
websites or Web applications. PHP stands for Hypertext Preprocessor, which earlier stood for
Personal Home Pages.The technologies that the developers used to perform and execute all
necessary functions that were needed during the development of the system.

A. Requirements Analysis

The developers conduct this research about library where the involved people are the students,
teachers and librarian.
The developers interviewed the librarian of the Batangas Christian School how their library
work. Based on the interview, the reasearchers develop a Library System for the better way to
use their library. They also provide the equipment to perform the system.

 Librarian – the librarian has a logbook in the library. The students will sign-in in the
logbook. The input also the date of the day that the book is being used and borrowed,

Library System with SMS Notification for Batangas Christian School 22


their name, title of the book, their section, and grade, and their signature beside the
logbook they must also have an index card that is the same information.
 Teacher – the teacher also has a logbook record apart from the student. The teacher also
must have their own record in the library. The teacher can return the book in the end of
school year.
 Student – the student bring their own index card to input their information to borrow a
book and also information of a book that they will borrow to the librarian. They have
also a logbook who go and out in the library.

The developers conduct this research about library where the involved people are the students,
teachers and librarian. The developers interviewed the librarian of the Batangas Christian School
how they library work. Based on the interview, we develop a Library System for the better way
to use their library. They also provide the equipment to perform the system. Batangas Christian
School is the beneficiary of the proposed system that is located at De Joya Compound,
Alangilan, Batangas City. The proposed system will be used by all members of the school. All
records in library will input in the system to check the condition of old books that are used by the
past user.
Batangas Chirstian School has procedure that needs to be followed when it comes in the library.
The first procedure is student must enrolled in the school. Meaning to say no one can borrow a
book from the outsiders only students of BCS can borrow to the library. Before the students go to
the library they must have an index card. The students will input the date of the day that the book
being borrowed, quantity of the book and the librarian will sign the index card before they give
the book.

Library System with SMS Notification for Batangas Christian School 23


Figure 1.0 Log Book – Name, Date, Section Grade and Signature

Logbook – this where the students put their Full name, Date, Grade and Section, and their
Signature. They put their information for proof that they borrow a book from the library.

Figure 1.1 Index Card – Books Information

Index Card – this where they input the title of the book. They also input the number of the book
and the author of the book.

Library System with SMS Notification for Batangas Christian School 24


Figure 1.2 Index Card Form – Borrower Information

Figure 1.3 Borrower List of Books

Library System with SMS Notification for Batangas Christian School 25


B. Requirements Documentation

SYSTEM FUNCTIONALITY

Librarian – The librarian manages the overall system. All transaction like the updating, deleting
archive of the books and authors can be performed. It also can be used in accomplishing reports.

Student – The student may create an account, after creating an account. They can now look at
the book they can borrow. There are all different kinds of books in the system, and they can all
be booked. To remind students that the book they borrowed is due, the librarian will send an
SMS reminder. There will be minimal charge if the borrowers failed to return at the expected
date in return.

Teacher – The teacher may create an account, after the teacher's account creation. Additionally,
they have access to all of the books, and if one is not currently accessible, they can reserve it.
Additionally, the librarian notifies them when the book they borrowed is about to due.

Figure 2.0
Home Page
Librarian Interface

Figure 2.1
Log-In / Log-Out

Library System with SMS Notification for Batangas Christian School 26


Log-in/Log-out Services - refers to one of the features of the proposed system that will require
authorized users to enter their user ID and password to be able to access their user account in
their respective assigned modules.

Figure 2.2
Dashboard

Figure 2.3
Author Management

Library System with SMS Notification for Batangas Christian School 27


Figure 2.4
Location Rock Management

Figure 2.5
Book Management

Library System with SMS Notification for Batangas Christian School 28


Figure 2.6
User Management

Figure 2.7
Issue Book Management

Library System with SMS Notification for Batangas Christian School 29


Figure 2.8
Audit Trail

Figure 2.9
SMS Notification

Library System with SMS Notification for Batangas Christian School 30


Figure 2.10

SMS Receipt

Student Interface

Figure 2.10
User Log-In

Library System with SMS Notification for Batangas Christian School 31


Figure 2.11
Book Issued

Figure 2.12
Search Book

Library System with SMS Notification for Batangas Christian School 32


Figure 2.13
User Settings

C. Design of Software, System Product, and/or Process

(Figure 3.0) System Development Life Cycle (SDL)

Library System with SMS Notification for Batangas Christian School 33


System Development Life Cycle
A software development methodology or system development methodology in software
engineering is a framework that is used to structure, plan, and control the process of development
an information system. SDLC is needed for the developers to create a program that will answer
different problems at the same time, programs built will have a clear documentation of
development, structure and even coding. (SDCL) process applies to information system
development project ensuring that all
functional and user requirements and agency strategic goals and objectives are met [WIKI2017].

Planning Phase
In the planning phase, the objective of the project is determining the requirements to produce the
product is considered. An estimate of resources, such as personnel and costs, is prepared along
with a concept for the new product. All of the information is analyzed to see if there is an
alternative solution in creating a new project. If there is no other viable alternative, the
information is assembled into a project plan and presented to management for approval
[WIKI2017].

In this phase, the developers determine what are the following requirements needed for the
system, cost estimation of resources, gathering all information and the assembly plan for the
system.

Analysis Phase
The analysis stage of the project team determines the end-user requirements. Often this is done
with the assistance of client focus group, which provide an explanation of their needs and what
their expectations are for the finished product and how it will perform. The project team
documents are all of the user requirements and get a sign-off from the client and management to
move forward with system design [WIKI2017].

Library System with SMS Notification for Batangas Christian School 34


In the analysis phase, the developers analyze first the specific problem, second is who will use
the system, the documentation of all user requirements and a sign off from client to user
management.

Design Phase
The design phase is the “architectural” phase of the system design. The flow of data processing
is developed into charts, and the project teams determines the most logical design and structure
for the data flow and storage. Fo the user interface, the project team design mock-up screen
layout that the developers use to write the code for the actual interface [WIKI2017].

In this phase the developers designed the user interface of the system, determine the data flow
process into charts and block diagrams to structural data flow storage.

Implementation Phase
The implementation phase involves installing approval applications into production enviroments.
Primary task include announcing of the implementation schedule,training end users, and
installing the product. In addition, organizations should input and verify data, configure and test
system and security parameters, and conduct post-implementation reviews. Management should
circulate implementation schedules to all affected parties and should notify users of any
implementation responsibilities [WIKI2017].

In the implementation phase, the developed machine is implemented thus the test of the system,
this phase also creates the documentation and tools the customers users to make informed
decisions about how to deploy your software securely.

Maintenance Phase
The Maintenance Phase occurs once the system is operational. It includes implementation of
changes that software might undergo over period of time, or implementation of new

Library System with SMS Notification for Batangas Christian School 35


requirements after the software deployed at the customer locations. The maintenance phase also
includes handli0ng the residual errors that may exist in the software even after the testing phase
[WIKI2017].

In this phase, the developers are making changes to hardware, software, and documentation to
support its operational effectiveness. It includes making changes to improve a system’s
performance, correct problems, enhance security, or address user requirements.

Data Flow Diagram – A data flow diagram(or DFD) is a graphical representation of the flow of
data through an information system. It shows how information is input and output from the
system, sources and destinations of the information, where that information is stored.
(CHOPE2017)

Library System with SMS Notification for Batangas Christian School 36


Figure 4.0
Student Reservation

Figure 4.1
Borrow Transaction

Figure 4.2
Returning with out Penalty Transaction

Figure 4.3
Returning with Penalty Transaction

Library System with SMS Notification for Batangas Christian School 37


Figure 4.4
SMS Notification

Figure 4.5
Reports

Entity Relationship Diagram – An entity relationship diagram (ERD), also known as an entity
relationship model, is a graphical representation that depicts relationship among the people,
objects, places, concepts, or events within and information technology (IT) sytem. An ERD uses
data modeling techniques that can help define business processes and serve as the foundation for
a relational database. (TechTarget)

White Box Testing

Library System with SMS Notification for Batangas Christian School 38


White Box Testing assumes that the tester can take a look at the code for the application block
and create test cases that look for any potential failure scenarios. During white box testing, you
analyze the code of the application block and prepare test cases for testing the functionality to
ensure that the class is behaving in accordance with the specifications and testing for robustness.

D. Development and Testing System Testing


System testing is a level of software testing where complete and integrated software is
tested. The purpose of this test is to evaluate the system’s compliance with the specified
requirements. The following criteria are used by intended users as test questions during the
testing phase.

A. Functionality
1. Suitability - Software performs the task required.
2. Accurateness - The result is as expected.
3. Interoperability - System interacts with other systems.
4. Security - Software prevents unauthorized access.
B. Usability
1. Understandability - The software is easy to use.
2. Learnability - The system is easily learned.
3. Operability - The system is used without much effort.
4. Attractiveness - GUI interface looks good.
C. Reliability
1. Maturity - Most of the faults in the software have been eliminated over time.
2. Fault Tolerance - Software handles errors.
3. Recoverability - Software resumes working and restores lost data.
D. Efficiency
1. Time Behavior – The system responds quickly.
2. Resource Utilization – System utilizes resources efficiently.
E. Portability
1. Adaptability – The software can be moved to other environments.
2. Install ability – The software installed easily.

Library System with SMS Notification for Batangas Christian School 39


3. Conformance – The software complies with portability standards.
4. Replace ability – The software is easily replaced with other software.
F. Maintainability
1. Analyzability – Faults are easily diagnosed.
2. Changeability – The software is easily modified
3. Stability – The software continues to function if changes are made.
4. Testability – The software is test easily.

ISO 9126 SOFTWARE EVALUATION CRITERIA

Numerical Rating Equivalent


5 Excellent
4 Very Good
3 Good
2 Fair
1 Poor

CRITERIA RATING SD WM
A. Functionality 1 2 3 4 5
1. Suitability. Software performs the tasks required. 1 20 69 0.55 4.67
2. Accurateness. The result is as expected. 5 31 54 0.62 4.45
3. Interoperability. System interacts with other 5 39 46 0.61 4.37
systems.
4. Security. Software prevents unauthorized access. 6 34 50 0.63 4.41
B. Usability
1. Understandability. The software is easy to use 5 26 59
2. Learnability. The system is easily learned. 5 24 61
3. Operability. The system is used without much 5 20 65
effort.
4. Attractiveness. GUI interface looks good. 4 21 65
C. Reliability
1. Maturity. Most of the faults in the software been 4 27 59
eliminated over time
2. Fault Tolerance. Software handles errors. 6 24 60

Library System with SMS Notification for Batangas Christian School 40


3. Recoverability. Software resumes working and 5 24 61
restores lost data
D. Efficiency
1. Time Behavior. The system responds quickly. 4 20 66
2. Resource Utilization. System utilizes resources 4 15 71
efficiently.
E. Portability
1. Adaptability. The software can be moved to other 5 26 59
environments.
2. Install ability. The software is installed easily. 3 24 63
3. Conformance. The software complies with 4 22 64
portability standards.
4. Replace ability. The software is easily replaced with 7 30 53
other software.
F. Maintainability
1. Analyzability. Faults are easily diagnosed. 7 18 65
2. Changeability. The software is easily modified. 5 20 65
3. Stability. The software continues to function if 6 30 54
changes are made.
4. Testability. The software is tested easily. 4 13 73

The total number of students being surveyed was 90. After the data had been analyzed, always
yielded to above 50%. Hence, it is an indicator that the library being established passed the high
standard of criteria.
Table shows the complete percentage rate of all the criteria.

1. Suitability – 93.42%
2. Accuranteness – 88.92%
3. Interoperability – 87.44%
4. Security – 88.21%

E. Description of Prototype
This section displays the created system’s required report layout and screen form in the
developed system.
Report Layout
The developers will provide documents for the system, such as list of enrolled students and
enrollment form.
Forms on Screen

Library System with SMS Notification for Batangas Christian School 41


The developers will show readers screenshot layouts of the system give them an understand
of how it works.

CHAPTER V

CONCLUSION AND RECOMMENDATIONS

The library of Batangas Christian School now works manually. As it was discussed in the first
chapter, the stated manual method has a variety of issues with its transactions. The developers of
the mentioned library performed research to address the issues produced by these cited issues. In
order to improve the current manual flow at Batangas Christian School, our group designed and
developed “Library System with SMS notification for Batangas Christian School”. This system
will include various transactions for borrowing and returning books as well as the use of SMS
notification to assist the librarian in informing students about important issues, with a primary
focus on monitoring penalties. In addition to generating reports that comprise the Master List of
Books, the proposed system also involves calculating penalties. Reports on books that have been
borrowed, returned, lost, or damaged are all available. The performance study showed that the
developers had accomplished the planned system's goals, demonstrating that the library system is
more effective to the manual method.

Library System with SMS Notification for Batangas Christian School 42


The study's developers also advise future researchers to conduct additional, local or international
research on the same study in order to confirm, support, or refute its findings. If the findings of
the study are consistent, it might be important to do this in order to create generalizations that
have a wider scope.

Appendix

The following pages contain the references, resource person(s), and curriculum vitae of the
researchers. Resource persons are those who contributed to the development of this research.

APPENDIX A: REFERENCES

References

Khan, M.T. et al.(2021). Library Management System with SMS Auto Reply. Obtained from
https://www.jetir.org/papers/JETIR2104051.pdf?
fbclid=IwAR2E9Pv24q5O1fbv878U14jBjFJ3A9v05LCZ7TjK2vRrhJZ-zrNDmCJAinI

Library System with SMS Notification for Batangas Christian School 43


Sahani, M. (April 13, 2021). Thesis on Library Management System LMS Project Report.
Obtained from https://www.slideshare.net/manishsahani12/thesis-on-library-management-
system-lms-project-report?
fbclid=IwAR1H0b4SUodOP0yWvYSko2TdudY_xFyLaeX8_P4ed4u9c0cUKs3j6y_5kmQ

Prasanna, N.S.N.L. & Gupta, B.N.S. (May2020). Online Library Management System. Obtained
from https://www.jetir.org/view?
paper=JETIRDU06021&fbclid=IwAR1mpfyicrHKQlyjVzN9FM0h6_33Pi_591gAlZJCf6tLwC1
4RyPYidJ_GxA

Paden, M. et al.(April 1, 2020). Library System for Canumay East National High School.
Obtained from https://ojs.aaresearchindex.com/index.php/aasgbcpjmra/article/view/2359?
fbclid=IwAR37Lk48qyk5uPWuevQEJ-Or73ic7igZWJD4agMmN49rRl0YNtPXZ1QufcM

Mayo, A. (February 2016). Public High School Online Library System. Obtained from
http://dspace.cas.upm.edu.ph/jspui/bitstream/123456789/429/1/Library%20System.pdf?
fbclid=IwAR2E9Pv24q5O1fbv878U14jBjFJ3A9v05LCZ7TjK2vRrhJZ-zrNDmCJAinI

De Guzman, M. & Santos, R. ( September 2017) Online Library System with SMS
Notification for FFHNAS. Obtained from https://www.facebook.com/messenger_file/?
attachment_id=377689514327795&message_id=mid.
%24cAAAB8IOOMv6GgqZJ_GAUWD2r10Lf&thread_id=100009104915873

APPENDIX B: Resources Person


Resources Person
Mrs. Irene Ramirez
(Librian)

Library System with SMS Notification for Batangas Christian School 44


Library System with SMS Notification for Batangas Christian School 45
Library System with SMS Notification for Batangas Christian School 46
Library System with SMS Notification for Batangas Christian School 47
Library System with SMS Notification for Batangas Christian School 48
GRAMMARIAN’S CERTIFICATE

This is to certify that the undersigned has reviewed and went through all the pages of the
thesis manuscript entitled “LIBRARY SYSTEM WITH SMS NOTIFICATION FOR
BATANGAS CHRISTIAN SCHOOL” prepared by ANTHONY JAMES SYMON N.
EBORA, LIZA MAE B. BRIONES, JOHN ANGELO B. LEAL, and KIM HARRY L.
LALAMUNAN, in accordance with the set of structural rules that govern the composition of
sentences, phrases, and word in the English language.

Signed:
Date Signed:

Cinderella de la Cruz, PhD


Grammarian January 11,2022

Library System with SMS Notification for Batangas Christian School 49


APPENDIX C: INTERVIEW

Transcript of Interview

Interviewer : Briones, Liza May B. / Leal, John Angelo


Interviewee : Irene Ramirez (Librarian)

Date : April 13, 2022 / May 23, 2022


Time : 8:30am / 10am
Location : Batangas Christian School (Library)

1. What is the name of the school?


Batangas Christian School

2. Who is the owner/administrator of the school?


Rev. Emphraim S. Camacho

3. When is it established?
Year 2000

4. Is the school private or public?


Private

5. What is the exact location of the school?


De Joya Compound, Alangilan, Batangas City

6. Do you have library in the school?


Yes

7. When is the library established?


2000

Library System with SMS Notification for Batangas Christian School 50


9. Is it CHED accredited?
Yes

10. Is the library open every day?


Weekday

11. Who are the users of the library?


Students and Teachers

12. Do you allow outsiders to borrow books?


No

13. Where do you gets the books?


Publisher (Local and International)

14. Do you have library cards?


Yes

15. Do you have card catalogues?


Yes (new)

16. How many books do your library houses?


More or less 700

17. How do you arrange the books? What is the classification of the books?
By Level and Its classification

18. Are all books allowed to be borrowed?


No, General References and Abecca books are not allowed

Library System with SMS Notification for Batangas Christian School 51


19. What are the rules and regulations inside the library?
Be Quiet

20. Are all books allowed to be brought at home?


No

21. What if there’s a need for you to show some reports from the library?
I will check the all records manually in the record books

22. How many staff do you have?


Only 1

23. Do you need computerized library system to your library?


Yes

24. Reasons for having computerized system?


For easier, fast and transactions reliable

25.Penalty is continues?
Yes

26. How will you know if the book is not lost?


If the books are returned

27. What are the books statutes?


Returned, Damaged and lost

28. Do you accept books with few pages?


Yes

29. Do you accept overdue book w/no payment?

Library System with SMS Notification for Batangas Christian School 52


Yes, If the student has no ability to pay it

30. Are all levels can rent?


Yes

31. Do you have a rental books?


No

32. What are the conditions when borrowing books?


Keep the book and return it on the due date

33.What are the common problem?


Hard to monitor the lost, overdue, damage books
I have lost of records of transactions
Hard to update the list of books

34. Do you limit the number of the books to be borrowed by specific borrower?
Maximum of 3 books per student but teachers can have many

35. How many days do you allow the books to be borrowed?


Maximum of 3 days for the student and every end of school year for the teacher

36. Do you fine penalty to overdue books? If so, how much? Is it possible that the
penalty will increase? Do you issue receipts?
Yes, 10 pesos every day with receipt

37. Do you fine penalty to lost? Damaged books? If so, how is it settled?
If lost and damaged, they have to pay for amount of book

38. What is/are the procedures in borrowing a book?

Library System with SMS Notification for Batangas Christian School 53


The student will ask the librarian if the book is available, then librarian will write
the book and borrower info in the library card of student and in record books

39. What do you do to obsolete the books?


I put them in the storage area

40. How do you monitor the availability of books?


By checking it to the shelves manually

41. How do you deal to the borrowers that have overdue books, lost, or damaged
books that haven’t settled yet their accountabilities?
I record their accounts and at the end of school year, clearance are not signed
unless settlements are done to both students and teachers

42.What is the maximum duration of the borrowed books?


Maximum of 3 days for the students and for teacher is anytime but every end of
school need to returned it.

43.What if the overdue book is lost or damaged, how will you compute their
penalty?
Both, lost/damaged and overdue books are separately to computed

44. How do you count the days of borrowing?


Office hours

45. Are holidays or weekends included in the counting of days?


Yes

46. Do you have a log books?


Yes

Library System with SMS Notification for Batangas Christian School 54


47. What is the purpose of log books?
Log in and out of the book of borrowers in the library

48. Do you have any record book?


Yes, via word (since 2021)

49. What are these record books?


Borrowed, Returned, Damaged, Lost, Penalty

50. What is the purpose of this record books?


To keep all the records book

51. Do you accept donated books?


Yes

52. What are your bases in accepting donated books?


As long as it is useful to the readers, I accept them

53. Do you allow borrowing out books?


Yes

54. Who are allowed to borrow the books?


Students and teachers

55. Are outsiders allowed to borrow books?


No

56.Are they allowed to photocopy books coming from this library?


No

57.What are the requirements to bring out books for photocopy?

Library System with SMS Notification for Batangas Christian School 55


Letter

58. How long is certain book allowed to be borrowed?


3 days

59. Is it is exactly 24 hours or within the day?


Within that day

60.How many books are allowed to be borrowed?


Maximum of 3

61.Is borrowing allowed during examination days?


No

62. What is the classification of the books that allowed to be borrowed?


All, But periodical, General References and Abecca book are not allowed

63. How long does it take in borrowing transaction?


5-10 mins

64. Do you encounter problems in manual process of borrowing books?


Yes, a lot

65. What are these problems?


The students are the once who record the info in the record book and the time I
spend in looking for the books prolongs the borrowing transaction

66. How do you handle such problems like that?


Patience and monitor everyday if the borrowed books is due or not

67. How long does it take in returning transaction?

Library System with SMS Notification for Batangas Christian School 56


Check if the books is overdue or not, lost or damaged, then I will compute and
mark in the library card and give to the students and return the book in the shelves (5-
15mins)

68. What if the borrower wants to extend the borrowing out book?
The student will need to record again

69. What if the does not return the book in time?


Penalty is subjected (10 pesos every day)

70. Do you have separate record book for penalty?


Yes, in another notebook

71. Is the faculty included in penalty?


No, but if they lost and damaged the book theirs need to pay it

72. What if the borrower does not pay the penalty?


Clearance is not signed

73. What is the basis in computing the penalty?


Due days

74. What if the record book is damage?


I will write all the records again in the new record book

75. What if the book is lost?


Pay the amount of books

76. What is your basis for the lost book? What if it’s declared lost and in a certain
day he found it?
If it is declared lost, then he will pay for it. The recorded status cannot be altered.

Library System with SMS Notification for Batangas Christian School 57


77. What if the borrower who had lost a certain book does not came to school
anymore?
The book is considered as lost

78. Is the borrower who had lost book still allowed to borrow book?
If the borrower has unsettled accountabilities, and then he is not allowed to
borrow anymore unless settlements are made.

79. Do you have inventory of books?


Yes, manually and now via word (2021)

80. How often do you have the inventory of books?


Manually, but most of the time when the admin wants all the records in
immediately

81. How do you do this kind of inventory?


I will check all records in the record books

82. Do you submit report?


Yes

83. Student allowed to bring the phone in school?


Yes

84. How many transaction have everyday?


5-20 transactions per day

Library System with SMS Notification for Batangas Christian School 58


Supporting Details

Library System with SMS Notification for Batangas Christian School 59


Library System with SMS Notification for Batangas Christian School 60
Library System with SMS Notification for Batangas Christian School 61
Library System with SMS Notification for Batangas Christian School 62
OLD LIBRARY

Library System with SMS Notification for Batangas Christian School 63


Library System with SMS Notification for Batangas Christian School 64
Library System with SMS Notification for Batangas Christian School 65
APENDIX E: PERSONAL TECHNICAL VITAE

Library System with SMS Notification for Batangas Christian School 66


4TH Year College

Library System with SMS Notification for Batangas Christian School 67


4TH Year College
4th Year College

HOMEPAGE

Library System with SMS Notification for Batangas Christian School 68


Click Login Button in

Log in Form –
Fill up the textbox the click the Login Button

CATEGORY LIST

ADD – Click the ADD button to


add new category

Library System with SMS Notification for Batangas Christian School 69


Type the category name in textbox then click ADD

AUTHOR /PUBLISHER LIST

ADD – Click the ADD button


to add new author/publisher.

Type the author or


publisher name in textbox
then click ADD.

LOCATION RACK LIST

Library System with SMS Notification for Batangas Christian School 70


ADD – Click the ADD button to add new location rack

Type the Location Rack


name in textbox then click ADD.

BOOK LIST

ADD – Click the ADD


button to add new book.

Library System with SMS Notification for Batangas Christian School 71


You need to fill-up the
Book Name, Book ISBN No., Number of Copy.

Select the Books Category, Author and Location Rack then click Add.

USER LIST

If you need to Disable a user just click the Disable/Enable button.

Library System with SMS Notification for Batangas Christian School 72


ISSUE BOOKS LIST

View Button – If you need to view the details of the book, user details and issue book details.

If you want to print the report just click the Print Button.

If you want you can edit the TO and FROM date.

Library System with SMS Notification for Batangas Christian School 73


AUDIT TRAIL
LIST

If you want to search the history you just click the search button.

SMS

NOFICATION LIST

If someone pop-up in the SMS Notification you need to click the SMS Notification Button to sent the
reminder.

Library System with SMS Notification for Batangas Christian School 74


If someone pop-up in
the SMS Receipt
you need to click the
SMS Receipt
Button to sent to the user.

USER MANUAL GUIDE

SEARCH BOOK
LIST

If you want to search a book just search in search box.

Library System with SMS Notification for Batangas Christian School 75


If you want to reserve the book just click the Reserve Book Button.

Reserved Button- Click the reserve button to reserved the book.

ISSUED BOOK DETAILS

If you want to search your reserved history just click the search box.

If the user want to edit the profile information just click the Profile Button in the upper right side

Library System with SMS Notification for Batangas Christian School 76


Just edit in the textbox and just click the Save Button.

USER

SELECT

DASHBOARD book_isbn_number, book_name FROM lms_book


WHERE book_isbn_number LIKE '%".
action.php $_POST["request"]."%'
AND book_status = 'Enable'
<?php ";

//action.php $result = $connect->query($query);

include
$data
=
array();

'../database_connection.php'; foreach($result as $row)


{
if(isset($_POST["action"])) $data[] = array(
{ 'isbn_no'
if($_POST["action"] == 'search_book_isbn') => str_replace($_POST["request"], '<b>'.
{ $_POST["request"].'</b>', $row["book_isbn_number"]),
$query = " 'book_name'
=> $row['book_name']

Library System with SMS Notification for Batangas Christian School 77


); }
} else
echo json_encode($data); {
} $formdata['admin_password'] =
$_POST['admin_password'];
if($_POST["action"] == 'search_user_id') }
{
$query = " if($message == '')
SELECT user_unique_id, user_name {
FROM lms_user $data = array(
WHERE user_unique_id LIKE '%". ':admin_email'
$_POST["request"]."%' => $formdata['admin_email']
AND user_status = 'Enable' );
";
$query = "
$result = $connect->query($query); SELECT * FROM lms_admin
WHERE admin_email = :admin_email
$data = array(); ";

foreach($result as $row) $statement = $connect->prepare($query);


{
$data[] = array( $statement->execute($data);
'user_unique_id'
=> str_replace($_POST["request"], '<b>'. if($statement->rowCount() > 0)
$_POST["request"].'</b>', $row["user_unique_id"]), {
'user_first_name' foreach($statement-
=> >fetchAll() as $row)
$row["user_first_name"] {
);
} if($row['admin_password'] ==
$formdata['admin_password'])
echo json_encode($data); {
}
} $_SESSION['admin_id'] = $row['admin_id'];

?> //inserting of audit


$msg
admin_login.php = 'User Email: <strong>'.$row['admin_email'].'</strong> login to
the system';
<?php
$audit = "INSERT INTO lms_audit
//admin_login.php (`audit_desc`,`date_created`) VALUES ('$msg', '".date("Y-m-d
H:i:s")."')";

include 'database_connection.php'; $statement = $connect->prepare($audit);

include 'function.php'; $statement->execute($data);

$message = ''; header('location:admin/index.php');


}
if(isset($_POST["login_button"])) else
{ {

$formdata = array(); $message = '<li>Wrong Password</li>';


}
if(empty($_POST["admin_email"])) }
{ }
$message .= '<li>Email Address is else
required</li>'; {
} $message = '<li>Wrong Email
else Address</li>';
{ }
if(!filter_var($_POST["admin_email"], }
FILTER_VALIDATE_EMAIL))
{ }
$message .= '<li>Invalid
Email Address</li>'; include 'header_user.php';
}
else ?>
{
$formdata['admin_email'] = <div class="d-flex align-items-center justify-content-center"
$_POST['admin_email']; style="min-height:700px;">
}
} <div class="col-md-6">

if(empty($_POST['admin_password'])) <?php
{ if($message != '')
$message .= '<li>Password is {
required</li>';

Library System with SMS Notification for Batangas Christian School 78


echo '<div class="alert alert-
danger"><ul>'.$message.'</ul></div>'; <?php
}
?> include 'footer.php';

<div class="card"> ?>


<div class="card-body">
<div class="row"> database_connection.php
<div class="col mt-3">
<center> <?php
<img width="150px"
src="image/adminuser.png"/> //database_connection.php
</center>
</div> date_default_timezone_set('Asia/Manila');
</div> $connect = new PDO("mysql:host=localhost;
<div class="row"> dbname=u996653094_lms", "u996653094_lms_name",
<div class="col"> "&xY5im8j6JM");
<center>
<h3>Admin Login</h3> session_start();
</center>
</div> ?>
</div>
footer.php

<?php
<form if(is_admin_login())
method="POST"> {
?>
<div </main>
class="mb-3"> <footer class="py-4 bg-light mt-auto">
<div class="container-fluid px-4">
<label class="form-label">Email address</label> <div class="d-flex align-items-center justify-
content-between small">
<div class="text-muted">Copyright &copy;
<input type="text" name="admin_email" Library Management System <?php echo date('Y'); ?></div>
id="admin_email" class="form-control" /> <div>
<a href="terms.php">Terms &amp;
Conditions</a>
</div> </div>
</div>
<div </div>
class="mb-3"> </footer>
</div>
<label class="form-label">Password</label> </div>
<?php
}
<input type="password" name="admin_password" else
id="admin_password" class="form-control" /> {
<input type="checkbox" onclick="myFunction()"> ?>
Show Password <footer class="pt-3 mt-4 text-muted border-top">
<section>
<script> <div class="container">
function myFunction() { <div class="row">
var x = <div class="col-12">
document.getElementById("admin_password"); <center>
if (x.type === "password") { <h2>Contact us</h2>
x.type = "text"; </center>
} else { </div>
x.type = "password"; </div>
} <div class="row">
} <div class="col-md-4">
</script> <center>
<h4>Admission's Office</h4>
</div> </center>
<h6>Mobile</h6>
<div <p><i class="fas fa-phone"></i> (0916) 200-
class="d-flex align-items-center justify-content-center mt-4 mb- 1679 (Globe)</p>
0"> <p><i class="fas fa-phone"></i> (0961) 419-
7381 (Smart)</p>
<h6>Telephone</h6>
<input type="submit" name="login_button" <p><i class="fas fa-phone"></i> (043) 980-
class="btn btn-primary" value="Login" /> 6176</p>
<h6>Email</h6>
<p><i class="fas fa-envelope"></i>
</div> [email protected]</p>
</form> </div>
</div> <div class="col-md-4">
</div> <center>
</div> <h4>Accounting Office </h4>
</div> </center>

Library System with SMS Notification for Batangas Christian School 79


<h6>Telephone</h6> }
<p><i class="fas fa-phone"></i> (043) 980-
6176 </p> $message = '';
<h6>Email</h6>
<p><i class="fas fa-envelope"></i> $success = '';
[email protected]</p>
<center> if(isset($_POST["forgot_button"]))
<h4>Socials</h4> {
</center> $formdata = array();
<p><a
href="https://www.facebook.com/batangaschristianschool"><i if(empty($_POST["user_email_address"]))
class="fas fab fa-facebook"></i>Facebook</a></p> {
<p><a $message .= '<li>Email Address is
href="https://www.youtube.com/channel/UCtxRW_DFRJLZhxfw required</li>';
OKvKGQA"><i class="fa fab fa-youtube"></i>Youtube</a></p> }
</div> else
<div class="col-md-4"> {
<p><a href="https://sites.google.com/view/bcs- if(!
ph/home?authuser=0"><i class="fas fa-globe"></i>Batangas filter_var($_POST["user_email_address"],
Christian School</a></p> FILTER_VALIDATE_EMAIL))
<p><a {
href="https://goo.gl/maps/EopNZRzezAuWr3Ni7"><i class="fas $message .= '<li>Invalid
fa-map-marker-alt"></i>De Joya Compound, Alangilan, Email Address</li>';
Batangas City </a></p> }
<center> else
<iframe {
src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!
1d1937.4881768514945!2d121.069369!3d13.780299!3m2!1i1024! $formdata['user_email_address'] =
2i768!4f13.1!3m3!1m2!1s0x0%3A0xaadf0fd5d85eb52!2sBatangas trim($_POST['user_email_address']);
%20Christian%20School%2C%20Inc.!5e0!3m2!1sen!2sus! }
4v1668564899260!5m2!1sen!2sus" width="400" height="250" }
style="border:0;" allowfullscreen="" loading="lazy"
referrerpolicy="no-referrer-when-downgrade"></iframe> if($message == '')
</center> {
</div> $data = array(
</div> ':user_email_address'
</div> => $formdata['user_email_address']
</section> );
<div>
</div> $query = "SELECT * FROM lms_user
<div class="text-center">&copy; <?php echo WHERE user_email_address = :user_email_address";
date('Y'); ?> | All Rights Reserved!</div>
</footer> $statement = $connect->prepare($query);
</div>
</main> $statement->execute($data);
<?php
} if($statement->rowCount() > 0)
?> {
foreach($statement-
<script src="<?php echo base_url(); >fetchAll() as $row)
?>asset/js/bootstrap.bundle.min.js" {
crossorigin="anonymous"></script>
<script src="<?php echo base_url(); if($row['user_status'] == 'Enable')
?>asset/js/scripts.js"></script> {
<script src="<?php echo base_url(); ?>asset/js/simple-
[email protected]" crossorigin="anonymous"></script> $emailId = $formdata['user_email_address'];
<script src="<?php echo base_url(); ?>asset/js/datatables-
simple-demo.js"></script>
$token =
</body> md5($emailId).rand(10,9999);

</html> $expFormat = mktime(date("H"), date("i"),


date("s"), date("m") ,date("d")+1, date("Y"));
forgot_password.php
$expDate = date("Y-m-d H:i:s",$expFormat);
<?php
$update = $connect->prepare("UPDATE lms_user set
//forgot_password.php reset_link_token=? ,exp_date=? WHERE
user_email_address=?");
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP; $update->execute([$token,$expDate,$emailId]);
use PHPMailer\PHPMailer\Exception; $link = "<a
href='www.bcs-library.com/reset_password.php?key=".
include 'database_connection.php'; $emailId."&token=".$token."'>Click To Reset password</a>";

include 'function.php'; require_once('vendor/autoload.php');

if(is_user_login()) $mail = new PHPMailer();


{
header('location:issue_book_details.php'); $mail->IsSMTP();

Library System with SMS Notification for Batangas Christian School 80


// enable SMTP authentication </div>
$mail->SMTPAuth = true; </div>
// GMAIL username <div class="row">
$mail->Username = "[email protected]"; <div class="col">
// GMAIL password <center>
$mail->Password = "Bcs123456w!*"; <h3>Forgot Password</h3>
$mail->SMTPSecure = "ssl"; </center>
// sets GMAIL as the SMTP server </div>
$mail->Host = "smtp.hostinger.com"; </div>
// set the SMTP port for the GMAIL server <form
$mail->Port = "465"; method="POST">
$mail->From='[email protected]'; <div
$mail->FromName='Bcs-Library'; class="mb-3">
$mail->addAddress($_POST["user_email_address"]);
$mail->Subject = 'Reset Password'; <label class="form-label">Email address</label>
$mail->IsHTML(true);
$mail->Body = 'Click On This Link to Reset <input type="text" name="user_email_address"
Password '.$link.''; id="user_email_address" class="form-control" />
if($mail->Send())
{ </div>
$success = '<li>Check Your Email and Click on the
link sent to your email</li>'; <div
} class="mb-0 d-flex justify-content-end">
else
{ <input type="submit" name="forgot_button"
echo "Mail Error - >".$mail->ErrorInfo; class="btn btn-primary" value="Submit" />
}
} <a href="user_login.php" class="btn btn-
else danger">Back</a>
{
</div>
$message = '<li>Your Account has been
disabled</li>'; </form>
} </div>
</div>
</div>
</div>
} </div>
} </div>
else
{ <?php
$message = '<li>Wrong Email
Address</li>'; include 'footer.php';
}
} ?>
}
function.php
include 'header_user.php';
<?php
?>
//function.php
<div class="container">
<div class="row"> function base_url()
<div class="d-flex align-items-center justify-content-center" {
style="height:700px;"> return 'https://bcs-library.com/';
<div class="col-md-6"> }
<?php
function is_admin_login()
if($message != '') {
{ if(isset($_SESSION['admin_id']))
echo '<div class="alert alert- {
danger"><ul>'.$message.'</ul></div>'; return true;
} }
return false;
}
if($success != '')
{ function is_user_login()
echo '<div class="alert alert- {
success">'.$success.'</div>'; if(isset($_SESSION['user_id']))
} {
return true;
?> }
<div class="card"> return false;
<div class="card-body"> }
<div class="row">
<div class="col mt-3"> function set_timezone($connect)
<center> {
<img width="150px" $query = "
src="image/generaluser.png"/> SELECT library_timezone FROM lms_setting
</center> LIMIT 1

Library System with SMS Notification for Batangas Christian School 81


"; $output = 0;

$result = $connect->query($query); $query = "


SELECT COUNT(issue_book_id) AS Total FROM
foreach($result as $row) lms_issue_book
{ WHERE user_id = '".$user_unique_id."'
AND book_issue_status = 'Issue'
";
date_default_timezone_set($row["library_timezone"]);
} $result = $connect->query($query);
}
foreach($result as $row)
function get_date_time($connect) {
{ $output = $row["Total"];
set_timezone($connect); }
return $output;
return date("Y-m-d H:i:s", }
STRTOTIME(date('h:i:sa')));
} function get_total_book_issue_day($connect)
{
function get_one_day_fines($connect) $output = 0;
{
$output = 0; $query = "
$query = " SELECT library_total_book_issue_day FROM
SELECT library_one_day_fine FROM lms_setting lms_setting
LIMIT 1 LIMIT 1
"; ";
$result = $connect->query($query);
foreach($result as $row) $result = $connect->query($query);
{
$output = $row["library_one_day_fine"]; foreach($result as $row)
} {
return $output; $output =
} $row["library_total_book_issue_day"];
}
function get_currency_symbol($connect) return $output;
{ }
$output = '';
$query = " function convert_data($string, $action = 'encrypt')
SELECT library_currency FROM lms_setting {
LIMIT 1 $encrypt_method = "AES-256-CBC";
"; $secret_key =
$result = $connect->query($query); 'AA74CDCC2BBRT935136HH7B63C27'; // user define private
foreach($result as $row) key
{ $secret_iv = '5fgf5HJ5g27'; // user define secret key
$currency_data = currency_array(); $key = hash('sha256', $secret_key);
foreach($currency_data as $currency) $iv = substr(hash('sha256', $secret_iv), 0, 16); //
{ sha256 is hash_hmac_algo
if($currency["code"] == if ($action == 'encrypt')
$row['library_currency']) {
{ $output = openssl_encrypt($string,
$output = '<span $encrypt_method, $key, 0, $iv);
style="font-family: DejaVu Sans;">' . $currency["symbol"] . $output = base64_encode($output);
'</span>&nbsp;'; }
} else if ($action == 'decrypt')
} {
} $output =
return $output; openssl_decrypt(base64_decode($string), $encrypt_method, $key,
} 0, $iv);
}
function get_book_issue_limit_per_user($connect) return $output;
{ }
$output = '';
$query = " function currency_array()
SELECT library_issue_total_book_per_user FROM {
lms_setting $currencies = array(
LIMIT 1 array('code'=> 'ALL',
"; 'countryname'=> 'Albania',
$result = $connect->query($query); 'name'=> 'Albanian lek',
foreach($result as $row) 'symbol'=> 'L'),
{
$output = array('code'=> 'AFN',
$row["library_issue_total_book_per_user"]; 'countryname'=>
} 'Afghanistan',
return $output; 'name'=> 'Afghanistan
} Afghani',
'symbol'=> '&#1547;'),
function get_total_book_issue_per_user($connect,
$user_unique_id) array('code'=> 'ARS',
{

Library System with SMS Notification for Batangas Christian School 82


'countryname'=> 'countryname'=>
'Argentina', 'Botswana',
'name'=> 'Argentine Peso', 'name'=> 'Botswana pula',
'symbol'=> '&#36;'), 'symbol'=> '&#80;'),

array('code'=> 'AWG', array('code'=> 'BGN',


'countryname'=> 'Aruba', 'countryname'=>
'name'=> 'Aruban florin', 'Bulgaria',
'symbol'=> '&#402;'), 'name'=> 'Bulgarian lev',
'symbol'=>
array('code'=> 'AUD', '&#1083;&#1074;'),
'countryname'=>
'Australia', array('code'=> 'BRL',
'name'=> 'Australian 'countryname'=> 'Brazil',
Dollar', 'name'=> 'Brazilian real',
'symbol'=> '&#65;&#36;'), 'symbol'=> '&#82;&#36;'),

array('code'=> 'AZN', array('code'=> 'BND',


'countryname'=> 'countryname'=>
'Azerbaijan', 'Sultanate of Brunei',
'name'=> 'Azerbaijani 'name'=> 'Brunei dollar',
Manat', 'symbol'=> '&#66;&#36;'),
'symbol'=> '&#8380;'),
array('code'=> 'KHR',
array('code'=> 'BSD', 'countryname'=>
'countryname'=> 'The 'Cambodia',
Bahamas', 'name'=> 'Cambodian riel',
'name'=> 'Bahamas 'symbol'=> '&#6107;'),
Dollar',
'symbol'=> '&#66;&#36;'), array('code'=> 'CAD',
'countryname'=> 'Canada',
array('code'=> 'BBD', 'name'=> 'Canadian
'countryname'=> dollar',
'Barbados', 'symbol'=> '&#67;&#36;'),
'name'=> 'Barbados
Dollar', array('code'=> 'KYD',
'symbol'=> 'countryname'=> 'Cayman
'&#66;&#100;&#115;&#36;'), Islands',
'name'=> 'Cayman Islands
array('code'=> 'BDT', dollar',
'countryname'=> 'People\'s 'symbol'=> '&#36;'),
Republic of Bangladesh',
'name'=> 'Bangladeshi array('code'=> 'CLP',
taka', 'countryname'=> 'Chile',
'symbol'=> '&#2547;'), 'name'=> 'Chilean peso',
'symbol'=> '&#36;'),
array('code'=> 'BYN',
'countryname'=> 'Belarus', array('code'=> 'CNY',
'name'=> 'Belarus Ruble', 'countryname'=> 'China',
'symbol'=> 'name'=> 'Chinese Yuan
'&#66;&#114;'), Renminbi',
'symbol'=> '&#165;'),
array('code'=> 'BZD',
'countryname'=> 'Belize', array('code'=> 'COP',
'name'=> 'Belize Dollar', 'countryname'=>
'symbol'=> 'Colombia',
'&#66;&#90;&#36;'), 'name'=> 'Colombian
peso',
array('code'=> 'BMD', 'symbol'=> '&#36;'),
'countryname'=> 'British
Overseas Territory of Bermuda', array('code'=> 'CRC',
'name'=> 'Bermudian 'countryname'=> 'Costa
Dollar', Rica',
'symbol'=> 'name'=> 'Costa Rican
'&#66;&#68;&#36;'), colón',
'symbol'=> '&#8353;'),
array('code'=> 'BOP',
'countryname'=> 'Bolivia', array('code'=> 'HRK',
'name'=> 'Boliviano', 'countryname'=> 'Croatia',
'symbol'=> 'name'=> 'Croatian kuna',
'&#66;&#115;'), 'symbol'=>
'&#107;&#110;'),
array('code'=> 'BAM',
'countryname'=> 'Bosnia array('code'=> 'CUP',
and Herzegovina', 'countryname'=> 'Cuba',
'name'=> 'Bosnia- 'name'=> 'Cuban peso',
Herzegovina Convertible Marka', 'symbol'=> '&#8369;'),
'symbol'=> '&#75;&#77;'),
array('code'=> 'CZK',
array('code'=> 'BWP',

Library System with SMS Notification for Batangas Christian School 83


'countryname'=> 'Czech 'countryname'=>
Republic', 'Gibraltar',
'name'=> 'Czech koruna', 'name'=> 'Gibraltar
'symbol'=> pound',
'&#75;&#269;'), 'symbol'=> '&#163;'),

array('code'=> 'DKK', array('code'=> 'GTQ',


'countryname'=> 'countryname'=>
'Denmark, Greenland, and the Faroe Islands', 'Guatemala',
'name'=> 'Danish krone', 'name'=> 'Guatemalan
'symbol'=> quetzal',
'&#107;&#114;'), 'symbol'=> '&#81;'),

array('code'=> 'DOP', array('code'=> 'GGP',


'countryname'=> 'countryname'=>
'Dominican Republic', 'Guernsey',
'name'=> 'Dominican 'name'=> 'Guernsey
peso', pound',
'symbol'=> 'symbol'=> '&#81;'),
'&#82;&#68;&#36;'),
array('code'=> 'GYD',
array('code'=> 'XCD', 'countryname'=> 'Guyana',
'countryname'=> 'Antigua 'name'=> 'Guyanese
and Barbuda, Commonwealth of Dominica, Grenada, Montserrat, dollar',
St. Kitts and Nevis, Saint Lucia and St. Vincent and the 'symbol'=>
Grenadines', '&#71;&#89;&#36;'),
'name'=> 'Eastern
Caribbean dollar', array('code'=> 'HNL',
'symbol'=> '&#36;'), 'countryname'=>
'Honduras',
array('code'=> 'EGP', 'name'=> 'Honduran
'countryname'=> 'Egypt', lempira',
'name'=> 'Egyptian 'symbol'=> '&#76;'),
pound',
'symbol'=> '&#163;'), array('code'=> 'HKD',
'countryname'=> 'Hong
array('code'=> 'SVC', Kong',
'countryname'=> 'El 'name'=> 'Hong Kong
Salvador', dollar',
'name'=> 'Salvadoran 'symbol'=>
colón', '&#72;&#75;&#36;'),
'symbol'=> '&#36;'),
array('code'=> 'HUF',
array('code'=> 'EEK', 'countryname'=>
'countryname'=> 'Estonia', 'Hungary',
'name'=> 'Estonian kroon', 'name'=> 'Hungarian
'symbol'=> forint',
'&#75;&#114;'), 'symbol'=>
'&#70;&#116;'),
array('code'=> 'EUR',
'countryname'=> array('code'=> 'ISK',
'European Union, Italy, Belgium, Bulgaria, Croatia, Cyprus, 'countryname'=> 'Iceland',
Czechia, Denmark, Estonia, Finland, France, Germany, Greece, 'name'=> 'Icelandic króna',
Hungary, Ireland, Latvia, Lithuania, Luxembourg, Malta, 'symbol'=>
Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, '&#237;&#107;&#114;'),
Spain, Sweden',
'name'=> 'Euro', array('code'=> 'INR',
'symbol'=> '&#8364;'), 'countryname'=> 'India',
'name'=> 'Indian rupee',
array('code'=> 'FKP', 'symbol'=> '&#8377;'),
'countryname'=> 'Falkland
Islands', array('code'=> 'IDR',
'name'=> 'Falkland Islands 'countryname'=>
(Malvinas) Pound', 'Indonesia',
'symbol'=> 'name'=> 'Indonesian
'&#70;&#75;&#163;'), rupiah',
'symbol'=>
array('code'=> 'FJD', '&#82;&#112;'),
'countryname'=> 'Fiji',
'name'=> 'Fijian dollar', array('code'=> 'IRR',
'symbol'=> 'countryname'=> 'Iran',
'&#70;&#74;&#36;'), 'name'=> 'Iranian rial',
'symbol'=> '&#65020;'),
array('code'=> 'GHC',
'countryname'=> 'Ghana', array('code'=> 'IMP',
'name'=> 'Ghanaian cedi', 'countryname'=> 'Isle of
'symbol'=> Man',
'&#71;&#72;&#162;'), 'name'=> 'Manx pound',
'symbol'=> '&#163;'),
array('code'=> 'GIP',

Library System with SMS Notification for Batangas Christian School 84


array('code'=> 'ILS',
'countryname'=> 'Israel, array('code'=> 'LTL',
Palestinian territories of the West Bank and the Gaza Strip', 'countryname'=>
'name'=> 'Israeli Shekel', 'Lithuania',
'symbol'=> '&#8362;'), 'name'=> 'Lithuanian
litas',
array('code'=> 'JMD', 'symbol'=> '&#8364;'),
'countryname'=>
'Jamaica', array('code'=> 'MKD',
'name'=> 'Jamaican 'countryname'=> 'North
dollar', Macedonia',
'symbol'=> '&#74;&#36;'), 'name'=> 'Macedonian
denar',
array('code'=> 'JPY', 'symbol'=>
'countryname'=> 'Japan', '&#1076;&#1077;&#1085;'),
'name'=> 'Japanese yen',
'symbol'=> '&#165;'), array('code'=> 'MYR',
'countryname'=>
array('code'=> 'JEP', 'Malaysia',
'countryname'=> 'Jersey', 'name'=> 'Malaysian
'name'=> 'Jersey pound', ringgit',
'symbol'=> '&#163;'), 'symbol'=> '&#82;&#77;'),

array('code'=> 'KZT', array('code'=> 'MUR',


'countryname'=> 'countryname'=>
'Kazakhstan', 'Mauritius',
'name'=> 'Kazakhstani 'name'=> 'Mauritian
tenge', rupee',
'symbol'=> '&#8376;'), 'symbol'=>
'&#82;&#115;'),
array('code'=> 'KPW',
'countryname'=> 'North array('code'=> 'MXN',
Korea', 'countryname'=> 'Mexico',
'name'=> 'North Korean 'name'=> 'Mexican peso',
won', 'symbol'=>
'symbol'=> '&#8361;'), '&#77;&#101;&#120;&#36;'),

array('code'=> 'KPW', array('code'=> 'MNT',


'countryname'=> 'South 'countryname'=>
Korea', 'Mongolia',
'name'=> 'South Korean 'name'=> 'Mongolian
won', tögrög',
'symbol'=> '&#8361;'), 'symbol'=> '&#8366;'),

array('code'=> 'KGS', array('code'=> 'MZN',


'countryname'=> 'Kyrgyz 'countryname'=>
Republic', 'Mozambique',
'name'=> 'Kyrgyzstani 'name'=> 'Mozambican
som', metical',
'symbol'=> 'symbol'=> '&#77;&#84;'),
'&#1083;&#1074;'),
array('code'=> 'NAD',
array('code'=> 'LAK', 'countryname'=>
'countryname'=> 'Laos', 'Namibia',
'name'=> 'Lao kip', 'name'=> 'Namibian
'symbol'=> '&#8365;'), dollar',
'symbol'=> '&#78;&#36;'),
array('code'=> 'LAK',
'countryname'=> 'Laos', array('code'=> 'NPR',
'name'=> 'Latvian lats', 'countryname'=> 'Federal
'symbol'=> '&#8364;'), Democratic Republic of Nepal',
'name'=> 'Nepalese rupee',
array('code'=> 'LVL', 'symbol'=>
'countryname'=> 'Laos', '&#82;&#115;&#46;'),
'name'=> 'Latvian lats',
'symbol'=> '&#8364;'), array('code'=> 'ANG',
'countryname'=> 'Curaçao
array('code'=> 'LBP', and Sint Maarten',
'countryname'=> 'name'=> 'Netherlands
'Lebanon', Antillean guilder',
'name'=> 'Lebanese 'symbol'=> '&#402;'),
pound',
'symbol'=> array('code'=> 'NZD',
'&#76;&#163;'), 'countryname'=> 'New
Zealand, the Cook Islands, Niue, the Ross Dependency, Tokelau,
array('code'=> 'LRD', the Pitcairn Islands',
'countryname'=> 'Liberia', 'name'=> 'New Zealand
'name'=> 'Liberian dollar', dollar',
'symbol'=> 'symbol'=> '&#36;'),
'&#76;&#68;&#36;'),

Library System with SMS Notification for Batangas Christian School 85


array('code'=> 'RUB',
'countryname'=> 'Russian
array('code'=> 'NIO', Federation, Abkhazia and South Ossetia, Donetsk and Luhansk',
'countryname'=> 'name'=> 'Russian ruble',
'Nicaragua', 'symbol'=> '&#8381;'),
'name'=> 'Nicaraguan
córdoba', array('code'=> 'SHP',
'symbol'=> '&#67;&#36;'), 'countryname'=> 'Saint
Helena, Ascension and Tristan da Cunha',
array('code'=> 'NGN', 'name'=> 'Saint Helena
'countryname'=> 'Nigeria', pound',
'name'=> 'Nigerian naira', 'symbol'=> '&#163;'),
'symbol'=> '&#8358;'),
array('code'=> 'SAR',
array('code'=> 'NOK', 'countryname'=> 'Saudi
'countryname'=> 'Norway Arabia',
and its dependent territories', 'name'=> 'Saudi riyal',
'name'=> 'Norwegian 'symbol'=> '&#65020;'),
krone',
'symbol'=> array('code'=> 'RSD',
'&#107;&#114;'), 'countryname'=> 'Serbia',
'name'=> 'Serbian dinar',
array('code'=> 'OMR', 'symbol'=>
'countryname'=> 'Oman', '&#100;&#105;&#110;'),
'name'=> 'Omani rial',
'symbol'=> '&#65020;'), array('code'=> 'SCR',
'countryname'=>
array('code'=> 'PKR', 'Seychelles',
'countryname'=> 'name'=> 'Seychellois
'Pakistan', rupee',
'name'=> 'Pakistani rupee', 'symbol'=>
'symbol'=> '&#82;&#115;'),
'&#82;&#115;'),
array('code'=> 'SGD',
array('code'=> 'PAB', 'countryname'=>
'countryname'=> 'Singapore',
'Panama', 'name'=> 'Singapore
'name'=> 'Panamanian dollar',
balboa', 'symbol'=> '&#83;&#36;'),
'symbol'=>
'&#66;&#47;&#46;'), array('code'=> 'SBD',
'countryname'=> 'Solomon
array('code'=> 'PYG', Islands',
'countryname'=> 'name'=> 'Solomon Islands
'Paraguay', dollar',
'name'=> 'Paraguayan 'symbol'=>
Guaraní', '&#83;&#73;&#36;'),
'symbol'=> '&#8370;'),
array('code'=> 'SOS',
array('code'=> 'PEN', 'countryname'=>
'countryname'=> 'Peru', 'Somalia',
'name'=> 'Sol', 'name'=> 'Somali shilling',
'symbol'=> 'symbol'=>
'&#83;&#47;&#46;'), '&#83;&#104;&#46;&#83;&#111;'),
array('code'=> 'PHP', array('code'=> 'ZAR',
'countryname'=> 'countryname'=> 'South
'Philippines', Africa',
'name'=> 'Philippine peso', 'name'=> 'South African
'symbol'=> '&#8369;'), rand',
'symbol'=> '&#82;'),
array('code'=> 'PLN',
'countryname'=> 'Poland', array('code'=> 'LKR',
'name'=> 'Polish złoty', 'countryname'=> 'Sri
'symbol'=> Lanka',
'&#122;&#322;'), 'name'=> 'Sri Lankan
rupee',
array('code'=> 'QAR', 'symbol'=>
'countryname'=> 'State of '&#82;&#115;'),
Qatar',
'name'=> 'Qatari Riyal',
'symbol'=> '&#65020;'), array('code'=> 'SEK',
'countryname'=> 'Sweden',
array('code'=> 'RON', 'name'=> 'Swedish krona',
'countryname'=> 'symbol'=>
'Romania', '&#107;&#114;'),
'name'=> 'Romanian leu
(Leu românesc)',
'symbol'=> '&#76;'), array('code'=> 'CHF',

Library System with SMS Notification for Batangas Christian School 86


'countryname'=> 'name'=> 'United States
'Switzerland', dollar',
'name'=> 'Swiss franc', 'symbol'=> '&#36;'),
'symbol'=>
'&#67;&#72;&#102;'), array('code'=> 'UYU',
'countryname'=>
array('code'=> 'SRD', 'Uruguayan',
'countryname'=> 'name'=> 'Peso
'Suriname', Uruguayolar',
'name'=> 'Suriname 'symbol'=> '&#36;&#85;'),
Dollar',
'symbol'=> array('code'=> 'UZS',
'&#83;&#114;&#36;'), 'countryname'=>
'Uzbekistan',
array('code'=> 'SYP', 'name'=> 'Uzbekistani
'countryname'=> 'Syria', soʻm',
'name'=> 'Syrian pound', 'symbol'=>
'symbol'=> '&#1083;&#1074;'),
'&#163;&#83;'),
array('code'=> 'VEF',
array('code'=> 'TWD', 'countryname'=>
'countryname'=> 'Taiwan', 'Venezuela',
'name'=> 'New Taiwan 'name'=> 'Venezuelan
dollar', bolívar',
'symbol'=> 'symbol'=>
'&#78;&#84;&#36;'), '&#66;&#115;'),

array('code'=> 'THB', array('code'=> 'VND',


'countryname'=> 'countryname'=>
'Thailand', 'Vietnam',
'name'=> 'Thai baht', 'name'=> 'Vietnamese
'symbol'=> '&#3647;'), dong (Đồng)',
'symbol'=> '&#8363;'),

array('code'=> 'TTD', array('code'=> 'VND',


'countryname'=> 'Trinidad 'countryname'=> 'Yemen',
and Tobago', 'name'=> 'Yemeni rial',
'name'=> 'Trinidad and 'symbol'=> '&#65020;'),
Tobago dollar',
'symbol'=> array('code'=> 'ZWD',
'&#84;&#84;&#36;'), 'countryname'=>
'Zimbabwe',
array('code'=> 'TRY', 'name'=> 'Zimbabwean
'countryname'=> 'Turkey, dollar',
Turkish Republic of Northern Cyprus', 'symbol'=> '&#90;&#36;'),
'name'=> 'Turkey Lira', );
'symbol'=> '&#8378;'),

array('code'=> 'TVD', return $currencies;


'countryname'=> 'Tuvalu', }
'name'=> 'Tuvaluan
dollar', function Currency_list()
'symbol'=> {
'&#84;&#86;&#36;'), $html = '
<option value="">Select
array('code'=> 'UAH', Currency</option>
'countryname'=> ';
'Ukraine', $data = currency_array();
'name'=> 'Ukrainian foreach($data as $row)
hryvnia', {
'symbol'=> '&#8372;'), $html .= '<option value="'.
$row["code"].'">'.$row["name"].'</option>';
array('code'=> 'GBP', }
'countryname'=> 'United return $html;
Kingdom, Jersey, Guernsey, the Isle of Man, Gibraltar, South }
Georgia and the South Sandwich Islands, the British Antarctic
Territory, and Tristan da Cunha', function Timezone_list()
'name'=> 'Pound sterling', {
'symbol'=> '&#163;'), $timezones = array(
'America/Adak' => '(GMT-10:00)
array('code'=> 'UGX', America/Adak (Hawaii-Aleutian Standard Time)',
'countryname'=> 'Uganda', 'America/Atka' => '(GMT-
'name'=> 'Ugandan 10:00) America/Atka (Hawaii-Aleutian Standard Time)',
shilling', 'America/Anchorage' =>
'symbol'=> '(GMT-9:00) America/Anchorage (Alaska Standard Time)',
'&#85;&#83;&#104;'), 'America/Juneau' => '(GMT-
9:00) America/Juneau (Alaska Standard Time)',
array('code'=> 'USD', 'America/Nome' => '(GMT-
'countryname'=> 'United 9:00) America/Nome (Alaska Standard Time)',
States',

Library System with SMS Notification for Batangas Christian School 87


'America/Yakutat' => 'America/Swift_Current' =>
'(GMT-9:00) America/Yakutat (Alaska Standard Time)', '(GMT-6:00) America/Swift_Current (Central Standard Time)',
'America/Dawson' => 'America/Tegucigalpa' =>
'(GMT-8:00) America/Dawson (Pacific Standard Time)', '(GMT-6:00) America/Tegucigalpa (Central Standard Time)',
'America/Ensenada' => 'America/Winnipeg' =>
'(GMT-8:00) America/Ensenada (Pacific Standard Time)', '(GMT-6:00) America/Winnipeg (Central Standard Time)',
'America/Los_Angeles' => 'Canada/Central' => '(GMT-
'(GMT-8:00) America/Los_Angeles (Pacific Standard Time)', 6:00) Canada/Central (Central Standard Time)',
'America/Tijuana' => 'Canada/East-Saskatchewan'
'(GMT-8:00) America/Tijuana (Pacific Standard Time)', => '(GMT-6:00) Canada/East-Saskatchewan (Central Standard
'America/Vancouver' => Time)',
'(GMT-8:00) America/Vancouver (Pacific Standard Time)', 'Canada/Saskatchewan' =>
'America/Whitehorse' => '(GMT-6:00) Canada/Saskatchewan (Central Standard Time)',
'(GMT-8:00) America/Whitehorse (Pacific Standard Time)', 'Chile/EasterIsland' =>
'Canada/Pacific' => '(GMT- '(GMT-6:00) Chile/EasterIsland (Easter Is. Time)',
8:00) Canada/Pacific (Pacific Standard Time)', 'Mexico/General' => '(GMT-
'Canada/Yukon' => '(GMT- 6:00) Mexico/General (Central Standard Time)',
8:00) Canada/Yukon (Pacific Standard Time)', 'America/Atikokan' =>
'Mexico/BajaNorte' => '(GMT-5:00) America/Atikokan (Eastern Standard Time)',
'(GMT-8:00) Mexico/BajaNorte (Pacific Standard Time)', 'America/Bogota' => '(GMT-
'America/Boise' => '(GMT- 5:00) America/Bogota (Colombia Time)',
7:00) America/Boise (Mountain Standard Time)', 'America/Cayman' =>
'America/Cambridge_Bay' '(GMT-5:00) America/Cayman (Eastern Standard Time)',
=> '(GMT-7:00) America/Cambridge_Bay (Mountain Standard 'America/Coral_Harbour' =>
Time)', '(GMT-5:00) America/Coral_Harbour (Eastern Standard Time)',
'America/Chihuahua' => 'America/Detroit' => '(GMT-
'(GMT-7:00) America/Chihuahua (Mountain Standard Time)', 5:00) America/Detroit (Eastern Standard Time)',
'America/Dawson_Creek' => 'America/Fort_Wayne' =>
'(GMT-7:00) America/Dawson_Creek (Mountain Standard '(GMT-5:00) America/Fort_Wayne (Eastern Standard Time)',
Time)', 'America/Grand_Turk' =>
'America/Denver' => '(GMT- '(GMT-5:00) America/Grand_Turk (Eastern Standard Time)',
7:00) America/Denver (Mountain Standard Time)', 'America/Guayaquil' =>
'America/Edmonton' => '(GMT-5:00) America/Guayaquil (Ecuador Time)',
'(GMT-7:00) America/Edmonton (Mountain Standard Time)', 'America/Havana' => '(GMT-
'America/Hermosillo' => 5:00) America/Havana (Cuba Standard Time)',
'(GMT-7:00) America/Hermosillo (Mountain Standard Time)', 'America/Indianapolis' =>
'America/Inuvik' => '(GMT- '(GMT-5:00) America/Indianapolis (Eastern Standard Time)',
7:00) America/Inuvik (Mountain Standard Time)', 'America/Iqaluit' => '(GMT-
'America/Mazatlan' => 5:00) America/Iqaluit (Eastern Standard Time)',
'(GMT-7:00) America/Mazatlan (Mountain Standard Time)', 'America/Jamaica' =>
'America/Phoenix' => '(GMT-5:00) America/Jamaica (Eastern Standard Time)',
'(GMT-7:00) America/Phoenix (Mountain Standard Time)', 'America/Lima' => '(GMT-
'America/Shiprock' => 5:00) America/Lima (Peru Time)',
'(GMT-7:00) America/Shiprock (Mountain Standard Time)', 'America/Louisville' =>
'America/Yellowknife' => '(GMT-5:00) America/Louisville (Eastern Standard Time)',
'(GMT-7:00) America/Yellowknife (Mountain Standard Time)', 'America/Montreal' =>
'Canada/Mountain' => '(GMT-5:00) America/Montreal (Eastern Standard Time)',
'(GMT-7:00) Canada/Mountain (Mountain Standard Time)', 'America/Nassau' => '(GMT-
'Mexico/BajaSur' => '(GMT- 5:00) America/Nassau (Eastern Standard Time)',
7:00) Mexico/BajaSur (Mountain Standard Time)', 'America/New_York' =>
'America/Belize' => '(GMT- '(GMT-5:00) America/New_York (Eastern Standard Time)',
6:00) America/Belize (Central Standard Time)', 'America/Nipigon' =>
'America/Cancun' => '(GMT- '(GMT-5:00) America/Nipigon (Eastern Standard Time)',
6:00) America/Cancun (Central Standard Time)', 'America/Panama' =>
'America/Chicago' => '(GMT-5:00) America/Panama (Eastern Standard Time)',
'(GMT-6:00) America/Chicago (Central Standard Time)', 'America/Pangnirtung' =>
'America/Costa_Rica' => '(GMT-5:00) America/Pangnirtung (Eastern Standard Time)',
'(GMT-6:00) America/Costa_Rica (Central Standard Time)', 'America/Port-au-Prince' =>
'America/El_Salvador' => '(GMT-5:00) America/Port-au-Prince (Eastern Standard Time)',
'(GMT-6:00) America/El_Salvador (Central Standard Time)', 'America/Resolute' =>
'America/Guatemala' => '(GMT-5:00) America/Resolute (Eastern Standard Time)',
'(GMT-6:00) America/Guatemala (Central Standard Time)', 'America/Thunder_Bay' =>
'America/Knox_IN' => '(GMT-5:00) America/Thunder_Bay (Eastern Standard Time)',
'(GMT-6:00) America/Knox_IN (Central Standard Time)', 'America/Toronto' =>
'America/Managua' => '(GMT-5:00) America/Toronto (Eastern Standard Time)',
'(GMT-6:00) America/Managua (Central Standard Time)', 'Canada/Eastern' => '(GMT-
'America/Menominee' => 5:00) Canada/Eastern (Eastern Standard Time)',
'(GMT-6:00) America/Menominee (Central Standard Time)', 'America/Caracas' =>
'America/Merida' => '(GMT- '(GMT-4:-30) America/Caracas (Venezuela Time)',
6:00) America/Merida (Central Standard Time)', 'America/Anguilla' =>
'America/Mexico_City' => '(GMT-4:00) America/Anguilla (Atlantic Standard Time)',
'(GMT-6:00) America/Mexico_City (Central Standard Time)', 'America/Antigua' =>
'America/Monterrey' => '(GMT-4:00) America/Antigua (Atlantic Standard Time)',
'(GMT-6:00) America/Monterrey (Central Standard Time)', 'America/Aruba' => '(GMT-
'America/Rainy_River' => 4:00) America/Aruba (Atlantic Standard Time)',
'(GMT-6:00) America/Rainy_River (Central Standard Time)', 'America/Asuncion' =>
'America/Rankin_Inlet' => '(GMT-4:00) America/Asuncion (Paraguay Time)',
'(GMT-6:00) America/Rankin_Inlet (Central Standard Time)', 'America/Barbados' =>
'America/Regina' => '(GMT- '(GMT-4:00) America/Barbados (Atlantic Standard Time)',
6:00) America/Regina (Central Standard Time)',

Library System with SMS Notification for Batangas Christian School 88


'America/Blanc-Sablon' => 'Chile/Continental' =>
'(GMT-4:00) America/Blanc-Sablon (Atlantic Standard Time)', '(GMT-4:00) Chile/Continental (Chile Time)',
'America/Boa_Vista' => 'America/St_Johns' =>
'(GMT-4:00) America/Boa_Vista (Amazon Time)', '(GMT-3:-30) America/St_Johns (Newfoundland Standard
'America/Campo_Grande' => Time)',
'(GMT-4:00) America/Campo_Grande (Amazon Time)', 'Canada/Newfoundland' =>
'America/Cuiaba' => '(GMT- '(GMT-3:-30) Canada/Newfoundland (Newfoundland Standard
4:00) America/Cuiaba (Amazon Time)', Time)',
'America/Curacao' => 'America/Araguaina' =>
'(GMT-4:00) America/Curacao (Atlantic Standard Time)', '(GMT-3:00) America/Araguaina (Brasilia Time)',
'America/Dominica' => 'America/Bahia' => '(GMT-
'(GMT-4:00) America/Dominica (Atlantic Standard Time)', 3:00) America/Bahia (Brasilia Time)',
'America/Eirunepe' => 'America/Belem' => '(GMT-
'(GMT-4:00) America/Eirunepe (Amazon Time)', 3:00) America/Belem (Brasilia Time)',
'America/Glace_Bay' => 'America/Buenos_Aires' =>
'(GMT-4:00) America/Glace_Bay (Atlantic Standard Time)', '(GMT-3:00) America/Buenos_Aires (Argentine Time)',
'America/Goose_Bay' => 'America/Catamarca' =>
'(GMT-4:00) America/Goose_Bay (Atlantic Standard Time)', '(GMT-3:00) America/Catamarca (Argentine Time)',
'America/Grenada' => 'America/Cayenne' =>
'(GMT-4:00) America/Grenada (Atlantic Standard Time)', '(GMT-3:00) America/Cayenne (French Guiana Time)',
'America/Guadeloupe' => 'America/Cordoba' =>
'(GMT-4:00) America/Guadeloupe (Atlantic Standard Time)', '(GMT-3:00) America/Cordoba (Argentine Time)',
'America/Guyana' => 'America/Fortaleza' =>
'(GMT-4:00) America/Guyana (Guyana Time)', '(GMT-3:00) America/Fortaleza (Brasilia Time)',
'America/Halifax' => '(GMT- 'America/Godthab' =>
4:00) America/Halifax (Atlantic Standard Time)', '(GMT-3:00) America/Godthab (Western Greenland Time)',
'America/La_Paz' => '(GMT- 'America/Jujuy' => '(GMT-
4:00) America/La_Paz (Bolivia Time)', 3:00) America/Jujuy (Argentine Time)',
'America/Manaus' => 'America/Maceio' => '(GMT-
'(GMT-4:00) America/Manaus (Amazon Time)', 3:00) America/Maceio (Brasilia Time)',
'America/Marigot' => 'America/Mendoza' =>
'(GMT-4:00) America/Marigot (Atlantic Standard Time)', '(GMT-3:00) America/Mendoza (Argentine Time)',
'America/Martinique' => 'America/Miquelon' =>
'(GMT-4:00) America/Martinique (Atlantic Standard Time)', '(GMT-3:00) America/Miquelon (Pierre & Miquelon Standard
'America/Moncton' => Time)',
'(GMT-4:00) America/Moncton (Atlantic Standard Time)', 'America/Montevideo' =>
'America/Montserrat' => '(GMT-3:00) America/Montevideo (Uruguay Time)',
'(GMT-4:00) America/Montserrat (Atlantic Standard Time)', 'America/Paramaribo' =>
'America/Port_of_Spain' => '(GMT-3:00) America/Paramaribo (Suriname Time)',
'(GMT-4:00) America/Port_of_Spain (Atlantic Standard Time)', 'America/Recife' => '(GMT-
'America/Porto_Acre' => 3:00) America/Recife (Brasilia Time)',
'(GMT-4:00) America/Porto_Acre (Amazon Time)', 'America/Rosario' => '(GMT-
'America/Porto_Velho' => 3:00) America/Rosario (Argentine Time)',
'(GMT-4:00) America/Porto_Velho (Amazon Time)', 'America/Santarem' =>
'America/Puerto_Rico' => '(GMT-3:00) America/Santarem (Brasilia Time)',
'(GMT-4:00) America/Puerto_Rico (Atlantic Standard Time)', 'America/Sao_Paulo' =>
'America/Rio_Branco' => '(GMT-3:00) America/Sao_Paulo (Brasilia Time)',
'(GMT-4:00) America/Rio_Branco (Amazon Time)', 'Antarctica/Rothera' =>
'America/Santiago' => '(GMT-3:00) Antarctica/Rothera (Rothera Time)',
'(GMT-4:00) America/Santiago (Chile Time)', 'Brazil/East' => '(GMT-3:00)
'America/Santo_Domingo' => Brazil/East (Brasilia Time)',
'(GMT-4:00) America/Santo_Domingo (Atlantic Standard Time)', 'America/Noronha' =>
'America/St_Barthelemy' => '(GMT-2:00) America/Noronha (Fernando de Noronha Time)',
'(GMT-4:00) America/St_Barthelemy (Atlantic Standard Time)', 'Atlantic/South_Georgia' =>
'America/St_Kitts' => '(GMT-2:00) Atlantic/South_Georgia (South Georgia Standard
'(GMT-4:00) America/St_Kitts (Atlantic Standard Time)', Time)',
'America/St_Lucia' => 'Brazil/DeNoronha' =>
'(GMT-4:00) America/St_Lucia (Atlantic Standard Time)', '(GMT-2:00) Brazil/DeNoronha (Fernando de Noronha Time)',
'America/St_Thomas' => 'America/Scoresbysund' =>
'(GMT-4:00) America/St_Thomas (Atlantic Standard Time)', '(GMT-1:00) America/Scoresbysund (Eastern Greenland Time)',
'America/St_Vincent' => 'Atlantic/Azores' => '(GMT-
'(GMT-4:00) America/St_Vincent (Atlantic Standard Time)', 1:00) Atlantic/Azores (Azores Time)',
'America/Thule' => '(GMT- 'Atlantic/Cape_Verde' =>
4:00) America/Thule (Atlantic Standard Time)', '(GMT-1:00) Atlantic/Cape_Verde (Cape Verde Time)',
'America/Tortola' => '(GMT- 'Africa/Abidjan' =>
4:00) America/Tortola (Atlantic Standard Time)', '(GMT+0:00) Africa/Abidjan (Greenwich Mean Time)',
'America/Virgin' => '(GMT- 'Africa/Accra' =>
4:00) America/Virgin (Atlantic Standard Time)', '(GMT+0:00) Africa/Accra (Ghana Mean Time)',
'Antarctica/Palmer' => 'Africa/Bamako' =>
'(GMT-4:00) Antarctica/Palmer (Chile Time)', '(GMT+0:00) Africa/Bamako (Greenwich Mean Time)',
'Atlantic/Bermuda' => 'Africa/Banjul' =>
'(GMT-4:00) Atlantic/Bermuda (Atlantic Standard Time)', '(GMT+0:00) Africa/Banjul (Greenwich Mean Time)',
'Atlantic/Stanley' => '(GMT- 'Africa/Bissau' =>
4:00) Atlantic/Stanley (Falkland Is. Time)', '(GMT+0:00) Africa/Bissau (Greenwich Mean Time)',
'Brazil/Acre' => '(GMT-4:00) 'Africa/Casablanca' =>
Brazil/Acre (Amazon Time)', '(GMT+0:00) Africa/Casablanca (Western European Time)',
'Brazil/West' => '(GMT-4:00) 'Africa/Conakry' =>
Brazil/West (Amazon Time)', '(GMT+0:00) Africa/Conakry (Greenwich Mean Time)',
'Canada/Atlantic' => '(GMT- 'Africa/Dakar' =>
4:00) Canada/Atlantic (Atlantic Standard Time)', '(GMT+0:00) Africa/Dakar (Greenwich Mean Time)',

Library System with SMS Notification for Batangas Christian School 89


'Africa/El_Aaiun' => 'Europe/Andorra' =>
'(GMT+0:00) Africa/El_Aaiun (Western European Time)', '(GMT+1:00) Europe/Andorra (Central European Time)',
'Africa/Freetown' => 'Europe/Belgrade' =>
'(GMT+0:00) Africa/Freetown (Greenwich Mean Time)', '(GMT+1:00) Europe/Belgrade (Central European Time)',
'Africa/Lome' => 'Europe/Berlin' =>
'(GMT+0:00) Africa/Lome (Greenwich Mean Time)', '(GMT+1:00) Europe/Berlin (Central European Time)',
'Africa/Monrovia' => 'Europe/Bratislava' =>
'(GMT+0:00) Africa/Monrovia (Greenwich Mean Time)', '(GMT+1:00) Europe/Bratislava (Central European Time)',
'Africa/Nouakchott' => 'Europe/Brussels' =>
'(GMT+0:00) Africa/Nouakchott (Greenwich Mean Time)', '(GMT+1:00) Europe/Brussels (Central European Time)',
'Africa/Ouagadougou' => 'Europe/Budapest' =>
'(GMT+0:00) Africa/Ouagadougou (Greenwich Mean Time)', '(GMT+1:00) Europe/Budapest (Central European Time)',
'Africa/Sao_Tome' => 'Europe/Copenhagen' =>
'(GMT+0:00) Africa/Sao_Tome (Greenwich Mean Time)', '(GMT+1:00) Europe/Copenhagen (Central European Time)',
'Africa/Timbuktu' => 'Europe/Gibraltar' =>
'(GMT+0:00) Africa/Timbuktu (Greenwich Mean Time)', '(GMT+1:00) Europe/Gibraltar (Central European Time)',
'America/Danmarkshavn' => 'Europe/Ljubljana' =>
'(GMT+0:00) America/Danmarkshavn (Greenwich Mean Time)', '(GMT+1:00) Europe/Ljubljana (Central European Time)',
'Atlantic/Canary' => 'Europe/Luxembourg' =>
'(GMT+0:00) Atlantic/Canary (Western European Time)', '(GMT+1:00) Europe/Luxembourg (Central European Time)',
'Atlantic/Faeroe' => 'Europe/Madrid' =>
'(GMT+0:00) Atlantic/Faeroe (Western European Time)', '(GMT+1:00) Europe/Madrid (Central European Time)',
'Atlantic/Faroe' => 'Europe/Malta' =>
'(GMT+0:00) Atlantic/Faroe (Western European Time)', '(GMT+1:00) Europe/Malta (Central European Time)',
'Atlantic/Madeira' => 'Europe/Monaco' =>
'(GMT+0:00) Atlantic/Madeira (Western European Time)', '(GMT+1:00) Europe/Monaco (Central European Time)',
'Atlantic/Reykjavik' => 'Europe/Oslo' =>
'(GMT+0:00) Atlantic/Reykjavik (Greenwich Mean Time)', '(GMT+1:00) Europe/Oslo (Central European Time)',
'Atlantic/St_Helena' => 'Europe/Paris' =>
'(GMT+0:00) Atlantic/St_Helena (Greenwich Mean Time)', '(GMT+1:00) Europe/Paris (Central European Time)',
'Europe/Belfast' => 'Europe/Podgorica' =>
'(GMT+0:00) Europe/Belfast (Greenwich Mean Time)', '(GMT+1:00) Europe/Podgorica (Central European Time)',
'Europe/Dublin' => 'Europe/Prague' =>
'(GMT+0:00) Europe/Dublin (Greenwich Mean Time)', '(GMT+1:00) Europe/Prague (Central European Time)',
'Europe/Guernsey' => 'Europe/Rome' =>
'(GMT+0:00) Europe/Guernsey (Greenwich Mean Time)', '(GMT+1:00) Europe/Rome (Central European Time)',
'Europe/Isle_of_Man' => 'Europe/San_Marino' =>
'(GMT+0:00) Europe/Isle_of_Man (Greenwich Mean Time)', '(GMT+1:00) Europe/San_Marino (Central European Time)',
'Europe/Jersey' => 'Europe/Sarajevo' =>
'(GMT+0:00) Europe/Jersey (Greenwich Mean Time)', '(GMT+1:00) Europe/Sarajevo (Central European Time)',
'Europe/Lisbon' => 'Europe/Skopje' =>
'(GMT+0:00) Europe/Lisbon (Western European Time)', '(GMT+1:00) Europe/Skopje (Central European Time)',
'Europe/London' => 'Europe/Stockholm' =>
'(GMT+0:00) Europe/London (Greenwich Mean Time)', '(GMT+1:00) Europe/Stockholm (Central European Time)',
'Africa/Algiers' => 'Europe/Tirane' =>
'(GMT+1:00) Africa/Algiers (Central European Time)', '(GMT+1:00) Europe/Tirane (Central European Time)',
'Africa/Bangui' => 'Europe/Vaduz' =>
'(GMT+1:00) Africa/Bangui (Western African Time)', '(GMT+1:00) Europe/Vaduz (Central European Time)',
'Africa/Brazzaville' => 'Europe/Vatican' =>
'(GMT+1:00) Africa/Brazzaville (Western African Time)', '(GMT+1:00) Europe/Vatican (Central European Time)',
'Africa/Ceuta' => 'Europe/Vienna' =>
'(GMT+1:00) Africa/Ceuta (Central European Time)', '(GMT+1:00) Europe/Vienna (Central European Time)',
'Africa/Douala' => 'Europe/Warsaw' =>
'(GMT+1:00) Africa/Douala (Western African Time)', '(GMT+1:00) Europe/Warsaw (Central European Time)',
'Africa/Kinshasa' => 'Europe/Zagreb' =>
'(GMT+1:00) Africa/Kinshasa (Western African Time)', '(GMT+1:00) Europe/Zagreb (Central European Time)',
'Africa/Lagos' => 'Europe/Zurich' =>
'(GMT+1:00) Africa/Lagos (Western African Time)', '(GMT+1:00) Europe/Zurich (Central European Time)',
'Africa/Libreville' => 'Africa/Blantyre' =>
'(GMT+1:00) Africa/Libreville (Western African Time)', '(GMT+2:00) Africa/Blantyre (Central African Time)',
'Africa/Luanda' => 'Africa/Bujumbura' =>
'(GMT+1:00) Africa/Luanda (Western African Time)', '(GMT+2:00) Africa/Bujumbura (Central African Time)',
'Africa/Malabo' => 'Africa/Cairo' =>
'(GMT+1:00) Africa/Malabo (Western African Time)', '(GMT+2:00) Africa/Cairo (Eastern European Time)',
'Africa/Ndjamena' => 'Africa/Gaborone' =>
'(GMT+1:00) Africa/Ndjamena (Western African Time)', '(GMT+2:00) Africa/Gaborone (Central African Time)',
'Africa/Niamey' => 'Africa/Harare' =>
'(GMT+1:00) Africa/Niamey (Western African Time)', '(GMT+2:00) Africa/Harare (Central African Time)',
'Africa/Porto-Novo' => 'Africa/Johannesburg' =>
'(GMT+1:00) Africa/Porto-Novo (Western African Time)', '(GMT+2:00) Africa/Johannesburg (South Africa Standard
'Africa/Tunis' => Time)',
'(GMT+1:00) Africa/Tunis (Central European Time)', 'Africa/Kigali' =>
'Africa/Windhoek' => '(GMT+2:00) Africa/Kigali (Central African Time)',
'(GMT+1:00) Africa/Windhoek (Western African Time)', 'Africa/Lubumbashi' =>
'Arctic/Longyearbyen' => '(GMT+2:00) Africa/Lubumbashi (Central African Time)',
'(GMT+1:00) Arctic/Longyearbyen (Central European Time)', 'Africa/Lusaka' =>
'Atlantic/Jan_Mayen' => '(GMT+2:00) Africa/Lusaka (Central African Time)',
'(GMT+1:00) Atlantic/Jan_Mayen (Central European Time)', 'Africa/Maputo' =>
'Europe/Amsterdam' => '(GMT+2:00) Africa/Maputo (Central African Time)',
'(GMT+1:00) Europe/Amsterdam (Central European Time)',

Library System with SMS Notification for Batangas Christian School 90


'Africa/Maseru' => 'Asia/Baghdad' =>
'(GMT+2:00) Africa/Maseru (South Africa Standard Time)', '(GMT+3:00) Asia/Baghdad (Arabia Standard Time)',
'Africa/Mbabane' => 'Asia/Bahrain' =>
'(GMT+2:00) Africa/Mbabane (South Africa Standard Time)', '(GMT+3:00) Asia/Bahrain (Arabia Standard Time)',
'Africa/Tripoli' => 'Asia/Kuwait' =>
'(GMT+2:00) Africa/Tripoli (Eastern European Time)', '(GMT+3:00) Asia/Kuwait (Arabia Standard Time)',
'Asia/Amman' => 'Asia/Qatar' => '(GMT+3:00)
'(GMT+2:00) Asia/Amman (Eastern European Time)', Asia/Qatar (Arabia Standard Time)',
'Asia/Beirut' => '(GMT+2:00) 'Europe/Moscow' =>
Asia/Beirut (Eastern European Time)', '(GMT+3:00) Europe/Moscow (Moscow Standard Time)',
'Asia/Damascus' => 'Europe/Volgograd' =>
'(GMT+2:00) Asia/Damascus (Eastern European Time)', '(GMT+3:00) Europe/Volgograd (Volgograd Time)',
'Asia/Gaza' => '(GMT+2:00) 'Indian/Antananarivo' =>
Asia/Gaza (Eastern European Time)', '(GMT+3:00) Indian/Antananarivo (Eastern African Time)',
'Asia/Istanbul' => 'Indian/Comoro' =>
'(GMT+2:00) Asia/Istanbul (Eastern European Time)', '(GMT+3:00) Indian/Comoro (Eastern African Time)',
'Asia/Jerusalem' => 'Indian/Mayotte' =>
'(GMT+2:00) Asia/Jerusalem (Israel Standard Time)', '(GMT+3:00) Indian/Mayotte (Eastern African Time)',
'Asia/Nicosia' => 'Asia/Tehran' =>
'(GMT+2:00) Asia/Nicosia (Eastern European Time)', '(GMT+3:30) Asia/Tehran (Iran Standard Time)',
'Asia/Tel_Aviv' => 'Asia/Baku' => '(GMT+4:00)
'(GMT+2:00) Asia/Tel_Aviv (Israel Standard Time)', Asia/Baku (Azerbaijan Time)',
'Europe/Athens' => 'Asia/Dubai' => '(GMT+4:00)
'(GMT+2:00) Europe/Athens (Eastern European Time)', Asia/Dubai (Gulf Standard Time)',
'Europe/Bucharest' => 'Asia/Muscat' =>
'(GMT+2:00) Europe/Bucharest (Eastern European Time)', '(GMT+4:00) Asia/Muscat (Gulf Standard Time)',
'Europe/Chisinau' => 'Asia/Tbilisi' => '(GMT+4:00)
'(GMT+2:00) Europe/Chisinau (Eastern European Time)', Asia/Tbilisi (Georgia Time)',
'Europe/Helsinki' => 'Asia/Yerevan' =>
'(GMT+2:00) Europe/Helsinki (Eastern European Time)', '(GMT+4:00) Asia/Yerevan (Armenia Time)',
'Europe/Istanbul' => 'Europe/Samara' =>
'(GMT+2:00) Europe/Istanbul (Eastern European Time)', '(GMT+4:00) Europe/Samara (Samara Time)',
'Europe/Kaliningrad' => 'Indian/Mahe' =>
'(GMT+2:00) Europe/Kaliningrad (Eastern European Time)', '(GMT+4:00) Indian/Mahe (Seychelles Time)',
'Europe/Kiev' => 'Indian/Mauritius' =>
'(GMT+2:00) Europe/Kiev (Eastern European Time)', '(GMT+4:00) Indian/Mauritius (Mauritius Time)',
'Europe/Mariehamn' => 'Indian/Reunion' =>
'(GMT+2:00) Europe/Mariehamn (Eastern European Time)', '(GMT+4:00) Indian/Reunion (Reunion Time)',
'Europe/Minsk' => 'Asia/Kabul' => '(GMT+4:30)
'(GMT+2:00) Europe/Minsk (Eastern European Time)', Asia/Kabul (Afghanistan Time)',
'Europe/Nicosia' => 'Asia/Aqtau' => '(GMT+5:00)
'(GMT+2:00) Europe/Nicosia (Eastern European Time)', Asia/Aqtau (Aqtau Time)',
'Europe/Riga' => 'Asia/Aqtobe' =>
'(GMT+2:00) Europe/Riga (Eastern European Time)', '(GMT+5:00) Asia/Aqtobe (Aqtobe Time)',
'Europe/Simferopol' => 'Asia/Ashgabat' =>
'(GMT+2:00) Europe/Simferopol (Eastern European Time)', '(GMT+5:00) Asia/Ashgabat (Turkmenistan Time)',
'Europe/Sofia' => 'Asia/Ashkhabad' =>
'(GMT+2:00) Europe/Sofia (Eastern European Time)', '(GMT+5:00) Asia/Ashkhabad (Turkmenistan Time)',
'Europe/Tallinn' => 'Asia/Dushanbe' =>
'(GMT+2:00) Europe/Tallinn (Eastern European Time)', '(GMT+5:00) Asia/Dushanbe (Tajikistan Time)',
'Europe/Tiraspol' => 'Asia/Karachi' =>
'(GMT+2:00) Europe/Tiraspol (Eastern European Time)', '(GMT+5:00) Asia/Karachi (Pakistan Time)',
'Europe/Uzhgorod' => 'Asia/Oral' => '(GMT+5:00)
'(GMT+2:00) Europe/Uzhgorod (Eastern European Time)', Asia/Oral (Oral Time)',
'Europe/Vilnius' => 'Asia/Samarkand' =>
'(GMT+2:00) Europe/Vilnius (Eastern European Time)', '(GMT+5:00) Asia/Samarkand (Uzbekistan Time)',
'Europe/Zaporozhye' => 'Asia/Tashkent' =>
'(GMT+2:00) Europe/Zaporozhye (Eastern European Time)', '(GMT+5:00) Asia/Tashkent (Uzbekistan Time)',
'Africa/Addis_Ababa' => 'Asia/Yekaterinburg' =>
'(GMT+3:00) Africa/Addis_Ababa (Eastern African Time)', '(GMT+5:00) Asia/Yekaterinburg (Yekaterinburg Time)',
'Africa/Asmara' => 'Indian/Kerguelen' =>
'(GMT+3:00) Africa/Asmara (Eastern African Time)', '(GMT+5:00) Indian/Kerguelen (French Southern & Antarctic
'Africa/Asmera' => Lands Time)',
'(GMT+3:00) Africa/Asmera (Eastern African Time)', 'Indian/Maldives' =>
'Africa/Dar_es_Salaam' => '(GMT+5:00) Indian/Maldives (Maldives Time)',
'(GMT+3:00) Africa/Dar_es_Salaam (Eastern African Time)', 'Asia/Calcutta' =>
'Africa/Djibouti' => '(GMT+5:30) Asia/Calcutta (India Standard Time)',
'(GMT+3:00) Africa/Djibouti (Eastern African Time)', 'Asia/Colombo' =>
'Africa/Kampala' => '(GMT+5:30) Asia/Colombo (India Standard Time)',
'(GMT+3:00) Africa/Kampala (Eastern African Time)', 'Asia/Kolkata' =>
'Africa/Khartoum' => '(GMT+5:30) Asia/Kolkata (India Standard Time)',
'(GMT+3:00) Africa/Khartoum (Eastern African Time)', 'Asia/Katmandu' =>
'Africa/Mogadishu' => '(GMT+5:45) Asia/Katmandu (Nepal Time)',
'(GMT+3:00) Africa/Mogadishu (Eastern African Time)', 'Antarctica/Mawson' =>
'Africa/Nairobi' => '(GMT+6:00) Antarctica/Mawson (Mawson Time)',
'(GMT+3:00) Africa/Nairobi (Eastern African Time)', 'Antarctica/Vostok' =>
'Antarctica/Syowa' => '(GMT+6:00) Antarctica/Vostok (Vostok Time)',
'(GMT+3:00) Antarctica/Syowa (Syowa Time)', 'Asia/Almaty' =>
'Asia/Aden' => '(GMT+3:00) '(GMT+6:00) Asia/Almaty (Alma-Ata Time)',
Asia/Aden (Arabia Standard Time)',

Library System with SMS Notification for Batangas Christian School 91


'Asia/Bishkek' => 'Asia/Taipei' => '(GMT+8:00)
'(GMT+6:00) Asia/Bishkek (Kirgizstan Time)', Asia/Taipei (China Standard Time)',
'Asia/Dacca' => '(GMT+6:00) 'Asia/Ujung_Pandang' =>
Asia/Dacca (Bangladesh Time)', '(GMT+8:00) Asia/Ujung_Pandang (Central Indonesia Time)',
'Asia/Dhaka' => 'Asia/Ulaanbaatar' =>
'(GMT+6:00) Asia/Dhaka (Bangladesh Time)', '(GMT+8:00) Asia/Ulaanbaatar (Ulaanbaatar Time)',
'Asia/Novosibirsk' => 'Asia/Ulan_Bator' =>
'(GMT+6:00) Asia/Novosibirsk (Novosibirsk Time)', '(GMT+8:00) Asia/Ulan_Bator (Ulaanbaatar Time)',
'Asia/Omsk' => '(GMT+6:00) 'Asia/Urumqi' =>
Asia/Omsk (Omsk Time)', '(GMT+8:00) Asia/Urumqi (China Standard Time)',
'Asia/Qyzylorda' => 'Australia/Perth' =>
'(GMT+6:00) Asia/Qyzylorda (Qyzylorda Time)', '(GMT+8:00) Australia/Perth (Western Standard Time
'Asia/Thimbu' => (Australia))',
'(GMT+6:00) Asia/Thimbu (Bhutan Time)', 'Australia/West' =>
'Asia/Thimphu' => '(GMT+8:00) Australia/West (Western Standard Time
'(GMT+6:00) Asia/Thimphu (Bhutan Time)', (Australia))',
'Indian/Chagos' => 'Australia/Eucla' =>
'(GMT+6:00) Indian/Chagos (Indian Ocean Territory Time)', '(GMT+8:45) Australia/Eucla (Central Western Standard Time
'Asia/Rangoon' => (Australia))',
'(GMT+6:30) Asia/Rangoon (Myanmar Time)', 'Asia/Dili' => '(GMT+9:00)
'Indian/Cocos' => Asia/Dili (Timor-Leste Time)',
'(GMT+6:30) Indian/Cocos (Cocos Islands Time)', 'Asia/Jayapura' =>
'Antarctica/Davis' => '(GMT+9:00) Asia/Jayapura (East Indonesia Time)',
'(GMT+7:00) Antarctica/Davis (Davis Time)', 'Asia/Pyongyang' =>
'Asia/Bangkok' => '(GMT+9:00) Asia/Pyongyang (Korea Standard Time)',
'(GMT+7:00) Asia/Bangkok (Indochina Time)', 'Asia/Seoul' => '(GMT+9:00)
'Asia/Ho_Chi_Minh' => Asia/Seoul (Korea Standard Time)',
'(GMT+7:00) Asia/Ho_Chi_Minh (Indochina Time)', 'Asia/Tokyo' => '(GMT+9:00)
'Asia/Hovd' => '(GMT+7:00) Asia/Tokyo (Japan Standard Time)',
Asia/Hovd (Hovd Time)', 'Asia/Yakutsk' =>
'Asia/Jakarta' => '(GMT+9:00) Asia/Yakutsk (Yakutsk Time)',
'(GMT+7:00) Asia/Jakarta (West Indonesia Time)', 'Australia/Adelaide' =>
'Asia/Krasnoyarsk' => '(GMT+9:30) Australia/Adelaide (Central Standard Time (South
'(GMT+7:00) Asia/Krasnoyarsk (Krasnoyarsk Time)', Australia))',
'Asia/Phnom_Penh' => 'Australia/Broken_Hill' =>
'(GMT+7:00) Asia/Phnom_Penh (Indochina Time)', '(GMT+9:30) Australia/Broken_Hill (Central Standard Time
'Asia/Pontianak' => (South Australia/New South Wales))',
'(GMT+7:00) Asia/Pontianak (West Indonesia Time)', 'Australia/Darwin' =>
'Asia/Saigon' => '(GMT+9:30) Australia/Darwin (Central Standard Time
'(GMT+7:00) Asia/Saigon (Indochina Time)', (Northern Territory))',
'Asia/Vientiane' => 'Australia/North' =>
'(GMT+7:00) Asia/Vientiane (Indochina Time)', '(GMT+9:30) Australia/North (Central Standard Time (Northern
'Indian/Christmas' => Territory))',
'(GMT+7:00) Indian/Christmas (Christmas Island Time)', 'Australia/South' =>
'Antarctica/Casey' => '(GMT+9:30) Australia/South (Central Standard Time (South
'(GMT+8:00) Antarctica/Casey (Western Standard Time Australia))',
(Australia))', 'Australia/Yancowinna' =>
'Asia/Brunei' => '(GMT+9:30) Australia/Yancowinna (Central Standard Time
'(GMT+8:00) Asia/Brunei (Brunei Time)', (South Australia/New South Wales))',
'Asia/Choibalsan' => 'Antarctica/DumontDUrville'
'(GMT+8:00) Asia/Choibalsan (Choibalsan Time)', => '(GMT+10:00) Antarctica/DumontDUrville (Dumont-
'Asia/Chongqing' => d\'Urville Time)',
'(GMT+8:00) Asia/Chongqing (China Standard Time)', 'Asia/Sakhalin' =>
'Asia/Chungking' => '(GMT+10:00) Asia/Sakhalin (Sakhalin Time)',
'(GMT+8:00) Asia/Chungking (China Standard Time)', 'Asia/Vladivostok' =>
'Asia/Harbin' => '(GMT+10:00) Asia/Vladivostok (Vladivostok Time)',
'(GMT+8:00) Asia/Harbin (China Standard Time)', 'Australia/ACT' =>
'Asia/Hong_Kong' => '(GMT+10:00) Australia/ACT (Eastern Standard Time (New
'(GMT+8:00) Asia/Hong_Kong (Hong Kong Time)', South Wales))',
'Asia/Irkutsk' => 'Australia/Brisbane' =>
'(GMT+8:00) Asia/Irkutsk (Irkutsk Time)', '(GMT+10:00) Australia/Brisbane (Eastern Standard Time
'Asia/Kashgar' => (Queensland))',
'(GMT+8:00) Asia/Kashgar (China Standard Time)', 'Australia/Canberra' =>
'Asia/Kuala_Lumpur' => '(GMT+10:00) Australia/Canberra (Eastern Standard Time (New
'(GMT+8:00) Asia/Kuala_Lumpur (Malaysia Time)', South Wales))',
'Asia/Kuching' => 'Australia/Currie' =>
'(GMT+8:00) Asia/Kuching (Malaysia Time)', '(GMT+10:00) Australia/Currie (Eastern Standard Time (New
'Asia/Macao' => South Wales))',
'(GMT+8:00) Asia/Macao (China Standard Time)', 'Australia/Hobart' =>
'Asia/Macau' => '(GMT+10:00) Australia/Hobart (Eastern Standard Time
'(GMT+8:00) Asia/Macau (China Standard Time)', (Tasmania))',
'Asia/Makassar' => 'Australia/Lindeman' =>
'(GMT+8:00) Asia/Makassar (Central Indonesia Time)', '(GMT+10:00) Australia/Lindeman (Eastern Standard Time
'Asia/Manila' => (Queensland))',
'(GMT+8:00) Asia/Manila (Philippines Time)', 'Australia/Melbourne' =>
'Asia/Shanghai' => '(GMT+10:00) Australia/Melbourne (Eastern Standard Time
'(GMT+8:00) Asia/Shanghai (China Standard Time)', (Victoria))',
'Asia/Singapore' => 'Australia/NSW' =>
'(GMT+8:00) Asia/Singapore (Singapore Time)', '(GMT+10:00) Australia/NSW (Eastern Standard Time (New
South Wales))',

Library System with SMS Notification for Batangas Christian School 92


'Australia/Queensland' => {
'(GMT+10:00) Australia/Queensland (Eastern Standard Time $output .= '<option value="'.
(Queensland))', $row["category_name"].'">'.$row["category_name"].'</option>'
'Australia/Sydney' => ;
'(GMT+10:00) Australia/Sydney (Eastern Standard Time (New }
South Wales))',
'Australia/Tasmania' => return $output;
'(GMT+10:00) Australia/Tasmania (Eastern Standard Time }
(Tasmania))',
'Australia/Victoria' => function fill_location_rack($connect)
'(GMT+10:00) Australia/Victoria (Eastern Standard Time {
(Victoria))', $query = "
'Australia/LHI' => SELECT location_rack_name FROM
'(GMT+10:30) Australia/LHI (Lord Howe Standard Time)', lms_location_rack
'Australia/Lord_Howe' => WHERE location_rack_status = 'Enable'
'(GMT+10:30) Australia/Lord_Howe (Lord Howe Standard ORDER BY location_rack_name ASC
Time)', ";
'Asia/Magadan' =>
'(GMT+11:00) Asia/Magadan (Magadan Time)', $result = $connect->query($query);
'Antarctica/McMurdo' =>
'(GMT+12:00) Antarctica/McMurdo (New Zealand Standard $output = '<option value="">Select Location
Time)', Rack</option>';
'Antarctica/South_Pole' =>
'(GMT+12:00) Antarctica/South_Pole (New Zealand Standard foreach($result as $row)
Time)', {
'Asia/Anadyr' => $output .= '<option value="'.
'(GMT+12:00) Asia/Anadyr (Anadyr Time)', $row["location_rack_name"].'">'.
'Asia/Kamchatka' => $row["location_rack_name"].'</option>';
'(GMT+12:00) Asia/Kamchatka (Petropavlovsk-Kamchatski }
Time)'
); return $output;
}
$html = '<option value="">Select
Timezone</option>'; function Count_total_reserve_book_number($connect)
foreach($timezones as $keys => $values) {
{ $total = 0;
$html .= '<option value="'.
$keys.'">'.$values.'</option>'; $query = "SELECT COUNT(issue_book_id) AS
} Total FROM lms_issue_book
WHERE book_issue_status = 'Reserve'
";
return $html;
} $result = $connect->query($query);
function fill_author($connect) foreach($result as $row)
{ {
$query = " $total = $row["Total"];
SELECT author_name FROM lms_author }
WHERE author_status = 'Enable'
ORDER BY author_name ASC return $total;
"; }
$result = $connect->query($query); function Count_total_issue_book_number($connect)
{
$output = '<option value="">Select $total = 0;
Author</option>';
$query = "SELECT COUNT(issue_book_id) AS
foreach($result as $row) Total FROM lms_issue_book
{ WHERE book_issue_status = 'Issue'
$output .= '<option value="'. ";
$row["author_name"].'">'.$row["author_name"].'</option>';
} $result = $connect->query($query);
return $output; foreach($result as $row)
} {
$total = $row["Total"];
function fill_category($connect) }
{
$query = " return $total;
SELECT category_name FROM lms_category }
WHERE category_status = 'Enable'
ORDER BY category_name ASC function Count_total_returned_book_number($connect)
"; {
$total = 0;
$result = $connect->query($query);
$query = "
$output = '<option value="">Select SELECT COUNT(issue_book_id) AS Total FROM
Category</option>'; lms_issue_book
WHERE book_issue_status = 'Return'
foreach($result as $row) ";

Library System with SMS Notification for Batangas Christian School 93


$result = $connect->query($query); $result = $connect->query($query);

foreach($result as $row) foreach($result as $row)


{ {
$total = $row["Total"]; $total = $row["Total"];
} }

return $total; return $total;


} }

function Count_total_not_returned_book_number($connect) function Count_total_category_number($connect)


{ {
$total = 0; $total = 0;

$query = " $query = "


SELECT COUNT(issue_book_id) AS Total FROM SELECT COUNT(category_id) AS Total FROM
lms_issue_book lms_category
WHERE book_issue_status = 'Not Return' WHERE category_status = 'Enable'
"; ";

$result = $connect->query($query); $result = $connect->query($query);

foreach($result as $row) foreach($result as $row)


{ {
$total = $row["Total"]; $total = $row["Total"];
} }
return $total;
return $total; }
}
function Count_total_location_rack_number($connect)
function Count_total_fines_received($connect) {
{ $total = 0;
$total = 0;
$query = "
$query = " SELECT COUNT(location_rack_id) AS Total FROM
SELECT SUM(book_fines) AS Total FROM lms_location_rack
lms_issue_book WHERE location_rack_status = 'Enable'
WHERE book_issue_status = 'Return' ";
";
$result = $connect->query($query);
$result = $connect->query($query);
foreach($result as $row)
foreach($result as $row) {
{ $total = $row["Total"];
$total = $row["Total"]; }
}
return $total;
return $total; }
}
?>
function Count_total_book_number($connect)
{ header.php
$total = 0;
<?php
$query = "
SELECT COUNT(book_id) AS Total FROM //header.php
lms_book
WHERE book_status = 'Enable' ?>
";
<!doctype html>
$result = $connect->query($query); <html lang="en">
<head>
foreach($result as $row) <meta charset="utf-8">
{ <meta name="viewport" content="width=device-width,
$total = $row["Total"]; initial-scale=1">
} <meta name="description" content="Welcome! Browse,
borrow and enjoy titles from a school library by Batangas
return $total; Christian School.">
} <meta name="author" content="">
<meta name="generator" content="">
function Count_total_author_number($connect) <title>BCS Library System</title>
{ <link rel="canonical" href="">
$total = 0; <!-- Bootstrap core CSS -->
<link href="<?php echo base_url(); ?>asset/css/simple-
$query = " datatables-style.css" rel="stylesheet" />
SELECT COUNT(author_id) AS Total FROM <link href="<?php echo base_url(); ?>asset/css/styles.css"
lms_author rel="stylesheet" />
WHERE author_status = 'Enable' <script src="<?php echo base_url(); ?>asset/js/font-
"; awesome-5-all.min.js" crossorigin="anonymous"></script>

Library System with SMS Notification for Batangas Christian School 94


<link href="<?php echo base_url(); ?>asset/css/font- <a class="nav-link"
awesome.min.css" rel="stylesheet" /> href="location_rack.php"><i class="fas fa-map-marker-alt me-
<!-- Favicons --> 1"></i>Location Rack</a>
<link rel="apple-touch-icon" href="" sizes="180x180"> <a class="nav-link" href="book.php"><i
<link rel="icon" href="image/logo.png" sizes="32x32" class="fas fa-book-open me-1"></i>Book</a>
type="image/png"> <a class="nav-link" href="user.php"><i
<link rel="icon" href="image/logo.png" sizes="16x16" class="fas fa-user me-1"></i>User</a>
type="image/png"> <a class="nav-link" href="issue_book.php"><i
<link rel="manifest" href=""> class="fas fa-book me-1"></i>Issue Book</a>
<link rel="mask-icon" href="" color="#7952b3"> <a class="nav-link" href="audit_trail.php"><i
<link rel="icon" href=""> class="fas fa-table me-1"></i>Audit Trail</a>
<meta name="theme-color" content="#7952b3"> <a class="nav-link" href="sms.php"><i
<style> class="fas fa-envelope me-1"></i>SMS Notification</a>
.bd-placeholder-img { <a class="nav-link" href="sms_return.php"><i
font-size: 1.125rem; class="fas fa-receipt me-1"></i>SMS Receipt</a>
text-anchor: middle; <a class="nav-link"
-webkit-user-select: none; href="logout.php">Logout</a>
-moz-user-select: none;
user-select: none; </div>
} </div>
@media (min-width: 768px) { <div class="sb-sidenav-footer">
.bd-placeholder-img-lg {
font-size: 3.5rem; </div>
} </nav>
} </div>
</style> <div id="layoutSidenav_content">
</head> <main>

<?php
<?php
if(is_admin_login()) }
{ else
{
?>
<body class="sb-nav-fixed"> ?>

<nav class="sb-topnav navbar navbar-expand navbar-dark <body>


bg-dark"> <main>
<!-- Navbar Brand--> <div class="container py-4">
<a class="navbar-brand ps-3" href="index.php">Library <header class="pb-3 mb-4
System</a> border-bottom">
<!-- Sidebar Toggle--> <div class="row">
<button class="btn btn-link btn-sm order-1 order-lg-0 me- <div class="col-
4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa- md-6">
bars"></i></button> <a href="index.php" class="d-flex align-items-
<form class="d-none d-md-inline-block form-inline ms- center text-dark text-decoration-none">
auto me-0 me-md-3 my-2 my-md-0"> <img src="image/logo.png" width="50"
height="50" />
</form> <span class="fs-4">Batangas Christian School
<!-- Navbar--> Library System</span>
<ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4"> </a>
<li class="nav-item dropdown"> </div>
<a class="nav-link dropdown-toggle" <div class="col-md-6">
id="navbarDropdown" href="#" role="button" data-bs- <a class="btn btn-outline-primary float-end"
toggle="dropdown" aria-expanded="false"><i class="fas fa-user href="user_login.php" >Log in</a>
fa-fw"></i></a> <a class="btn btn-outline-secondary float-end"
<ul class="dropdown-menu dropdown-menu-end" href="search_book_home.php" >Books</a>
aria-labelledby="navbarDropdown"> </div>
<li><a class="dropdown-item" <div class="col-md-6">
href="profile.php">Profile</a></li> <?php
<li><a class="dropdown-item" if(is_user_login())
href="setting.php">Setting</a></li> {
<li><a class="dropdown-item" ?>
href="logout.php">Logout</a></li> <ul class="list-inline-item m-et-4 float-end">
</ul> <li class="list-inline-item"><a
</li> href="issue_book_details.php">Issue Book</a></li>
</ul> <li class="list-inline-item"><a
</nav> href="search_book.php">Search Book</a></li>
<li class="list-inline-item"><a
<div id="layoutSidenav"> href="profile.php">Profile</a></li>
<div id="layoutSidenav_nav"> <li class="list-inline-item"><a
<nav class="sb-sidenav accordion sb-sidenav-dark" href="logout.php">Logout</a></li>
id="sidenavAccordion"> </ul>
<div class="sb-sidenav-menu"> <?php
<div class="nav"> }
<a class="nav-link" href="category.php"><i
class="fas fa-file me-1"></i>Category</a> ?>
<a class="nav-link" href="author.php"><i </div>
class="fas fa-at me-1"></i>Author/Publisher</a> </div>
</header>

Library System with SMS Notification for Batangas Christian School 95


<?php
} </form>
?> <!-- Navbar-->
<ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
<li class="nav-item dropdown">
header_user.php <a class="nav-link dropdown-toggle"
id="navbarDropdown" href="#" role="button" data-bs-
<?php toggle="dropdown" aria-expanded="false"><i class="fas fa-user
fa-fw"></i></a>
//header_user.php <ul class="dropdown-menu dropdown-menu-end"
aria-labelledby="navbarDropdown">
?> <li><a class="dropdown-item"
href="profile.php">Profile</a></li>
<!doctype html> <li><a class="dropdown-item"
<html lang="en"> href="setting.php">Setting</a></li>
<head> <li><a class="dropdown-item"
<meta charset="utf-8"> href="logout.php">Logout</a></li>
<meta name="viewport" content="width=device-width, </ul>
initial-scale=1"> </li>
<meta name="description" content="Welcome! Browse, </ul>
borrow and enjoy titles from a school library by Batangas </nav>
Christian School.">
<meta name="author" content=""> <div id="layoutSidenav">
<meta name="generator" content=""> <div id="layoutSidenav_nav">
<title>BCS Library System</title> <nav class="sb-sidenav accordion sb-sidenav-dark"
<link rel="canonical" href=""> id="sidenavAccordion">
<!-- Bootstrap core CSS --> <div class="sb-sidenav-menu">
<link href="<?php echo base_url(); ?>asset/css/simple- <div class="nav">
datatables-style.css" rel="stylesheet" /> <a class="nav-link"
<link href="<?php echo base_url(); ?>asset/css/styles.css" href="category.php">Category</a>
rel="stylesheet" /> <a class="nav-link"
<script src="<?php echo base_url(); ?>asset/js/font- href="author.php">Author</a>
awesome-5-all.min.js" crossorigin="anonymous"></script> <a class="nav-link"
<link href="<?php echo base_url(); ?>asset/css/font- href="location_rack.php">Location Rack</a>
awesome.min.css" rel="stylesheet" /> <a class="nav-link" href="book.php">Book</a>
<!-- Favicons --> <a class="nav-link" href="user.php">User</a>
<link rel="apple-touch-icon" href="" sizes="180x180"> <a class="nav-link"
<link rel="icon" href="image/logo.png" sizes="32x32" href="issue_book.php">Issue Book</a>
type="image/png"> <a class="nav-link"
<link rel="icon" href="image/logo.png" sizes="16x16" href="logout.php">Logout</a>
type="image/png">
<link rel="manifest" href=""> </div>
<link rel="mask-icon" href="" color="#7952b3"> </div>
<link rel="icon" href=""> <div class="sb-sidenav-footer">
<meta name="theme-color" content="#7952b3">
<style> </div>
.bd-placeholder-img { </nav>
font-size: 1.125rem; </div>
text-anchor: middle; <div id="layoutSidenav_content">
-webkit-user-select: none; <main>
-moz-user-select: none;
user-select: none;
} <?php
@media (min-width: 768px) { }
.bd-placeholder-img-lg { else
font-size: 3.5rem; {
}
} ?>
</style>
</head> <body>
<?php <main>
if(is_admin_login()) <div class="container py-4">
{
<header class="pb-3 mb-4
?> border-bottom">
<body class="sb-nav-fixed"> <div class="row">
<div class="col-
<nav class="sb-topnav navbar navbar-expand navbar-dark md-6">
bg-dark"> <a href="index.php" class="d-flex align-items-
<!-- Navbar Brand--> center text-dark text-decoration-none">
<a class="navbar-brand ps-3" href="index.php">Library <img src="image/logo.png" width="50"
System</a> height="50" />
<!-- Sidebar Toggle--> <span class="fs-4">Batangas Christian School
<button class="btn btn-link btn-sm order-1 order-lg-0 me- Library System</span>
4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa- </a>
bars"></i></button> </div>
<form class="d-none d-md-inline-block form-inline ms- <div class="col-md-6">
auto me-0 me-md-3 my-2 my-md-0"> <?php

Library System with SMS Notification for Batangas Christian School 96


if(is_user_login()) <p class="text-justify">If you frequently forget to
{ return the books you've borrowed, there will be a reminder that
?> will be sent to you.</p>
<ul class="list-inline-item m-et-4 float-end"> </center>
<li class="list-inline-item"><a </div>
href="issue_book_details.php">Issue Book</a></li> </div>
<li class="list-inline-item"><a </div>
href="search_book.php">Search Book</a></li> </section>
<li class="list-inline-item"><a <section>
href="profile.php">Profile</a></li> <img src="image/in-homepage-banner.jpg" class="img-
<li class="list-inline-item"><a fluid"/>
href="logout.php">Logout</a></li> </section>
</ul>
<?php <?php
}
include 'footer.php';
?>
</div> ?>
</div> issue_book_details.php

</header> <?php
<?php
} //issue_book_details.php
?>
include 'database_connection.php';
index.php
include 'function.php';
<?php
if(!is_user_login())
include 'database_connection.php'; {
include 'function.php'; header('location:user_login.php');
}
if(is_user_login())
{ $query = "
header('location:issue_book_details.php'); SELECT * FROM lms_issue_book
} INNER JOIN lms_book
ON lms_book.book_isbn_number =
include 'header.php'; lms_issue_book.book_id
WHERE lms_issue_book.user_id = '".
?> $_SESSION['user_id']."'
ORDER BY lms_issue_book.issue_book_id DESC
<section> ";
<img src="image/home-bg.jpg" class="img-fluid"/>
</section> $statement = $connect->prepare($query);
<section>
<div class="container"> $statement->execute();
<div class="row">
<div class="col-12"> include 'header_user.php';
<center>
<h2>Our Features</h2> ?>
<p><b>Our 3 Primary Features</b></p> <div class="container-fluid py-4" style="min-height: 700px;">
</center> <center>
</div> <img width="100px" src="image/books1.png"/>
</div> <h1>Your Issued Book Detail</h1>
<div class="row"> </center>
<div class="col-md-4"> <div class="card mb-4">
<center> <div class="card-header">
<img width="150" src="image/digital- <div class="row">
inventory.png"/> <div class="col
<h4>Digital Book Inventory</h4> col-md-6">
<p class="text-justify">A digital inventory that shows <i
every book that is available in the library, it also show how many class="fas fa-table me-1"></i> Your Issued Book Detail
of that books is available.</p> </div>
</center> <div class="col
</div> col-md-6" align="right">
<div class="col-md-4"> </div>
<center> </div>
<img width="150" src="image/search-online.png"/> </div>
<h4>Search Books</h4> <div class="card-body">
<p class="text-justify">Search any books that is <table id="datatablesSimple">
available from the library. Search via authors, book title, <thead>
categories, etc.</p> <tr>
</center> <th>Book ISBN No.</th>
</div> <th>Book
<div class="col-md-4"> Name</th>
<center> <th>Issue
<img width="150" src="image/defaulters-list.png"/> Date</th>
<h4>SMS Notifications</h4> <th>Expected
Return Date</th>

Library System with SMS Notification for Batangas Christian School 97


<th>Return }
Date</th> ?>
<th>Fines</th> </tbody>
<th>Status</th> </table>
</tr>
</thead>
<tbody>
<?php
if($statement-
>rowCount() > 0)
{ </div>
</div>
foreach($statement->fetchAll() as $row)
{ </div>

$status = $row["book_issue_status"]; <?php

if($status == 'Issue') include 'footer.php';

{ ?>

$status = '<span class="badge bg- logout.php


warning">Issue</span>';
<?php
}
//logout.php
if($status == 'Reserve')
session_start();
{
session_destroy();
$status = '<span class="badge bg-
secondary">Reserve</span>'; header('location:user_login.php');

} ?>

profile.php
if($status == 'Not Return')
<?php
{
//profile.php
$status = '<span class="badge bg-
danger">Not Return</span>'; include 'database_connection.php';

} include 'function.php';

if(!is_user_login())
if($status == 'Return') {
header('location:user_login.php');
{ }

$status = '<span class="badge bg- $message = '';


primary">Return</span>';
$success = '';
}
?> if(isset($_POST['save_button']))
<tr> {
$formdata = array();
<td><?php echo
$row["book_isbn_number"]; ?></td> if(empty($_POST["user_first_name"]))
{
<td><?php echo $row["book_name"]; ? $message .= '<li>First name is
></td> required</li>';
}
<td><?php echo else
$row["issue_date_time"]; ?></td> {
$formdata['user_first_name'] =
<td><?php echo trim($_POST['user_first_name']);
$row["expected_return_date"]; ?></td> }
<td><?php echo
$row["return_date_time"]; ?></td> if(empty($_POST["user_last_name"]))
{
<td><?php echo $message .= '<li>Last name is
get_currency_symbol($connect).$row["book_fines"]; ?></td> required</li>';
}
<td><?php echo $status; ?></td> else
{
</tr> $formdata['user_last_name'] =
<?php trim($_POST['user_last_name']);
} }

Library System with SMS Notification for Batangas Christian School 98


$formdata['user_profile'] =
$_POST['hidden_user_profile'];
if(empty($_POST['user_email_address']))
{ if(!empty($_FILES['user_profile']['name']))
$message .= '<li>Email Address is {
required</li>'; $img_name = $_FILES['user_profile']
} ['name'];
else $img_type = $_FILES['user_profile']
{ ['type'];
if(! $tmp_name = $_FILES['user_profile']
filter_var($_POST["user_email_address"], ['tmp_name'];
FILTER_VALIDATE_EMAIL)) $fileinfo = @getimagesize($tmp_name);
{ $width = $fileinfo[0];
$message .= '<li>Invalid $height = $fileinfo[1];
Email Address</li>'; $image_size = $_FILES['user_profile']
} ['size'];
else $img_explode = explode(".",
{ $img_name);
$img_ext =
$formdata['user_email_address'] = strtolower(end($img_explode));
trim($_POST['user_email_address']); $extensions = ["jpeg", "png", "jpg"];
} if(in_array($img_ext, $extensions))
} {
if($image_size <= 2000000)
if(empty($_POST["user_password"])) {
{ if($width == 225
$message .= '<li>Password is && $height == 225)
required</li>'; {
}
else $new_img_name = time() . '-' . rand() . '.' . $img_ext;
{
$formdata['user_password'] =
trim($_POST['user_password']); if(move_uploaded_file($tmp_name, "upload/" .
} $new_img_name))
{
if(empty($_POST["user_password1"])) $formdata['user_profile'] = $new_img_name;
{ }
$message .= '<li>Password is }
required</li>'; else
} {
else
{ $message .= '<li>Image dimension should be within
$formdata['user_password1'] = 225 X 225</li>';
trim($_POST['user_password1']); }
} }
else
if ($_POST["user_password"] === {
$_POST["user_password1"]) $message .=
{ '<li>Image size exceeds 2MB</li>';
// success! }
} }
else else
{ {
$message .= '<li>You entered two different passwords</li>';// $message .= '<li>Invalid
failed Image File</li>';
} }
}
if(empty($_POST['user_address']))
{ if($message == '')
$message .= '<li>User Address Detail is {
required</li>'; $data = array(
} ':user_first_name' =>
else $formdata['user_first_name'],
{ ':user_last_name'
$formdata['user_address'] = => $formdata['user_last_name'],
trim($_POST['user_address']); ':user_address'
} => $formdata['user_address'],
':user_contact_no'
if(empty($_POST['user_contact_no'])) => $formdata['user_contact_no'],
{ ':user_profile'
$message .= '<li>User Address Detail is => $formdata['user_profile'],
required</li>'; ':user_email_address' =>
} $formdata['user_email_address'],
else ':user_password'
{ => $formdata['user_password'],
$formdata['user_contact_no'] = ':user_updated_on'
$_POST['user_contact_no']; => get_date_time($connect),
} ':user_unique_id'
=> $_SESSION['user_id']

Library System with SMS Notification for Batangas Christian School 99


); id="user_last_name" class="form-control" value="<?php echo
$row['user_last_name']; ?>" />
$query = "
UPDATE lms_user </div>
SET user_first_name = :user_first_name
user_last_name = :user_last_name, </div>
user_address = :user_address,
user_contact_no = :user_contact_no,
user_profile = :user_profile, <div
user_email_address = :user_email_address, class="mb-3">
user_password = :user_password,
user_updated_on = :user_updated_on <label class="form-label">Email address</label>
WHERE user_unique_id = :user_unique_id
"; <input type="text" name="user_email_address"
id="user_email_address" class="form-control" value="<?php
$statement = $connect->prepare($query); echo $row['user_email_address']; ?>" />

$statement->execute($data); </div>

$success = 'Data Change Successfully'; <div


} class="row">
} <div
class="col-md-6 mb-3">
$query = " <label class="form-label">Password</label>
SELECT * FROM lms_user
WHERE user_unique_id = '". <input type="password" name="user_password"
$_SESSION['user_id']."' id="user_password" class="form-control" value="<?php echo
"; $row['user_password']; ?>"/>
$result = $connect->query($query); </div>
<div
include 'header_user.php'; class="col-md-6 mb-3">
?> <label class="form-label">Re-Enter
Password</label>
<div class="d-flex align-items-center justify-content-center mt-5
mb-5" style="min-height:700px;"> <input type="password" name="user_password1"
<div class="col-md-6"> id="user_password1" class="form-control" />
<?php
if($message != '') </div>
{
echo '<div class="alert alert- </div>
danger"><ul>'.$message.'</ul></div>';
}
<div
if($success != '') class="mb-3">
{
echo '<div class="alert alert- <input type="checkbox" onclick="myFunction()">
success">'.$success.'</div>'; Show Password
}
?>
<div class="card"> <script>
<div class="card- function myFunction() {
header">Profile</div> var x =
<div class="card-body"> document.getElementById("user_password");
<?php if (x.type === "password") {
foreach($result as $row) x.type = "text";
{ } else {
?> x.type = "password";
<form }
method="POST" enctype="multipart/form-data"> var y =
<div document.getElementById("user_password1");
class="row"> if (y.type === "password") {
<div y.type = "text";
class="col-md-6 mb-3"> } else {
y.type = "password";
<label class="form-label">First Name</label> }
}
<input type="text" name="user_first_name" </script>
id="user_first_name" class="form-control" value="<?php echo </div>
$row['user_first_name']; ?>" />

</div> <div
<div class="mb-3">
class="col-md-6 mb-3">
<label class="form-label">Contact Number</label>
<label class="form-label">Last Name</label>
<input type="text" name="user_contact_no"
<input type="text" name="user_last_name"

Library System with SMS Notification for Batangas Christian School 100
id="user_contact_no" class="form-control" value="<?php echo $success = '';
$row['user_contact_no']; ?>"/>
if(isset($_POST["reset_pass"]))
</div> {
<div $check_token = $connect->prepare("SELECT reset_link_token
class="mb-3"> from lms_user where user_email_address=? and
reset_link_token=?");
<label class="form-label">Address</label> $check_token->execute([$_POST['user_email_address'],
$_POST['user_token']]);
<textarea name="user_address" id="user_address"
class="form-control"><?php echo $row['user_address']; if($check_token->rowCount()>0)
?></textarea> {
$formdata = array();
</div>
<div if(empty($_POST["user_password"]))
class="mb-3"> {
$message .= '<li>Password is required</li>';
<label class="form-label">User Photo</label><br /> }
else
<input type="file" name="user_profile" {
id="user_profile" /> $formdata['user_password'] =
trim($_POST['user_password']);
<br /> }

<span class="text-muted">Only .jpg & .png image if(empty($_POST["user_password1"]))


allowed. Image size must be 600 x 600</span> {
$message .= '<li>Password is required</li>';
<br /> }
else
<input type="hidden" name="hidden_user_profile" {
value="<?php echo $row['user_profile']; ?>" /> $formdata['user_password1'] =
trim($_POST['user_password1']);
<img src="upload/<?php echo $row['user_profile']; ? }
>" width="100" class="img-thumbnail" />
if ($_POST["user_password"] ===
</div> $_POST["user_password1"])
<div {
class="text-center mt-4 mb-2"> $changepass = $connect->prepare("UPDATE lms_user
set user_password=?,reset_link_token=? where
<input type="submit" name="save_button" user_email_address=?");
class="btn btn-primary" value="Save" /> $changepass->execute([$_POST["user_password"],
uniqid(), $_POST['user_email_address']]);
</div> $success .= '<b>Password Changed.</b>';
</form> }
else
<?php {
} $message .= '<li>You entered two different
?> passwords</li>';// failed
</div> }
</div> $data = array(
</div> ':user_password' =>
</div> $formdata['user_password'],
);
<?php }else{
$message .= '<b>Invalid Token.</b>';
include 'footer.php'; }
}
?>
include 'header_user.php';
reset_password.php
?>
<?php

//reset_password.php <div class="d-flex align-items-center justify-content-center mt-5


mb-5" style="min-height:200px;">
use PHPMailer\PHPMailer\PHPMailer; <div class="col-md-6">
use PHPMailer\PHPMailer\SMTP; <?php
use PHPMailer\PHPMailer\Exception;
if($message != '')
include 'database_connection.php'; {
echo '<div class="alert alert-
include 'function.php'; danger"><ul>'.$message.'</ul></div>';
}
if(is_user_login())
{ if($success != '')
header('location:issue_book_details.php'); {
} echo '<div class="alert alert-
success">'.$success.'</div>';
$message = ''; }

Library System with SMS Notification for Batangas Christian School 101
?>
<div class="row">
<div class="col"> include 'footer.php';
<center>
<h4>Reset Password</h4> ?>
</center>
</div> search_book.php
</div>
<?php
<form method="POST" enctype="multipart/form-
data"> //search_book.php
<input type="hidden" name="user_email_address"
id="user_email_address" class="form-control" value="<? include 'database_connection.php';
=$_GET['key']?>"/>
<input type="hidden" name="user_token" include 'function.php';
id="user_token" class="form-control" value="<?
=$_GET['token']?>"/> if(!is_user_login())
{
header('location:user_login.php');
}
<label class="form-label">Password</label>
$error = '';
<input type="password" name="user_password"
id="user_password" class="form-control" /> if(isset($_POST["reserve_book_button"]))
{
<label class="form-label">Re-Enter $formdata = array();
Password</label>
if(empty($_POST["book_id"]))
<input type="password" name="user_password1" {
id="user_password1" class="form-control" /> $error .= '<li>Book ISBN Number is required</li>';
}
else
{
<div $formdata['book_id'] = trim($_POST['book_id']);
class="mb-3"> }

<input type="checkbox" onclick="myFunction()"> if(empty($_POST["user_id"]))


Show Password {
$error .= '<li>User Unique ID is required</li>';
}
<script> else
function myFunction() { {
var x = $formdata['user_id'] = trim($_POST['user_id']);
document.getElementById("user_password"); }
if (x.type === "password") {
x.type = "text"; if($error == '')
} else { {
x.type = "password"; //Check Book Available or Not
} $query = "
var y = SELECT * FROM lms_book
document.getElementById("user_password1"); WHERE book_isbn_number = '".$formdata['book_id']."'
if (y.type === "password") { ";
y.type = "text";
} else { $statement = $connect->prepare($query);
y.type = "password";
} $statement->execute();
}
</script>
</div> if($statement->rowCount() > 0)
{
foreach($statement->fetchAll() as $book_row)
{
//check book is available or not
if($book_row['book_status'] == 'Enable' &&
<div $book_row['book_no_of_copy'] > 0)
class="text-center mt-4 mb-2"> {
//Check User is exist
<input type="submit" name="reset_pass" class="btn $query = "
btn-primary" value="Submit" /> SELECT user_id, user_verification_status,
user_status, user_first_name, user_last_name FROM lms_user
</div> WHERE user_unique_id = '".$formdata['user_id']."'
</form> ";
</div>
</div> $statement = $connect->prepare($query);
</div>
</div> $statement->execute();

if($statement->rowCount() > 0)
<?php {

Library System with SMS Notification for Batangas Christian School 102
foreach($statement->fetchAll() as $user_row) $query = "
{ SELECT * FROM lms_book
if($user_row['user_verification_status'] == 'Yes') WHERE book_status = 'Enable'
{ ORDER BY book_id DESC
$data = array( ";
':book_id' => $formdata['book_id'],
':user_id' => $formdata['user_id'], $statement = $connect->prepare($query);
':issue_date_time' => '',
':expected_return_date' => '', $statement->execute();
':return_date_time' => '',
':book_fines' => 0,
':book_issue_status' => 'Reserve'
); include 'header_user.php';

$query = " ?>


INSERT INTO lms_issue_book
(book_id, user_id, issue_date_time, <div class="container-fluid py-4" style="min-height: 700px;">
expected_return_date, return_date_time, book_fines,
book_issue_status) <h1>Search Book</h1>
VALUES <?php
(:book_id, :user_id, :issue_date_time, :expected_return_date, :ret if(isset($_GET["action"]))
urn_date_time, :book_fines, :book_issue_status) {
"; if($_GET["action"] == 'reserve')
{
$statement = $connect->prepare($query); $book_id = convert_data($_GET["code"], 'decrypt');

$statement->execute($data); if($book_id > 0)


{
$connect->query($query); $query = "
SELECT * FROM lms_book
$msg = 'Account name: '. WHERE book_id = '$book_id'
$user_row['user_first_name'].' '.$user_row['user_last_name'].' ";
reserved a book title: '.$book_row['book_name'].'';
$book_result = $connect->query($query);
$audit = "INSERT INTO lms_audit
(`audit_desc`,`date_created`) VALUES ('$msg', '".date("Y-m-d foreach($book_result as $book_data)
H:i:s")."')"; {
$statement = $connect->prepare($audit); ?>
$statement->execute($data); <div class="card mb-4">
<div class="card-header">
header('location:search_book.php? <i class="fas fa-user-plus"></i>Reserve Book
msg=reserve'); </div>
} <div class="card-body">
else <form method="post">
{ <div class="mb-3">
echo 'Pleaser verify your account so you can <label class="form-label">Book ISBN
borrow books'; Number</label>
$error .= '<li>Please verify your email <input type="text" name="book_id" value="<?
address</li>'; =$book_data['book_isbn_number'];?>" id="book_id"
} class="form-control" readonly/>
} <span id="book_isbn_result"></span>
} </div>
else <div class="mb-3">
{ <label class="form-label">User Unique
$error .= '<li>User not Found</li>'; ID</label>
} <input type="text" name="user_id" value="<?
} php echo $_SESSION['user_id']; ?>" id="user_id" class="form-
else control" readonly/>
{ <span id="user_unique_id_result"></span>
$error .= '<li>Book not Available</li>'; </div>
} <div class="mt-4 mb-0">
} <input type="submit"
} name="reserve_book_button" class="btn btn-success"
else value="Reserve" />
{ </div>
$error .= '<li>Book not Found</li>'; </form>
} </div>
} </div>
if($error != '') </div>
{ </div>
echo '<div class="alert alert-danger alert-dismissible
fade show" role="alert"><ul class="list-unstyled">'.$error.'</ul> <?php
<button type="button" class="btn-close" data-bs- }
dismiss="alert" aria-label="Close"></button></div>'; }
} }
}
}
else
{
?>

Library System with SMS Notification for Batangas Christian School 103
<?php
if(isset($_GET['msg'])) if($row['book_no_of_copy'] > 0)
{
if($_GET['msg'] == 'reserve') {
{
echo '<div class="alert alert-success alert-dismissible fade $book_status = '<div class="badge bg-
show" role="alert">New book reserved successfully<button success">Available</div>';
type="button" class="btn-close" data-bs-dismiss="alert" aria-
label="Close"></button></div>'; }
}
} else
?>
<div class="card mb-4"> {
<div class="card-header">
<div class="row"> $book_status = '<div class="badge bg-
<div class="col danger">Not Available</div>';
col-md-6">
<i }
class="fas fa-table me-1"></i> Book List
</div> echo '
</div>
</div> <tr>
<div class="card-body">
<table <td>'.
id="datatablesSimple"> $row["book_name"].'</td>
<thead>
<tr> <td>'.
$row["book_isbn_number"].'</td>
<th>Book Name</th>
<td>'.
<th>ISBN No.</th> $row["book_category"].'</td>

<th>Category</th> <td>'.
$row["book_author"].'</td>
<th>Author/Publisher</th>
<td>'.
<th>Location Rack</th> $row["book_location_rack"].'</td>

<th>No. of Available Copy</th> <td>'.


$row["book_no_of_copy"].'</td>
<th>Status</th>
<td>'.$book_status.'</td>

<td>
<th>Action</th> <a href="search_book.php?
</tr> action=reserve&code='.convert_data($row["book_id"]).'"
</thead> class="btn btn-success btn-sm">Reserve Book</a>
<tfoot> </td>
<tr>
</tr>
<th>Book Name</th>
';
<th>ISBN No.</th> }
}
<th>Category</th> else
{
<th>Author/Publisher</th> echo '
<tr>
<th>Location Rack</th>
<td colspan="8" class="text-center">No Data
<th>No. of Available Copy</th> Found</td>
</tr>
<th>Status</th> ';
}

<th>Action</th> ?>
</tr> </tbody>
</tfoot> </table>
<tbody> </div>
<?php </div>
<?php
if($statement- }
>rowCount() > 0) ?>
{ </div>

foreach($statement->fetchAll() as $row) <?php


{
include 'footer.php';
$book_status = '';
?>

Library System with SMS Notification for Batangas Christian School 104
search_book_home.php <th>Status</th>
</tr>
<?php </tfoot>
<tbody>
//search_book_home.php <?php

include 'database_connection.php'; if($statement-


>rowCount() > 0)
include 'function.php'; {

$query = " foreach($statement->fetchAll() as $row)


SELECT * FROM lms_book {
WHERE book_status = 'Enable'
ORDER BY book_id DESC $book_status = '';
";
if($row['book_no_of_copy'] > 0)
$statement = $connect->prepare($query);
{
$statement->execute();
$book_status = '<div class="badge bg-
success">Available</div>';
include 'header.php';
}
?>
else
<div class="container-fluid py-4" style="min-height: 700px;">
{
<h1>Search Book</h1>
$book_status = '<div class="badge bg-
<div class="card mb-4"> danger">Not Available</div>';
<div class="card-header">
<div class="row"> }
<div class="col
col-md-6"> echo '
<i
class="fas fa-table me-1"></i> Book List <tr>
</div>
<div class="col <td>'.
col-md-6" align="right"> $row["book_name"].'</td>

</div> <td>'.
</div> $row["book_isbn_number"].'</td>
</div>
<div class="card-body"> <td>'.
<table $row["book_category"].'</td>
id="datatablesSimple">
<thead> <td>'.
<tr> $row["book_author"].'</td>

<th>Book Name</th> <td>'.


$row["book_location_rack"].'</td>
<th>ISBN No.</th>
<td>'.
<th>Category</th> $row["book_no_of_copy"].'</td>

<th>Author/Publisher</th> <td>'.$book_status.'</td>

<th>Location Rack</th> </tr>

<th>No. of Available Copy</th> ';


}
<th>Status</th> }
</tr> else
</thead> {
<tfoot> echo '
<tr> <tr>

<th>Book Name</th> <td colspan="8" class="text-center">No Data


Found</td>
<th>ISBN No.</th> </tr>
';
<th>Category</th> }

<th>Author/Publisher</th> ?>
</tbody>
<th>Location Rack</th> </table>
</div>
<th>No. of Available Copy</th> </div>
</div>

Library System with SMS Notification for Batangas Christian School 105
foreach($statement-
<?php >fetchAll() as $row)
{
include 'footer.php';
if($row['user_status'] == 'Enable')
?> {

user_login.php if($row['user_password'] ==
$formdata['user_password'])
<?php {

//user_login.php $_SESSION['user_id'] = $row['user_unique_id'];

include 'database_connection.php';
//Inserting of audit trail
include 'function.php';
$msg = 'User Account: <strong>'.
if(is_user_login()) $row['user_first_name'].' '.$row['user_last_name'].' </strong>
{ login to the system';
header('location:issue_book_details.php');
} $audit = "INSERT INTO lms_audit
(`audit_desc`,`date_created`) VALUES ('$msg', '".date("Y-m-d
$message = ''; H:i:s")."')";

if(isset($_POST["login_button"])) $statement = $connect->prepare($audit);


{
$formdata = array(); $statement->execute($data);

if(empty($_POST["user_email_address"])) header('location:issue_book_details.php');
{ }
$message .= '<li>Email Address is else
required</li>'; {
}
else $message = '<li>Wrong Password</li>';
{ }
if(! }
filter_var($_POST["user_email_address"], else
FILTER_VALIDATE_EMAIL)) {
{
$message .= '<li>Invalid $message = '<li>Your Account has been
Email Address</li>'; disabled</li>';
} }
else }
{ }
else
$formdata['user_email_address'] = {
trim($_POST['user_email_address']); $message = '<li>Wrong Email
} Address</li>';
} }
}
if(empty($_POST['user_password'])) }
{
$message .= '<li>Password is include 'header_user.php';
required</li>';
} ?>
else
{ <div class="container">
$formdata['user_password'] = <div class="row">
trim($_POST['user_password']); <div class="d-flex align-items-center justify-content-center"
} style="height:700px;">
<div class="col-md-6">
if($message == '') <?php
{
$data = array( if($message != '')
':user_email_address' {
=> $formdata['user_email_address'] echo '<div class="alert alert-
); danger"><ul>'.$message.'</ul></div>';
}
$query = "
SELECT * FROM lms_user ?>
WHERE user_email_address = :user_email_address <div class="card">
"; <div class="card-body">
<div class="row">
$statement = $connect->prepare($query); <div class="col mt-3">
<center>
$statement->execute($data); <img width="150px"
src="image/generaluser.png"/>
if($statement->rowCount() > 0) </center>
{ </div>
</div>

Library System with SMS Notification for Batangas Christian School 106
<div class="row"> </div>
<div class="col"> </div>
<center> </div>
<h3>User Login</h3>
</center> <?php
</div>
</div> include 'footer.php';
<form
method="POST"> ?>
<div
class="mb-3"> user_registration.php

<label class="form-label">Email address</label> <?php

<input type="text" name="user_email_address" //user_registration.php


id="user_email_address" class="form-control" />
use PHPMailer\PHPMailer\PHPMailer;
</div> use PHPMailer\PHPMailer\SMTP;
<div use PHPMailer\PHPMailer\Exception;
class="mb-3">
include 'database_connection.php';
<label class="form-label">Password</label>
include 'function.php';
<input type="password" name="user_password" if(is_user_login())
id="user_password" class="form-control"> {
header('location:issue_book_details.php');
<input type="checkbox" onclick="myFunction()"> Show }
Password
$message = '';

<script> $success = '';


function myFunction() {
var x = if(isset($_POST["register_button"]))
document.getElementById("user_password"); {
if (x.type === "password") { $formdata = array();
x.type = "text";
} else { if(empty($_POST["user_first_name"]))
x.type = "password"; {
} $message .= '<li>First name is
} required</li>';
</script> }
else
</div> {
$formdata['user_first_name'] =
<div class="mb-0 d-flex align-items-center justify- trim($_POST['user_first_name']);
content-center"> }
<p>

<a href="forgot_password.php">Forgot Password? if(empty($_POST["user_last_name"]))


</a> {
</p> $message .= '<li>Last name is
required</li>';
</div> }
else
<div {
class="mb-0 d-flex align-items-center justify-content-center"> $formdata['user_last_name'] =
<p> trim($_POST['user_last_name']);
}
Not yet registered? <a
href="user_registration.php">Sign up</a> if(empty($_POST["user_email_address"]))
</p> {
$message .= '<li>Email Address is
</div> required</li>';
}
<div else
class="mb-0 d-flex align-items-center justify-content-center"> {
if(!
<input type="submit" name="login_button" filter_var($_POST["user_email_address"],
class="btn btn-primary" value="Login" /> FILTER_VALIDATE_EMAIL))
{
</div> $message .= '<li>Invalid
Email Address</li>';
</form> }
</div> else
<div class="card-footer"><a {
href="admin_login.php" class="btn btn-outline-
secondary">Admin Login</a></div> $formdata['user_email_address'] =
</div> trim($_POST['user_email_address']);
</div> }

Library System with SMS Notification for Batangas Christian School 107
}
if(in_array($img_ext, $extensions))
if(empty($_POST["user_password"])) {
{ if($image_size <= 5000000)
$message .= '<li>Password is {
required</li>'; if($width == '600'
} && $height == '600')
else {
{
$formdata['user_password'] = $new_img_name = time() . '-' . rand() . '.' . $img_ext;
trim($_POST['user_password']);
} if(move_uploaded_file($tmp_name, "upload/".
$new_img_name))
{
if(empty($_POST["user_password1"]))
{ $formdata['user_profile'] = $new_img_name;
$message .= '<li>Re-Enter Password is }
required</li>'; }
} else
else {
{
$formdata['user_password1'] = $message .= '<li>Image dimension should be within
trim($_POST['user_password1']); 225 X 225</li>';
} }
}
if ($_POST["user_password"] === else
$_POST["user_password1"]) {
{ $message .=
// success! '<li>Image size exceeds 2MB</li>';
} }
else }
{ else
$message .= '<li>You entered two different passwords</li>';// {
failed $message .= '<li>Invalid
} Image File</li>';
}
if(empty($_POST['user_address'])) }
{ else
$message .= '<li>User Address Detail is {
required</li>'; $message .= '<li>Please Select Profile
} Image</li>';
else }
{
$formdata['user_address'] = if($message == '')
trim($_POST['user_address']); {
} $data = array(
':user_email_address'
if(empty($_POST['user_contact_no'])) => $formdata['user_email_address']
{ );
$message .= '<li>User Contact Number
Detail is required</li>'; $query = "
} SELECT * FROM lms_user
else WHERE user_email_address = :user_email_address
{ ";
$formdata['user_contact_no'] =
trim($_POST['user_contact_no']); $statement = $connect->prepare($query);
}
$statement->execute($data);
if(!empty($_FILES['user_profile']['name']))
{ if($statement->rowCount() > 0)
$img_name = $_FILES['user_profile'] {
['name']; $message = '<li>Email
$img_type = $_FILES['user_profile'] Already Register</li>';
['type']; }
$tmp_name = $_FILES['user_profile'] else
['tmp_name']; {
$fileinfo = @getimagesize($tmp_name); $user_verificaton_code =
$width = $fileinfo[0]; md5(uniqid());
$height = $fileinfo[1];
$user_unique_id = 'U' .
$image_size = $_FILES['user_profile'] rand(10000000,99999999);
['size'];
$data = array(
$img_explode = explode(".", ':user_first_name'
$img_name); => $formdata['user_first_name'],
':user_last_name'
$img_ext = => $formdata['user_last_name'],
strtolower(end($img_explode)); ':user_address'
=>
$extensions = ["jpeg", "png", "jpg"]; $formdata['user_address'],

Library System with SMS Notification for Batangas Christian School 108
':user_contact_no $user_unique_id.'</b> which you will use for borrowing
' => books.</p>
$formdata['user_contact_no'],
':user_profile' <p>To verify your account, please click the link to verify
=> your email address.</p>
$formdata['user_profile'], <p><a href="'.base_url().'verify.php?code='.
':user_email_add $user_verificaton_code.'">Click to Verify</a></p>
ress' => $formdata['user_email_address'], <p>Thank you!</p>
':user_password' ';
=> $formdata['user_password'],
':user_verificaton $mail->send();
_code'=> $user_verificaton_code,
':user_verificatio $success = 'You are
n_status' => 'No', successfully registered, you can login but cant borrow books
':user_unique_id' verify your email first. Verification Email sent to ' .
=> $user_unique_id, $formdata['user_email_address'] . ',.';
':user_status' }
=> 'Enable',
':user_created_on }
' => get_date_time($connect) }
);
include 'header_user.php';
$query = "
INSERT INTO lms_user ?>
(user_first_name, user_last_name, user_address,
user_contact_no, user_profile, user_email_address, <style>
user_password, user_verificaton_code, user_verification_status, .asterisk_input::after
user_unique_id, user_status, user_created_on) {
VALUES content:" *";
(:user_first_name, :user_last_name, :user_address, :user_contact color: #e32;
_no, :user_profile, :user_email_address, :user_password, :user_ve }
rificaton_code, :user_verification_status, :user_unique_id, :user_s </style>
tatus, :user_created_on)
";
<div class="d-flex align-items-center justify-content-center mt-5
$statement = $connect- mb-5" style="min-height:700px;">
>prepare($query); <div class="col-md-6">
<?php
$statement->execute($data);
if($message != '')
require {
'vendor/autoload.php'; echo '<div class="alert alert-
danger"><ul>'.$message.'</ul></div>';
$mail = new }
PHPMailer(true);
if($success != '')
$mail->isSMTP(); {
echo '<div class="alert alert-
$mail->Host = success">'.$success.'</div>';
'smtp.hostinger.com'; }

$mail->SMTPAuth = true; ?>


<div class="card">
$mail->Username = 'en@bcs- <div class="card-body">
library.com'; <div class="row">
<div class="col mt-3">
$mail->Password = <center>
'Bcs123456w!*'; <img width="100" src="image/generaluser.png"/>
</center>
$mail->SMTPSecure = 'ssl' ; </div>
</div>
$mail->Port = 465; <div class="row">
<div class="col">
$mail->setFrom('en@bcs- <center>
library.com', 'Bcs-Library'); <h4>New User Registration</h4>
</center>
$mail- </div>
>addAddress($formdata['user_email_address'], </div>
$formdata['user_first_name']); <form
method="POST" enctype="multipart/form-data">
$mail->isHTML(true); <div
class="row">
$mail->Subject = <div
'Registration Verification for Batangas Christrian School Library class="col-md-6 mb-3">
Management System';
<label class="form-label asterisk_input">First
$mail->Body = ' Name</label>
<p>Thank you for
registering to the Batangas Christrian School Library <input type="text" name="user_first_name"
Management System. Your Unique ID is <b>'. id="user_first_name" class="form-control" />

Library System with SMS Notification for Batangas Christian School 109
</div>
<div <div
class="col-md-6 mb-3"> class="mb-3">

<label class="form-label asterisk_input">Last <label class="form-label asterisk_input">Contact


Name</label> Number</label>

<input type="text" name="user_last_name" <input type="text" name="user_contact_no"


id="user_last_name" class="form-control" /> id="user_contact_no" class="form-control" />

</div> </div>
<div
</div> class="mb-3">

<label class="form-label
<div asterisk_input">Address</label>
class="mb-3">
<textarea name="user_address" id="user_address"
<label class="form-label asterisk_input">Email class="form-control"></textarea>
address</label>
</div>
<input type="text" name="user_email_address" <div
id="user_email_address" class="form-control" /> class="mb-3">

</div> <label class="form-label asterisk_input">User


Photo</label><br />
<div <input type="file" name="user_profile"
class="row"> id="user_profile" />
<div
class="col-md-6 mb-3"> <br />
<label class="form-label <span class="text-muted">Only .jpg & .png image
asterisk_input">Password</label> allowed. Image size must be 600 x 600</span>
<input type="password" name="user_password" </div>
id="user_password" class="form-control" />

</div> <div
<div class="mb-0 d-flex align-items-center justify-content-center">
class="col-md-6 mb-3"> <p>

<label class="form-label asterisk_input">Re-Enter Already have an account? <a


Password</label> href="user_login.php">Log In</a>
</p>
<input type="password" name="user_password1"
id="user_password1" class="form-control" /> </div>

</div>
<div
</div> class="text-center mt-4 mb-2">

<input type="submit" name="register_button"


<div class="btn btn-primary" value="Register" />
class="mb-3">
</div>
<input type="checkbox" onclick="myFunction()"> </form>
Show Password </div>
</div>
</div>
<script> </div>
function myFunction() {
var x =
document.getElementById("user_password"); <?php
if (x.type === "password") {
x.type = "text";
} else { include 'footer.php';
x.type = "password";
} ?>
var y =
document.getElementById("user_password1"); verify.php
if (y.type === "password") {
y.type = "text"; <?php
} else {
y.type = "password"; //verify.php
}
} include 'database_connection.php';
</script>
</div> include 'function.php';

Library System with SMS Notification for Batangas Christian School 110
include 'header_user.php';
if(isset($_POST["action"]))
if(isset($_GET['code'])) {
{ if($_POST["action"] == 'search_book_isbn')
$data = array( {
':user_verificaton_code' => $query = "
trim($_GET['code']) SELECT book_isbn_number, book_name
); FROM lms_book
WHERE book_isbn_number LIKE '%".
$query = " $_POST["request"]."%'
SELECT user_verification_status FROM lms_user AND book_status = 'Enable'
WHERE user_verificaton_code ";
= :user_verificaton_code
"; $result = $connect->query($query);

$statement = $connect->prepare($query); $data = array();

$statement->execute($data); foreach($result as $row)


{
if($statement->rowCount() > 0) $data[] = array(
{ 'isbn_no'
foreach($statement->fetchAll() as $row) => str_replace($_POST["request"], '<b>'.
{ $_POST["request"].'</b>', $row["book_isbn_number"]),
'book_name'
if($row['user_verification_status'] == 'No') => $row['book_name']
{ );
$data = array( }
':user echo json_encode($data);
_verification_status' => 'Yes', }
':user
_verificaton_code' => if($_POST["action"] == 'search_user_id')
trim($_GET['code']) {
); $query = "
SELECT user_unique_id, user_name
$query = " FROM lms_user
UPDATE WHERE user_unique_id LIKE '%".
lms_user $_POST["request"]."%'
SET AND user_status = 'Enable'
user_verification_status = :user_verification_status ";
WHERE
user_verificaton_code = :user_verificaton_code $result = $connect->query($query);
";
$data = array();
$statement =
$connect->prepare($query); foreach($result as $row)
{
$statement- $data[] = array(
>execute($data); 'user_unique_id'
=> str_replace($_POST["request"], '<b>'.
echo '<div $_POST["request"].'</b>', $row["user_unique_id"]),
class="alert alert-success">Your email successfully verify, now 'user_name'
you can <a href="user_login.php">login</a> into system.</div>'; =>
} $row["user_name"]
else );
{ }
echo '<div
class="alert alert-info">Your email already verify</div>'; echo json_encode($data);
} }
} }
}
else ?>
{
echo '<div class="alert alert- audit_trail.php
danger">Invalid URL</div>';
} <?php
}
//audit_trail.php
include 'footer.php';
include '../database_connection.php';
?> include '../function.php';

ADMIN DASHBOARD if(!is_admin_login())


{
action.php header('location:../admin_login.php');
}
<?php $query = "SELECT * FROM lms_audit ORDER BY audit_id
DESC";
//action.php $statement = $connect->prepare($query);
$statement->execute(); // Fetching data
include '../database_connection.php'; include '../header.php';

Library System with SMS Notification for Batangas Christian School 111
{
?> $formdata['author_name'] =
<div class="container-fluid py-4" style="min-height: 700px;"> trim($_POST["author_name"]);
<h1>Audit Trail</h1> }
<ol class="breadcrumb mt-4 mb-4 bg-light p-2
border"> if($error == '')
<li class="breadcrumb-item"><a {
href="index.php">Dashboard</a></li> $query = "
<li class="breadcrumb-item active">Audit Trail</li> SELECT * FROM lms_author
</ol> WHERE author_name = '".$formdata['author_name']."'
<div class="row"> ";
<div class="col-md-12">
<div class="card mb-12"> $statement = $connect->prepare($query);
<div class="card-header">
<i class="fas fa-table me-1"></i> Audit Trail $statement->execute();
</div>
<div class="card-body"> if($statement->rowCount() > 0)
<table id="datatablesSimple"> {
<thead> $error = '<li>Author Name
<tr> Already Exists</li>';
<th>Description</th> }
<th>Date</th> else
</tr> {
</thead> $data = array(
<tfoot> ':author_name'
<tr> =>
<th>Description</th> $formdata['author_name'],
<th>Date</th> ':author_status'
</tr> => 'Enable',
</tfoot> ':author_created_
<tbody> on' => get_date_time($connect)
<?php foreach($statement->fetchAll() as $row):?> );
<tr>
<td><?php echo $row['audit_desc'];?></td> $query = "
<td><?php echo $row['date_created'];?></td> INSERT INTO lms_author
</tr> (author_name, author_status, author_created_on)
<?php endforeach; ?> VALUES
</tbody> (:author_name, :author_status, :author_created_on)
</table> ";
</div>
</div> $statement = $connect-
</div> >prepare($query);
</div>
</div> $statement->execute($data);

<?php header('location:author.php?
msg=add');
include '../footer.php'; }
}
?> }

author.php if(isset($_POST["edit_author"]))
{
<?php $formdata = array();

//author.php if(empty($_POST["author_name"]))
{
include '../database_connection.php'; $error .= '<li>Author Name is
required</li>';
include '../function.php'; }
else
if(!is_admin_login()) {
{ $formdata['author_name'] =
header('location:../admin_login.php'); trim($_POST['author_name']);
} }

$message = ''; if($error == '')


{
$error = ''; $author_id =
convert_data($_POST['author_id'], 'decrypt');
if(isset($_POST["add_author"]))
{ $query = "
$formdata = array(); SELECT * FROM lms_author
WHERE author_name = '".$formdata['author_name']."'
if(empty($_POST["author_name"])) AND author_id != '".$author_id."'
{ ";
$error .= '<li>Author Name is
required</li>'; $statement = $connect->prepare($query);
}
else $statement->execute();

Library System with SMS Notification for Batangas Christian School 112
<div class="container-fluid py-4" style="min-height: 700px;">
if($statement->rowCount() > 0) <h1>Author/Publisher Management</h1>
{ <?php
$error = '<li>Author Name
Already Exists</li>'; if(isset($_GET["action"]))
} {
else if($_GET["action"] == "add")
{ {
$data = array( ?>
':author_name'
=> $formdata['author_name'], <ol class="breadcrumb mt-4 mb-4 bg-light p-2
':author_updated border">
_on'=> get_date_time($connect), <li class="breadcrumb-item"><a
':author_id' href="index.php">Dashboard</a></li>
=> $author_id <li class="breadcrumb-item"><a
); href="author.php">Author Management</a></li>
<li class="breadcrumb-item active">Add Author</li>
$query = " </ol>
UPDATE lms_author
SET author_name = :author_name, <div class="row">
author_updated_on = :author_updated_on <div class="col-md-6">
WHERE author_id = :author_id <?php
";
if($error != '')
$statement = $connect- {
>prepare($query); echo '<div class="alert alert-
danger alert-dismissible fade show" role="alert"><ul class="list-
$statement->execute($data); unstyled">'.$error.'</ul> <button type="button" class="btn-
close" data-bs-dismiss="alert"
header('location:author.php? aria-label="Close"></button></div>';
msg=edit'); }
}
} ?>
} <div class="card mb-4">
<div class="card-header">
if(isset($_GET["action"], $_GET["code"], $_GET["status"]) && <i class="fas fa-
$_GET["action"] == 'delete') user-plus"></i> Add New Author
{ </div>
$author_id = $_GET["code"]; <div class="card-body">
<form method="post">
$status = $_GET["status"]; <div class="mb-3">
<label class="form-
$data = array( label">Author Name</label>
':author_status' <input type="text"
=> $status, name="author_name" id="author_name" class="form-
':author_updated_on' => control" />
get_date_time($connect), </div>
':author_id' <div class="mt-4 mb-0">
=> $author_id <input type="submit"
); name="add_author" class="btn btn-success" value="Add" />
</div>
$query = " </form>
UPDATE lms_author </div>
SET author_status = :author_status, </div>
author_updated_on = :author_updated_on </div>
WHERE author_id = :author_id </div>
";
<?php
$statement = $connect->prepare($query); }
else if($_GET["action"] == 'edit')
$statement->execute($data); {
$author_id =
header('location:author.php? convert_data($_GET["code"], 'decrypt');
msg='.strtolower($status).'');
} if($author_id > 0)
{
$query = "
$query = " SELECT *
SELECT * FROM lms_author FROM lms_author
ORDER BY author_name ASC WHERE author_id = '$author_id'
"; ";

$statement = $connect->prepare($query); $author_result =


$connect->query($query);
$statement->execute();

include '../header.php'; foreach($author_result as $author_row)


{
?> ?>

Library System with SMS Notification for Batangas Christian School 113
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 {
border"> echo '<div class="alert alert-
<li class="breadcrumb-item"><a success alert-dismissible fade show" role="alert">Author Status
href="index.php">Dashboard</a></li> Change to Disable <button type="button" class="btn-close" data-
<li class="breadcrumb-item"><a bs-dismiss="alert" aria-label="Close"></button></div>';
href="author.php">Author Management</a></li> }
<li class="breadcrumb-item active">Edit Author</li>
</ol> if($_GET["msg"] == 'enable')
{
<div class="row"> echo '<div class="alert alert-
<div class="col-md-6"> success alert-dismissible fade show" role="alert">Author Status
<div class="card mb-4"> Change to Enable <button type="button" class="btn-close" data-
<div class="card-header"> bs-dismiss="alert" aria-label="Close"></button></div>';
<i class="fas fa- }
user-edit"></i> Edit Author Details }
</div>
<div class="card-body"> ?>
<form <div class="card mb-4">
method="post"> <div class="card-header">
<div <div class="row">
class="mb-3"> <div class="col
col-md-6">
<label class="form-label">Author Name</label> <i
class="fas fa-table me-1"></i> Author/Publisher Management
<input type="text" name="author_name" </div>
id="author_name" class="form-control" value="<?php echo <div class="col
$author_row['author_name']; ?>" /> col-md-6" align="right">
<a
</div> href="author.php?action=add" class="btn btn-success btn-
<div sm">Add</a>
class="mt-4 mb-0"> </div>
</div>
<input type="hidden" name="author_id" value="<? </div>
php echo $_GET['code']; ?>" /> <div class="card-body">
<table
<input type="submit" name="edit_author" id="datatablesSimple">
class="btn btn-primary" value="Edit" /> <thead>
<tr>
</div>
</form> <th>Author/Publisher Name</th>
</div>
</div> <th>Status</th>
</div>
</div> <th>Created On</th>

<?php <th>Updated On</th>


}
} <th>Action</th>
} </tr>
} </thead>
else <tfoot>
{ <tr>

?> <th>Author Name</th>


<ol class="breadcrumb mt-4 mb-4 bg-light p-2
border"> <th>Status</th>
<li class="breadcrumb-item"><a
href="index.php">Dashboard</a></li> <th>Created On</th>
<li class="breadcrumb-item
active">Author/Publisher Management</li> <th>Updated On</th>
</ol>
<?php <th>Action</th>
</tr>
if(isset($_GET["msg"])) </tfoot>
{ <tbody>
if($_GET["msg"] == 'add') <?php
{ if($statement-
echo '<div class="alert alert- >rowCount() > 0)
success alert-dismissible fade show" role="alert">New Author {
Added<button type="button" class="btn-close" data-bs-
dismiss="alert" aria-label="Close"></button></div>'; foreach($statement->fetchAll() as $row)
} { ?>
if($_GET['msg'] == 'edit') <tr>
{
echo '<div class="alert alert- <td><?php echo ''.
success alert-dismissible fade show" role="alert">Author Data $row["author_name"].'';?></td>
Edited <button type="button" class="btn-close" data-bs-
dismiss="alert" aria-label="Close"></button></div>'; <td><?php
}
if($_GET["msg"] == 'disable') $author_status = '';

Library System with SMS Notification for Batangas Christian School 114
}
if($row['author_status'] == 'Enable') ?>
</tbody>
{ </table>
</div>
$author_status = '<div class="badge bg- </div>
success">Enable</div>';
<script>
}
function delete_data(code, status)
else {
var new_status = 'Enable';
{
if(status == 'Enable')
$author_status = '<div class="badge bg- {
danger">Disable</div>'; new_status =
'Disable';
} }

if(confirm("Are you sure you


want to "+new_status+" this Author?"))
echo ''.$author_status.'';?></td> {
<td><?php echo ''. window.location.href = "author.php?
$row["author_created_on"].'';?></td> action=delete&code="+code+"&status="+new_status+"";
}
<td><?php echo ''. }
$row["author_updated_on"].'';?></td>
</script>
<td><?php
<?php
if($row['author_status'] == 'Enable')
}
{
?>
echo' </div>
<a href="author.php? <?php
action=edit&code='.convert_data($row["author_id"]).'"
class="btn btn-sm btn-primary">Edit</a> include '../footer.php';
<button type="button" ?>
name="delete_button" class="btn btn-danger btn-sm"
onclick="delete_data(`'.$row["author_id"].'`, `'. book.php
$row["author_status"].'`)">Disable</button>';
<?php
}
//book.php
else
include '../database_connection.php';
{
include '../function.php';
echo'

<a href="author.php? if(!is_admin_login())


action=edit&code='.convert_data($row["author_id"]).'" {
class="btn btn-sm btn-primary">Edit</a> header('location:../admin_login.php');
}
<button type="button"
name="delete_button" class="btn btn-success btn-sm" $message = '';
onclick="delete_data(`'.$row["author_id"].'`, `'.
$row["author_status"].'`)">Enable</button>'; $error = '';
}?> if(isset($_POST["add_book"]))
{
</td> $formdata = array();
</tr> if(empty($_POST["book_name"]))
<?php {
} $error .= '<li>Book Name is
} required</li>';
else }
{ else
echo ' {
<tr> $formdata['book_name'] =
trim($_POST["book_name"]);
<td colspan="4" class="text-center">No Data }
Found</td>
</tr> if(empty($_POST["book_category"]))
'; {

Library System with SMS Notification for Batangas Christian School 115
$error .= '<li>Book Category is e, :book_isbn_number, :book_no_of_copy, :book_status, :book_a
required</li>'; dded_on)
} ";
else
{ $statement = $connect->prepare($query);
$formdata['book_category'] =
trim($_POST["book_category"]); $statement->execute($data);
}

if(empty($_POST["book_author"])) $msg = 'Administrator added a book with


{ a <strong>Book title:</strong> '.$_POST['book_name'].',
$error .= '<li>Book Author is <strong>Author:</strong> '.$_POST["book_author"].' and a
required</li>'; number of copies:
} <strong>'.$_POST['book_no_of_copy'].'</strong> ';
else $audit = "INSERT INTO lms_audit
{ (`audit_desc`,`date_created`) VALUES ('$msg', '".date("Y-m-d
$formdata['book_author'] = H:i:s")."')";
trim($_POST["book_author"]); $statement = $connect->prepare($audit);
} $statement->execute($data);

if(empty($_POST["book_location_rack"])) header('location:book.php?msg=add');
{ }
$error .= '<li>Book Location Rack is }
required</li>';
} if(isset($_POST["edit_book"]))
else {
{ $formdata = array();
$formdata['book_location_rack'] =
trim($_POST["book_location_rack"]); if(empty($_POST["book_name"]))
} {
$error .= '<li>Book Name is
if(empty($_POST["book_isbn_number"])) required</li>';
{ }
$error .= '<li>Book ISBN Number is else
required</li>'; {
} $formdata['book_name'] =
else trim($_POST["book_name"]);
{ }
$formdata['book_isbn_number'] =
trim($_POST["book_isbn_number"]); if(empty($_POST["book_category"]))
} {
if(empty($_POST["book_no_of_copy"])) $error .= '<li>Book Category is
{ required</li>';
$error .= '<li>Book No. of Copy is }
required</li>'; else
} {
else $formdata['book_category'] =
{ trim($_POST["book_category"]);
$formdata['book_no_of_copy'] = }
trim($_POST["book_no_of_copy"]);
} if(empty($_POST["book_author"]))
{
if($error == '') $error .= '<li>Book Author is
{ required</li>';
$data = array( }
':book_category' else
=> $formdata['book_category'], {
':book_author' $formdata['book_author'] =
=> $formdata['book_author'], trim($_POST["book_author"]);
':book_location_rack' => }
$formdata['book_location_rack'],
':book_name' if(empty($_POST["book_location_rack"]))
=> $formdata['book_name'], {
':book_isbn_number' $error .= '<li>Book Location Rack is
=> $formdata['book_isbn_number'], required</li>';
':book_no_of_copy' }
=> $formdata['book_no_of_copy'], else
':book_status' {
=> 'Enable', $formdata['book_location_rack'] =
':book_added_on' trim($_POST["book_location_rack"]);
=> get_date_time($connect) }
);
if(empty($_POST["book_isbn_number"]))
$query = " {
INSERT INTO lms_book $error .= '<li>Book ISBN Number is
(book_category, book_author, book_location_rack, required</li>';
book_name, book_isbn_number, book_no_of_copy, book_status, }
book_added_on) else
VALUES {
(:book_category, :book_author, :book_location_rack, :book_nam

Library System with SMS Notification for Batangas Christian School 116
$formdata['book_isbn_number'] = header('location:book.php?
trim($_POST["book_isbn_number"]); msg='.strtolower($status).'');
} }
if(empty($_POST["book_no_of_copy"]))
{
$error .= '<li>Book No. of Copy is $query = "
required</li>'; SELECT * FROM lms_book
} ORDER BY book_id DESC
else ";
{
$formdata['book_no_of_copy'] = $statement = $connect->prepare($query);
trim($_POST["book_no_of_copy"]);
} $statement->execute();

if($error == '')
{ include '../header.php';
$data = array(
':book_category' ?>
=> $formdata['book_category'],
':book_author' <div class="container-fluid py-4" style="min-height: 700px;">
=> $formdata['book_author'], <h1>Book Management</h1>
':book_location_rack' => <?php
$formdata['book_location_rack'], if(isset($_GET["action"]))
':book_name' {
=> $formdata['book_name'], if($_GET["action"] == 'add')
':book_isbn_number' {
=> $formdata['book_isbn_number'], ?>
':book_no_of_copy'
=> $formdata['book_no_of_copy'], <ol class="breadcrumb mt-4 mb-4 bg-light p-2
':book_updated_on' border">
=> get_date_time($connect), <li class="breadcrumb-item"><a
':book_id' href="index.php">Dashboard</a></li>
=> $_POST["book_id"] <li class="breadcrumb-item"><a href="book.php">Book
); Management</a></li>
$query = "
UPDATE lms_book <li class="breadcrumb-item active">Add Book</li>
SET book_category = :book_category, </ol>
book_author = :book_author,
book_location_rack = :book_location_rack, <?php
book_name = :book_name,
book_isbn_number = :book_isbn_number, if($error != '')
book_no_of_copy = :book_no_of_copy, {
book_updated_on = :book_updated_on echo '<div class="alert alert-danger alert-dismissible
WHERE book_id = :book_id fade show" role="alert"><ul class="list-unstyled">'.$error.'</ul>
"; <button type="button" class="btn-close" data-bs-
dismiss="alert" aria-label="Close"></button></div>';
$statement = $connect->prepare($query); }

$statement->execute($data); ?>

header('location:book.php?msg=edit'); <div class="card mb-4">


} <div class="card-header">
} <i class="fas fa-user-plus"></i> Add New
Book
if(isset($_GET["action"], $_GET["code"], $_GET["status"]) && </div>
$_GET["action"] == 'delete') <div class="card-body">
{ <form method="post">
$book_id = $_GET["code"]; <div class="row">
$status = $_GET["status"]; <div class="col-md-6">
<div class="mb-
$data = array( 3">
':book_status' =>
$status, <label class="form-label">Book Name</label>
':book_updated_on' =>
get_date_time($connect), <input type="text" name="book_name"
':book_id' => id="book_name" class="form-control" />
$book_id </div>
); </div>
<div class="col-md-6">
$query = " <div class="mb-
UPDATE lms_book 3">
SET book_status = :book_status,
book_updated_on = :book_updated_on <label class="form-label">Select Author</label>
WHERE book_id = :book_id
"; <select name="book_author" id="book_author"
class="form-control">
$statement = $connect->prepare($query);
<?php echo fill_author($connect); ?>
$statement->execute($data);
</select>

Library System with SMS Notification for Batangas Christian School 117
</div> $book_result =
</div> $connect->query($query);
</div>
<div class="row">
<div class="col-md-6"> foreach($book_result as $book_row)
<div class="mb- {
3"> ?>
<ol class="breadcrumb mt-4 mb-4 bg-light p-2
<label class="form-label">Select Category</label> border">
<li class="breadcrumb-item"><a
<select name="book_category" id="book_category" href="index.php">Dashboard</a></li>
class="form-control"> <li class="breadcrumb-item"><a href="book.php">Book
Management</a></li>
<?php echo fill_category($connect); ?> <li class="breadcrumb-item active">Edit Book</li>
</ol>
</select> <div class="card mb-4">
</div> <div class="card-header">
</div> <i class="fas fa-user-plus"></i> Edit
<div class="col-md-6"> Book Details
<div class="mb- </div>
3"> <div class="card-body">
<form method="post">
<label class="form-label">Select Location <div class="row">
Rack</label> <div class="col-
md-6">
<select name="book_location_rack" <div
id="book_location_rack" class="form-control"> class="mb-3">

<?php echo fill_location_rack($connect); ?> <label class="form-label">Book Name</label>

</select> <input type="text" name="book_name"


</div> id="book_name" class="form-control" value="<?php echo
</div> $book_row['book_name']; ?>" />
</div>
<div class="row"> </div>
<div class="col-md-6"> </div>
<div class="mb- <div class="col-
3"> md-6">
<div
<label class="form-label">Book ISBN class="mb-3">
Number</label>
<label class="form-label">Select Author</label>
<input type="text" name="book_isbn_number"
id="book_isbn_number" class="form-control" /> <select name="book_author" id="book_author"
</div> class="form-control">
</div>
<div class="col-md-6"> <?php echo fill_author($connect); ?>
<div class="mb-
3"> </select>

<label class="form-label">No. of Copy</label> </div>


</div>
<input type="number" name="book_no_of_copy" </div>
id="book_no_of_copy" step="1" class="form-control" /> <div class="row">
</div> <div class="col-
</div> md-6">
</div> <div
<div class="mt-4 mb-3 text-center"> class="mb-3">
<input type="submit"
name="add_book" class="btn btn-success" value="Add" /> <label class="form-label">Select Category</label>
</div>
</form> <select name="book_category" id="book_category"
</div> class="form-control">
</div>
<?php echo fill_category($connect); ?>
<?php
} </select>
else if($_GET["action"] == 'edit')
{ </div>
$book_id = </div>
convert_data($_GET["code"], 'decrypt'); <div class="col-
md-6">
if($book_id > 0) <div
{ class="mb-3">
$query = "
SELECT * <label class="form-label">Select Location
FROM lms_book Rack</label>
WHERE book_id = '$book_id'
"; <select name="book_location_rack"
id="book_location_rack" class="form-control">

Library System with SMS Notification for Batangas Christian School 118
{
<?php echo if($_GET["msg"] == 'add')
fill_location_rack($connect); ?> {
echo '<div class="alert alert-
</select> success alert-dismissible fade show" role="alert">New Book
Added<button type="button" class="btn-close" data-bs-
</div> dismiss="alert" aria-label="Close"></button></div>';
</div> }
</div> if($_GET['msg'] == 'edit')
<div class="row"> {
<div class="col- echo '<div class="alert alert-
md-6"> success alert-dismissible fade show" role="alert">Book Data
<div Edited <button type="button" class="btn-close" data-bs-
class="mb-3"> dismiss="alert" aria-label="Close"></button></div>';
}
<label class="form-label">Book ISBN if($_GET["msg"] == 'disable')
Number</label> {
echo '<div class="alert alert-
<input type="text" name="book_isbn_number" success alert-dismissible fade show" role="alert">Book Status
id="book_isbn_number" class="form-control" value="<?php Change to Disable <button type="button" class="btn-close" data-
echo $book_row['book_isbn_number']; ?>" /> bs-dismiss="alert" aria-label="Close"></button></div>';
}
</div> if($_GET['msg'] == 'enable')
</div> {
<div class="col- echo '<div class="alert alert-
md-6"> success alert-dismissible fade show" role="alert">Book Status
<div Change to Enable <button type="button" class="btn-close" data-
class="mb-3"> bs-dismiss="alert" aria-label="Close"></button></div>';
}
<label class="form-label">No. of Copy</label> }

<input type="number" name="book_no_of_copy" ?>


id="book_no_of_copy" class="form-control" step="1" <div class="card mb-4">
value="<?php echo $book_row['book_no_of_copy']; ?>" /> <div class="card-header">
<div class="row">
</div> <div class="col
</div> col-md-6">
</div> <i
<div class="mt-4 mb-3 text- class="fas fa-table me-1"></i> Book Management
center"> </div>
<input <div class="col col-md-6" align="right">
type="hidden" name="book_id" value="<?php echo <script>function print()
$book_row['book_id']; ?>" /> {window.open("bookprints.php?category=All", "", "width=800,
<input height=800");}</script>
type="submit" name="edit_book" class="btn btn-primary"
value="Edit" /> <input type=button value="Print Book List"
</div> class="btn btn-success btn-sm" onclick="print()"></input>
</form> <a href="book.php?action=add" class="btn btn-
<script> success btn-sm">Add</a>
</div>
document.getElementById('book_author').value = </div>
"<?php echo $book_row['book_author']; ?>"; </div>
<div class="card-body">
document.getElementById('book_category').value = <table id="datatablesSimple">
"<?php echo $book_row['book_category']; ?>"; <thead>
<tr>
<th>Book
document.getElementById('book_location_rack').value = "<?php Name</th>
echo $book_row['book_location_rack']; ?>"; <th>ISBN
</script> No.</th>
</div>
</div> <th>Category</th>
<?php <th>Author</th>
} <th>Location
} Rack</th>
} <th>No. of
} Copy</th>
else <th>Status</th>
{ <th>Created
?> On</th>
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 <th>Updated
border"> On</th>
<li class="breadcrumb-item"><a <th>Action</th>
href="index.php">Dashboard</a></li> </tr>
<li class="breadcrumb-item </thead>
active">Book Management</li> <tfoot>
</ol> <tr>
<?php <th>Book
Name</th>
if(isset($_GET["msg"]))

Library System with SMS Notification for Batangas Christian School 119
<th>ISBN $row["book_id"].'`,
No.</th> `'.$row["book_status"].'`)">Disable</button>';
}
<th>Category</th> else{
<th>Author</th> echo '
<th>Location <a
Rack</th> href="book.php?
<th>No. of action=edit&code='.convert_data($row["book_id"]).'" class="btn
Copy</th> btn-sm btn-primary">Edit</a>
<th>Status</th>
<th>Created <button type="button" name="delete_button"
On</th> class="btn btn-success btn-sm" onclick="delete_data(`'.
<th>Updated $row["book_id"].'`,
On</th> `'.$row["book_status"].'`)">Enable</button>';
<th>Action</th> }?>
</tr> </td>
</tfoot> </tr>
<tbody>
<?php

if($statement->rowCount() > 0) <?php


{ }
foreach($statement- }
>fetchAll() as $row) else
{ ?> {
<tr> echo '
<tr>
<td><?php echo ''.$row["book_name"].'';?></td> <td colspan="10"
class="text-center">No Data Found</td>
<td><?php echo ''.$row["book_isbn_number"].'';? </tr>
></td> ';
}
<td><?php echo ''.$row["book_category"].'';?></td>
?>
<td><?php echo ''.$row["book_author"].'';?></td> </tbody>
</table>
<td><?php echo ''.$row["book_location_rack"].'';? </div>
></td> </div>
<script>
<td><?php echo
''.$row["book_no_of_copy"].'';?></td> function delete_data(code, status)
{
<td><?php var new_status = 'Enable';
$book_status = ''; if(status == 'Enable')
{
if($row['book_status'] == 'Enable') new_status = 'Disable';
{ }
$book_status = '<div class="badge bg- if(confirm("Are you sure you want to
success">Enable</div>'; "+new_status+" this Category?"))
} {
else window.location.href =
{ "book.php?
action=delete&code="+code+"&status="+new_status+"";
$book_status = '<div class="badge bg- }
danger">Disable</div>'; }
}
echo ''. </script>
$book_status.'';?> <?php
</td> }
?>
<td><?php echo </div>
''.$row["book_added_on"].'';?></td>

<td><?php echo <?php


''.$row["book_updated_on"].'';?></td>
<td> include '../footer.php';
<?
php ?>
if($row['book_status'] == 'Enable') bookprints.php
{
echo ' <?php
<a
href="book.php? //bookprints.php
action=edit&code='.convert_data($row["book_id"]).'" class="btn
btn-sm btn-primary">Edit</a> include '../database_connection.php';
<button type="button" name="delete_button" include '../function.php';
class="btn btn-danger btn-sm" onclick="delete_data(`'.

Library System with SMS Notification for Batangas Christian School 120
if(!is_admin_login()) <th>Book Title</th>
{ <th>Book ISBN #</th>
header('location:../admin_login.php'); <th>No. of Copy</th>
} <th>Book Added ON</th>
<th>Book Upudated ON</th>
?> </tr>";
<?php
if(isset($_GET['submit'])){ while($row = $select_orders-
echo "<body onload=window.print()>"; >fetch(PDO::FETCH_ASSOC)){
} echo "<tr><td>" .
?> htmlspecialchars($row['book_category']) . "</td><td>".
<html> htmlspecialchars($row['book_author']) . "</td><td>".
<head> htmlspecialchars($row['book_name']) . "</td><td>".
<link href="<?php echo base_url(); ?>asset/css/styles.css" htmlspecialchars($row['book_isbn_number']) . "</td><td>".
rel="stylesheet" /> htmlspecialchars($row['book_no_of_copy']) . "</td><td>".
<style> htmlspecialchars($row['book_added_on']) . "</td><td>".
table htmlspecialchars($row['book_updated_on']) . "</td></tr>";
{ }
font-family: arial, sans-serif; echo "</table>";
border-collapse: collapse; }else{
width: 100%; $select_orders= $connect->prepare("SELECT * FROM
} lms_book where book_category=?");
$select_orders->execute([$_GET["category"]]);
td, th
{ echo "<table>
border: 2px solid #808080; <tr>
text-align: left; <th>Book Category</th>
padding: 8px; <th>Author</th>
} <th>Book Title</th>
<th>Book ISBN #</th>
tr:nth-child(even) <th>No. of Copy</th>
{ <th>Book Added ON</th>
background-color: #dddddd; <th>Book Upudated ON</th>
} </tr>";

@page while($row = $select_orders-


{ >fetch(PDO::FETCH_ASSOC)){
size:A4; echo "<tr><td>" .
margin: 0; htmlspecialchars($row['book_category']) . "</td><td>".
} htmlspecialchars($row['book_author']) . "</td><td>".
</style> htmlspecialchars($row['book_name']) . "</td><td>".
htmlspecialchars($row['book_isbn_number']) . "</td><td>".
</head> htmlspecialchars($row['book_no_of_copy']) . "</td><td>".
<body> htmlspecialchars($row['book_added_on']) . "</td><td>".
<div class="my-4"> htmlspecialchars($row['book_updated_on']) . "</td></tr>";
<img src="image/logo.png" width="50" height="50" }
style="vertical-align:middle" />
<span class="fs-4">Batangas Christian School Library echo "</table>";
System</span> }
</div> }
?>
<form action="" method="get"> <div class="my-4 float-end justify-content-center">
Category:<select name="category"> <div class="mb-5">
<option value="All">All</option> <span class="fs-6">Prepared by</span>
<?php </div>
$categories = $connect->prepare("SELECT book_category
from lms_book"); <divclass="mt-5">
$categories->execute(); <span class="fs-6">Librarian</span>
while($res = $categories->fetch(PDO::FETCH_ASSOC)){ </div>
echo "<option value=".$res['book_category'].">". </div>
$res['book_category']."</option>";
} </body>
?> </html>
</select>
bookstatusprints.php
<input name="submit" value="Print" type="submit">
</form> <?php

<?php //bookstatusprints.php
if(isset($_GET['category']))
{ include '../database_connection.php';
if($_GET['category'] == "All")
{ include '../function.php';
$select_orders= $connect->prepare("SELECT * FROM
lms_book"); if(!is_admin_login())
$select_orders->execute(); {
echo "<table> header('location:../admin_login.php');
<tr> }
<th>Book Category</th>
<th>Author</th> include '../header.php';

Library System with SMS Notification for Batangas Christian School 121
</tr>";
?>
<?php while($row = $select_orders-
if(isset($_GET['submit'])){ >fetch(PDO::FETCH_ASSOC)){
echo "<body onload=window.print()>"; echo "<tr><td>" .
} htmlspecialchars($row['book_id']) . "</td><td>" .
htmlspecialchars($row['user_id']) . "</td><td>".
?> htmlspecialchars($row['issue_date_time']) . "</td><td>".
<form action="" method="get"> htmlspecialchars($row['return_date_time']) . "</td><td>".
Status: htmlspecialchars($row['book_fines']) . "</td><td>".
<select name="Status"> htmlspecialchars($row['book_issue_status']) . "</td></tr>";
<option value="All">All</option> }
<?php
echo "</table>";
$categories = $connect->prepare("SELECT }
book_issue_status from lms_issue_book"); }
$categories->execute();
?>
while($res = $categories-
>fetch(PDO::FETCH_ASSOC)){
echo "<option value=". <?php
$res['book_issue_status'].">".$res['book_issue_status']."</
option>"; include '../footer.php';
}
?> ?>
</select>
<input name="submit" value="Print" type="submit"> category.php
</form>
<?php
<?php
if(isset($_GET['status'])) //category.php
{
include '../database_connection.php';

include '../function.php';
if($_GET['status'] == "All"){
if(!is_admin_login())
$select_orders= $connect->prepare("SELECT * {
FROM lms_issue_book"); header('location:../admin_login.php');
$select_orders->execute(); }

echo "<table> $message = '';


<tr>
<th>Book ISBN $error = '';
Number</th>
<th>User Unique ID</th> if(isset($_POST['add_category']))
<th>Issue Date</th> {
<th>Return Date</th> $formdata = array();
<th>Late Return Fines</th>
<th>Status</th> if(empty($_POST['category_name']))
</tr>"; {
$error .= '<li>Category Name is
while($row = $select_orders- required</li>';
>fetch(PDO::FETCH_ASSOC)){ }
echo "<tr><td>" . else
htmlspecialchars($row['book_id']) . "</td><td>" . {
htmlspecialchars($row['user_id']) . "</td><td>". $formdata['category_name'] =
htmlspecialchars($row['issue_date_time']) . "</td><td>". trim($_POST['category_name']);
htmlspecialchars($row['return_date_time']) . "</td><td>". }
htmlspecialchars($row['book_fines']) . "</td><td>".
htmlspecialchars($row['book_issue_status']) . "</td></tr>"; if($error == '')
} {
$query = "
echo "</table>"; SELECT * FROM lms_category
WHERE category_name = '".$formdata['category_name']."'
";
}else{
$select_orders= $connect->prepare("SELECT * FROM $statement = $connect->prepare($query);
lms_issue_book where book_issue_status=?");
$select_orders->execute([$_GET["status"]]); $statement->execute();

echo "<table> if($statement->rowCount() > 0)


<tr> {
<th>Book ISBN $error = '<li>Category Name
Number</th> Already Exists</li>';
<th>User Unique ID</th> }
<th>Issue Date</th> else
<th>Return Date</th> {
<th>Late Return Fines</th> $data = array(
<th>Status</th>

Library System with SMS Notification for Batangas Christian School 122
':category_name' $statement = $connect-
=> >prepare($query);
$formdata['category_name'],
':category_status' $statement->execute($data);
=> 'Enable',
':category_create
d_on' => get_date_time($connect) header('location:category.php?msg=edit');
); }
}
$query = " }
INSERT INTO lms_category
(category_name, category_status, category_created_on) if(isset($_GET["action"], $_GET["code"], $_GET["status"]) &&
VALUES $_GET["action"] == 'delete')
(:category_name, :category_status, :category_created_on) {
"; $category_id = $_GET["code"];
$status = $_GET["status"];
$statement = $connect- $data = array(
>prepare($query); ':category_status'
=> $status,
$statement->execute($data); ':category_updated_on' =>
get_date_time($connect),
':category_id'
header('location:category.php?msg=add'); => $category_id
} );
} $query = "
} UPDATE lms_category
SET category_status = :category_status,
if(isset($_POST["edit_category"])) category_updated_on = :category_updated_on
{ WHERE category_id = :category_id
$formdata = array(); ";

if(empty($_POST["category_name"])) $statement = $connect->prepare($query);


{
$error .= '<li>Category Name is $statement->execute($data);
required</li>';
} header('location:category.php?
else msg='.strtolower($status).'');
{ }
$formdata['category_name'] =
$_POST['category_name'];
} $query = "
SELECT * FROM lms_category
if($error == '') ORDER BY category_name ASC
{ ";
$category_id =
convert_data($_POST['category_id'], 'decrypt'); $statement = $connect->prepare($query);

$query = " $statement->execute();


SELECT * FROM lms_category
WHERE category_name = '".$formdata['category_name']."' include '../header.php';
AND category_id != '".$category_id."'
"; ?>

$statement = $connect->prepare($query); <div class="container-fluid py-4" style="min-height: 700px;">


<h1>Category Management</h1>
$statement->execute(); <?php

if($statement->rowCount() > 0) if(isset($_GET['action']))


{ {
$error = '<li>Category Name if($_GET['action'] == 'add')
Already Exists</li>'; {
} ?>
else
{ <ol class="breadcrumb mt-4 mb-4 bg-light p-2
$data = array( border">
':category_name' <li class="breadcrumb-item"><a
=> $formdata['category_name'], href="index.php">Dashboard</a></li>
':category_updat <li class="breadcrumb-item"><a
ed_on' => get_date_time($connect), href="category.php">Category Management</a></li>
':category_id' <li class="breadcrumb-item active">Add
=> $category_id Category</li>
); </ol>
<div class="row">
$query = " <div class="col-md-6">
UPDATE lms_category <?php
SET category_name = :category_name,
category_updated_on = :category_updated_on if($error != '')
WHERE category_id = :category_id {
"; echo '<div
class="alert alert-danger alert-dismissible fade show"

Library System with SMS Notification for Batangas Christian School 123
role="alert"><ul class="list-unstyled">'.$error.'</ul> <button
type="button" class="btn-close" data-bs-dismiss="alert" aria-
label="Close"></button></div>'; <form method="post">
}

?> <div class="mb-3">


<div class="card mb-4">
<div class="card- <label class="form-label">Category
header"> Name</label>
<i
class="fas fa-user-plus"></i> Add New Category <input type="text"
</div> name="category_name" id="category_name" class="form-
<div class="card-body"> control" value="<?php echo $category_row['category_name']; ?
>" />
<form method="POST">
</div>
<div class="mb-3">
<label class="form-
label">Category Name</label> <div class="mt-4 mb-0">
<input type="text"
name="category_name" id="category_name" class="form- <input type="hidden"
control" /> name="category_id" value="<?php echo $_GET['code']; ?>" />
</div>
<input type="submit"
<div class="mt-4 mb-0"> name="edit_category" class="btn btn-primary" value="Edit" />
<input type="submit"
name="add_category" value="Add" class="btn btn-success" /> </div>
</div>

</form> </form>

</div> </div>
</div> </div>
</div>
</div> </div>
</div>

<?php <?php
} }
else if($_GET["action"] == 'edit') }
{ }
$category_id = }
convert_data($_GET["code"],'decrypt'); else
{
if($category_id > 0)
{ ?>
$query = " <ol class="breadcrumb mt-4 mb-4 bg-light p-2
SELECT * border">
FROM lms_category <li class="breadcrumb-item"><a
WHERE category_id = '$category_id' href="index.php">Dashboard</a></li>
"; <li class="breadcrumb-item
active">Category Management</li>
$category_result </ol>
= $connect->query($query);
<?php

foreach($category_result as $category_row) if(isset($_GET['msg']))


{ {
?> if($_GET['msg'] == 'add')
{
echo '<div class="alert alert-
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 success alert-dismissible fade show" role="alert">New Category
border"> Added<button type="button" class="btn-close" data-bs-
<li class="breadcrumb-item"><a dismiss="alert" aria-label="Close"></button></div>';
href="index.php">Dashboard</a></li> }
<li class="breadcrumb-item"><a
href="category.php">Category Management</a></li> if($_GET["msg"] == 'edit')
<li class="breadcrumb-item active">Edit {
Category</li> echo '<div class="alert alert-
</ol> success alert-dismissible fade show" role="alert">Category Data
<div class="row"> Edited <button type="button" class="btn-close" data-bs-
<div class="col-md-6"> dismiss="alert" aria-label="Close"></button></div>';
<div class="card mb-4"> }
<div class="card- if($_GET["msg"] == 'disable')
header"> {
<i echo '<div class="alert alert-
class="fas fa-user-edit"></i> Edit Category Details success alert-dismissible fade show" role="alert">Category
</div> Status Change to Disable <button type="button" class="btn-
<div class="card- close" data-bs-dismiss="alert"
body"> aria-label="Close"></button></div>';

Library System with SMS Notification for Batangas Christian School 124
}
if($row['category_status'] == 'Enable')
if($_GET['msg'] == 'enable')
{ {
echo '<div class="alert alert-
success alert-dismissible fade show" role="alert">Category $category_status = '<div class="badge bg-
Status Change to Enable <button type="button" class="btn- success">Enable</div>';
close" data-bs-dismiss="alert"
aria-label="Close"></button></div>'; }
}
} else

?> {

<div class="card mb-4"> $category_status = '<div class="badge bg-


<div class="card-header"> danger">Disable</div>';
<div class="row">
<div class="col }
col-md-6">
<i
class="fas fa-table me-1"></i> Category Management echo ''.$category_status.'';?></td>
</div>
<div class="col <td><?php echo ''.
col-md-6" align="right"> $row["category_created_on"].'';?></td>
<a
href="category.php?action=add" class="btn btn-success btn- <td><?php echo ''.
sm">Add</a> $row["category_updated_on"].'';?></td>
</div>
</div> <td><?php
</div>
<div class="card-body"> if($row['category_status'] == 'Enable')

<table {
id="datatablesSimple">
<thead> echo'
<tr>
<a href="category.php?
<th>Category Name</th> action=edit&code='.convert_data($row["category_id"]).'"
class="btn btn-sm btn-primary">Edit</a>
<th>Status</th>
<button
<th>Created On</th> name="delete_button" class="btn btn-danger btn-sm"
onclick="delete_data(`'.$row["category_id"].'`, `'.
<th>Updated On</th> $row["category_status"].'`)">Disable</button>';

<th>Action</th> }
</tr>
</thead> else
<tfoot>
<tr> {

<th>Category Name</th> echo'

<th>Status</th> <a href="category.php?


action=edit&code='.convert_data($row["category_id"]).'"
<th>Created On</th> class="btn btn-sm btn-primary">Edit</a>

<th>Updated On</th> <button


name="delete_button" class="btn btn-success btn-sm"
<th>Action</th> onclick="delete_data(`'.$row["category_id"].'`, `'.
</tr> $row["category_status"].'`)">Enable</button>';
</tfoot>
<tbody> }?>
<?php
</td>
if($statement-
>rowCount() > 0) </tr>
{ <?php
}
foreach($statement->fetchAll() as $row) }
{?> else
<tr> {
echo '
<td><?php echo ''. <tr>
$row["category_name"].'';?></td>
<td colspan="4" class="text-center">No Data
<td><?php Found</td>
</tr>
$category_status = ''; ';
}

Library System with SMS Notification for Batangas Christian School 125
<h1
?> class="text-center"><?php echo
</tbody> Count_total_reserve_book_number($connect); ?></h1>
</table> <h5
class="text-center"><i class="fas fa-bookmark me-1"></i>Total
<script> Books Reserved</h5>
</div>
function </div>
delete_data(code, status) </a>
{ </div>
var <div class="col-xl-3 col-md-6">
new_status = 'Enable'; <a href="issue_book.php">
<div class="card bg-warning
text-white mb-4">
if(status == 'Enable') <div class="card-
{ body">
<h1
new_status = 'Disable'; class="text-center"><?php echo
} Count_total_issue_book_number($connect); ?></h1>
<h5
class="text-center"><i class="fas fa-book me-1"></i>Total Books
if(confirm("Are you sure you want to Issued</h5>
"+new_status+" this Category?")) </div>
{ </div>
</a>
window.location.href="category.php? </div>
action=delete&code="+code+"&status="+new_status+""; <div class="col-xl-3 col-md-6">
} <a href="issue_book.php">
} <div class="card bg-danger
text-white mb-4">
</script> <div class="card-
body">
</div> <h1
</div> class="text-center"><?php echo
<?php Count_total_returned_book_number($connect); ?></h1>
} <h5
?> class="text-center"><i class="fas fa-check-circle
me-1"></i>Total Books Returned</h5>
</div> </div>
</div>
<?php </a>
</div>
include '../footer.php'; <div class="col-xl-3 col-md-6">
<a href="issue_book.php">
?> <div class="card bg-success
text-white mb-4">
index.php <div class="card-
body">
<?php <h1
class="text-center"><?php echo
//index.php Count_total_not_returned_book_number($connect); ?></h1>
<h5
include '../database_connection.php'; class="text-center"><i class="fas fa-times-circle me-1"></i>Total
Books Not Return</h5>
include '../function.php'; </div>
</div>
if(!is_admin_login()) </a>
{ </div>
header('location:../admin_login.php'); <div class="col-xl-3 col-md-6">
} <a href="issue_book.php">
<div class="card bg-success
text-white mb-4">
include '../header.php'; <div class="card-
body">
?> <h1
<style type="text/css"> class="text-center"><?php echo get_currency_symbol($connect) .
a{ Count_total_fines_received($connect); ?></h1>
text-decoration:none; <h5
} class="text-center"><i class="fas fa-money-bill me-1"></i>Total
</style> Fines Received</h5>
<div class="container-fluid py-4"> </div>
<h1 class="mb-5">Dashboard</h1> </div>
<div class="row"> </a>
<div class="col-xl-3 col-md-6"> </div>
<a href="issue_book.php"> <div class="col-xl-3 col-md-6">
<div class="card bg-primary <a href="book.php">
text-white mb-4"> <div class="card bg-danger
<div class="card- text-white mb-4">
body"> <div class="card-
body">

Library System with SMS Notification for Batangas Christian School 126
<h1
class="text-center"><?php echo
Count_total_book_number($connect); ?></h1> $sort_date = $connect->prepare("SELECT
<h5 min(issue_date_time) as min,max(issue_date_time) as max FROM
class="text-center"><i class="fas fa-book-open me-1"></i>Total lms_issue_book");
Books</h5> $sort_date->execute();
</div>
</div>
</a>
</div>
<div class="col-xl-3 col-md-6">
<a href="author.php"> if( $url == "https://bcs-library.com/admin/isolate.php"){
<div class="card bg-warning
text-white mb-4">
<div class="card- while($res = $sort_date-
body"> >fetch(PDO::FETCH_ASSOC)){
<h1
class="text-center"><?php echo echo '<script>function print()
Count_total_author_number($connect); ?></h1> {window.open("print.php?from='.$res["min"].'&to='.
<h5 $res["max"].'", "", "width=800, height=800");}</script>';
class="text-center"><i class="fas fa-at me-1"></i>Total echo ' <button onclick="print()">Print</button>';
Authors/Publishers</h5> }
</div> }
</div> else{
</a> echo "aa";
</div> }
<div class="col-xl-3 col-md-6">
<a href="category.php">
<div class="card bg-primary ?>
text-white mb-4">
<div class="card- issue_book.php
body">
<h1 <?php
class="text-center"><?php echo
Count_total_category_number($connect); ?></h1> //issue_book.php
<h5
class="text-center"><i class="fas fa-file me-1"></i>Total include '../database_connection.php';
Categories</h5>
</div> include '../function.php';
</div>
</a> if(!is_admin_login())
</div> {
<div class="col-xl-3 col-md-6"> header('location:../admin_login.php');
<a href="location_rack.php"> }
<div class="card bg-primary
text-white mb-4"> $error = '';
<div class="card-
body"> if(isset($_POST["book_issue_button"]))
<h1 {
class="text-center"><?php echo if(isset($_POST["book_issue_confirmation"]))
Count_total_location_rack_number($connect); ?></h1> {
<h5 $issue_book_id = convert_data($_GET["code"],
class="text-center"><i class="fas fa-map-marker-alt 'decrypt');
me-1"></i>Total Location Racks</h5>
</div> if($issue_book_id > 0)
</div> {
</a> $query = "
</div> SELECT * FROM lms_issue_book
</div> WHERE issue_book_id = '$issue_book_id'
</div> ";

<?php $result = $connect->query($query);

include '../footer.php'; foreach($result as $row1)


{
?> $query = "
SELECT * FROM lms_user
isolate.php WHERE user_unique_id = '".$row1["user_id"]."'
";
<?php
include '../database_connection.php'; $user_result = $connect->query($query);

if(isset($_SERVER['HTTPS']) && if($error != '')


$_SERVER['HTTPS'] === 'on') {
$url = "https://"; echo '<div class="alert
else alert-danger">'.$error.'</div>';
$url = "http://"; }

$url.= $_SERVER['HTTP_HOST']; foreach($user_result as $user_data)


$url.= $_SERVER['REQUEST_URI']; {

Library System with SMS Notification for Batangas Christian School 127
echo ''.$row1["user_id"].''; ':book_issue_status' => 'Return',
':issue_book_id' => $_POST['issue_book_id']
$book_issue_limit = );
get_book_issue_limit_per_user($connect);
$query = "
$total_book_issue = UPDATE lms_issue_book
get_total_book_issue_per_user($connect, ''.$row1["user_id"].''); SET return_date_time = :return_date_time,
} book_issue_status = :book_issue_status
} WHERE issue_book_id = :issue_book_id
} ";
if($total_book_issue < $book_issue_limit)
{ $statement = $connect->prepare($query);
$total_book_issue_day =
get_total_book_issue_day($connect); $statement->execute($data);

$today_date = get_date_time($connect); $query = "


UPDATE lms_book
$expected_return_date = date('Y-m-d H:i:s', SET book_no_of_copy = book_no_of_copy + 1
strtotime($today_date. ' + '.$total_book_issue_day.' days')); WHERE book_isbn_number = '".
$_POST["book_isbn_number"]."'
$data = array( ";
':issue_date_time' => $today_date,
':expected_return_date' => $expected_return_date, $connect->query($query);
':book_issue_status' => 'Issue',
':issue_book_id' => $_POST['issue_book_id'] header("location:issue_book.php?msg=return");
); }
else
$query = " {
UPDATE lms_issue_book $error = 'Please first confirm return book received by
SET issue_date_time = :issue_date_time, clicking on checkbox';
expected_return_date = :expected_return_date, }
book_issue_status = :book_issue_status }
WHERE issue_book_id = :issue_book_id
"; $query = "
SELECT * FROM lms_issue_book
$statement = $connect->prepare($query); ORDER BY issue_book_id DESC
";
$statement->execute($data);
$statement = $connect->prepare($query);
$query = "
UPDATE lms_book $statement->execute();
SET book_no_of_copy = book_no_of_copy - 1
WHERE book_isbn_number = '". include '../header.php';
$_POST["book_isbn_number"]."'
"; ?>
<div class="container-fluid py-4" style="min-height: 700px;">
$connect->query($query); <h1>Issue Book Management</h1>
<?php
$msg = 'Account name: '.
$user_row['user_first_name'].' '.$user_row['user_last_name'].' if(isset($_GET["action"]))
have recieved a book title: '.$book_row['book_name'].''; {
if($_GET["action"] == 'view')
$audit = "INSERT INTO lms_audit {
(`audit_desc`,`date_created`) VALUES ('$msg', '".date("Y-m-d $issue_book_id = convert_data($_GET["code"],
H:i:s")."')"; 'decrypt');
$statement = $connect->prepare($audit);
$statement->execute($data); if($issue_book_id > 0)
{
header("location:issue_book.php?msg=add"); $query = "
} SELECT * FROM lms_issue_book
else WHERE issue_book_id = '$issue_book_id'
{ ";
$error .= 'User has already reached Book Issue Limit,
First return pending book'; $result = $connect->query($query);
}
} foreach($result as $row)
else {
{ $query = "
$error = 'Please first confirm book issue by clicking on SELECT * FROM lms_book
checkbox'; WHERE book_isbn_number = '".$row["book_id"]."'
} ";

} $book_result = $connect->query($query);

if(isset($_POST["book_return_button"])) $query = "


{ SELECT * FROM lms_user
if(isset($_POST["book_return_confirmation"])) WHERE user_unique_id = '".$row["user_id"]."'
{ ";
$data = array(
':return_date_time' => get_date_time($connect), $user_result = $connect->query($query);

Library System with SMS Notification for Batangas Christian School 128
$form_item = '';
if($error != '')
{ if($status == "Issue")
echo '<div class="alert {
alert-danger">'.$error.'</div>';
} $status = '<span class="badge bg-
warning">Issue</span>';
foreach($book_result as $book_data)
{ $form_item = '
echo ' <label><div><input type="checkbox" required
<h2>Book Details</h2> name="" value="Yes" /> I accept
<table class="table table-bordered"> <a href="terms.php">Terms &amp;
<tr> Conditions</a></div>
<th width="30%">Book ISBN Number</th>
<td width="70%">'. <input type="checkbox"
$book_data["book_isbn_number"].'</td> name="book_return_confirmation" value="Yes" /> I aknowledge
</tr> that I have received Issued Book</label>
<tr>
<th width="30%">Book Title</th> <br />
<td width="70%">'.
$book_data["book_name"].'</td> <div class="mt-4 mb-4">
</tr> <input type="submit"
<tr> name="book_return_button" value="Book Return" class="btn
<th width="30%">Author</th> btn-primary" />
<td width="70%">'. </div>
$book_data["book_author"].'</td> ';
</tr> }
</table>
<br /> if($status == "Reserve")
'; {
}
$status = '<span class="badge bg-
foreach($user_result as $user_data) secondary">Reserve</span>';
{
echo ' $form_item = '
<h2>User Details</h2> <label>
<table class="table table-bordered"> <div><input type="checkbox" required name=""
<tr> value="Yes" /> I accept
<th width="30%">User Unique ID</th> <a href="terms.php">Terms &amp;
<td width="70%">'. Conditions</a></div>
$user_data["user_unique_id"].'</td>
</tr> <input type="checkbox"
<tr> name="book_issue_confirmation" value="Yes" /> I aknowledge
<th width="30%">User First Name</th> that I have issued a Book</label>
<td width="70%">'.
$user_data["user_first_name"].'</td> <br />
</tr
<tr> <div class="mt-4 mb-4">
<th width="30%">User Last Name</th> <input type="submit"
<td width="70%">'. name="book_issue_button" value="Book Issue" class="btn btn-
$user_data["user_last_name"].'</td> primary" />
</tr> </div>
<tr> ';
<th width="30%">User Address</th> }
<td width="70%">'.
$user_data["user_address"].'</td> if($status == 'Not Return')
</tr> {
<tr>
<th width="30%">User Contact No.</th> $status = '<span class="badge bg-danger">Not
<td width="70%">'. Return</span>';
$user_data["user_contact_no"].'</td>
</tr> $form_item = '
<tr> <label>
<th width="30%">User Email Address</th> <div><input type="checkbox" required name=""
<td width="70%">'. value="Yes" /> I accept
$user_data["user_email_address"].'</td> <a href="terms.php">Terms &amp;
</tr> Conditions</a></div>
<tr>
<th width="30%">User Image</th> <div><input type="checkbox"
<td width="70%"><img name="book_return_confirmation" value="Yes" /> I aknowledge
src="'.base_url().'upload/' . $user_data["user_profile"].'" that I have received Issued Book</div>
class="img-thumbnail" width="100" /></td> </label>
</tr>
</table> <br />
<br />
'; <div class="mt-4 mb-4">
} <input type="submit"
name="book_return_button" value="Book Return" class="btn
$status = $row["book_issue_status"]; btn-primary" />
</div>

Library System with SMS Notification for Batangas Christian School 129
'; type="button" class="btn-close" data-bs-dismiss="alert" aria-
} label="Close"></button></div>';
}
if($status == 'Return') }
{ ?>
$status = '<span class="badge bg-
primary">Return</span>'; <div class="card mb-4">
} <div class="card-header">
<div class="row">
echo ' <div class="col col-md-6">
<h2>Issue Book Details</h2> <i class="fas fa-
<table class="table table-bordered"> table me-1"></i> Issue Book Management
<tr> </div>
<th width="30%">Book Issue Date</th> <div class="col col-md-6" align="right">
<td width="70%">'. <?php
$row["issue_date_time"].'</td> if(isset($_SERVER['HTTPS']) &&
</tr> $_SERVER['HTTPS'] === 'on')
<tr> $url = "https://";
<th width="30%">Book Return Date</th> else
<td width="70%">'. $url = "http://";
$row["return_date_time"].'</td> $url.= $_SERVER['HTTP_HOST'];
</tr> $url.= $_SERVER['REQUEST_URI'];
<tr> $sort_date = $connect->prepare("SELECT
<th width="30%">Book Issue Status</th> min(issue_date_time) as min,max(issue_date_time) as max FROM
<td width="70%">'.$status.'</td> lms_issue_book");
</tr> $sort_date->execute();
<tr> if( $url ==
<th width="30%">Total Fines</th> "https://bcs-library.com/admin/issue_book.php")
<td {
width="70%">'.get_currency_symbol($connect).' '. while($res = $sort_date-
$row["book_fines"].'</td> >fetch(PDO::FETCH_ASSOC)){
</tr> echo '<script>function print()
</table> {window.open("print.php?from='.$res["min"].'&to='.
<form method="POST"> $res["max"].'", "", "width=800, height=800");}</script>';
<input type="hidden" name="issue_book_id" echo '
value="'.$issue_book_id.'" /> <button class="btn btn-success btn-sm"
<input type="hidden" name="book_isbn_number" onclick="print()">Print Issued Book</button>
value="'.$row["book_id"].'" /> ';
'.$form_item.' }
</form> }
<br /> else
'; {
} }
} ?>
} </div>
} </div>
else </div>
{ <div class="card-body">
?> <table id="datatablesSimple">
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 border"> <thead>
<li class="breadcrumb-item"><a <tr>
href="index.php">Dashboard</a></li> <th>Book ISBN
<li class="breadcrumb-item active">Issue Book Number</th>
Management</li> <th>User Unique ID</th>
</ol> <th>Issue Date</th>
<?php <th>Expected Return Date</th>
if(isset($_GET['msg'])) <th>Return Date</th>
{ <th>Late Return Fines</th>
if($_GET['msg'] == 'add') <th>Status</th>
{ <th>Action</th>
echo '<div class="alert alert-success alert-dismissible fade </tr>
show" role="alert">New Book Issue Successfully<button </thead>
type="button" class="btn-close" data-bs-dismiss="alert" aria- <tfoot>
label="Close"></button></div>'; <tr>
} <th>Book ISBN
Number</th>
if($_GET["msg"] == 'return') <th>User Unique ID</th>
{ <th>Issue Date</th>
echo ' <th>Expected Return Date</th>
<div class="alert alert-success alert-dismissible fade show" <th>Return Date</th>
role="alert">Issued Book Successfully Return into Library <th>Late Return Fines</th>
<button type="button" class="btn-close" data-bs- <th>Status</th>
dismiss="alert" aria-label="Close"></button></div> <th>Action</th>
'; </tr>
} </tfoot>
if($_GET['msg'] == 'reserve') <tbody>
{ <?php
echo '<div class="alert alert-success alert-dismissible fade if($statement->rowCount() > 0)
show" role="alert">New book reserved successfully<button {

Library System with SMS Notification for Batangas Christian School 130
$one_day_fine =
get_one_day_fines($connect); $status = '<span class="badge bg-
secondary">Reserve</span>';
$currency_symbol = }
get_currency_symbol($connect);

set_timezone($connect); if($status == 'Not


Return')
foreach($statement- {
>fetchAll() as $row)
{ $status = '<span class="badge bg-danger">Not
$status = Return</span>';
$row["book_issue_status"]; }

$book_fines = if($status ==
$row["book_fines"]; 'Return')
{

if($row["book_issue_status"] == "Issue") $status = '<span class="badge bg-


{ primary">Return</span>';
}
$current_date_time = new
DateTime(get_date_time($connect)); echo '
<tr>
$expected_return_date = new <td>'.
DateTime($row["expected_return_date"]); $row["book_id"].'</td>
<td>'.
$row["user_id"].'</td>
if($current_date_time > $expected_return_date) <td>'.
{ $row["issue_date_time"].'</td>
<td>'.
$interval = $current_date_time- $row["expected_return_date"].'</td>
>diff($expected_return_date); <td>'.
$row["return_date_time"].'</td>
<td>'.
$total_day = $interval->d; $currency_symbol.$book_fines.'</td>
<td>'.
$status.'</td>
$book_fines = $total_day * $one_day_fine; <td>
<a href="issue_book.php?
action=view&code='.convert_data($row["issue_book_id"]).'"
$status = 'Not Return'; class="btn btn-info btn-sm">View</a>
</td>
</tr>
$query = " ';
}
UPDATE lms_issue_book }
else
{
SET book_fines = '". echo '
$book_fines."', <tr>
<td colspan="7"
class="text-center">No Data Found</td>
book_issue_status = '". </tr>
$status."' ';
}
?>
WHERE issue_book_id = '". </tbody>
$row["issue_book_id"]."' </table>
</div>
"; </div>
<?php
}
$connect->query($query); ?>
} </div>
}
<?php
if($status ==
'Issue') include '../footer.php';
{
?>
$status = '<span class="badge
bg-warning">Issue</span>'; location_rack.php
}
<?php

if($status == 'Reserve') //location_rack.php


{
include '../database_connection.php';

Library System with SMS Notification for Batangas Christian School 131
include '../function.php'; if(empty($_POST["location_rack_name"]))
{
if(!is_admin_login()) $error .= '<li>Location Rack Name is
{ required</li>';
header('location:../admin_login.php'); }
} else
{
$message = ''; $formdata['location_rack_name'] =
trim($_POST["location_rack_name"]);
$error = ''; }

if(isset($_POST["add_location_rack"])) if($error == '')


{ {
$formdata = array(); $location_rack_id =
convert_data($_POST["location_rack_id"], 'decrypt');
if(empty($_POST["location_rack_name"]))
{ $query = "
$error .= '<li>Location Rack Name is SELECT * FROM lms_location_rack
required</li>'; WHERE location_rack_name = '".
} $formdata['location_rack_name']."'
else AND location_rack_id != '".$location_rack_id."'
{ ";
$formdata['location_rack_name'] =
trim($_POST["location_rack_name"]); $statement = $connect->prepare($query);
}
$statement->execute();
if($error == '')
{ if($statement->rowCount() > 0)
$query = " {
SELECT * FROM lms_location_rack $error = '<li>Location Rack
WHERE location_rack_name = '". Name Already Exists</li>';
$formdata['location_rack_name']."' }
"; else
{
$statement = $connect->prepare($query); $data = array(
':location_rack_n
$statement->execute(); ame' =>
$formdata['location_rack_name'],
if($statement->rowCount() > 0) ':location_rack_u
{ pdated_on' => get_date_time($connect),
$error = '<li>Location Rack ':location_rack_i
Name Already Exists</li>'; d' => $location_rack_id
} );
else
{ $query = "
$data = array( UPDATE lms_location_rack
':location_rack_n SET location_rack_name
ame' => = :location_rack_name,
$formdata['location_rack_name'], location_rack_updated_on
':location_rack_st = :location_rack_updated_on
atus' => 'Enable', WHERE location_rack_id = :location_rack_id
':location_rack_c ";
reated_on' => get_date_time($connect)
); $statement = $connect-
>prepare($query);
$query = "
INSERT INTO $statement->execute($data);
lms_location_rack
(location_rack_name, location_rack_status,
location_rack_created_on) header('location:location_rack.php?msg=edit');
VALUES }
(:location_rack_name, :location_rack_status, :location_rack_crea }
ted_on) }
";
if(isset($_GET["action"], $_GET["code"], $_GET["status"]) &&
$statement = $connect- $_GET["action"]=='delete')
>prepare($query); {
$location_rack_id = $_GET["code"];
$statement->execute($data);
$status = $_GET["status"];

header('location:location_rack.php?msg=add'); $data = array(


} ':location_rack_status'
} => $status,
} ':location_rack_updated_on'
=> get_date_time($connect),
if(isset($_POST["edit_location_rack"])) ':location_rack_id'
{ => $location_rack_id
$formdata = array(); );
$query = "

Library System with SMS Notification for Batangas Christian School 132
UPDATE lms_location_rack </div>
SET location_rack_status = :location_rack_status, <div class="mt-4 mb-0">
location_rack_updated_on = :location_rack_updated_on <input type="submit"
WHERE location_rack_id = :location_rack_id name="add_location_rack" class="btn btn-success"
"; value="Add" />
</div>
$statement = $connect->prepare($query); </form>
</div>
$statement->execute($data); </div>
</div>
header('location:location_rack.php? </div>
msg='.strtolower($status).'');
<?php
} }
else if($_GET["action"] == 'edit')
{
$query = " $location_rack_id =
SELECT * FROM lms_location_rack convert_data($_GET["code"], 'decrypt');
ORDER BY location_rack_name ASC
"; if($location_rack_id > 0)
{
$statement = $connect->prepare($query); $query = "
SELECT *
$statement->execute(); FROM lms_location_rack
WHERE location_rack_id = '$location_rack_id'
include '../header.php'; ";

?>
$location_rack_result = $connect->query($query);
<div class="container-fluid py-4" style="min-height: 700px;">
<h1>Location Rack Management</h1>
<?php foreach($location_rack_result as $location_rack_row)
{
if(isset($_GET["action"])) ?>
{
if($_GET["action"] == 'add') <ol class="breadcrumb mt-4 mb-4 bg-light p-2
{ border">
?> <li class="breadcrumb-item"><a
href="index.php">Dashboard</a></li>
<li class="breadcrumb-item"><a
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 href="location_rack.php">Location Rack Management</a></li>
border"> <li class="breadcrumb-item active">Edit Location Rack</li>
<li class="breadcrumb-item"><a </ol>
href="index.php">Dashboard</a></li> <div class="row">
<li class="breadcrumb-item"><a <div class="col-md-6">
href="category.php">Location Rack Management</a></li> <div class="card mb-4">
<li class="breadcrumb-item active">Add <div class="card-header">
Location Rack</li> <i class="fas fa-
</ol> user-edit"></i> Edit Location Rack Details
</div>
<div class="row"> <div class="card-body">
<div class="col-md-6"> <form method="post">
<?php <div class="mb-3">
<label class="form-
if($error != '') label">Location Rack Name</label>
{ <input type="text"
echo ' name="location_rack_name" id="location_rack_name"
<div class="alert class="form-control" value="<?php echo
alert-danger alert-dismissible fade show" role="alert"><ul $location_rack_row["location_rack_name"]; ?>" />
class="list-unstyled">'.$error.'</ul> <button type="button" </div>
class="btn-close" data-bs-dismiss="alert" aria- <div class="mt-4 mb-0">
label="Close"></button></div> <input type="hidden"
'; name="location_rack_id" value="<?php echo $_GET['code']; ?
} >" />
<input type="submit"
?> name="edit_location_rack" class="btn btn-primary"
<div class="card mb-4"> value="Edit" />
<div class="card- </div>
header"> </form>
<i </div>
class="fas fa-user-plus"></i> Add New Location Rack </div>
</div>
<div class="card-body"> </div>
<form method="post"> </div>
<div class="mb-3">
<label class="form- <?php
label">Location Rack Name</label> }
<input type="text" }
name="location_rack_name" id="location_rack_name" }
class="form-control" /> }

Library System with SMS Notification for Batangas Christian School 133
else <th>Updated On</th>
{ <th>Action</th>
</tr>
?> </thead>
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 <tfoot>
border"> <tr>
<li class="breadcrumb-item"><a
href="index.php">Dashboard</a></li> <th>Location Rack Name</th>
<li class="breadcrumb-item <th>Status</th>
active">Location Rack Management</li> <th>Created On</th>
</ol> <th>Updated On</th>
<?php <th>Action</th>
</tr>
if(isset($_GET["msg"])) </tfoot>
{ <tbody>
if($_GET["msg"] == 'add') <?php
{ if($statement-
echo '<div >rowCount() > 0)
class="alert alert-success alert-dismissible fade show" {
role="alert">New Location Rack Added<button type="button"
class="btn-close" data-bs-dismiss="alert" aria- foreach($statement->fetchAll() as $row)
label="Close"></button></div>'; { ?>
} <tr>

if($_GET["msg"] == 'edit') <td><?php echo ''.


{ $row["location_rack_name"].'';?></td>
echo '<div
class="alert alert-success alert-dismissible fade show" <td><?php
role="alert">Location Rack Data Edited <button type="button"
class="btn-close" data-bs-dismiss="alert" aria- $location_rack_status = '';
label="Close"></button></div>';
} if($row['location_rack_status'] == 'Enable')

if($_GET["msg"] == {
'disable')
{ $location_rack_status = '<div
echo '<div class="badge bg-success">Enable</div>';
class="alert alert-success alert-dismissible fade show"
role="alert">Location Rack Status Change to Disable <button }
type="button" class="btn-close" data-bs-dismiss="alert" aria-
label="Close"></button></div>'; else
}
{
if($_GET["msg"] ==
'enable') $location_rack_status = '<div
{ class="badge bg-danger">Disable</div>';
echo '<div
class="alert alert-success alert-dismissible fade show" }
role="alert">Location Rack Status Change to Enable <button
type="button" class="btn-close" data-bs-dismiss="alert" aria-
label="Close"></button></div>'; echo ''.$location_rack_status.'';?></td>
}
} <td><?php echo ''.
$row["location_rack_created_on"].'';?></td>
?>
<div class="card mb-4"> <td><?php echo ''.
<div class="card-header"> $row["location_rack_updated_on"].'';?></td>
<div class="row">
<div class="col <td><?php
col-md-6">
<i if($row['location_rack_status'] ==
class="fas fa-table me-1"></i> Location Rack Management 'Enable')
</div>
<div class="col {
col-md-6" align="right">
<a echo'
href="location_rack.php?action=add" class="btn btn-success
btn-sm">Add</a> <a href="location_rack.php?
</div> action=edit&code='.convert_data($row["location_rack_id"]).'"
</div> class="btn btn-sm btn-primary">Edit</a>
</div>
<div class="card-body"> <button type="button"
<table name="delete_button" class="btn btn-danger btn-sm"
id="datatablesSimple"> onclick="delete_data(`'.$row["location_rack_id"].'`, `'.
<thead> $row["location_rack_status"].'`)">Disable</button>';
<tr>
}
<th>Location Rack Name</th>
<th>Status</th> else
<th>Created On</th>

Library System with SMS Notification for Batangas Christian School 134
<?php
{
//logout.php
echo'
session_start();
<a href="location_rack.php?
action=edit&code='.convert_data($row["location_rack_id"]).'" session_destroy();
class="btn btn-sm btn-primary">Edit</a>
header('location:../index.php');
<button type="button"
name="delete_button" class="btn btn-success btn-sm" ?>
onclick="delete_data(`'.$row["location_rack_id"].'`, `'.
$row["location_rack_status"].'`)">Enable</button>'; print.php

}?> <?php

</td> //print.php

</tr> include '../database_connection.php';

include '../function.php';
<?php
} if(!is_admin_login())
} {
else header('location:../admin_login.php');
{ }
echo '
<tr> ?>
<td colspan="5" class="text-center">No Data <?php
Found</td> $date_from = date_create($_GET['from']);
</tr> $date_to=date_create($_GET['to']);
'; $date_from=date_format($date_from,"Y-m-d");
} $date_to=date_format($date_to,"Y-m-d");
?> ?>
</tbody> <html>
</table> <head>
</div> <link href="<?php echo base_url(); ?>asset/css/styles.css"
</div> rel="stylesheet" />
<script> <style>
table {
function delete_data(code, status) font-family: arial, sans-serif;
{ border-collapse: collapse;
var new_status = 'Enable'; width: 100%;
}
if(status == 'Enable')
{ td, th {
new_status = border: 2px solid #808080;
'Disable'; text-align: left;
} padding: 8px;
}
if(confirm("Are you sure you
want to "+new_status+" this Category?")) tr:nth-child(even) {
{ background-color: #dddddd;
}
window.location.href = "location_rack.php?
action=delete&code="+code+"&status="+new_status+"" @page
} {
} size:A4;
margin: 0;
</script> }
<?php </style>
</head>
} <body
onmouseover="document.getElementById('header').style.display
?> = 'block'">
<div class="my-4">
</div> <img src="image/logo.png" width="50" height="50"
style="vertical-align:middle" />
<span class="fs-4">Batangas Christian School Library
System</span>
<?php </div>
include '../footer.php'; <?php
if(!isset($_GET["submit"])){
?> echo <<< DTD
<form action="" method="get" id="header">
logout.php From: <input name="from" id="from" type="date" value="<?
=$date_from?>" max="" onclick="chekVal()">

Library System with SMS Notification for Batangas Christian School 135
To: <input name="to" id="to" type="date" value="<? echo '<body onload="setTimeout(function()
=$date_to?>" min="" onclick="chekVal()"> { window.print()}, 0);"
<input name="submit" value="Print" type="submit"> onmouseover="document.getElementById(\'header\').style.displa
</form> y = \'block\'">';

<script>
//input validation script }else if(isset($_GET['to']) && !isset($_GET['from'])){
function chekVal(){ $select_orders= $connect->prepare("SELECT *
document.getElementById('from').setAttribute("max", FROM lms_issue_book where issue_date_time between ?
document.getElementById('to').value); and ?");
document.getElementById('to').setAttribute("min", $select_orders->execute([$to,$to]);
document.getElementById('from').value);
} echo "<table>
</script> <tr>
<th>Book ISBN
DTD; Number</th>
}else{ <th>User Unique ID</th>
echo <<< DTD <th>Issue Date</th>
<form action="" method="get" style="display:none" <th>Return Date</th>
id="header"> <th>Late Return Fines</th>
From: <input name="from" id="from" type="date" value="<? <th>Status</th>
=$date_from?>" max="" onclick="chekVal()"> </tr>";
To: <input name="to" id="to" type="date" value="<?
=$date_to?>" min="" onclick="chekVal()"> while($row = $select_orders-
<input name="submit" value="Print" type="submit"> >fetch(PDO::FETCH_ASSOC)){
</form> echo "<tr><td>" .
htmlspecialchars($row['book_id']) . "</td><td>" .
<script> htmlspecialchars($row['user_id']) . "</td><td>".
//input validation script htmlspecialchars($row['issue_date_time']) . "</td><td>".
function chekVal(){ htmlspecialchars($row['return_date_time']) . "</td><td>".
document.getElementById('from').setAttribute("max", htmlspecialchars($row['book_fines']) . "</td><td>".
document.getElementById('to').value); htmlspecialchars($row['book_issue_status']) . "</td></tr>";
document.getElementById('to').setAttribute("min", }
document.getElementById('from').value);
} echo "</table>";
</script> echo '<body onload="setTimeout(function()
{ window.print()}, 0);"
DTD; onmouseover="document.getElementById(\'header\').style.displa
} y = \'block\'">';
}else{
$from = $_GET['from'];
?> $to = $_GET['to'];
<?php
if(isset($_GET['from']) && isset($_GET['to']) && $select_orders= $connect->prepare("SELECT * FROM
isset($_GET["submit"])) lms_issue_book where issue_date_time between ? and ?");
{ $select_orders->execute([$from,$to]);
$from = $_GET['from'];
$to = $_GET['to']; echo "<table>
<tr>
<th>Book ISBN
if(isset($_GET['from']) && !isset($_GET['to'])){ Number</th>
//sql table to print <th>User Unique ID</th>
$select_orders= $connect->prepare("SELECT * <th>Issue Date</th>
FROM lms_issue_book where issue_date_time between ? <th>Return Date</th>
and ?"); <th>Late Return Fines</th>
$select_orders->execute([$from,$from]); <th>Status</th>
</tr>";
echo "<table>
<tr> while($row = $select_orders-
<th>Book ISBN >fetch(PDO::FETCH_ASSOC)){
Number</th> echo "<tr><td>" .
<th>User Unique ID</th> htmlspecialchars($row['book_id']) . "</td><td>" .
<th>Issue Date</th> htmlspecialchars($row['user_id']) . "</td><td>".
<th>Return Date</th> htmlspecialchars($row['issue_date_time']) . "</td><td>".
<th>Late Return Fines</th> htmlspecialchars($row['return_date_time']) . "</td><td>".
<th>Status</th> htmlspecialchars($row['book_fines']) . "</td><td>".
</tr>"; htmlspecialchars($row['book_issue_status']) . "</td></tr>";
}
while($row = $select_orders-
>fetch(PDO::FETCH_ASSOC)){ echo "</table>";
echo "<tr><td>" . echo '<body onload="setTimeout(function()
htmlspecialchars($row['book_id']) . "</td><td>" . { window.print()}, 0);"
htmlspecialchars($row['user_id']) . "</td><td>". onmouseover="document.getElementById(\'header\').style.displa
htmlspecialchars($row['issue_date_time']) . "</td><td>". y = \'block\'">';
htmlspecialchars($row['return_date_time']) . "</td><td>". }
htmlspecialchars($row['book_fines']) . "</td><td>".
htmlspecialchars($row['book_issue_status']) . "</td></tr>"; }else if(isset($_GET['from']) && isset($_GET['to']) && !
} isset($_GET["submit"])){
$from = $_GET['from'];
echo "</table>"; $to = $_GET['to'];

Library System with SMS Notification for Batangas Christian School 136
{
$select_orders= $connect->prepare("SELECT * FROM $error .= '<li>Invalid Email
lms_issue_book where issue_date_time between ? and ?"); Address</li>';
$select_orders->execute([$from,$to]); }
else
echo "<table> {
<tr> $formdata['admin_email'] =
<th>Book ISBN $_POST['admin_email'];
Number</th> }
<th>User Unique ID</th> }
<th>Issue Date</th>
<th>Return Date</th> if(empty($_POST['admin_password']))
<th>Late Return Fines</th> {
<th>Status</th> $error .= '<li>Password is required</li>';
</tr>"; }
else
while($row = $select_orders- {
>fetch(PDO::FETCH_ASSOC)){ $formdata['admin_password'] =
echo "<tr><td>" . $_POST['admin_password'];
htmlspecialchars($row['book_id']) . "</td><td>" . }
htmlspecialchars($row['user_id']) . "</td><td>".
htmlspecialchars($row['issue_date_time']) . "</td><td>". if($error == '')
htmlspecialchars($row['return_date_time']) . "</td><td>". {
htmlspecialchars($row['book_fines']) . "</td><td>". $admin_id = $_SESSION['admin_id'];
htmlspecialchars($row['book_issue_status']) . "</td></tr>";
} $data = array(
':admin_email'
echo "</table>"; => $formdata['admin_email'],
}else{ ':admin_password' =>
$formdata['admin_password'],
} ':admin_id'
?> => $admin_id
</script> );
<div class="my-4 float-end justify-content-center">
<div class="mb-5"> $query = "
<span class="fs-6">Prepared by</span> UPDATE lms_admin
</div> SET admin_email = :admin_email,
admin_password = :admin_password
<div class="mt-5"> WHERE admin_id = :admin_id
<span class="fs-6">Librarian</span> ";
</div>
</div> $statement = $connect->prepare($query);
</div>
$statement->execute($data);
</body>
</html> $message = 'User Data Edited';
}
profile.php }

<?php $query = "


SELECT * FROM lms_admin
//profile.php WHERE admin_id = '".$_SESSION["admin_id"]."'
";
include '../database_connection.php';
$result = $connect->query($query);
include '../function.php';

if(!is_admin_login()) include '../header.php';


{
header('location:../admin_login.php'); ?>
}
<div class="container-fluid px-4">
$message = ''; <h1 class="mt-4">Profile</h1>
<ol class="breadcrumb mt-4 mb-4 bg-light p-2
$error = ''; border">
<li class="breadcrumb-item"><a
if(isset($_POST['edit_admin'])) href="index.php">Dashboard</a></li>
{ <li class="breadcrumb-item
active">Profile</a></li>
$formdata = array(); </ol>
<div class="row">
if(empty($_POST['admin_email'])) <div class="col-md-6">
{ <?php
$error .= '<li>Email Address is
required</li>'; if($error != '')
} {
else echo '<div
{ class="alert alert-danger alert-dismissible fade show"
if(!filter_var($_POST["admin_email"], role="alert"><ul class="list-unstyled">'.$error.'</ul> <button
FILTER_VALIDATE_EMAIL))

Library System with SMS Notification for Batangas Christian School 137
type="button" class="btn-close" data-bs-dismiss="alert" aria- ?>
label="Close"></button></div>';
} setting.php

if($message != '') <?php


{
echo '<div //setting.php
class="alert alert-success alert-dismissible fade show"
role="alert">'.$message.' <button type="button" class="btn- include '../database_connection.php';
close" data-bs-dismiss="alert"
aria-label="Close"></button></div>'; include '../function.php';
}
if(!is_admin_login())
?> {
<div class="card mb-4"> header('location:../admin_login.php');
<div class="card- }
header">
<i $message = '';
class="fas fa-user-edit"></i> Edit Profile Details
</div> if(isset($_POST['edit_setting']))
<div class="card- {
body"> $data = array(
':library_name'
<?php =>
$_POST['library_name'],
foreach($result as ':library_address'
$row) => $_POST['library_address'],
{ ':library_contact_number'
?> => $_POST['library_contact_number'],
':library_email_address'
=> $_POST['library_email_address'],
<form method="post"> ':library_total_book_issue_day' =>
$_POST['library_total_book_issue_day'],
<div class="mb-3"> ':library_one_day_fine'
=> $_POST['library_one_day_fine'],
<label class="form-label">Email ':library_currency'
Address</label> => $_POST['library_currency'],
':library_timezone'
<input type="text" => $_POST['library_timezone'],
name="admin_email" id="admin_email" class="form-control" ':library_issue_total_book_per_user'
value="<?php echo $row['admin_email']; ?>" /> =>
$_POST['library_issue_total_book_per_user']
</div> );

<div class="mb-3"> $query = "


UPDATE lms_setting
<label SET library_name = :library_name,
class="form-label">Password</label> library_address = :library_address,
library_contact_number = :library_contact_number,
<input type="password" library_email_address = :library_email_address,
name="admin_password" id="admin_password" class="form- library_total_book_issue_day
control" value="<?php echo $row['admin_password']; ?>" /> = :library_total_book_issue_day,
library_one_day_fine = :library_one_day_fine,
</div> library_currency = :library_currency,
library_timezone = :library_timezone,
<div class="mt-4 mb-0"> library_issue_total_book_per_user
= :library_issue_total_book_per_user
<input type="submit" ";
name="edit_admin" class="btn btn-primary" value="Edit" />
$statement = $connect->prepare($query);
</div>
$statement->execute($data);
</form>
$message = '
<?php <div class="alert alert-success alert-dismissible fade
} show" role="alert">Data Edited <button type="button"
class="btn-close" data-bs-dismiss="alert" aria-
?> label="Close"></button></div>
';
</div> }
</div>
$query = "
</div> SELECT * FROM lms_setting
</div> LIMIT 1
</div> ";

<?php $result = $connect->query($query);

include '../footer.php'; include '../header.php';

Library System with SMS Notification for Batangas Christian School 138
?> name="library_contact_number" id="library_contact_number"
class="form-control" value="<?php echo
<div class="container-fluid px-4"> $row['library_contact_number']; ?>" />
<h1 class="mt-4">Setting</h1>
</div>
<ol class="breadcrumb mt-4 mb-4 bg-light p-2
border"> </div>
<li class="breadcrumb-item"><a <div
href="index.php">Dashboard</a></li> class="col-md-6">
<li class="breadcrumb-item
active">Setting</a></li> <div class="mb-3">
</ol>
<?php <label class="form-label">Email
Address</label>
if($message != '')
{ <input type="text"
echo $message; name="library_email_address" id="library_email_address"
} class="form-control" value="<?php echo
$row['library_email_address']; ?>" />
?>
<div class="card mb-4"> </div>
<div class="card-header">
<i class="fas fa-user- </div>
edit"></i> Library Setting </div>
</div> <div
<div class="card-body"> class="row">
<div
<form method="post"> class="col-md-6">
<?php
foreach($result as <div class="mb-3">
$row)
{ <label class="form-label">Book Return
?> Day Limit</label>
<div
class="row"> <input type="number"
<div name="library_total_book_issue_day"
class="col-md-12"> id="library_total_book_issue_day" class="form-control"
value="<?php echo $row['library_total_book_issue_day']; ?>" />
<div class="mb-3">
</div>
<label class="form-label">Library
Name</label> </div>
<div
<input type="text" class="col-md-6">
name="library_name" id="library_name" class="form-control"
value="<?php echo $row['library_name']; ?>" /> <div class="mb-3">

</div> <label class="form-label">Book Late


Return One Day Fine</label>
</div>
</div> <input type="number"
<div name="library_one_day_fine" id="library_one_day_fine"
class="row"> class="form-control" value="<?php echo
<div $row['library_one_day_fine']; ?>" />
class="col-md-12">
</div>
<div class="mb-3">
</div>
<label </div>
class="form-label">Address</label> <div
class="row">
<textarea name="library_address" <div
id="library_address" class="form-control"><?php echo class="col-md-6">
$row["library_address"]; ?></textarea>
<div class="mb-3">
</div>
<label
</div> class="form-label">Currency</label>
</div>
<div <select name="library_currency"
class="row"> id="library_currency" class="form-control">
<div
class="col-md-6"> <?php echo Currency_list(); ?
>
<div class="mb-3">
</select>
<label class="form-label">Contact
Number</label> </div>

<input type="text" </div>

Library System with SMS Notification for Batangas Christian School 139
<div header('location:../admin_login.php');
class="col-md-6"> }

<div class="mb-3"> $query = "SELECT * FROM lms_issue_book


INNER JOIN lms_user on lms_user.user_unique_id =
<label lms_issue_book.user_id
class="form-label">Timezone</label> INNER JOIN lms_book on lms_book.book_isbn_number =
lms_issue_book.book_id
<select name="library_timezone" WHERE DATE(expected_return_date) = '".date("Y-m-d")."'
id="library_timezone" class="form-control"> AND sms_notif = '0'
AND book_issue_status = 'Issue'";
<?php echo $statement = $connect->prepare($query);
Timezone_list(); ?> $statement->execute(); // Fetching data

</select>
$query2 = "SELECT * FROM lms_issue_book
</div> INNER JOIN lms_user on lms_user.user_unique_id =
lms_issue_book.user_id
</div> INNER JOIN lms_book on lms_book.book_isbn_number =
</div> lms_issue_book.book_id
<div WHERE DATE(expected_return_date) = '".date("Y-m-d")."'
class="row"> AND sms_notif = '0'
<div AND book_issue_status = 'Issue'";
class="col-md-6"> $stmt = $connect->prepare($query2);
$stmt->execute();
<label class="form-label">Per User Book Issue
Limit</label> if(isset($_POST['send_btn'])){

<input type="number" $query3 = "SELECT * FROM lms_issue_book


name="library_issue_total_book_per_user" INNER JOIN lms_user on lms_user.user_unique_id =
id="library_issue_total_book_per_user" class="form-control" lms_issue_book.user_id
value="<?php echo $row['library_issue_total_book_per_user']; ? INNER JOIN lms_book on lms_book.book_isbn_number =
>" /> lms_issue_book.book_id
WHERE DATE(expected_return_date) = '".date("Y-m-d")."'
</div> AND sms_notif = '0'
</div> AND book_issue_status = 'Issue'";
<div class="mt-4 $stmt = $connect->prepare($query3);
mb-0"> $stmt->execute();

<input type="submit" name="edit_setting" foreach($stmt->fetchAll() as $row){


class="btn btn-primary" value="Save" />
</div> $msg = 'System has send a notification message to user: '.
<script $row['user_first_name'].' '.$row['user_last_name'].' because the
type="text/javascript"> book that he/she borrowed was up to date.';

$audit = "INSERT INTO lms_audit


document.getElementById('library_currency').value (`audit_desc`,`date_created`) VALUES ('$msg', '".date("Y-m-d
= "<?php echo $row['library_currency']; ?>"; H:i:s")."')";
$statement = $connect->prepare($audit);
$statement->execute();

document.getElementById('library_timezone').value="<?php $ch = curl_init();


echo $row['library_timezone']; ?>"; $parameters = array(
'apikey' => '4Zd6RytEFMx4y7m1GmRL', //Your API
</script> KEY
<?php 'number' => ''.$row['user_contact_no'].'',
} 'message' => 'Please be informed that you must return the
?> book name: '.$row['book_name'].'. with date: '.
</form> $row['expected_return_date'].'.',
'sendername' => 'SEMAPHORE'
</div> );
</div> curl_setopt( $ch,
</div> CURLOPT_URL,'https://semaphore.co/api/v4/messages' );
curl_setopt( $ch, CURLOPT_POST, 1 );
<?php
//Send the parameters set above with the request
include '../footer.php'; curl_setopt( $ch, CURLOPT_POSTFIELDS,
http_build_query( $parameters ) );
?>
// Receive response from server
sms.php curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$output = curl_exec( $ch );
<?php curl_close ($ch);

//sms.php $query4 = "UPDATE lms_issue_book SET sms_notif = '1'


WHERE issue_book_id = '".$row['issue_book_id']."' ";
include '../database_connection.php'; $statement = $connect->prepare($query4);
include '../function.php'; $statement->execute();
if(!is_admin_login()) }
{

Library System with SMS Notification for Batangas Christian School 140
echo '<script>alert("You have successfully send notification
message.");window.location="sms.php";</script>'; sms_return.php

} <?php

include '../header.php'; //sms_return.php

?> include '../database_connection.php';


<div class="container-fluid py-4" style="min-height: 700px;"> include '../function.php';
<h1>SMS Notification</h1> if(!is_admin_login())
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 {
border"> header('location:../admin_login.php');
<li class="breadcrumb-item"><a }
href="index.php">Dashboard</a></li>
<li class="breadcrumb-item active">SMS Notification</li> $query5 = "SELECT * FROM lms_issue_book
</ol> INNER JOIN lms_user on lms_user.user_unique_id =
<div class="row"> lms_issue_book.user_id
<div class="col-md-12"> INNER JOIN lms_book on lms_book.book_isbn_number =
<div class="card mb-12"> lms_issue_book.book_id
<div class="card-header"> WHERE DATE(return_date_time) = '".date("Y-m-d")."' AND
<i class="fas fa-user-plus"></i> SMS sms_return = '0'
</div> AND book_issue_status = 'Return'";
<div class="card-body"> $statement = $connect->prepare($query5);
<table id="datatablesSimple"> $statement->execute(); // Fetching data
<thead>
<tr>
<th>Student ID</th> $query6 = "SELECT * FROM lms_issue_book
<th>Student Name</th> INNER JOIN lms_user on lms_user.user_unique_id =
<th>Book Details</th> lms_issue_book.user_id
<th>Expected Return Date</th> INNER JOIN lms_book on lms_book.book_isbn_number =
</tr> lms_issue_book.book_id
</thead> WHERE DATE(return_date_time) = '".date("Y-m-d")."' AND
<tbody> sms_return = '0'
<?php foreach($statement->fetchAll() as $row):?> AND book_issue_status = 'Return'";
<tr> $stmt = $connect->prepare($query6);
<td><?php echo $row['user_unique_id'];?></td> $stmt->execute();
<td><?php echo $row['user_first_name'];?> <?php echo
$row['user_last_name'];?> </td> if(isset($_POST['send_btn1'])){
<td>
<ul style="list-style:none;"> $query7 = "SELECT * FROM lms_issue_book
<li><strong>ISBN Number:</strong><?php echo INNER JOIN lms_user on lms_user.user_unique_id =
$row['book_isbn_number'];?></li> lms_issue_book.user_id
<li><strong>Book Name:</strong><?php echo INNER JOIN lms_book on lms_book.book_isbn_number =
$row['book_name'];?></li> lms_issue_book.book_id
<li><strong>Category:</strong><?php echo WHERE DATE(return_date_time) = '".date("Y-m-d")."' AND
$row['book_category'];?></li> sms_return = '0'
<li><strong>Author:</strong><?php echo AND book_issue_status = 'Return'";
$row['book_author'];?></li> $stmt = $connect->prepare($query7);
</ul> $stmt->execute();
</td>
<td><?php echo $row['expected_return_date'];?></td> foreach($stmt->fetchAll() as $row){
</tr>
</tbody> $msg = 'System has send a notification message to user: '.
<?php endforeach; ?> $row['user_first_name'].' '.$row['user_last_name'].' because the
</table> book that he/she borrowed was returned.';
<?php
if($stmt->rowCount() > 0): $audit = "INSERT INTO lms_audit
?> (`audit_desc`,`date_created`) VALUES ('$msg', '".date("Y-m-d
<form method="post"> H:i:s")."')";
<button class="btn btn-primary" $statement = $connect->prepare($audit);
name="send_btn">Send SMS Notification</button> $statement->execute();
</form>
<?php else:?> $ch = curl_init();
<form method="post"> $parameters = array(
<button class="btn btn-primary" name="send_btn" 'apikey' => '4Zd6RytEFMx4y7m1GmRL', //Your API
disabled>Send SMS Notification</button> KEY
</form> 'number' => ''.$row['user_contact_no'].'',
<?php endif;?> 'message' => 'You successfully returned the book name: '.
$row['book_name'].' within the date: '.$row['return_date_time'].'
</div> and pay the fine ₱'.$row['book_fines'].'.',
</div> 'sendername' => 'SEMAPHORE'
</div> );
</div> curl_setopt( $ch,
</div> CURLOPT_URL,'https://semaphore.co/api/v4/messages' );
curl_setopt( $ch, CURLOPT_POST, 1 );
<?php
//Send the parameters set above with the request
include '../footer.php'; curl_setopt( $ch, CURLOPT_POSTFIELDS,
http_build_query( $parameters ) );
?>

Library System with SMS Notification for Batangas Christian School 141
// Receive response from server </div>
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); </div>
$output = curl_exec( $ch ); </div>
curl_close ($ch); </div>

$query8 = "UPDATE lms_issue_book SET sms_return = '1' <?php


WHERE issue_book_id = '".$row['issue_book_id']."' ";
$statement = $connect->prepare($query8); include '../footer.php';
$statement->execute();
} ?>
echo '<script>alert("You have successfully send receipt
message.");window.location="sms_return.php";</script>'; terms.php

} <?php

include '../header.php'; //terms.php

?> include '../database_connection.php';


<div class="container-fluid py-4" style="min-height: 700px;"> include '../function.php';
<h1>SMS Receipt</h1>
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 if(!is_admin_login())
border"> {
<li class="breadcrumb-item"><a header('location:../admin_login.php');
href="index.php">Dashboard</a></li> }
<li class="breadcrumb-item active">SMS Receipt</li>
</ol> include '../header.php';
<div class="row">
<div class="col-md-12"> ?>
<div class="card mb-12"> <html lang="en">
<div class="card-header"> <head>
<i class="fas fa-user-plus"></i> SMS <style>
</div> body{
<div class="card-body"> margin: 30px;
<table id="datatablesSimple"> padding: 0;
<thead> min-height: 100vh;
<tr> display: flex;
<th>Student ID</th> align-items: center;
<th>Student Name</th> justify-content: center;
<th>Book Details</th> }
<th>Return Date</th>
</tr> .terms-box{
</thead> max-width: 700px;
<tbody> background-color: #111;
<?php foreach($statement->fetchAll() as $row):?> color: #fff;
<tr> font-family: "Montserrat";
<td><?php echo $row['user_unique_id'];?></td> padding: 60px 30px;
<td><?php echo $row['user_first_name'];?> <?php echo }
$row['user_last_name'];?> </td>
<td> .terms-text{
<ul style="list-style:none;"> padding: 0 20px;
<li><strong>ISBN Number:</strong><?php echo height: 400px;
$row['book_isbn_number'];?></li> overflow-y: auto;
<li><strong>Book Name:</strong><?php echo font-size: 14px;
$row['book_name'];?></li> font-weight: 500;
<li><strong>Category:</strong><?php echo color: #f1f1f1;
$row['book_category'];?></li> }
<li><strong>Author:</strong><?php echo
$row['book_author'];?></li> .terms-text::-webkit-scrollbar{
</ul> width: 2px;
</td> background-color: #282828;
<td><?php echo $row['return_date_time'];?></td> }
</tr>
</tbody> .terms-text::-webkit-scrollbar-thumb{
<?php endforeach; ?> background-color: #d13639;
</table> }
<?php
if($stmt->rowCount() > 0): .terms-text h2{
?> text-transform: uppercase;
<form method="post"> }
<button class="btn btn-primary"
name="send_btn1">Send SMS Receipt</button> .terms-box h4{
</form> font-size: 13px;
<?php else:?> text-align: center;
<form method="post"> padding: 0 40px;
<button class="btn btn-primary" name="send_btn1" }
disabled>Send SMS Receipt</button>
</form> .terms-box h4 span{
<?php endif;?> color: #d13639;
}
</div>

Library System with SMS Notification for Batangas Christian School 142
.buttons{ <p>1. Only Bona fide students, faculty
display: flex; members, officers of the administration and staff of Batangas
padding: 0 20px; Christian School are allowed to use the library.</p>
justify-content: space-between; <p>2. Students are required to present their
} validated School I.D. upon entering the library.</p>
<p>3. Students must be in complete uniform
.bton{ during class days and in proper school attire during free
height: 50px; days.</p>
width: calc(100% - 6px); <p>4. All materials are for library use only.
border: 0; Photocopying is not allowed.</p>
border-radius: 6px; <h7>Alumni</h7>
font-size: 19px; <p>1. BCS Alumni may use the library
font-weight: 500; resources on Fridays and must present their Alumni I.D Alumni
color: #fff; are given free access to the library for three days per
transition: .3s linear; seminar.</p>
cursor: pointer; <p>2. In excess of the three days period, a
} research fee of fifty pesos(Php 50.00) per day is paid at the
Accounting Office. Official receipt must be presented to the
.red-btn{ Teacher Librarian for recording purposes.</p>
background-color: #d13639; <p>3. All library materials are for library use
} only. Photocopying is not allowed</p>
<h7>2.2 LIBRARY DECORUM</h7>
.btn:hover{ <p>1. Library users MUST observe total silence
opacity: .6; in the Library and its environment at all times</p>
} <p>2. All users are required to observe and
</style> obey library policies including the wearing of the prescribed
</head> school uniform and School I.D at all times.</p>
<body> <p>3. The use of mobiles phones is strictly
<div class="container-fluid py-4" style="min-height: 700px;"> prohibited in the library</p>
<h1>Terms & Condition</h1> <p>4. Food and drinks are not allowed inside
<div class="terms-box"> the library. Food and drinks are hazard to library materials and
<div class="terms-text"> equipment and the spilling of such can create a fall and/or pest
<h5>STUDENT LIBRARY SERVICES MANUAL</h5> problem.</p>
<h5>Greetings Users,</h5> <p>5. Handle library materials with care. Avoid
<h5>Vision</h5> marking, underlining, inserting bulky objects and making “dog
<p>BCS Library: Geared toward quality information ears”. These acts can shorten the life of library materials. Anyone
sources and services committed to continuously support and assist caught marking, defacing, mutilating books or any other library
in the circular and instructional program of the school.</p> material and /or property will expect to pay for the material with
<h5>Mission</h5> the most current edition of the same or as a billed by the school
<p>The Library provides the basic knowledge and skill administration.</p>
needed in acquiring valuable information through the use of <p>6. Books and journals must be properly
library and media resources and its facilities in support of the charged out before they may be brought out of the library for
vision-mission statement of Batangas Christian School.</p> home reading.</p>
<h5>LIBRARY GOALS:</h5> <p>7. Cleanliness and orderliness in the library
<p>1. Provides adequate and functional is a must. Chairs must be pushed back under the table after using
equipment to support and services;</p> and must not be transferred from one place to another. Seats may
<p>2. Train faculty and students in the use and not be reserved</p>
proper care of the facilities;</p> <p>8. Users are not allowed to log in using their
<p>3. Assist students and teachers in the online personal passwords at the search computers. Do not shut down
access of information through the internet;</p> the computer after you through with your search.</p>
<p>4. Encourage reflective interaction, <p>9. The library has assigned a laptop
intellectual discussion and academic exploration; and</p> charging station for library users. All other electric outlets inside
<p>5. Give an excellent, effective, and efficient the library are for official library use only. In no case are the
library services to the academic community.</p> users allowed to use the outlets for charging laptops and mobile
<h5>LIBRARY OBJECTIVES:</h5> phones to avoid any electrical malfunctions.</p>
<h6>1. TEACHING AND LEARNING <p>10. Library users should attend to their
ROLE</h6> valuables in the library. The Library will not be responsible for
<p>To extend and strengthen the teaching and learning any item lost, stolen, or damaged on library premises. Users are
role and educational impact as an academic partner.</p> not allowed to leave their baggage overnight in the library.</p>
<h6>2. COLLECTION</h6> <p>11. Library staff reserves the right to inspect
<p>To establish processes and support structures that bags or other personal property when users enter or leave the
ensure selection, acquisition, preservation, and access to the full premises,</p>
spectrum of research materials. Build the sustainable digital <p>12. Photography and recording are not
infrastructure needed to support expanding modes of research, allowed on library premises without prior permission.</p>
teaching, and scholarly communication.</p> <h7>2.3FINES AND PENALTIES</h7>
<h6>3. STUDENTS EXPERIENCE</h6> <p>2.3.1 Overdue books. Books not returned on the due
<p>To a library experience that is high quality, consistent, date shall have a fine of five pesos (Php5.00) per day excluding
and robust regardless of the users’ access method, or Sundays and Holidays.</p>
objective.</p> <p>2.3.2 Lost books. The borrower should report
<h6>4. USERS SATISFACTION</h6> immediately to the Circulation Librarian when a book is lost,
<p>To suffice the need of resources and information otherwise, he will pay the overdue fines incurred until the day the
whether academic and/or for time bel users efficiently and special loss is reported. The borrower will be given one (1) month
non-academic days.</p> extension to find the book.</p>
<h5>LIBRARY RULES AND REGULATIONS</h5> <p>Lost book(s) shall be paid for based on the current
<h6>1. ACCESSIBILITY</h6> value of the book or replace them with the following conditions:
<p>The library is open Mondays to Fridays from 8:00 am *Same title and author, preferably with the latest copyright*
to 4:00 pm. It is closed on Saturday, Sundays, holidays and special Processing fee which is the 10% of the price of the book*
non- academic days.</p> Reprinted copy is not accepted as replacement of an original
<h6>2. GENERAL POLICES</h6> edition</p>
<h7>2.1 ADMISSION</h7> <p>2.3.3 Damaged/Destroyed library materials</p>

Library System with SMS Notification for Batangas Christian School 143
<p>A library user found irresponsible for the destruction <p>1. The Internet service of the library is intended for
or damage of any library materials will be fined accordingly and Research Purposes</p>
shall be charged based on the current value of the book. Failure to <p>2. Validated school I.D. must be presented
observe these regulations will be reported and may lead to:</p> to the E-Library In-Charge upon entry to the E-Library.</p>
<p>1st offense: Warning/Reprimand</p> <p>3. Usage: One (1) hour free use per user/per
<p>2nd offense: Suspension of borrowing privileges</p> day on a first come, first served basis.</p>
<p>3rd offense: Suspension from library privileges</p> <p>4. 10/hr. will be charged in excess of 1
<p>•Same title and author with the latest copyright is hour.</p>
preferred</p> <p>5. Printing charges: Short size: P2.50/page
<p>•Reprint copy is not accepted as replacement for an Long size: 3.00/page</p>
original edition.</p> </div>
<p>In case of floods, fires and others disasters, a
certification is required either from the bureau of Fire, Barangay <div class="buttons">
Captain, etc. to support the claim.</p> <button class="bton red-btn" onclick="history.go(-
<h7>2.4 LIBRARY CLEARANCE REQUESTS, 1)">Back</button>
ETC.</h7> </div>
<p>One week before the final exam, circulation of books is </div>
cut off in order to give time for the library staff to consolidate all </div>
records of the students and faculty with library are encouraged to </body>
settle their library obligations/ accountabilities before the </html>
clearance signing schedule. Clearances of undergraduate students <?php
are signed in groups either by majors or sections.</p>
<p>The Teacher Librarian signs all student include '../footer.php';
clearances.</p>
<h7>2.5 CONTROL AND SECURITY ?>
MEASURES</h7>
<p>To safeguard library resources, an electronic user.php
surveillance system (CCTV) is installed in strategic areas of the
library. Likewise, ample aisles. emergency exits, fire <?php
extinguishers, and smoke alarm system are installed in the
library.</p> //user.php
<h6>3. CIRCULATION</h6>
<h7>3.1 BORROWING POLICIES FOR HOME USE include '../database_connection.php';
BOOKS </h7>
<p>Circulation Service Hours is from Mondays thru include '../function.php';
Fridays starting at 8:00 in the morning to 3:00 in the
afternoon.</p> if(!is_admin_login())
<p>3.1.1 Students</p> {
<p>a. All bona fide students of BCS may header('location:../admin_login.php');
borrow a maximum of two books for a period of 2-5 days. The }
Validated School I.D. is required in borrowing books and other
library materials.</p> if(isset($_GET["action"], $_GET['status'], $_GET['code']) &&
<p>b. All faculty members are discouraged $_GET["action"] == 'delete')
from requesting another person (student, fellow faculty member, {
etc.) to return borrowed books in their behalf;</p> $user_id = $_GET["code"];
<p>c. Borrowing privileges will be suspended $status = $_GET["status"];
when materials have not been returned after each
semester/grading period;</p> $data = array(
<p>3.1.2 Faculty</p> ':user_status' =>
<p>a. Faculty members and Staff are allowed to borrow $status,
books for home use to a maximum of five (5) books per semester ':user_updated_on' =>
or grading period</p> get_date_time($connect),
<p>b. A faculty needing a material should ':user_id' =>
personally visit the library and sign the book card of the book $user_id
borrowed. In case another person will get the material, a written );
authorization and Employee I.D. must be presented to the
circulation librarian;</p> $query = "
<p>c. Faculty members are discouraged from UPDATE lms_user
borrowing library books for other members of the family or SET user_status = :user_status,
friends;</p> user_updated_on = :user_updated_on
<p>d. Reserve books with only one copy maybe WHERE user_id = :user_id
borrowed by a faculty for seven (7) days after which the book will ";
be recalled by the librarian.</p>
<p>e. Faculty members are required to return $statement = $connect->prepare($query);
the books every semester or to renew if they still need them. To
renew, borrowed books should be brought to the circulation in- $statement->execute($data);
charge to update the record;</p>
<p>f. All faculty members are discouraged header('location:user.php?
from requesting another person (student, fellow faculty member, msg='.strtolower($status).'');
etc.) to return borrowed books in their behalf;</p> }
<p>g. Borrowing privileges will be suspended
when materials have not been returned after each $query = "
semester/grading period;</p> SELECT * FROM lms_user
<h7>3.2. PHOTOCOPY</h7> ORDER BY user_id DESC
<p>Students. faculty, and staff are given a period of one (I) ";
hour to photocopy library materials. All library materials should
be properly charged out. Theses and dissertations are not to be $statement = $connect->prepare($query);
taken out for photocopy. A fine of five pesos (Php5.OO) per hour
is charged for books not returned on time.</p> $statement->execute();
<p>ELECTRONIC LIBRARY (E-LIB.)</p>

Library System with SMS Notification for Batangas Christian School 144
include '../header.php'; <th>Created On</th>
<th>Updated On</th>
?> <th>Action</th>
</tr>
<div class="container-fluid py-4" style="min-height: 700px;"> </tfoot>
<h1>User Management</h1> <tbody>
<ol class="breadcrumb mt-4 mb-4 bg-light p-2 <?php
border"> if($statement->rowCount() >
<li class="breadcrumb-item"><a 0)
href="index.php">Dashboard</a></li> {
<li class="breadcrumb-item active">User Management</li>
</ol> foreach($statement->fetchAll() as $row)
<?php { ?>
<tr>
if(isset($_GET["msg"])) <td><?php echo '<img src="../upload/'.
{ $row["user_profile"].'" class="img-thumbnail" width="75" />';?
if($_GET["msg"] == 'disable') ></td>
{
echo '<div class="alert alert- <td><?php echo ''.$row["user_unique_id"].'';?></td>
success alert-dismissible fade show" role="alert">Category
Status Change to Disable <button type="button" class="btn- <td><?php echo ''.$row["user_first_name"].' '.
close" data-bs-dismiss="alert" $row["user_last_name"].'';?></td>
aria-label="Close"></button></div>';
} <td><?php echo ''.$row["user_email_address"].'';?
></td>
if($_GET["msg"] == 'enable')
{ <td><?php echo
echo ' ''.$row["user_contact_no"].'';?></td>
<div class="alert alert-
success alert-dismissible fade show" role="alert">Category <td><?php echo ''.$row["user_address"].'';?></td>
Status Change to Enable <button type="button" class="btn-
close" data-bs-dismiss="alert" <td><?php echo ''.
aria-label="Close"></button></div> $row["user_verification_status"].'';?></td>
';
} <td><?php
}
$user_status = '';
?>
<div class="card mb-4"> if($row['user_status'] == 'Enable')
<div class="card-header"> {
<div class="row">
<div class="col col-md-6"> $user_status = '<div class="badge bg-
<i class="fas fa- success">Enable</div>';
table me-1"></i> User Management }
</div> else
<div class="col col-md-6" {
align="right">
</div> $user_status = '<div class="badge bg-
</div> danger">Disable</div>';
</div> }
<div class="card-body">
<table id="datatablesSimple"> echo''.$user_status.'';?></td>
<thead>
<tr> <td><?php echo
''.$row["user_created_on"].'';?></td>
<th>Image</th>
<th>User Unique ID</th> <td><?php echo
<th>Name</th> ''.$row["user_updated_on"].'';?></td>
<th>Email Address</th>
<th>Contact No.</th> <td><?php
<th>Address</th>
<th>Email Verified</th> if($row['user_status'] == 'Enable')
<th>Status</th>
<th>Created On</th> {
<th>Updated On</th>
<th>Action</th> echo
</tr>
</thead> '<button type="button" name="delete_button"
<tfoot> class="btn btn-danger btn-sm" onclick="delete_data(`'.
<tr> $row["user_id"].'`, `'.$row["user_status"].'`)">Disable</td>';
<th>Image</th> }
<th>User Unique ID</th>
<th>Name</th> else
<th>Email Address</th>
<th>Contact No.</th> {
<th>Address</th>
<th>Email Verified</th> echo
<th>Status</th>

Library System with SMS Notification for Batangas Christian School 145
'<button type="button" name="delete_button"
class="btn btn-success btn-sm" onclick="delete_data(`'.
$row["user_id"].'`, `'.$row["user_status"].'`)">Enable</td>';

} ?>
</tr>
<?php
}
}
else
{
echo '
<tr>
<td
colspan="12" class="text-center">No Data Found</td>
</tr>
';
}
?>
</tbody>
</table>
</div>
</div>
</div>

<script>

function delete_data(code, status)


{
var new_status = 'Enable';

if(status == 'Enable')
{
new_status = 'Disable';
}

if(confirm("Are you sure you want to


"+new_status+" this User?"))
{
window.location.href =
"user.php?
action=delete&code="+code+"&status="+new_status+"";
}
}

</script>

<?php

include '../footer.php';

?>

Library System with SMS Notification for Batangas Christian School 146

You might also like