0% found this document useful (0 votes)
9 views83 pages

AJU190914 Removed

The Library Management System is designed to assist librarians in managing university libraries by providing features for adding and updating members and books, as well as managing check-in specifications. The system aims to reduce manual work and improve efficiency in accessing library resources while ensuring data consistency and security. It includes user-friendly interfaces for both administrators and students, allowing for easy book management and tracking of issued materials.

Uploaded by

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

AJU190914 Removed

The Library Management System is designed to assist librarians in managing university libraries by providing features for adding and updating members and books, as well as managing check-in specifications. The system aims to reduce manual work and improve efficiency in accessing library resources while ensuring data consistency and security. It includes user-friendly interfaces for both administrators and students, allowing for easy book management and tracking of issued materials.

Uploaded by

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

ABSTRACT

The Library Management System" is an application for assisting a librarian in managing


a book library in a university. The system would provide basic set of features to add/update

members. add update books, and manage check in specifications for the systems based on the
client's statement of need.

This is a typical management Information system (MIS), its Development include the
establishment and maintenance of back-end database and front-end application development
aspects. For the former require the establishment of data consistency and integrity of the

strong data security and good libraries. As for the latter requires the application fully

functional. easy to use and so on.


CHAPTER I

INTRODUCTION

1.1 PROBLEM DEFINATION AND OBJECTIVE

The purpose of the Library Management system is to allow for storing details of a large
number of books, magazines, Journals, thesis and allow for add, search, borrow, return
facilities separately to administrator/Librarian, staff and students.

The main objective of the Library Management System is to manage the details of Address,
Member, Issues, Books, Student. It manages all the information about Address, Librarian,
Student, Address. The project is totally built at administrative end and thus only the
administrator is guaranteed the ac cess. The purpose of the project is to build an application
program to reduce the manual work for managing the Address, Member, Librarian, Issues. It
tracks all the details about the Issues, Books, Student.

1.2 MOTIVATION

Libraries are essential in a process of giving citizens access 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.

1.3 PROJECT OVERVIEW &SPECIFICATIONS

The application will allow the admin to sign in into the page by using their id and password
set by them to insert books, update the book quantity, can also update the book edition and
can delete the book. The student can search their book-by-book name and can issue the book
or can return the book if issued earlier.

A user will have to sign in first by giving the username and password to get to the admin
interface. The admin interface or the web page will involve 4 fields, to add new books, to
update book quantity and edition and to delete the book.

The student interface or the web page will involve 3 fields, to search books by name, to issue
book and to return book.

-2-
1.4 HARWARE INTERFACE

PROCESSOR: - Intel Pentium-IV System

POCESSOR SPEED: - 250MHz to 833MHz

RAM: - 512MB

HARD DISK: 40 GB

1.5 SOFTWARE INTERFACE

The application can run in any system having an updated version of a web browser and a
local web server such as XAMPP where we can deploy and test the application that can run
our code and give us the intended layout.

-3-
CHAPTER II
2.1 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.2 PROPOSED SYSTEM

This project will help the students and Admin to maintain the details of the library.

It will assist the admin 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.

Our proposed system has the following advantages.

1.User friendly interface

2.Fast access to database

3.More Storage Capacity

4.Fine Check

5.Look and Feel Environment All the manual difficulties in managing the library have been
rectified by implementing computerization.

-4-
CHAPTER III

SYSTREM ANALYSIS AND DESIGN


3.1 REQUIRMENT SPECIFICATION

3.1.1 FUNTIONAL REQUIRMENT USERLOGIN

Description of features

This feature used by the user to login to system. They are required to enter user id and
password before they are allowed to enter the system. The user id and password will be
verified and if invalid id is there user is allowed to not enter the system.
Functional requirements
-user id is provided by the authorities
-The system must only allow user with user id and password to enter the system
-The system performs authorization process which decides what user level can access
-The user must be able to logout after they finished using system.

Register New Book


Description of feature

This feature allows to add new books to the library

Functional requirements
System must be able to verify information System must be able to enter number of
copies into table

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

3.1.2 NON FUNTIONAL REQUIRMENT

• Product Requirements

Efficiency Requirement
When a library management system will be implemented librarian and user will
easily access library as searching and book transaction will be very faster.

-5-
Reliability Requirement
The system should accurately perform member registration member validation, report
generation, book transaction and search

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

Organizational Requirement Implementation Requirements


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

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

-6-
Data Flow Diagram

0 Level DFD

-7-
1 Level DFD

-8-
2 Level DFD

-9-
E-R Diagram

- 10 -
Flow Chart

- 11 -
3.3 NORMALIZATION

Normalization is the procces of bringing or returning somthing to a normal codition or state.


Itmake somthing more normal and regular. It makes the larger table to smaller. The procces
throw which ideasand behaviour which falls apaert may be normal.

- 12 -
CHAPTER IV

4. TESTING

Testing is one of the most important parts of software engineering. During requirement
analysis and design, the output is a document that is usually textual and not executable. After
the coding phase, computer programs are available that can be executed for testing purpose.
This implies that te

sting not only, has to uncover errors introduced during coding, but also errors introduced
during previous phase. Thus, the goal of testing is to uncover the requirements, design and
coding errors in the programs. The source code declared above for the program of ‘Library
Management System ‘has-been tested several times and all the functionalities are working
perfectly without any error.

4.1 UNIT TESTING

Testing of the software as a mean of accessing or measuring the software to determine its
quality. The area of testing is one of the key process areas in ensuring the quality of the
software known as Software Quality Assurance (SQA).

Testing is done with one primary objective to ensure the quality of the software before it is
actually implemented. The main purpose of testing from developer’s point of view is to gain
confidence. If no error is found at least he is sure that the product under development is
meeting it required goals in terms of quality.

There is no way to find when to stop testing however people have followed certain norms
and guidelines over the course of time. They are as follows:

When the rate of finding errors has reached an acceptable level.

Based on the size of the system, “enough” errors have been found where “enough” can
be a quantitative parameter based on historical data.

Measuring coverage of testing as percentage of line executed divided by total number of


lines in the system. If the percentage id below acceptable limits, then the test plans
have to be enhanced to test areas where code not been tested.

- 13 -
4.2 INTEGREATION TESTING

The last step was to integrate the various modules in the software. We implemented top-
down integration. The integration was performed in five steps:

The main control module was used as test driver and stubs were substituted for all
components directly subordinate to the main control module.

Depending on depth first search subordinate stubs was replaced with actual components.

Tests were conducted as each component with real component.


On completion of each set of tests, another stub is replaced with real
component.
Integration testing was conducted to ensure execution of some subset of tests have
already been conducted had not propagated unintended side effects.

- 14 -
CHAPTER V

5. RESULT AND DISCUSSION

5.1 User Interface

Admin Pannel

- 15 -
- 16 -
- 17 -
User Pannel

- 18 -
- 19 -
5.2 DATA BASE DEGINE

The general theme behind a database to handle information as an integrated whole. A


database is a collection of interrelated data stored with minimum redundancy to serve many
users quickly and effectively. After designing input and output, the analyst must concentrate
on database design or how data should be organized around user requirements. The general
objective is to make information access, easy quick, inexpensive and flexible for other users.
During database design the following objectives are concerned: -

• Data independence

• Accurate and integrating

• More information at low cost

• Privacy and security

• Performance

• Ease of learning and use

- 20 -
SOURCE CODE OF INDEX PAGE:

-- Table structure for table `admin`

--

CREATETABLE `admin`(

`id` int(11)NOTNULL,

`FullName` varchar(100)DEFAULTNULL,

`AdminEmail` varchar(120)DEFAULTNULL,

`UserName` varchar(100)NOTNULL,

`Password` varchar(100)NOTNULL,

`updationDate` timestampNOTNULLDEFAULT'0000-00-00
00:00:00'ONUPDATEcurrent_timestamp()

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `admin`

--

INSERTINTO `admin`(`id`, `FullName`, `AdminEmail`, `UserName`, `Password`,


`updationDate`)VALUES

(1,'Anuj Kumar','[email protected]','admin','f925916e2754e5e03f75dd58a5733251','2022-
01-08 06:03:56');

-- --------------------------------------------------------

- 21 -
--

-- Table structure for table `tblauthors`

--

CREATETABLE `tblauthors`(

`id` int(11)NOTNULL,

`AuthorName` varchar(159)DEFAULTNULL,

`creationDate` timestampNULLDEFAULTcurrent_timestamp(),

`UpdationDate` timestampNULLDEFAULTNULLONUPDATEcurrent_timestamp()

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `tblauthors`

--

INSERTINTO `tblauthors`(`id`, `AuthorName`, `creationDate`, `UpdationDate`)VALUES

(1,'Anuj kumar','2022-01-22 07:23:03','2022-01-22 07:23:03'),

(2,'Chetan Bhagatt','2022-01-22 07:23:03','2022-01-22 07:23:03'),

(3,'Anita Desai','2022-01-22 07:23:03','2022-01-22 16:23:41'),

(4,'HC Verma','2022-01-22 07:23:03','2022-01-22 16:23:45'),

(5,'R.D. Sharma ','2022-01-22 07:23:03','2022-01-22 16:23:47'),

(9,'fwdfrwer','2022-01-22 07:23:03','2022-01-22 16:23:55'),

(10,'Dr. Andy Williams','2022-01-22 07:15:32',NULL),

(11,'Kyle Hill','2022-01-22 07:16:34',NULL),

(12,'Robert T. Kiyosak','2022-01-22 07:18:38',NULL),

(13,'Kelly Barnhill','2022-01-22 07:21:54',NULL),

- 22 -
(14,'Herbert Schildt','2022-01-22 07:23:03',NULL);

-- --------------------------------------------------------

--

-- Table structure for table `tblbooks`

--

CREATETABLE `tblbooks`(

`id` int(11)NOTNULL,

`BookName` varchar(255)DEFAULTNULL,

`CatId` int(11)DEFAULTNULL,

`AuthorId` int(11)DEFAULTNULL,

`ISBNNumber` varchar(25)DEFAULTNULL,

`BookPrice` decimal(10,2)DEFAULTNULL,

`bookImage` varchar(250)NOTNULL,

`isIssued` int(1)DEFAULTNULL,

`RegDate` timestampNULLDEFAULTcurrent_timestamp(),

`UpdationDate` timestampNULLDEFAULTNULLONUPDATEcurrent_timestamp()

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `tblbooks`

--

- 23 -
INSERTINTO `tblbooks`(`id`, `BookName`, `CatId`, `AuthorId`, `ISBNNumber`,
`BookPrice`, `bookImage`, `isIssued`, `RegDate`, `UpdationDate`)VALUES

(1,'PHP And MySql programming', 5,


1,'222333','20.00','1efecc0ca822e40b7b673c0d79ae943f.jpg', 1,'2022-01-22 07:23:03','2022-
01-22 16:24:13'),

(3,'physics', 6, 4,'1111','15.00','dd8267b57e0e4feee5911cb1e1a03a79.jpg', 0,'2022-01-22


07:23:03','2022-01-22 16:24:17'),

(5,'Murach\'s MySQL', 5, 1, '9350237695', '455.00',


'5939d64655b4d2ae443830d73abc35b6.jpg', 1, '2022-01-21 16:42:11', '2022-01-22
06:11:03'),

(6, 'WordPress for Beginners 2022: A Visual Step-by-Step Guide to Mastering WordPress', 5,
10, 'B019MO3WCM', '100.00', '144ab706ba1cb9f6c23fd6ae9c0502b3.jpg', NULL, '2022-01-
22 07:16:07', '2022-01-22 07:20:49'),

(7, 'WordPress Mastery Guide:', 5, 11, 'B09NKWH7NP', '53.00',


'90083a56014186e88ffca10286172e64.jpg', NULL, '2022-01-22 07:18:03', '2022-01-22
07:20:58'),

(8, 'Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and
Middle Class Do Not', 8, 12, 'B07C7M8SX9', '120.00',
'52411b2bd2a6b2e0df3eb10943a5b640.jpg', NULL, '2022-01-22 07:20:39', NULL),

(9, 'The Girl Who Drank the Moon', 8, 13, '1848126476', '200.00',
'f05cd198ac9335245e1fdffa793207a7.jpg', NULL, '2022-01-22 07:22:33', NULL),

(10, 'C++: The Complete Reference, 4th Edition', 5, 14, '007053246X', '142.00',
'36af5de9012bf8c804e499dc3c3b33a5.jpg', 0, '2022-01-22 07:23:36', '2022-01-22 08:18:22'),

(11, 'ASP.NET Core 5 for Beginners', 9, 11, 'GBSJ36344563', '422.00',


'b1b6788016bbfab12cfd2722604badc9.jpg', 0, '2022-01-22 08:14:21', '2022-01-22 08:15:23');

-- --------------------------------------------------------

--

- 24 -
-- Table structure for table `tblcategory`

--

CREATE TABLE `tblcategory` (

`id` int(11) NOT NULL,

`CategoryName` varchar(150) DEFAULT NULL,

`Status` int(1) DEFAULT NULL,

`CreationDate` timestamp NULL DEFAULT current_timestamp(),

`UpdationDate` timestamp NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE


current_timestamp()

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `tblcategory`

--

INSERT INTO `tblcategory` (`id`, `CategoryName`, `Status`, `CreationDate`,


`UpdationDate`) VALUES

(4, 'Romantic', 1, '2022-01-22 07:23:03', '2022-01-22 07:23:03'),

(5, 'Technology', 1, '2022-01-22 07:23:03', '2022-01-22 07:23:03'),

(6, 'Science', 1, '2022-01-22 07:23:03', '2022-01-22 16:24:37'),

(7, 'Management', 1, '2022-01-22 07:23:03', '2022-01-22 16:24:35'),

(8, 'General', 1, '2022-01-22 07:23:03', '2022-01-22 16:24:40'),

(9, 'Programming', 1, '2022-01-22 07:23:03', '2022-01-22 16:24:42');

-- --------------------------------------------------------

- 25 -
--

-- Table structure for table `tblissuedbookdetails`

--

CREATE TABLE `tblissuedbookdetails` (

`id` int(11) NOT NULL,

`BookId` int(11) DEFAULT NULL,

`StudentID` varchar(150) DEFAULT NULL,

`IssuesDate` timestamp NULL DEFAULT current_timestamp(),

`ReturnDate` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),

`RetrunStatus` int(1) DEFAULT NULL,

`fine` int(11) DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `tblissuedbookdetails`

--

INSERT INTO `tblissuedbookdetails` (`id`, `BookId`, `StudentID`, `IssuesDate`,


`ReturnDate`, `RetrunStatus`, `fine`) VALUES

(7, 5, 'SID011', '2022-01-22 05:45:57', NULL, NULL, NULL),

(8, 1, 'SID002', '2022-01-22 05:59:17', '2022-01-22 06:18:08', 1, 0),

(9, 10, 'SID009', '2022-01-22 07:38:09', '2022-01-22 07:38:54', 1, 0),

(10, 11, 'SID009', '2022-01-22 08:15:02', '2022-01-22 08:15:23', 1, 0),

(11, 1, 'SID012', '2022-01-22 08:17:15', NULL, NULL, NULL),

- 26 -
(12, 10, 'SID012', '2022-01-22 08:18:08', '2022-01-22 08:18:22', 1, 5);

-- --------------------------------------------------------

--

-- Table structure for table `tblstudents`

--

CREATE TABLE `tblstudents` (

`id` int(11) NOT NULL,

`StudentId` varchar(100) DEFAULT NULL,

`FullName` varchar(120) DEFAULT NULL,

`EmailId` varchar(120) DEFAULT NULL,

`MobileNumber` char(11) DEFAULT NULL,

`Password` varchar(120) DEFAULT NULL,

`Status` int(1) DEFAULT NULL,

`RegDate` timestamp NULL DEFAULT current_timestamp(),

`UpdationDate` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- Dumping data for table `tblstudents`

--

INSERT INTO `tblstudents` (`id`, `StudentId`, `FullName`, `EmailId`, `MobileNumber`,


`Password`, `Status`, `RegDate`, `UpdationDate`) VALUES

- 27 -
(1, 'SID002', 'Anuj kumar', '[email protected]', '9865472555',
'f925916e2754e5e03f75dd58a5733251', 1, '2022-01-02 07:23:03', '2022-01-22 16:25:45'),

(4, 'SID005', 'sdfsd', '[email protected]', '8569710025',


'92228410fc8b872914e023160cf4ae8f', 1, '2022-01-02 07:23:03', '2022-01-22 16:25:53'),

(8, 'SID009', 'test', '[email protected]', '2359874527', 'f925916e2754e5e03f75dd58a5733251',


1, '2022-01-02 07:23:03', '2022-01-22 16:25:58'),

(9, 'SID010', 'Amit', '[email protected]', '8585856224',


'f925916e2754e5e03f75dd58a5733251', 1, '2022-01-02 07:23:03', '2022-01-22 16:26:02'),

(10, 'SID011', 'Sarita Pandey', '[email protected]', '4672423754',


'f925916e2754e5e03f75dd58a5733251', 1, '2022-01-02 07:23:03', '2022-01-22 16:26:04'),

(11, 'SID012', 'John Doe', '[email protected]', '1234569870',


'f925916e2754e5e03f75dd58a5733251', 1, '2022-01-22 08:16:18', NULL);

--

-- Indexes for dumped tables

--

--

-- Indexes for table `admin`

--

ALTER TABLE `admin`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `tblauthors`

--

ALTER TABLE `tblauthors`

- 28 -
ADD PRIMARY KEY (`id`);

--

-- Indexes for table `tblbooks`

--

ALTER TABLE `tblbooks`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `tblcategory`

--

ALTER TABLE `tblcategory`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `tblissuedbookdetails`

--

ALTER TABLE `tblissuedbookdetails`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `tblstudents`

--

ALTER TABLE `tblstudents`

ADD PRIMARY KEY (`id`),

ADD UNIQUE KEY `StudentId` (`StudentId`);

- 29 -
--

-- AUTO_INCREMENT for dumped tables

--

--

-- AUTO_INCREMENT for table `admin`

--

ALTER TABLE `admin`

MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--

-- AUTO_INCREMENT for table `tblauthors`

--

ALTER TABLE `tblauthors`

MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--

-- AUTO_INCREMENT for table `tblbooks`

--

ALTER TABLE `tblbooks`

MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--

-- AUTO_INCREMENT for table `tblcategory`

--

- 30 -
ALTER TABLE `tblcategory`

MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--

-- AUTO_INCREMENT for table `tblissuedbookdetails`

--

ALTER TABLE `tblissuedbookdetails`

MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--

-- AUTO_INCREMENT for table `tblstudents`

--

ALTER TABLE `tblstudents`

MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if($_SESSION['alogin']!=''){

- 31 -
$_SESSION['alogin']='';

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

$username=$_POST['username'];

$password=md5($_POST['password']);

$sql ="SELECT UserName,PasswordFROMadminWHERE UserName=:username


andPassword=: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>";

?>

<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

- 32 -
<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="author"content=""/>

<title>Online Library Management System</title>

<!-- BOOTSTRAP CORE STYLE -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

</head>

<body>

<!------MENU SECTION START-->

<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<divclass="row pad-botm">

<divclass="col-md-12">

<h4class="header-line">ADMIN LOGIN FORM</h4>

</div>

</div>

- 33 -
<!--LOGIN PANEL START-->

<divclass="row">

<divclass="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">

<divclass="panel panel-info">

<divclass="panel-heading">

LOGIN FORM

</div>

<divclass="panel-body">

<formrole="form"method="post">

<divclass="form-group">

<label>Enter Username</label>

<inputclass="form-control"type="text"name="username"autocomplete="off"required/>

</div>

<divclass="form-group">

<label>Password</label>

<inputclass="form-control"type="password"name="password"autocomplete="off"required/>

</div>

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

</form>

</div>

</div>

</div>

</div>

- 34 -
<!---LOGIN PABNEL END-->

</div>

</div>

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

<?phpinclude('includes/footer.php');?>

<!-- FOOTER SECTION END-->

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</script>

</body>

</html>

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if($_SESSION['alogin']!=''){

$_SESSION['alogin']='';

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

- 35 -
$username=$_POST['username'];

$password=md5($_POST['password']);

$sql ="SELECT UserName,PasswordFROMadminWHERE UserName=:username


andPassword=: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>";

?>

<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="author"content=""/>

<title>Online Library Management System</title>

- 36 -
<!-- BOOTSTRAP CORE STYLE -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

</head>

<body>

<!------MENU SECTION START-->

<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<divclass="row pad-botm">

<divclass="col-md-12">

<h4class="header-line">ADMIN LOGIN FORM</h4>

</div>

</div>

<!--LOGIN PANEL START-->

<divclass="row">

<divclass="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">

- 37 -
<divclass="panel panel-info">

<divclass="panel-heading">

LOGIN FORM

</div>

<divclass="panel-body">

<formrole="form"method="post">

<divclass="form-group">

<label>Enter Username</label>

<inputclass="form-control"type="text"name="username"autocomplete="off"required/>

</div>

<divclass="form-group">

<label>Password</label>

<inputclass="form-control"type="password"name="password"autocomplete="off"required/>

</div>

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

</form>

</div>

</div>

</div>

</div>

<!---LOGIN PABNEL END-->

</div>

- 38 -
</div>

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

<?phpinclude('includes/footer.php');?>

<!-- FOOTER SECTION END-->

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</script>

</body>

</html>

?php

require_once("includes/config.php");

// code user email availablity

if(!empty($_POST["emailid"])) {

$email= $_POST["emailid"];

if (filter_var($email, FILTER_VALIDATE_EMAIL)===false) {

echo "error : You did not enter a valid email.";

else {

$sql ="SELECT EmailId FROM tblstudents WHERE EmailId=:email";

$query= $dbh -> prepare($sql);

$query-> bindParam(':email', $email, PDO::PARAM_STR);

- 39 -
$query-> execute();

$results = $query -> fetchAll(PDO::FETCH_OBJ);

$cnt=1;

if($query -> rowCount() >0)

echo "<span style='color:red'> Email already exists .</span>";

echo "<script>$('#submit').prop('disabled',true);</script>";

} else{

echo "<span style='color:green'> Email available for Registration .</span>";

echo "<script>$('#submit').prop('disabled',false);</script>";

?>

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if(strlen($_SESSION['login'])==0)

header('location:index.php');

else{?>

- 40 -
<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="author"content=""/>

<title>Online Library Management System | User Dash Board</title>

<!-- BOOTSTRAP CORE STYLE -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

</head>

<body>

<!------MENU SECTION START-->

<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<divclass="row pad-botm">

- 41 -
<divclass="col-md-12">

<h4class="header-line">User DASHBOARD</h4>

</div>

</div>

<divclass="row">

<ahref="listed-books.php">

<divclass="col-md-4 col-sm-4 col-xs-6">

<divclass="alert alert-success back-widget-set text-center">

<iclass="fa fa-book fa-5x"></i>

<?php

$sql ="SELECT id from tblbooks ";

$query = $dbh -> prepare($sql);

$query->execute();

$results=$query->fetchAll(PDO::FETCH_OBJ);

$listdbooks=$query->rowCount();

?>

<h3><?php echo htmlentities($listdbooks);?></h3>

Books Listed

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

<divclass="col-md-4 col-sm-4 col-xs-6">

<divclass="alert alert-warning back-widget-set text-center">

- 42 -
<iclass="fa fa-recycle fa-5x"></i>

<?php

$rsts=0;

$sid=$_SESSION['stdid'];

$sql2 ="SELECT id from tblissuedbookdetails where StudentID=:sidand (RetrunStatus=:rsts


|| RetrunStatus isnull|| RetrunStatus='')";

$query2 = $dbh -> prepare($sql2);

$query2->bindParam(':sid',$sid,PDO::PARAM_STR);

$query2->bindParam(':rsts',$rsts,PDO::PARAM_STR);

$query2->execute();

$results2=$query2->fetchAll(PDO::FETCH_OBJ);

$returnedbooks=$query2->rowCount();

?>

<h3><?php echo htmlentities($returnedbooks);?></h3>

Books Not Returned Yet

</div>

</div>

<ahref="issued-books.php">

<divclass="col-md-4 col-sm-4 col-xs-6">

<divclass="alert alert-success back-widget-set text-center">

<iclass="fa fa-book fa-5x"></i>

<h3>&nbsp;</h3>

Issued Books

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

- 43 -
</div>

</div>

</div>

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

<?phpinclude('includes/footer.php');?>

<!-- FOOTER SECTION END-->

<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING


TIME -->

<!-- CORE JQUERY -->

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</body>

</html>

<?php } ?>

?php

session_start();

error_reporting(0);

include('includes/config.php');

if($_SESSION['login']!=''){

- 44 -
$_SESSION['login']='';

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

$email=$_POST['emailid'];

$password=md5($_POST['password']);

$sql ="SELECT EmailId,Password,StudentId,StatusFROM tblstudents WHERE


EmailId=:email andPassword=: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>";

- 45 -
}

else{

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

?>

<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="author"content=""/>

<title>Online Library Management System | </title>

<!-- BOOTSTRAP CORE STYLE -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

- 46 -
<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

</head>

<body>

<!------MENU SECTION START-->

<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<!--Slider---->

<divclass="row">

<divclass="col-md-10 col-sm-8 col-xs-12 col-md-offset-1">

<divid="carousel-example"class="carousel slide slide-bdr"data-ride="carousel">

<divclass="carousel-inner">

<divclass="item active">

<imgsrc="assets/img/1.jpg"alt=""/>

</div>

<divclass="item">

<imgsrc="assets/img/2.jpg"alt=""/>

</div>

<divclass="item">

<imgsrc="assets/img/3.jpg"alt=""/>

</div>

</div>

<!--INDICATORS-->

- 47 -
<olclass="carousel-indicators">

<lidata-target="#carousel-example"data-slide-to="0"class="active"></li>

<lidata-target="#carousel-example"data-slide-to="1"></li>

<lidata-target="#carousel-example"data-slide-to="2"></li>

</ol>

<!--PREVIUS-NEXT BUTTONS-->

<aclass="left carousel-control"href="#carousel-example"data-slide="prev">

<spanclass="glyphicon glyphicon-chevron-left"></span>

</a>

<aclass="right carousel-control"href="#carousel-example"data-slide="next">

<spanclass="glyphicon glyphicon-chevron-right"></span>

</a>

</div>

</div>

</div>

<hr/>

<divclass="row pad-botm">

<divclass="col-md-12">

<h4class="header-line">USER LOGIN FORM</h4>

</div>

</div>

<aname="ulogin"></a>

<!--LOGIN PANEL START-->

<divclass="row">

- 48 -
<divclass="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">

<divclass="panel panel-info">

<divclass="panel-heading">

LOGIN FORM

</div>

<divclass="panel-body">

<formrole="form"method="post">

<divclass="form-group">

<label>Enter Email id</label>

<inputclass="form-control"type="text"name="emailid"requiredautocomplete="off"/>

</div>

<divclass="form-group">

<label>Password</label>

<inputclass="form-control"type="password"name="password"requiredautocomplete="off" />

<pclass="help-block"><ahref="user-forgot-password.php">Forgot Password</a></p>

</div>

<buttontype="submit"name="login"class="btn btn-info">LOGIN </button> |


<ahref="signup.php">Not Register Yet</a>

</form>

</div>

</div>

</div>

</div>

- 49 -
<!---LOGIN PABNEL END-->

</div>

</div>

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

<?phpinclude('includes/footer.php');?>

<!-- FOOTER SECTION END-->

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</body>

</html>

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if(strlen($_SESSION['login'])==0)

header('location:index.php');

else{

- 50 -
?>

<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="author"content=""/>

<title>Online Library Management System | Issued Books</title>

<!-- BOOTSTRAP CORE STYLE -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- DATATABLE STYLE -->

<linkhref="assets/js/dataTables/dataTables.bootstrap.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

</head>

<body>

<!------MENU SECTION START-->

- 51 -
<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<divclass="row pad-botm">

<divclass="col-md-12">

<h4class="header-line">Manage Issued Books</h4>

</div>

<divclass="row">

<divclass="col-md-12">

<!-- Advanced Tables -->

<divclass="panel panel-default">

<divclass="panel-heading">

Issued Books

</div>

<divclass="panel-body">

<divclass="table-responsive">

<tableclass="table table-striped table-bordered table-


hover"id="dataTables-example">

<thead>

<tr>

<th>#</th>

<th>Book Name</th>

<th>ISBN </th>

- 52 -
<th>Issued Date</th>

<th>Return Date</th>

<th>Fine in(USD)</th>

</tr>

</thead>

<tbody>

<?php

$sid=$_SESSION['stdid'];

$sql="SELECT
tblbooks.BookName,tblbooks.ISBNNumber,tblissuedbookdetails.IssuesDate,tblissuedbookde
tails.ReturnDate,tblissuedbookdetails.id as rid,tblissuedbookdetails.fine
from tblissuedbookdetails join tblstudents on
tblstudents.StudentId=tblissuedbookdetails.StudentId join tblbooks on
tblbooks.id=tblissuedbookdetails.BookId where tblstudents.StudentId=:sidorder by
tblissuedbookdetails.id desc";

$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)

{ ?>

<trclass="odd gradeX">

<tdclass="center"><?php echo htmlentities($cnt);?></td>

<tdclass="center"><?php echo htmlentities($result-


>BookName);?></td>

- 53 -
<tdclass="center"><?php echo htmlentities($result-
>ISBNNumber);?></td>

<tdclass="center"><?php echo htmlentities($result-


>IssuesDate);?></td>

<tdclass="center"><?phpif($result->ReturnDate=="")

{?>

<spanstyle="color:red">

<?php echo htmlentities("Not Return Yet"); ?>

</span>

<?php } else {

echo htmlentities($result->ReturnDate);

?></td>

<tdclass="center"><?php echo htmlentities($result->fine);?></td>

</tr>

<?php $cnt=$cnt+1;}} ?>

</tbody>

</table>

</div>

</div>

</div>

<!--End Advanced Tables -->

</div>

</div>

- 54 -
</div>

</div>

</div>

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

<?phpinclude('includes/footer.php');?>

<!-- FOOTER SECTION END-->

<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING


TIME -->

<!-- CORE JQUERY -->

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

<!-- DATATABLE SCRIPTS -->

<scriptsrc="assets/js/dataTables/jquery.dataTables.js"></script>

<scriptsrc="assets/js/dataTables/dataTables.bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</body>

</html>

<?php } ?>

?php

- 55 -
session_start();

error_reporting(0);

include('includes/config.php');

if(strlen($_SESSION['login'])==0)

header('location:index.php');

else{

?>

<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="author"content=""/>

<title>Online Library Management System | Issued Books</title>

<!-- BOOTSTRAP CORE STYLE -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- DATATABLE STYLE -->

<linkhref="assets/js/dataTables/dataTables.bootstrap.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

- 56 -
<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

</head>

<body>

<!------MENU SECTION START-->

<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<divclass="row pad-botm">

<divclass="col-md-12">

<h4class="header-line">Manage Issued Books</h4>

</div>

<divclass="row">

<divclass="col-md-12">

<!-- Advanced Tables -->

<divclass="panel panel-default">

<divclass="panel-heading">

Issued Books

</div>

<divclass="panel-body">

- 57 -
<?php $sql = "SELECT
tblbooks.BookName,tblcategory.CategoryName,tblauthors.AuthorName,tblbooks.ISBNNum
ber,tblbooks.BookPrice,tblbooks.id as bookid,tblbooks.bookImage,tblbooks.isIssued
from tblbooks join tblcategory on tblcategory.id=tblbooks.CatId join tblauthors on
tblauthors.id=tblbooks.AuthorId";

$query = $dbh -> prepare($sql);

$query->execute();

$results=$query->fetchAll(PDO::FETCH_OBJ);

$cnt=1;

if($query->rowCount() >0)

foreach($results as $result)

{ ?>

<divclass="col-md-4"style="float:left; height:300px;">

<imgsrc="admin/bookimg/<?php echo htmlentities($result->bookImage);?>"width="100">

<br/><b><?php echo htmlentities($result-


>BookName);?></b><br/>

<?php echo htmlentities($result->CategoryName);?><br/>

<?php echo htmlentities($result->AuthorName);?><br/>

<?php echo htmlentities($result->ISBNNumber);?><br/>

<?phpif($result->isIssued=='1'): ?>

<pstyle="color:red;">Book Already issued</p>

- 58 -
<?phpendif;?>

</div>

<?php $cnt=$cnt+1;}} ?>

</div>

</div>

<!--End Advanced Tables -->

</div>

</div>

</div>

</div>

</div>

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

<?phpinclude('includes/footer.php');?>

<!-- FOOTER SECTION END-->

<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING


TIME -->

<!-- CORE JQUERY -->

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

- 59 -
<!-- DATATABLE SCRIPTS -->

<scriptsrc="assets/js/dataTables/jquery.dataTables.js"></script>

<scriptsrc="assets/js/dataTables/dataTables.bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</body>

</html>

<?php } ?>

<?php

session_start();

session_destroy(); // destroy session

header("location:index.php");

?>

<?php

session_start();

include('includes/config.php');

error_reporting(0);

if(strlen($_SESSION['login'])==0)

header('location:index.php');

else{

if(isset($_POST['update']))

- 60 -
{

$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>';

?>

<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="author"content=""/>

<!--[if IE]>

- 61 -
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<![endif]-->

<title>Online Library Management System | Student Signup</title>

<!-- BOOTSTRAP CORE STYLE -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

</head>

<body>

<!------MENU SECTION START-->

<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<divclass="row pad-botm">

<divclass="col-md-12">

<h4class="header-line">My Profile</h4>

</div>

- 62 -
</div>

<divclass="row">

<divclass="col-md-9 col-md-offset-1">

<divclass="panel panel-danger">

<divclass="panel-heading">

My Profile

</div>

<divclass="panel-body">

<formname="signup"method="post">

<?php

$sid=$_SESSION['stdid'];

$sql="SELECT
StudentId,FullName,EmailId,MobileNumber,RegDate,UpdationDate,Statusfrom 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)

{ ?>

<divclass="form-group">

- 63 -
<label>Student ID : </label>

<?php echo htmlentities($result->StudentId);?>

</div>

<divclass="form-group">

<label>Reg Date : </label>

<?php echo htmlentities($result->RegDate);?>

</div>

<?phpif($result->UpdationDate!=""){?>

<divclass="form-group">

<label>Last Updation Date : </label>

<?php echo htmlentities($result->UpdationDate);?>

</div>

<?php } ?>

<divclass="form-group">

<label>Profile Status : </label>

<?phpif($result->Status==1){?>

<spanstyle="color: green">Active</span>

<?php } else { ?>

<spanstyle="color: red">Blocked</span>

<?php }?>

</div>

<divclass="form-group">

<label>Enter Full Name</label>

- 64 -
<inputclass="form-control"type="text"name="fullanme"value="<?php echo
htmlentities($result->FullName);?>"autocomplete="off"required/>

</div>

<divclass="form-group">

<label>Mobile Number :</label>

<inputclass="form-control"type="text"name="mobileno"maxlength="10"value="<?php echo
htmlentities($result->MobileNumber);?>"autocomplete="off"required/>

</div>

<divclass="form-group">

<label>Enter Email</label>

<inputclass="form-control"type="email"name="email"id="emailid"value="<?php echo
htmlentities($result->EmailId);?>" autocomplete="off"requiredreadonly/>

</div>

<?php }} ?>

<buttontype="submit"name="update"class="btn btn-primary"id="submit">Update Now


</button>

</form>

</div>

</div>

</div>

</div>

</div>

</div>

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

<?phpinclude('includes/footer.php');?>

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</body>

</html>

<?php } ?>

?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];

- 66 -
$fname=$_POST['fullanme'];

$mobileno=$_POST['mobileno'];

$email=$_POST['email'];

$password=md5($_POST['password']);

$status=1;

$sql="INSERTINTO tblstudents(StudentId,FullName,MobileNumber,EmailId,Password,Stat
us) 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>";

- 67 -
?>

<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="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 -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

<scripttype="text/javascript">

function valid()

- 68 -
if(document.signup.password.value!= document.signup.confirmpassword.value)

alert("Password and Confirm Password Field do not match !!");

document.signup.confirmpassword.focus();

returnfalse;

returntrue;

</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>

- 69 -
<body>

<!------MENU SECTION START-->

<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<divclass="row pad-botm">

<divclass="col-md-12">

<h4class="header-line">User Signup</h4>

</div>

</div>

<divclass="row">

<divclass="col-md-9 col-md-offset-1">

<divclass="panel panel-danger">

<divclass="panel-heading">

SINGUP FORM

</div>

<divclass="panel-body">

<formname="signup"method="post"onSubmit="return valid();">

<divclass="form-group">

<label>Enter Full Name</label>

<inputclass="form-control"type="text"name="fullanme"autocomplete="off"required/>

</div>

- 70 -
<divclass="form-group">

<label>Mobile Number :</label>

<inputclass="form-
control"type="text"name="mobileno"maxlength="10"autocomplete="off"required/>

</div>

<divclass="form-group">

<label>Enter Email</label>

<inputclass="form-
control"type="email"name="email"id="emailid"onBlur="checkAvailability()" autocomplete
="off"required />

<spanid="user-availability-status"style="font-size:12px;"></span>

</div>

<divclass="form-group">

<label>Enter Password</label>

<inputclass="form-control"type="password"name="password"autocomplete="off"required />

</div>

<divclass="form-group">

<label>Confirm Password </label>

<inputclass="form-
control" type="password"name="confirmpassword"autocomplete="off"required />

</div>

- 71 -
<buttontype="submit"name="signup"class="btn btn-danger"id="submit">Register Now
</button>

</form>

</div>

</div>

</div>

</div>

</div>

</div>

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

<?phpinclude('includes/footer.php');?>

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</body>

</html>

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if(isset($_POST['change']))

- 72 -
$email=$_POST['email'];

$mobile=$_POST['mobile'];

$newpassword=md5($_POST['newpassword']);

$sql ="SELECT EmailId FROM tblstudents WHERE EmailId=:email and


MobileNumber=:mobile";

$query= $dbh -> prepare($sql);

$query-> bindParam(':email', $email, PDO::PARAM_STR);

$query-> bindParam(':mobile', $mobile, PDO::PARAM_STR);

$query-> execute();

$results = $query -> fetchAll(PDO::FETCH_OBJ);

if($query -> rowCount() >0)

$con="update tblstudents set Password=:newpassword where EmailId=:email and


MobileNumber=:mobile";

$chngpwd1 = $dbh->prepare($con);

$chngpwd1-> bindParam(':email', $email, PDO::PARAM_STR);

$chngpwd1-> bindParam(':mobile', $mobile, PDO::PARAM_STR);

$chngpwd1-> bindParam(':newpassword', $newpassword, PDO::PARAM_STR);

$chngpwd1->execute();

echo "<script>alert('Your Password succesfully changed');</script>";

else {

echo "<script>alert('Email id or Mobile no is invalid');</script>";

?>

- 73 -
<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<head>

<metacharset="utf-8"/>

<metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=1"/>

<metaname="description"content=""/>

<metaname="author"content=""/>

<title>Online Library Management System | Password Recovery </title>

<!-- BOOTSTRAP CORE STYLE -->

<linkhref="assets/css/bootstrap.css"rel="stylesheet"/>

<!-- FONT AWESOME STYLE -->

<linkhref="assets/css/font-awesome.css"rel="stylesheet"/>

<!-- CUSTOM STYLE -->

<linkhref="assets/css/style.css"rel="stylesheet"/>

<!-- GOOGLE FONT -->

<linkhref='http://fonts.googleapis.com/css?family=Open+Sans'rel='stylesheet'type='text/cs
s'/>

<scripttype="text/javascript">

function valid()

if(document.chngpwd.newpassword.value!= document.chngpwd.confirmpassword.value)

alert("New Password and Confirm Password Field do not match !!");

document.chngpwd.confirmpassword.focus();

returnfalse;

- 74 -
returntrue;

</script>

</head>

<body>

<!------MENU SECTION START-->

<?phpinclude('includes/header.php');?>

<!-- MENU SECTION END-->

<divclass="content-wrapper">

<divclass="container">

<divclass="row pad-botm">

<divclass="col-md-12">

<h4class="header-line">User Password Recovery</h4>

</div>

</div>

<!--LOGIN PANEL START-->

<divclass="row">

<divclass="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">

<divclass="panel panel-info">

<divclass="panel-heading">

LOGIN FORM

</div>

<divclass="panel-body">

<formrole="form"name="chngpwd"method="post"onSubmit="return valid();">

- 75 -
<divclass="form-group">

<label>Enter Reg Email id</label>

<inputclass="form-control"type="email"name="email"requiredautocomplete="off"/>

</div>

<divclass="form-group">

<label>Enter Reg Mobile No</label>

<inputclass="form-control"type="text"name="mobile"requiredautocomplete="off"/>

</div>

<divclass="form-group">

<label>Password</label>

<inputclass="form-
control"type="password"name="newpassword"requiredautocomplete="off" />

</div>

<divclass="form-group">

<label>ConfirmPassword</label>

<inputclass="form-
control"type="password"name="confirmpassword"requiredautocomplete="off" />

</div>

<buttontype="submit"name="change"class="btn btn-info">Chnage Password</button> |


<ahref="index.php">Login</a>

</form>

- 76 -
</div>

</div>

</div>

</div>

<!---LOGIN PABNEL END-->

</div>

</div>

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

<?phpinclude('includes/footer.php');?>

<!-- FOOTER SECTION END-->

<scriptsrc="assets/js/jquery-1.10.2.js"></script>

<!-- BOOTSTRAP SCRIPTS -->

<scriptsrc="assets/js/bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

<scriptsrc="assets/js/custom.js"></script>

</body>

</html>

- 77 -
Database View

- 78 -
- 79 -
- 80 -
- 81 -
. CONCLUSION AND FUTURE WORK
The project was successfully completed and it is working fine fulfilling our desired functions
using the basic web development tools such as HTML, CSS and JavaScript used to design the
main page and PHP and MySQL database for storing the user information and validation of
users trying to access the main page. And also has a facility for student login where student
can login and can see status of books issued as well as request for book or give some
suggestions. It is a simple webpage and it gives us a basic idea about how the millions of
webpages that are there in the internet of different websites are designed. Although it is a
simple webpage with some simple functionality, it can be further modified in the future for
automation of data entry from the existing system. Also, will add some other functionalites
like students not only be able to check their fine amount but will also be able to pay their dues
through payment gateway

- 82 -
Chapter VI

6.REFERENCE

• HTML & CSS, and JavaScript & JQuery Book by jon Duckett
• MicrosoftSQLserver : Abeginner’sguide , seventh Edition Book by Dusan petkovic

• Microsoft SQL Server Notes for Professionals


bookhttp://books.goalkicker.com/MicrosoftSQLServerBook/
• W3 Schools http://www.w3schools.com/

• Stack Overflow : https://stackoverflow.com/

• Other references: www.google.com

www.youtube.com

- 83 -

You might also like