0% found this document useful (0 votes)
27 views

Online Library Management System

Uploaded by

NEHA SIBY
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)
27 views

Online Library Management System

Uploaded by

NEHA SIBY
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/ 63

RGB COLOUR GUESSING GAME

PROJECT REPORT

Submitted to

BHARATHIAR UNIVERSITY

A Mini Project report submitted in partial fulfillment of the

requirements of Bharathiar University, Coimbatore for the award

of the degree of Master of Computer Applications

Submitted By

VIGNESH KUMAR V.

(Reg No:2238M0101)

Under the guidance of


Mrs. Surabhi K.S

Assistant Professor
NEHRU COLLEGE OF MANAGEMENT

Approved by AICTE, New Delhi & Affiliated to Bharathiar University,

Coimbatore Accredited by NAAC with B++Recognized by UGC

with2(f) & 12(B)“Nehru gardens”,

Thirumalayampalayam Coimbatore-105.

November 2023
Department of Computer Applications PROJECT
REPORT CERTIFICATE
This is to certify that this project work entitled “Online Library Management System”
is the bonafide work of Vignesh Kumar.V.(Reg.No:2238M0101)submitted in partial
fulfilment of the requirement for the award of the degree of MASTER OF COMPUTER
APPLICATIONS of Bharathiar University, Coimbatore under the guidance of Mrs Surabhi
K.S. MCA, Assistant Professor, Department of Computer Applications, Nehru College of
Management, Coimbatore during the Academic year 2022-2023.

INTERNAL GUIDE

HoD-MCA PRINCIPAL

Submitted for the viva-voice examination held on

Internal Examiner External Examiner


DECLARATION

I, Vignesh Kumar.V. (Reg.No:2238M0044) hereby declare that the project report entitled

“Online Library Management System” is a bonafide record of the project work done by me, under the

guidance of Mrs

A.Nandhini MCA Assistant Professor, Department of Computer Application, Nehru College of

Management, Coimbatore. Declared further, that to the best of my knowledge, the work reported here

does not form part of any other project report or dissertation on the basis of which a degree or award was

conferred on an earlier occasion to any other candidate. The content of this report is not being presented

by any other student to this or any other University for the award of a degree.

Date :

Place : Coimbatore Signature of the candidate


ACKNOWLEDGEMENT

The satisfaction that accompanies the successful completion of any task would be incomplete
without mentioning about the people who made it possible, whose constant guidance and
encouragement has crowned the efforts with success. I would like to thank almighty God
whogave knowledge and strength to complete this project successfully.

With deep gratitude, I profoundly thank our CEO & Secretary Dr P.KRISHNA KUMAR, M.B.A,
Ph.D., forpermitting me to undertake this work in Nehru College of Management.

I express my deep sense of gratitude to Principal, Dr. R.MOSES DANIEL M.B.A., Ph.D.,
PGDCA., PGDIB Associate Professor Dr.M SENGALIAPPAN, Head, Department of
Computer Applications for providing me with all the necessary facilities, which helped me, a lot
in the successful completion of this project.

It is a great pleasure for me to acknowledge the assistance of my project guide Mrs Surabhi K.S.
MCA Assistant Professor, Department of Computer Applications, Nehru College of Management,
Coimbatore, for her valuable advice and kind support during the period of this project.

With gratitude,

Vignesh Kumar.V.
ABSTRACT

Online Library management system is a project which aims in developing a computerized system
to maintain all the daily work of library .This project has many features which are generally not
available in normal library management systems like facility of user login and a facility of admin
login .It also has a facility of admin login through which the admin can monitor the whole
system . It has also a facility where student after logging in their accounts can see list of books
issued and its issue date and return date.

Overall, this project of ours is being developed to help the students as well as staff of library to
maintain the library in the best way possible and also reduce the human efforts.
TABLE OF THE CONTENT
CHAPTERS NAME OF THE TITLE PAGE NO

CHAPTER 1 INRODUCTION 01
1.1 OVERVIEW OF THE PROJECT

CHAPTER 2 SYSTEM ANALYSIS


2.1 FEASIBILITY STUDY
02-03
2.2 EXISTING SYSTEM

2.3 PROPOSED SYSTEM

CHAPTER 3 SYSTEM SPECIFICATION


3.1 HARDWARE SPECIFICATION
04-06
3.2 SOFTWARE SPECIFICATION

3.3 SOFTWARE TOOLS USED

CHAPTER 4 SYSTEM DESIGN


4.1 DESINING TERMINOLOGY 07-13
4.2 DATA FLOW DIAGRAM

4.3 DATABASE DESIGN

CHAPTER 5 SYSTEM DEVELOPMENT


5.1 SYSTEM MODULES SPECIFICATION 14-15
5.2 USER MANUAL PROCEDURES

CHAPTER 6 SYSTEM TESTING


6.1 TESTING METHODOLOGIES
16-17
6.2 TESTING IN DEVELOPED SOFTWARE

CHAPTER 7 SOFTWARE MAINTENANCE 18


7.1 SYSTEM MAINTENANCE

CHAPTER 8 CONCLUSION&SCOPE FOR FUTURE


ENHANCEMENT
19
8.1 CONCLUSION

8.2 SCOPE FOR FUTURE ENHANCEMENT

CHAPTER 9 BIBLIOGRAPHY 20
9.1 REFERENCES
CHAPTER 10 APPENDICES 21-61
10.1 SCREENSHOTS

10.2 SAMPLE SOURCE CODE

CHAPTER 1

INTRODUCTION

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

1.1 OVERVIEW OF THE PROJECT

The project aims and objectives that will be achieved after completion of this project are
discussed in this subchapter. The aims and objectives are as follows:
• Online book issue
• Request column for librarian for providing new books
• Student login page where student can find books issued by him/her and date of
return.   A search column to search availability of books
CHAPTER 2

SYSTEM ANALYSIS

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

2.1 FEASIBILITY STUDY

The feasibility of the project is analyzed in this phase and business proposal is put forth
with a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the proposed
system is not a burden to the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.

Three key considerations involved in the feasibility analysis are:

1.Economic Feasibility

This study is carried out to check the economic impact will have on the system will have on the
organization. The amount of fund that the company can pour into the research and development
of the system is limited. The expenditures must be justified. Thus the developed system as well
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products have to be purchased.

2. Technical Feasibility

This study is carried out to check the technical feasibility, that is, the technical requirements of
the system. Any system developed must not have a high demand on the available technical
resources. This will lead to high demands being placed on the client. The developed system must
have a modest requirement, as only minimal or null changes for the implementing this system.

3. Operational Feasibility
The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity. The level of acceptance by the
users solely depends on the methods that are employed to educate the user about the system
and to make him familiar with it. His level of confidence must be raised so that he is also
able to make some constructive criticism, which is welcomed, as he is the final user of the
system.

2.2 EXISTING SYSTEM


In the available Online Library Management System, librarian maintains the details of each book
on the registers so to find out the number of books available in the library they need to go to
check the entire entry which makes the process slow. While they need to spend an extra hour to
maintain the records of books. For a student who wants to know about a book in the library need
to search the entire book section. The student needs to check the status of the book means the last
date of book, how many books has issued.

2.3 PROPOSED SYSTEM


The proposed Online Library Management System project will help the students and librarian to
maintain the details of the library. It will assist the librarian before the shortage of books while
they can know the details of the number of currently available in the library according to the
author by accessing the system. A student can view the details of the book issued by them, and
the system will notify the students about the last date of submission of books. At the time of issue
of a book, the student will get assisted by the system about different authors of a similar book so
that they can get the best available book from the library.

CHAPTER 3

SYSTEM SPECIFICATION

3.1 SOFTWARE REQUIREMENT

FRONT END: HTML CSS JAVASCRIPT MYSQL

BACKEND: MYSQL

3.2 HARDWARE REQUIREMENT

PROCESSOR: Windows 10

HARD DISK: 120 GB

RAM: 16 GB
3.3 SOFTWARE TOOLS USED

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

FRONT END

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

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

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

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


commonly used as part of web browsers, whose implementations allow client-side scripts to
interact with the user, control the browser, communicate asynchronously, and alter the document
content that is displayed. It is also being used in server-side programming, game development
and the creation of desktop and mobile applications. JavaScript is a prototype-based scripting
language with dynamic typing and has first-class functions. Its syntax was influenced by C.
JavaScript copies many names and naming conventions from Java, but the two languages are
otherwise unrelated and have very different semantics. The key design principles within
JavaScript are taken from the Self and Scheme programming languages. It is a multi-paradigm
language, supporting object-oriented, imperative, and functional programming styles. The
application of JavaScript to use outside of web pages—for example, in PDF documents,
sitespecific browsers, and desktop widgets—is also significant. Newer and faster JavaScript VMs
and platforms built upon them (notably Node.js) have also increased the popularity of JavaScript
for server-side web applications. On the client side, JavaScript was traditionally implemented as
an interpreted language but just-in-time compilation is now performed by recent (post-

2012) browsers.

PHP- PHP is a server-side scripting language designed for web development but also used as a
general-purpose programming language. PHP is now installed on more than 244 million websites
and 2.1 million web servers. Originally created by Rasmus Lerdorf in 1995, the reference
implementation of PHP is now produced by The PHP Group. While PHP originally stood for
Personal Home Page, it now stands for PHP: Hypertext Preprocessor, a recursive backronym
code is interpreted by a web server with a PHP processor module, which generates the resulting
web page: PHP commands can be embedded directly into an HTML source document rather than
calling an external file to process data. It has also evolved to include a command-line interface
capability and can be used in standalone graphical applications.

BACK END

The back end is designed using MySQL which is used to design the databases.

MYSQL- MySQL ("My S-Q-L", officially, but also called "My Sequel") is (as of July 2013) the
world's second most widely used open-source relational database management system
(RDBMS). It is named after co-founder Michael Widenius daughter, My. The SQL phrase stands
for Structured Query Language. The MySQL development project has made its source code
available under the terms of the GNU General Public License, as well as under a variety of
proprietary agreements. MySQL was owned and sponsored by a single for-profit firm, the
Swedish company MySQL AB, now owned by Oracle Corporation. MySQL is a popular choice
of database for use in web applications, and is a central component of the widely used LAMP
open-source web application software stack (and other 'AMP' stacks). LAMP is an acronym for
"Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open-source projects that require a
full-featured database management system often use MySQL. For commercial use, several paid
editions are available, and offer additional functionality. Applications which use MySQL
databases. include: TYPO3, MODx, Joomla, WordPress, phpBB, MyBB, Drupal and other
software. MySQL is also used in many high-profile, large-scale websites, including Wikipedia,
Google (though not for searches), Facebook, Twitter, Flickr, and YouTube.
CHAPTER 4

SYSTEM DESIGN

4.1 DESIGN TERMINOLOGY:


DFD Symbols

In a DFD there are four symbols

A Square defines a source or destination of system data.

An arrow identifies data flow in motion. It is a pipeline through

which in format flows

A circle or a bubble represents a process that transform incoming data

Into going data flows

An open rectangle is a data source or data at rest or a temporary of data

Constructing a DFD
4.2 DATA FLOW DIAGRAM
Add/Upate/Delete
Category
LEVEL 1

Add/Update/Delete
Authors

ADMIN

Add/Update/Delete Book

Admin After Login


Issue a book

Manage return entry

Manage Regid students

LEVEL 2

Check issued and


returned book details
USER/
STUDENT

Manage own profile

Student After Login


Change own password

User dashboard
Issue
book

Issue a ISBN no.


book
Display
book info

Go back
to main Return
menu Book
ER DIAGRAM

4.3 DATABASE DESIGN

VARIOUS TABELS TO MAINTAIN INFORMATION


ADMIN TABLE

Table tbl authors track the details of authors

Table tbl category track the record of category


Table tbl books for books records

Table tbl students for students record and student login details.













CHAPTER 5
SYSTEM DEVELOPMENT

5.1 SYSTEM MODULES SPECIFICATION

ADMIN MODULE:

In a computerized library management system the librarian manages the library


activities in digital setup.
Admin module has three types: 
Login Form
 Add New Book
 Add Author
 Issue Book
 Search Student ID
 Change own password

ADMIN FEATURES

 Admin Dashboard
 Admin can add/update/ delete category
 Admin can add/update/ delete author
 Admin can add/update/ delete books
 Admin can issue a new book to student and also update the details when student
return book
 Admin can search student by using their student ID
 Admin can also view student details
 Admin can change own password

STUDENT/USER MODULE:

A database for tracking student/user demographic information that can be maintained by the
user as well as the vendor-much like a social networking site.

STUDENTS FEATURES:

 Student can register yourself and after registration they will get studentid  After
login student can view own dashboard.
 Student can update own profile.
 Student can view issued book and book return date-time.
 Student can also view the available books in the library.
 Student can also change own password.
 Student can also recover own password .

5.2 USER MANUAL PROCEDURES


Fact finding technique, which is the most appropriate one, includes four techniques

• Data collection

• Questionnaires

• Personnel interviews

• Onsite-Observation

Data Collection

The data has been collected and organized from the documents such as records ,reports from
the project manager, then collected the details of the present system. The recent information
is collected through interviews and by direct observation.

Questionnaires

Questionnaires are an important and effective type of correspondence. This method is


effective to obtain information from a large number of peoples, particularly if they are widely
scattered or in remote locations. It is also possible to ask to the manager about their
requirements. Questionnaires should be in order to increase the promptness and probability
of response. Questionnaires can also be used to solicit responses to specific questions from
individuals.

Personnel interview

It is one of the most fruitful methods of obtaining information.Personal interviews has been
conducted with the manager and also collected all the details related to the project.

Onsite -observation

The data has been collected by observing the operations of the existing system and analyzed
what are all the changes to be made to the existing system and formulated questions and
drawn conclusions on the basis of observation

CHAPTER 6
SYSTEM TESTING
6.1 TESTING METHODOLOGIES

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

1.Unit testing

2.integration testing

UNIT TESTING

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

• The procedures belonging to other modules that the module under test calls

• Non local data structures that module accesses

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

Test For the admin module



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

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

 Book Addition- Admin can enter details of book and can add the details to the
main book table also he can view the books requests .

Test for Student login module

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

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

INTEGRATION TESTING

In this type of testing, we test various integration of the project module by providing the

Input.The primary objective is to test the module interfaces in order to ensure that
errors are occurring when one module invokes the other module.
.
STING IN DEVELOPED SOFTWARE

All the project is developed successfully and tested completely on base of the
requirements mentioned in the DFD and the module details. Unit testing is conducted
while development regression testing is conducted while merging module. System
testing is conducted while all project ready. Regression testing is done while improve
the performance of the system.
CHAPTER 7 SOFTWARE
MAINTENANCE

7.1 SYSTEM MAINTENANCE

System maintenance is widely accepted part of SDLC now a days. It stands for all the modifications and
updations done after the delivery of software product. There are number of reasons, why modifications are
required, some of them are briefly mentioned below:

Market Conditions - Policies, which changes over the time, such as taxation and newly introduced
constraints like, how to maintain bookkeeping, may trigger need for modification. Client
Requirements - Over the time, customer may ask for new features or functions in the software.

Host Modifications - If any of the hardware and/or platform (such as operating system) of the target host
changes, software changes are needed to keep adaptability.

Organization Changes - If there is any business level change at client end, such as reduction of
organization strength, acquiring another company, organization venturing into new business, need to
modify in the original software may arise.

Types of maintenance
In a software lifetime, type of maintenance may vary based on its nature. It may be just a routine
maintenance tasks as some bug discovered by some user or it may be a large event in itself based on
maintenance size or nature. Following are some types of maintenance based on their characteristics:

Corrective Maintenance - This includes modifications and updations done in order to correct or fix
problems, which are either discovered by user or concluded by user error reports.
Adaptive Maintenance - This includes modifications and updations applied to keep the software product
up-to date and tuned to the ever changing world of technology and business environment.

Perfective Maintenance - This includes modifications and updates done in order to keep the software
usable over long period of time. It includes new features, new user requirements for refining the software
and improve its reliability and performance.

Preventive Maintenance - This includes modifications and updations to prevent future problems
of the software. It aims to attend problems, which are not significant at this moment but may
cause serious issues in future.

CHAPTER 8

CONCLUSION & FUTURE SCOPE


8.1 CONCLUSION

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

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

8.2 SCOPE FOR FUTURE ENHANCEMENT

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

9.1 REFERENCES

• http://www.w3schools.com/html/html_intro.asp
• https://www.w3schools.com/php/default.asp
• https://www.w3schools.com/sql/default.asp

 Fundamentals of software engineering by Rajib mall, PHI learning

Web development and application development by Ivan Byross BPB publications















































CHAPTER 10 APPENDICES

 10.1 SCREEN SHOTS














































10.2 SAMPLE SOURCE CODE

Admin login

<?php
session_start(); error_reporting(0);
include('includes/config.php');
if($_SESSION['alogin']!=''){
$_SESSION['alogin']='';
}
if(isset($_POST['login']))
{
$username=$_POST['username'];
$password=md5($_POST['password']);
$sql ="SELECT UserName,Password FROM admin WHERE
UserName=:username and Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':username', $username, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
$_SESSION['alogin']=$_POST['username'];
echo "<script type='text/javascript'> document.location
='admin/dashboard.php'; </script>";
} else{
echo "<script>alert('Invalid Details');</script>";
}
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,
initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Online Library Management System</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans'
rel='stylesheet' type='text/css' />

</head>
<body>
<!------MENU SECTION START-->
<?php include('includes/header.php');?>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">ADMIN LOGIN FORM</h4>
</div>
</div>

<!--LOGIN PANEL START-->


<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3" >
<div class="panel panel-info">
<div class="panel-heading">
LOGIN FORM
</div>
<div class="panel-body">
<form role="form" method="post">
<div class="form-group">
<label>Enter Username</label>
<input class="form-control" type="text" name="username"
autocomplete="off" required />
</div>
<div class="form-group">
<label>Password</label>
<input class="form-control" type="password" name="password"
autocomplete="off" required />
</div>

<button type="submit" name="login" class="btn btn-info">LOGIN


</button>
</form>
</div>
</div>
</div>
</div>
<!---LOGIN PANEL END-->

</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include('includes/footer.php');?>
<!-- FOOTER SECTION END-->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</script>
</body>
</html>

INDEX
<?php session_start();
error_reporting(0);
include('includes/config.php')
; if($_SESSION['login']!=''){
$_SESSION['login']='';
}
if(isset($_POST['login']))
{

$email=$_POST['emailid'];
$password=md5($_POST['password']);
$sql ="SELECT EmailId,Password,StudentId,Status FROM tblstudents
WHERE EmailId=:email and Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);

if($query->rowCount() > 0)
{
foreach ($results as $result) {
$_SESSION['stdid']=$result->StudentId;
if($result->Status==1)
{
$_SESSION['login']=$_POST['emailid'];
echo "<script type='text/javascript'> document.location ='dashboard.php';
</script>";
} else {
echo "<script>alert('Your Account Has been blocked .Please contact
admin');</script>";

}
}

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

?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Online Library Management System | </title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans'
rel='stylesheet' type='text/css' />

</head>
<body>
<!------MENU SECTION START-->
<?php include('includes/header.php');?>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<!--Slider---->
<div class="row">
<div class="col-md-10 col-sm-8 col-xs-12 col-md-offset-1">
<div id="carousel-example" class="carousel slide slide-bdr"
dataride="carousel" >
<div class="carousel-inner">
<div class="item active">
<img src="assets/img/1.jpg" alt="" />
</div>
<div class="item">
<img src="assets/img/2.jpg" alt="" />
</div>
<div class="item">
<img src="assets/img/3.jpg" alt="" />
</div>
</div>
<!--INDICATORS-->
<ol class="carousel-indicators">
<li data-target="#carousel-example" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example" data-slide-to="1"></li>
<li data-target="#carousel-example" data-slide-to="2"></li>
</ol>
<!--PREVIUS-NEXT BUTTONS-->
<a class="left carousel-control" href="#carousel-example"
dataslide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example"
dataslide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div>
</div>
<hr />

<div class="row pad-botm">


<div class="col-md-12">
<h4 class="header-line">USER LOGIN FORM</h4>
</div>
</div>
<a name="ulogin"></a>
<!--LOGIN PANEL START-->
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3" >
<div class="panel panel-info">
<div class="panel-heading">
LOGIN FORM
</div>
<div class="panel-body">
<form role="form" method="post">

<div class="form-group">
<label>Enter Email id</label>
<input class="form-control" type="text" name="emailid" required
autocomplete="off" />
</div>
<div class="form-group">
<label>Password</label>
<input class="form-control" type="password" name="password" required
autocomplete="off" />
<p class="help-block"><a href="user-forgot-password.php">Forgot
Password</a></p>
</div>
<button type="submit" name="login" class="btn btn-info">LOGIN
</button> | <a href="signup.php">Not Register Yet</a>
</form>
</div>
</div>
</div>
</div>
<!---LOGIN PANEL END-->

</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include('includes/footer.php');?>
<!-- FOOTER SECTION END-->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>

</body>
</html>

SIGNUP

<?php session_start();
include('includes/config.php'); error_reporting(0);
if(isset($_POST['signup']))
{

//Code for student ID


$count_my_page = ("studentid.txt");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]"); fclose($fp);
$StudentId= $hits[0];
$fname=$_POST['fullanme'];
$mobileno=$_POST['mobileno'];
$email=$_POST['email'];
$password=md5($_POST['password']);
$status=1;
$sql="INSERT INTO
tblstudents(StudentId,FullName,MobileNumber,EmailId,Password,Status)
VALUES(:StudentId,:fname,:mobileno,:email,:password,:status)";
$query = $dbh->prepare($sql);
$query->bindParam(':StudentId',$StudentId,PDO::PARAM_STR);
$query->bindParam(':fname',$fname,PDO::PARAM_STR);
$query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':password',$password,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
echo '<script>alert("Your Registration successfull and your student id is "+"'.
$StudentId.'")</script>';
} else
{
echo "<script>alert('Something went wrong. Please try again');</script>";
}
}

?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<title>Online Library Management System | Student Signup</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans'
rel='stylesheet' type='text/css' /> <script type="text/javascript">
function valid()
{
if(document.signup.password.value!=
document.signup.confirmpassword.value)
{
alert("Password and Confirm Password Field do not match !!");
document.signup.confirmpassword.focus(); return false;
}
return true;
}
</script> <script> function
checkAvailability() { $
("#loaderIcon").show();
jQuery.ajax({ url:
"check_availability.php",
data:'emailid='+$("#emailid").val(),
type: "POST", success:function(data){
$("#user-availability-
status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
</script>

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

</div>

</div>
<div class="row">

<div class="col-md-9 col-md-offset-1">


<div class="panel panel-danger">
<div class="panel-heading">
SINGUP FORM
</div>
<div class="panel-body">
<form name="signup" method="post" onSubmit="return valid();">
<div class="form-group">
<label>Enter Full Name</label>
<input class="form-control" type="text" name="fullanme"
autocomplete="off" required />
</div>

<div class="form-group">
<label>Mobile Number :</label>
<input class="form-control" type="text" name="mobileno" maxlength="10"
autocomplete="off" required />
</div>

<div class="form-group">
<label>Enter Email</label>
<input class="form-control" type="email" name="email" id="emailid"
onBlur="checkAvailability()" autocomplete="off" required /> <span
id="user-availability-status" style="font-size:12px;"></span> </div>

<div class="form-group">
<label>Enter Password</label>
<input class="form-control" type="password" name="password"
autocomplete="off" required />
</div>

<div class="form-group">
<label>Confirm Password </label>
<input class="form-control" type="password" name="confirmpassword"
autocomplete="off" required />
</div>

<button type="submit" name="signup" class="btn btn-danger"


id="submit">Register Now </button>

</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include('includes/footer.php');?>
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</body>
</html>

MY-PROFILE

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

$sql="update tblstudents set FullName=:fname,MobileNumber=:mobileno


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

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


}

?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<title>Online Library Management System | Student Signup</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans'
rel='stylesheet' type='text/css' />

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

</div>

</div>
<div class="row">

<div class="col-md-9 col-md-offset-1">


<div class="panel panel-danger">
<div class="panel-heading">
My Profile
</div>
<div class="panel-body">
<form name="signup" method="post">
<?php
$sid=$_SESSION['stdid'];
$sql="SELECT
StudentId,FullName,EmailId,MobileNumber,RegDate,UpdationDate,Status
from tblstudents where StudentId=:sid ";
$query = $dbh -> prepare($sql);
$query-> bindParam(':sid', $sid, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

<div class="form-group">
<label>Student ID : </label>
<?php echo htmlentities($result->StudentId);?>
</div>

<div class="form-group"> <label>Reg


Date : </label>
<?php echo htmlentities($result->RegDate);?>
</div>
<?php if($result->UpdationDate!=""){?>
<div class="form-group">
<label>Last Updation Date : </label>
<?php echo htmlentities($result->UpdationDate);?>
</div>
<?php } ?>

<div class="form-group">
<label>Profile Status : </label>
<?php if($result->Status==1){?>
<span style="color: green">Active</span>
<?php } else { ?>
<span style="color: red">Blocked</span>
<?php }?>
</div>

<div class="form-group">
<label>Enter Full Name</label>
<input class="form-control" type="text" name="fullanme" value="<?php
echo htmlentities($result->FullName);?>" autocomplete="off" required />
</div>

<div class="form-group">
<label>Mobile Number :</label>
<input class="form-control" type="text" name="mobileno" maxlength="10"
value="<?php echo htmlentities($result->MobileNumber);?>"
autocomplete="off" required />
</div>

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

<button type="submit" name="update" class="btn btn-primary"


id="submit">Update Now </button>

</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include('includes/footer.php');?>
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script> </body>
</html>
<?php } ?>

REG-STUDENTS

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

// code for block student


if(isset($_GET['inid']))
{
$id=$_GET['inid'];
$status=0;
$sql = "update tblstudents set Status=:status WHERE id=:id";
$query = $dbh->prepare($sql);
$query -> bindParam(':id',$id, PDO::PARAM_STR);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query -> execute();
header('location:reg-students.php');
}

//code for active students if(isset($_GET['id']))


{
$id=$_GET['id'];
$status=1;
$sql = "update tblstudents set Status=:status WHERE id=:id";
$query = $dbh->prepare($sql);
$query -> bindParam(':id',$id, PDO::PARAM_STR);
$query -> bindParam(':status',$status, PDO::PARAM_STR); $query ->
execute();
header('location:reg-students.php');
}

?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Online Library Management System | Manage Reg Students</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- DATATABLE STYLE -->
<link href="assets/js/dataTables/dataTables.bootstrap.css"
rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans'
rel='stylesheet' type='text/css' />

</head>
<body>
<!------MENU SECTION START-->
<?php include('includes/header.php');?>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">Manage Reg Students</h4>
</div>
</div>
<div class="row">
<div class="col-md-12">
<!-- Advanced Tables -->
<div class="panel panel-default">
<div class="panel-heading">
Reg Students
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered
tablehover" id="dataTables-example">
<thead>
<tr>
<th>#</th>
<th>Student ID</th>
<th>Student Name</th>
<th>Email id </th>
<th>Mobile Number</th>
<th>Reg Date</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $sql = "SELECT * from tblstudents";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr class="odd gradeX">
<td class="center"><?php echo htmlentities($cnt);?
></td>
<td class="center"><?php echo htmlentities($result-
>StudentId);?></td>
<td class="center"><?php echo htmlentities($result-
>FullName);?></td>
<td class="center"><?php echo htmlentities($result-
>EmailId);?></td>
<td class="center"><?php echo
htmlentities($result->MobileNumber);?></td>
<td class="center"><?php echo
htmlentities($result->RegDate);?></td>
<td class="center"><?php if($result->Status==1)
{
echo htmlentities("Active");
} else {

echo htmlentities("Blocked"); }
?></td>
<td class="center">
<?php if($result->Status==1)
{?>
<a href="reg-students.php?inid=<?php echo htmlentities($result->id);?>"
onclick="return confirm('Are you sure you want to block this student?');" >
<button class="btn btn-danger"> Inactive</button>
<?php } else {?>

<a href="reg-students.php?id=<?php echo htmlentities($result->id);?>"


onclick="return confirm('Are you sure you want to active this
student?');"><button class="btn btn-primary"> Active</button>
<?php } ?>
<a href="student-history.php?stdid=<?php echo
htmlentities($result>StudentId);?>"><button class="btn btn-success">
Details</button>
</td>
</tr>
<?php $cnt=$cnt+1;}} ?>
</tbody>
</table>
</div>

</div>
</div>
<!--End Advanced Tables -->
</div>
</div>
</div>
</div>

<!-- CONTENT-WRAPPER SECTION END-->


<?php include('includes/footer.php');?>
<!-- FOOTER SECTION END-->
<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE
THE LOADING TIME -->
<!-- CORE JQUERY -->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- DATATABLE SCRIPTS -->
<script src="assets/js/dataTables/jquery.dataTables.js"></script>
<script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</body>
</html>
<?php } ?>

STUDENT-HISTORY
<?php session_start();
error_reporting(0);
include('includes/config.php')
;
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
} else{

// code for block student


if(isset($_GET['inid']))
{
$id=$_GET['inid'];
$status=0;
$sql = "update tblstudents set Status=:status WHERE id=:id";
$query = $dbh->prepare($sql);
$query -> bindParam(':id',$id, PDO::PARAM_STR);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query -> execute();
header('location:reg-students.php');
}

//code for active students


if(isset($_GET['id']))
{
$id=$_GET['id'];
$status=1;
$sql = "update tblstudents set Status=:status WHERE id=:id";
$query = $dbh->prepare($sql);
$query -> bindParam(':id',$id, PDO::PARAM_STR);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query -> execute();
header('location:reg-students.php');
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Online Library Management System | Student History</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- DATATABLE STYLE -->
<link href="assets/js/dataTables/dataTables.bootstrap.css"
rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans'
rel='stylesheet' type='text/css' />

</head>
<body>
<!------MENU SECTION START-->
<?php include('includes/header.php');?>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<?php $sid=$_GET['stdid']; ?>
<h4 class="header-line">#<?php echo $sid;?> Book Issued
History</h4>
</div>
</div>
<div class="row">
<div class="col-md-12">
<!-- Advanced Tables -->
<div class="panel panel-default">
<div class="panel-heading">

<?php echo $sid;?> Details


</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered
tablehover" id="dataTables-example">
<thead>
<tr>
<th>#</th>
<th>Student ID</th>
<th>Student Name</th>
<th>Issued Book </th>
<th>Issued Date</th>
<th>Returned Date</th>
<th>Fine (if any)</th>
</tr>
</thead>
<tbody>
<?php

$sql = "SELECT tblstudents.StudentId


,tblstudents.FullName,tblstudents.EmailId,tblstudents.MobileNumber,tblboo
ks.BookName,tblbooks.ISBNNumber,tblissuedbookdetails.IssuesDate,tblissue
dbookdetails.ReturnDate,tblissuedbookdetails.id as
rid,tblissuedbookdetails.fine,tblissuedbookdetails.RetrunStatus,tblbooks.id as
bid,tblbooks.bookImage from tblissuedbookdetails join tblstudents on
tblstudents.StudentId=tblissuedbookdetails.StudentId join tblbooks on
tblbooks.id=tblissuedbookdetails.BookId where tblstudents.StudentId='$sid'
";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr class="odd gradeX">
<td class="center"><?php echo htmlentities($cnt);?
></td>
<td class="center"><?php echo htmlentities($result-
>StudentId);?></td>
<td class="center"><?php echo htmlentities($result-
>FullName);?></td>
<td class="center"><?php echo
htmlentities($result->BookName);?></td>
<td class="center"><?php echo htmlentities($result-
>IssuesDate);?></td>
<td class="center"><?php if($result-
>ReturnDate==''): echo "Not returned yet";
else: echo htmlentities($result->ReturnDate); endif;?
></td>
<td class="center"><?php if($result-
>ReturnDate==''): echo "Not returned yet";
else: echo $result->fine; endif;
?></td>

</tr>
<?php $cnt=$cnt+1;}} ?>
</tbody>
</table>
</div>
</div>
</div>
<!--End Advanced Tables -->
</div>
</div>

</div>
</div>

<!-- CONTENT-WRAPPER SECTION END-->


<?php include('includes/footer.php');?>
<!-- FOOTER SECTION END-->
<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE
THE LOADING TIME -->
<!-- CORE JQUERY -->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- DATATABLE SCRIPTS -->
<script src="assets/js/dataTables/jquery.dataTables.js"></script>
<script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</body>
</html>
<?php } ?>

GET_STUDENT

<?php
require_once("includes/config.php"); if(!empty($_POST["studentid"]))
{
$studentid= strtoupper($_POST["studentid"]);
$sql ="SELECT FullName,Status,EmailId,MobileNumber FROM
tblstudents WHERE StudentId=:studentid";
$query= $dbh -> prepare($sql);
$query-> bindParam(':studentid', $studentid, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach ($results as $result) {
if($result->Status==0)
{
echo "<span style='color:red'> Student ID Blocked </span>"."<br />"; echo
"<b>Student Name-</b>" .$result->FullName;
echo "<script>$('#submit').prop('disabled',true);</script>"; }
else {
?>

<?php echo htmlentities($result-


>FullName)."<br />"; echo
htmlentities($result->EmailId)."<br />"; echo
htmlentities($result->MobileNumber);
echo "<script>$('#submit').prop('disabled',false);</script>";
}
}
}
else{
echo "<span style='color:red'> Invaid Student Id. Please Enter Valid Student
id .</span>";
echo "<script>$('#submit').prop('disabled',true);</script>";
}
}
?>

ADD-AUTHOR
<?php session_start();
error_reporting(0);
include('includes/config.php')
;
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
} else{

if(isset($_POST['create']))
{
$author=$_POST['author'];
$sql="INSERT INTO tblauthors(AuthorName) VALUES(:author)";
$query = $dbh->prepare($sql);
$query->bindParam(':author',$author,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$_SESSION['msg']="Author Listed successfully"; header('location:manage-
authors.php');
} else
{
$_SESSION['error']="Something went wrong. Please try again";
header('location:manage-authors.php');
}

}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Online Library Management System | Add Author</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans'
rel='stylesheet' type='text/css' />

</head>
<body>
<!------MENU SECTION START-->
<?php include('includes/header.php');?>
<!-- MENU SECTION END-->
<div class="content-wra
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">Add Author</h4>

</div>

</div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3"">
<div class="panel panel-info">
<div class="panel-heading">
Author Info
</div>
<div class="panel-body">
<form role="form" method="post">
<div class="form-group">
<label>Author Name</label>
<input class="form-control" type="text" name="author" autocomplete="off"
required />
</div>

<button type="submit" name="create" class="btn btn-info">Add </button>

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

</div>

</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include('includes/footer.php');?>
<!-- FOOTER SECTION END-->
<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE
THE LOADING TIME -->
<!-- CORE JQUERY -->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</body>
</html>
<?php } ?>

You might also like