You are on page 1of 98

INTRODUCTION

1
CHAPTER-1

1.Abstract

With the advancement of technology, it is imperative to exalt all the


systems into a user-friendly manner. The Library Management system (LMS) acts as a tool
to transform traditional libraries into digital libraries. In traditional libraries, the students/user
has to search for books which are hassle process and there is no proper maintenance of
database about issues/fines. The overall progress of work is slow and it is impossible to
generate a fast report.

The librarians have to work allotted for arranging, sorting books in the
book sells. At the same time, they have to check and monitor the lend/borrow book details
with its fine. It is a tedious process to work simultaneously in different sectors. LMS will
assist the librarians to work easily. The LMS supports the librarians to encounter all the issues
concurrently. The users need not stand in a queue for a long period to return/borrow a book
from the library. The single PC contains all the data' s in it. The librarians have to assess the
system and provide an entry in it. Through LMS the librarian can find the book in the
bookshelves. The LMS is designed with the basic features such as librarian can
add/view/update/delete books and students' details in it. Once he/she ingress into the system
they can modify any data' s in the database.

The complete model is developed in Dot net technology, the C#


language is used to build the front- end application whereas the SQL server is exploiting as
database. The authorized person can only access the LMS system, they have to log in with
their user id and password. As aforementioned that the LMS is designed in a user-friendly
manner, so the admin can smoothly activate the system without expert advice. Every data is
storing and retrieving from the SQL database so it is highly secure. Thus, our system
contributes its new approach towards the digital library setup.

2
REVIEW OF INFORMATION

3
CHAPTER-2

REVIEW OF INFORMATION

2.1 Problem Outline:

A digital library is a collection of information that is stored and accessed electronically. The
information stored in the library should have a topic common to all the data. ,a digital library
is to provide a central location for accessing information on a particular topic. The user wants
when he searches for information about Mathematic is to get information. A digital library
must keep topics separate, otherwise it would be totally useless. A digital library should also
have a user interface that is easy to use.

2.2 Work Division:

The work was split into three areas: front-end design, back-end design actions and mobile
application. The front-end design was done using HTML, PHP, CSS is used to provide
actions to the controller and the application is deployed in a virtual eliminator. The work was
split in this manner because it gets easy to develop a separate layer of the system. The back-
end design was done using MYSQL database for storing users and admins data. Initially the
web-service was assigned as part of the website development.

2.3 Report Outline:

This report is divided into several sections that include background chapter which reviews
general web application development, requirement analysis that covers user requirements for
the web application, design and implementation chapters that covers mobile development,
user testing and evaluation, future work and conclusion which includes a discussion of certain
problems encountered in the project.

4
PROJECT ENVIRONMENT

5
CHAPTER-3

PROJECT ENVIRONMENT

3.1 HTML:

Introduction to HTML
Objectives
Understand what is HTML
Understand the usage of HTML
Understand the file naming conventions
Create HTML documents
Introduction
Web pages can be created using HTML, also called as the Internet language. HTML
is the acronym for Hypertext Markup Language. Hypertext refers to the content in a Web
page that includes text, pictures and sound.
HTML is an improved version of Standard Generalized Markup Language (SGML).
Tim Berners-Lee at Cern designed the original HTML document type in 1990. In 1992, Dan
Connolly wrote the HTML Document Type and a brief HTML specification. Since 1993,
cross-sections of people have contributed to the evolution of the HTML specification.
Finally, in 1994, Dan Connolly and Karen Olson Muldrow rewrote the HTML specification.
Mosaic was the first Web browser and was developed by the National Centre for
Supercomputing Applications (NCSA) at the University of Illinois at Urbana- Champaign.
Microsoft Internet Explorer was created based on this NCSA Mosaic Browser.

4.1 Html
What is HTML?
HTML is the standard markup language for creating Web pages. HTML stands for Hyper
Text Markup Language. It specifies the following
➢ HTML describes the structure of Web pages using markup
➢ HTML elements are the building blocks of HTML pages
➢ HTML elements are represented by tags

6
➢ HTML tags label pieces of content such as “heading”, “paragraph”,
“table”, and so on
➢ Browsers do not display the HTML tags, but use them to render the content of the
page
The definition of HTML is Hyper Text Markup Language.

➢ Hyper Text is the method by which you move around on the web - by clicking on
special text called hyperlinks which bring you to the next page. The fact that it
is hyper just means it is not linear - i.e. you can go to any place on the Internet
whenever you want by clicking on links - there is no set order to do things in.

➢ Markup is what HTML tags do to the text inside them. They mark it as a certain type
of text (italicized text, for example).

➢ HTML is a Language, as it has code-words and syntax like any other language.

Prerequisites:
You will need a text editor, such as Notepad and an Internet browser, such as Internet
Explorer or Netscape.
Q: What is Notepad and where do I get it?
A: Notepad is the default Windows text editor. On most Windows systems, click your
Start button and choose Programs then Accessories. It should be a little blue
notebook.
Mac Users: SimpleText is the default text editor on the Mac. In OSX use Text Edit
and change the following preferences: Select (in the preferences window) Plain text
instead of Rich text and then select Ignore rich text commands in HTML files. This
is very important because if you don’t do this HTML codes probably won’t work
One thing you should avoid using is a word processor (like Microsoft Word) for authoring
your HTML documents.

HTM or HTML Extension?


When you save an HTML file, you can use either the .htm or the .html extension. The .htm
extension comes from the past when some of the commonly used software only allowed three

7
letter extensions. It is perfectly safe to use either .html or .htm, but be consistent.
mypage.htm and mypage.html are treated as different files by the browser.
How to View HTML Source
A good way to learn HTML is to look at how other people have coded their html pages. To
find out, simply click on the View option in your browsers toolbar and select Source or Page
Source. This will open a window that shows you the actual HTML of the page. Go ahead and
view the source html for this page.

HTML Tags
What are HTML tags?
HTML tags are used to mark-up HTML elements
HTML tags are surrounded by the two characters < and>
The surrounding characters are called angle brackets
HTML tags normally come in pairs like <b> and </b>
The first tag in a pair is the start tag, the second tag is the end tag
The text between the start and end tags is the element content
HTML tags are not case sensitive, <b> means the same as <B>

Logical vs. Physical Tags


In HTML there are both logical tags and physical tags. Logical tags are designed to
describe (to the browser) the enclosed text’s meaning. An example of a logical tag is the
<strong></strong> tag. By placing text in between these tags, you are telling the browser that
the text has some greater importance. By default, all browsers make the text appear bold
when in between the <strong> and </strong> tags.
Physical tags on the other hand provide specific instructions on how to display the text they
enclose. Examples of physical tags include:
<b> : Makes the text bold.
<big> : Makes the text usually one size bigger than what’s around it.
<i> : Makes text italic.
Physical tags were invented to add style to HTML pages because style sheets were
not around, though the original intention of HTML was to not have physical tags. Rather
than use physical tags to style your HTML pages, you should use style sheets. HTML
Elements

8
Remember the HTML example from the previous page:
<html>
<head>
<title>My First Webpage</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html>
This is an HTML element:
<b>This text is bold</b>
The HTML element begins with a start tag: <b>
The content of the HTML element is: This text is bold
The HTML element ends with an end tag: </b>
The purpose of the <b> tag is to define an HTML element that should be displayed as bold.
This is also an HTML element:
<body>
This is my first homepage. <b>This text is bold</b>
</body>
This HTML element starts with the start tag <body>, and ends with the end tag </body>. The
purpose or the <body> tag is to define the HTML element that contains the body of the
HTML document.

Nested Tags
You may have noticed in the example above, the <body> tag also contains other tags, like
the <b> tab. When you enclose an element in with multiple tags, the last tag opened should
be the first tag closed. For example:
<p><b><em>This is NOT the proper way to close nested tags. </p></em></b>
<p><b><em>This is the proper way to close nested tags. </em></b></p>
Note: It doesn’t matter which tag is first, but they must be closed in the proper order.

Why Use Lowercase Tags?

9
You may notice we’ve used lowercase tags even though I said that HTML tags are not case
sensitive. <B> means the same as <b>. The World Wide Web Consortium (W3C), the group
responsible for developing web standards, recommends lowercase tags in their HTML 4
recommendation, and XHTML (the next generation HTML) requires lowercase tags.

Tag Attributes
Tags can have attributes. Attributes can provide additional information about the HTML
elements on your page. The <tag> tells the browser to do something, while the attribute tells
the browser how to do it. For instance, if we add the bgcolor attribute, we can tell the browser
that the background color of your page should be blue, like this: <body bgcolor=” blue”>.
This tag defines an HTML table: <table>. With an added border attribute, you can tell the
browser that the table should have no borders: <table border=”0”>. Attributes always come
in name/value pairs like this: name=”value”. Attributes are always added to the start tag of
an HTML element and the value is surrounded by quotes.
Basic HTML Tags
The most important tags in HTML are tags that define headings, paragraphs and line breaks.

Basic HTML Tags Tag Description

<html> Defines an HTML document

<body>
Defines the Document’s body

Defines header 1 to header 6


<h1> to <h6>

<p> Defines a paragraph

<br> Inserts a single line break

<hr> Defines a horizontal rule

Defines a comment
<!-->

10
Headings
Headings are defined with the <h1> to <h6> tags. <h1> defines the largest heading while
<h6> defines the smallest.

<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
<h4>This is a heading</h4>
<h5>This is a heading</h5>
<h6> This is a heading</h6>

HTML automatically adds an extra blank line before and after a heading. A useful
heading attribute is align.
<h5 align=”left”>I can align headings </h5>
<h5 align=”center”>This is a centered heading </h5>
<h5 align=”right”>This is a heading aligned to the right </h5>

Paragraphs
Paragraphs are defined with the <p> tag. Think of a paragraph as a block of text. You can
use the align attribute with a paragraph tag as well.
<p align=”left”> This is a paragraph</p>
<p align=”center”>this is another paragraph</p>

Important: You must indicate paragraphs with <p> elements. A browser ignores any
indentations or blank lines in the source text. Without <p> elements, the document becomes
one large paragraph. HTML automatically adds an extra blank line before and after
a paragraph.

11
Line Breaks

The <br> tag is used when you want to


start a new line, but don’t want to start a
new paragraph. The <br> tag forces a
This Code Would Display
line break wherever you place it. It
is similar to single spacing in
a document.

<p>This <br> is a para<br> graph with This


line breaks</p> is a para
graph with line breaks

Comments in HTML

The comment tag is used to insert a This Code Would Display


comment in the HTML source code. A
comment can be placed anywhere in the
document and the browser
will ignore everything inside the brackets.
You can use comments to write notes
to yourself, or write a helpful message to
someone looking at your source code.

<p>This html comment would <!-- This is This html comment would be displayed
a comment--> be displayed like this.</p like this.

Other HTML Tags


As mentioned before, there are logical styles that describe what the text should be and
physical styles which actually provide physical formatting. It is recommended to use
the logical tags and use style sheets to style the text in those tags.

12
Logical Tags Physical Tags Tag Description

<abbr> Defines an abbreviation

<acronym> Defines an acronym

<address> Defines an address element

<cite> Defines a citation

<code> Defines computer code text

<blockquote > Defines a long quotation

<del> Defines text

<dfn> Defines a definition term

<em> Defines emphasized text

<ins> Defines inserted text

<kbd> Defines keyboard text

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code

<strong> Defines strong text

<var> Defines a variable

<b> Defines bold text

<big> Defines big text

<i> Defines italic text

<small> Defines small text

<sup> Defines superscripted text

<sub> Defines subscripted text

<tt> Defines teletype text

<u> Deprecated. Use styles instead

13
HTML Character Entities
Some characters have a special meaning in HTML, like the less than sign (<) that defines
the start of an HTML tag. If we want the browser to actually display these characters,
we must insert character entities in place of the actual characters themselves.

The Most Common Description Entity Name Entity


Character Entities: Number
Result

Non-breaking space &nbsp; &#160;

< Less than &lt; &#60;

> Greater than &gt; &#62;

& Ampersand &amp; &#38;

“ Quotation mark &quot; &#34;

‘ Apostrophe &apos; (does| &#39;


not work in IE)

A character entity has three parts: an ampersand (&), an entity name or an entity number, and
finally a semicolon (;). The & means we are beginning a special character, the ; means ending
a special character and the letters in between are sort of an abbreviation for what it’s for. To
display a less than sign in an HTML document we must write: &lt; or &#60; The advantage
of using a name instead of a number is that a name s easier to remember. The disadvantage
is that not all browsers support the newest entity names, while the support for entity numbers
is very good in almost all browsers.
Non-breaking Space
The most common character entity in HTML is the non-breaking space &nbsp; Normally
HTML will truncate spaces in your text. If you add 10 spaces in your text, HTML will
remove 9 of them. To add spaces to your text, use the &nbsp; character entity.

HTML Fonts
The <font> tag in HTML is deprecated. The World Wide Web Consortium (W3c)
has removed the <font> tag from its recommendations. In future versions of HTML,

14
style sheets (CSS) will be used to define the layout and display properties of HTML
elements.
The <font> Tag Should NOT be used.

HTML Backgrounds
Backgrounds
The <body> tag has two attributes where you can specify backgrounds. The background can
be a color or an image.

Bgcolor
The bgcolor attribute specifies a background-color for an HTML page. The value of this
attribute can be a hexadecimal number, an RGB value, or a color name:
<body bgcolor=”#000000”> <body bgcolor=”rgb(0,0,0)”> <body bgcolor=”black”>
The lines above all set the background-color to black.

Background
The background attribute can also specify a background-image for an HTML page. The
value of this attribute is the URL of the image you want to use. If the image is smaller than
the browser window, the image will repeat itself until it fills the entire browser window.

<body background=”clouds.gif”>
<body background=”http://profdevtrain.austincc.edu/html/graphics/clouds.gif”>
The URL can be relative (as in the first line above) or absolute (as in the second line above).
If you want to use a background image, you should keep in mind:
Will the background image increase the loading time too much?

Will the background image look good with other images on the page?

Will the background image look good with the text colors on the page?

Will the background image look good when it is repeated on the page?

Will the background image take away the focus from the text?

15
HTML Colors
Color Values
Colors are defined using a hexadecimal notation for the combination of red, green, and
blue color values (RGB). The lowest value that can be given to one light source is 0
[hex #00]. The highest value is 255 (hex #FF). This table shows the result of combining red,
green, and blue:
Color Color RGB

#000000 rgb(0,0,0)

#FFOO00 rgb (255,0,0)

#0OFF00 rgb(0,255,0)

#O000FF rgb(0,0,255)

#FFFFOO rgb(255,255,0)

#00FFFF rgb(0,255,255)
#FFOOFF rgb(255,0,255)

#COCOCO rgb(192,192,192)

#FFFFFF rgb(255,255,255)

Color Names
A collection of color names is supported by most browsers. To view a table of color names
that are supported by most browsers visit this web page

Web Safe Colors


A few years ago, when most computers supported only 256 different colors, a list of 216
Web Safe Colors was suggested as a Web standard. The reason for this was that the Microsoft
and Mac operating system used 40 different “reserved” fixed system colors (about 20
each). These 216 cross platform webs safe color palette was originally created to ensure that
all computers would display all colors correctly when running a 256 color palette.

16
16 Million Different Colors
The combination of red, green and blue values from 0 to 255 gives a total of more than 16
million different colors to play with (256 x 256 x 256). Most modern monitors are Capable
of displaying at least 16,384 different colors. To assist you in using color schemes.

HTML Lists
HTML provides a Simple way to show unordered lists (bullet lists) or ordered
lists (numbered lists).

Unordered Lists
An unordered list is a list of items marked with bullets (typically small black circles). An
unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

Ordered Lists
An ordered list is also a list of items. The list items are marked with numbers. An ordered
list starts with the <ol> tag. Each list item starts with the <li> tag.

Definition Lists
Definition lists consist of two parts: a term and a description. To mark up a definition list,
you need three HTML elements; a container <dl>, a definition term <dt>, and a definition
description <dd>.

HTML Links
HTML uses the <a> anchor tag to create a link to another document or web page.
The Anchor Tag and the Href Attribute
An anchor can point to any resource on the Web: an HTML page, an image, a sound file, a
movie, etc. The syntax of creating an anchor:
<a href=”url”>Text to be displayed</a>

The <a> tag is used to create an anchor to link from, the href attribute is used to tell the
address of the document or page we are linking to, and the words between the open and close
of the anchor tag will be displayed as a hyperlink.

17
The Target Attribute
With the target attribute, you can define where the linked document will be opened. By
default, the link will open in the current window. The code below will open the document in
a new browser window:
<a href=http://www.austincc.edu/ target=” _blank”>Visit ACC! </a>

Email Links
To create an email link, you will use mailto: plus, your email address. Here is a link to
ACC’s Help Desk:
<a href=”mailto:helpdesk@austincc.edu”>Email Help Desk</a>
To add a subject for the email message, you would add? subject= after the email address. For
example:
<a href- “mailto:helpdesk@austincc.edu?subject=Email Assistance”>Email Help Desks/a>

The Anchor Tag and the Name Attribute


The name attribute is used to create a named anchor. When using
named anchors, we can create links that can jump directly to a specific section on a page,
instead of letting the user scroll around to find what he/she is looking for. Unlike an anchor
that uses href, a named anchor doesn’t change the appearance of the text (unless you set styles
for that anchor) or indicate in any way that there is anything special about the text. Below is
the syntax of a named anchor:
A name=” top”>Text to be displayed</a>

HTML Images
The Image Tag and the Src Attribute
The <img> tag is empty, which means that it contains attributes only and it has no dosing
tag. To display an image on a page, you need to use the src attribute. Src stands for “source”.
The value of the src attribute is the URL of the image you want to display on your page.

The Alt Attribute


The alt attribute is used to define an alternate text for an image. The value of the
alt attribute is author-defined text:
<img src=” graphics/chef.gif” alt=” Smiling Happy Chef”>

18
The alt attribute tells the reader what he or she is missing on a page if the browser can’t load
images. The browser will then display the alternate text instead of the image. It is a good
practice to include the alt attribute for each image on a page, to improve the display and
usefulness of your document for people who have text-only browsers or use Screen readers.

Image Dimensions
When you have an image, the browser usually figures out how big the image is all by itself.
If you put in the image dimensions in pixels however, the browser simply reserves Space for
the image, then loads the rest of the page. Once the entire page is loads it can go back and fill
in the images. Without dimensions, when it runs into an image, the browser has to
pause loading the page, load the image, then continue loading the page. The chef image
would then be:

<img src=” graphics/chef.gif width=”130” height=”101” alt=” Smiling Happy Chef”>

Tables
Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and
each row is divided into data cells (with the <td> tag). The letters td stands for table data,
which is the content of a data cell. A data cell can contain text, images, lists, paragraphs,
forms, horizontal rules, tables, etc.

Headings in a Table
Headings in a table are defined with the <th> tag.
This code Would Display

<table border=”1”> Heading


<tr> <th>Heading</th> Another Heading
<th> Another Heading</th> </tr> Row 1, cell 1
<tr> <td>row 1, cell 1</td> Row 1, cell 2
<td>row 1, cell 2</td> </tr> Row 2, cell 1
<tr><td>row 2, cell 1</td>
<td>row 2, cell 2</td> </tr> </table> Row 2, cell 2

19
Cell Padding and Spacing
The <table> tag has two attributes known as cell spacing and cellpadding. Here is a table
example without these properties. These properties may be used separately or together.
Table Tags Tag Description

<table> Defines a table

<th> Defines a table header

<tr> Defines a table row

<td> Defines a table cell

<caption> Defines a table caption

<colgroup> Defines groups of table columns

<col> Defines the attribute values for one or more


columns in a table

CSS is the language tor describing the presentation of Web pages, including colors,
layout and fonts. It allows one to adapt the presentation to different types of devices, such as
large screens, small screens, or printers. CSS is independent of HTML and can be used with
any XMI-based markup language. The separation of HTML from CSS makes it easier to
maintain sites, share style sheets across pages, and tailor pages to different environments.
This is referred to as the separation of structure (or: content) from presentation.

What is Web Fonts?


Web Fonts is a technology that enables people to use fonts on demand over the Web without
requiring installation in the operating system. W3C has experience in downloadable fonts
through HTML, CSS2, and SVG. Until recently, downloadable fonts have not been common
on the Web due to the lack of an interoperable font format. The Web Fonts effort plans to
address that through the creation of an industry-supported, open font format for the Web
(called “WOFF”).

20
3.2 PHP:

PHP started out as a small open source project that evolved as more and more people found
out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.

• PHP is a recursive acronym for "PHP: Hypertext Pre-processor".

• PHP is a server side scripting language that is embedded in HTML. It is used to


manage dynamic content, databases, session tracking, even build entire e-commerce
sites.

• It is integrated with a number of popular databases, including MySQL, PostgreSQL,


Oracle, Sybase, Informix, and Microsoft SQL Server.

• PHP is pleasingly zippy in its execution, especially when compiled as an Apache


module on the Unix side. The MySQL server, once started, executes even very
complex queries with huge result sets in record-setting time.

• PHP supports a large number of major protocols such as POP3, IMAP, and LDAP.
PHP4 added support for Java and distributed object architectures (COM and
CORBA), making n-tier development a possibility for the first time.

• PHP is forgiving: PHP language tries to be as forgiving as possible.

• PHP Syntax is C-Like.

Common uses of PHP

• PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them.

• PHP can handle forms, i.e. gather data from files, save data to a file, through email
you can send data, return data to the user.

• You add, delete, modify elements within your database through PHP.

• Access cookies variables and set cookies.

• Using PHP, you can restrict users to access some pages of your website.

• It can encrypt data.

21
Characteristics of PHP

Five important characteristics make PHP's practical nature possible −

• Simplicity

• Efficiency

• Security

• Flexibility

• Familiarity

In order to develop and run PHP Web pages three vital components need to be installed on
your computer system.

• Web Server − PHP will work with virtually all Web Server software, including
Microsoft's Internet Information Server (IIS) but then most often used is freely
available Apache Server. Download Apache for free here
− https://httpd.apache.org/download.cgi

• Database − PHP will work with virtually all database software, including Oracle and
Sybase but most commonly used is freely available MySQL database. Download
MySQL for free here − https://www.mysql.com/downloads/

• PHP Parser − In order to process PHP script instructions a parser must be installed
to generate HTML output that can be sent to the Web Browser. This tutorial will
guide you how to install PHP parser on your computer.

PHP Parser Installation

Before you proceed it is important to make sure that you have proper environment setup on
your machine to develop your web programs using PHP.

Type the following address into your browser's address box.

http://127.0.0.1/info.php

If this displays a page showing your PHP installation related information then it means you
have PHP and Webserver installed properly. Otherwise, you have to follow given procedure
to install PHP on your computer.

22
This section will guide you to install and configure PHP over the following four platforms

• PHP Installation on Linux or Unix with Apache

• PHP Installation on Mac OS X with Apache

• PHP Installation on Windows NT/2000/XP with IIS

• PHP Installation on Windows NT/2000/XP with Apache

PHP installation on Windows NT/2000/XP with Apache

To install Apache with PHP 5 on Windows follow the following steps. If your PHP and
Apache versions are different then please take care accordingly.

• Download Apache server from www.apache.org/dist/httpd/binaries/win32. You


want the current stable release version with the no_src.msi extension. Double-click
the installer file to install; C:\Program Files is a common location. The installer will
also ask you whether you want to run Apache as a service or from the command line
or DOS prompt. We recommend you do not install as a service, as this may cause
problems with start-up.

• Extract the PHP binary archive using your unzip utility; C:\PHP is a common
location.

• Copy some .dll files from your PHP directory to your system directory (usually
C:\Windows). You need php5ts.dll for every case. You will also probably need to
copy the file corresponding to your Web server module -
C:\PHP\Sapi\php5apache.dll. to your Apache modules directory. It's possible that
you will also need others from the dlls subfolder.but start with the two mentioned
previously and add more if you need them.

• Copy either php.ini-dist or php.ini-recommended (preferably the latter) to your


Windows directory, and rename it php.ini. Open this file in a text editor (for example,
Notepad). Edit this file to get configuration directives; At this point, we highly
recommend that new users set error reporting to E_ALL on their development
machines.

• Tell your Apache server where you want to serve files from and what extension(s)
you want to identify PHP files (.php is the standard, but you can use .html, .phtml,

23
or whatever you want). Go to your HTTP configuration files (C:\Program
Files\Apache Group\Apache\conf or whatever your path is), and open httpd.conf
with a text editor. Search for the word Document Root (which should appear twice)
and change both paths to the directory you want to serve files out of. (The default is
C:\Program Files\Apache Group\Apache\htdocs.). Add at least one PHP extension
directive as shown in the first line of the following code −

Load Module php5_module modules/php5apache.dll


Add Type application/x-httpd-php .php .phtml

• You may also need to add the following line Add Module mod_php5.c

• Stop and restart the WWW service. Go to the Start menu → Settings → Control
Panel → Services. Scroll down the list to IIS Admin Service. Select it and click
Stop. After it stops, select World Wide Web Publishing Service and click Start.
Stopping and restarting the service from within Internet Service Manager will not
suffice. Since this is Windows, you may also wish to reboot.

• Open a text editor. Type: <?php phpinfo(); ?>. Save this file in your Web server's
document root as info.php.

• Start any Web browser and browse the file.you must always use an HTTP request
(http://www.testdomain.com/info.php or http://localhost/info.php or
http://127.0.0.1/info.php) rather than a filename (/home/httpd/info.php) for the file
to be parsed correctly

You should see a long table of information about your new PHP installation message
Congratulations!

Apache Configuration

If you are using Apache as a Web Server then this section will guide you to edit Apache
Configuration Files.

Just Check it here − PHP Configuration in Apache Server

PHP.INI File Configuration

The PHP configuration file, php.ini, is the final and most immediate way to affect PHP's
functionality.

24
Just Check it here − PHP.INI File Configuration

Windows IIS Configuration

To configure IIS on your Windows machine you can refer your IIS Reference Manual
shipped along with IIS.

Apache Configuration in PHP

Apache uses httpd.conf file for global settings, and the .htaccess file for per-directory access
settings. Older versions of Apache split up httpd.conf into three files (access.conf,
httpd.conf, and srm.conf), and some users still prefer this arrangement.

Apache server has a very powerful, but slightly complex, configuration system of its own.
Learn more about it at the Apache Web site − www.apache.org

The following section describe settings in httpd.conf that affect PHP directly and cannot be
set elsewhere. If you have standard installation then httpd.conf will be found at
/etc/httpd/conf:

Timeout

This value sets the default number of seconds before any HTTP request will time out. If you
set PHP's max_execution_time to longer than this value, PHP will keep grinding away but
the user may see a 404 error. In safe mode, this value will be ignored; you must use the
timeout value in php.ini instead

DocumentRoot

DocumentRoot designates the root directory for all HTTP processes on that server. It looks
something like this on Unix −

DocumentRoot./usr /local/apache_1.3.6/htdocs.

You can choose any directory as document root.

AddType

The PHP MIME type needs to be set here for PHP files to be parsed. Remember that you
can associate any file extension with PHP like .php3, .php5 or .htm.

25
AddType application/x-httpd-php .php
AddType application/x-httpd-phps.phps
AddType application/x-httpd-php3 .php3 .phtml
AddType application/x-httpd-php .html

Action

You must uncomment this line for the Windows apxs module version of Apache with shared
object support −

LoadModule php4_module modules/php4apache.dll

or on Unix flavors −

LoadModule php4_module modules/mod_php.so

AddModule

You must uncomment this line for the static module version of Apache.

AddModule mod_php4.c

PHP.INI File Configuration

The PHP configuration file, php.ini, is the final and most immediate way to affect PHP's
functionality. The php.ini file is read each time PHP is initialized.in other words, whenever
httpd is restarted for the module version or with each script execution for the CGI version.
If your change isn.t showing up, remember to stop and restart httpd. If it still isn.t showing
up, use phpinfo() to check the path to php.ini.

The configuration file is well commented and thorough. Keys are case sensitive, keyword
values are not; whitespace, and lines beginning with semicolons are ignored. Booleans can
be represented by 1/0, Yes/No, On/Off, or True/False. The default values in php.ini-dist will
result in a reasonable PHP installation that can be tweaked later.

Here we are explaining the important settings in php.ini which you may need for your PHP
Parser.

short_open_tag = Off

26
Short open tags look like this: <? ?>. This option must be set to Off if you want to use XML
functions.

safe_mode = Off

If this is set to On, you probably compiled PHP with the --enable-safe-mode flag. Safe mode
is most relevant to CGI use. See the explanation in the section "CGI compile-time options".
earlier in this chapter.

safe_mode_exec_dir = [DIR]

This option is relevant only if safe mode is on; it can also be set with the --with-exec-dir
flag during the Unix build process. PHP in safe mode only executes external binaries out of
this directory. The default is /usr/local/bin. This has nothing to do with serving up a normal
PHP/HTML Web page.

safe_mode_allowed_env_vars = [PHP_]

This option sets which environment variables users can change in safe mode. The default is
only those variables prepended with "PHP_". If this directive is empty, most variables are
alterable.

safe_mode_protected_env_vars = [LD_LIBRARY_PATH]

This option sets which environment variables users can't change in safe mode, even if
safe_mode_allowed_env_vars is set permissively

disable_functions = [function1, function2...]

A welcome addition to PHP4 configuration and one perpetuated in PHP5 is the ability to
disable selected functions for security reasons. Previously, this necessitated hand-editing the
C code from which PHP was made. Filesystem, system, and network functions should
probably be the first to go because allowing the capability to write files and alter the system
over HTTP is never such a safe idea.

max_execution_time = 30

27
The function set_time_limit() won.t work in safe mode, so this is the main way to make a
script time out in safe mode. In Windows, you have to abort based on maximum memory
consumed rather than time. You can also use the Apache timeout setting to timeout if you
use Apache, but that will apply to non-PHP files on the site too.

error_reporting = E_ALL & ~E_NOTICE

The default value is E_ALL & ~E_NOTICE, all errors except notices. Development servers
should be set to at least the default; only production servers should even consider a lesser
value

error_prepend_string = [""]

With its bookend, error_append_string, this setting allows you to make error messages a
different color than other text, or what have you.

warn_plus_overloading = Off

This setting issues a warning if the + operator is used with strings, as in a form value.

variables_order = EGPCS

This configuration setting supersedes gpc_order. Both are now deprecated along with
register_globals. It sets the order of the different variables: Environment, GET, POST,
COOKIE, and SERVER (aka Built-in).You can change this order around. Variables will be
overwritten successively in left-to-right order, with the rightmost one winning the hand
every time. This means if you left the default setting and happened to use the same name for
an environment variable, a POST variable, and a COOKIE variable, the COOKIE variable
would own that name at the end of the process. In real life, this doesn't happen much.

register_globals = Off

This setting allows you to decide whether you wish to register EGPCS variables as global.
This is now deprecated, and as of PHP4.2, this flag is set to Off by default. Use superglobal
arrays instead. All the major code listings in this book use superglobal arrays.

gpc_order = GPC

28
This setting has been GPC Deprecated.

magic_quotes_gpc = On

This setting escapes quotes in incoming GET/POST/COOKIE data. If you use a lot of forms
which possibly submit to themselves or other forms and display form values, you may need
to set this directive to On or prepare to use addslashes() on string-type data.

magic_quotes_runtime = Off

This setting escapes quotes in incoming database and text strings. Remember that SQL adds
slashes to single quotes and apostrophes when storing strings and does not strip them off
when returning them. If this setting is Off, you will need to use stripslashes() when
outputting any type of string data from a SQL database. If magic_quotes_sybase is set to
On, this must be Off.

magic_quotes_sybase = Off

This setting escapes single quotes in incoming database and text strings with Sybase-style
single quotes rather than backslashes. If magic_quotes_runtime is set to On, this must be
Off.

auto-prepend-file = [path/to/file]

If a path is specified here, PHP must automatically include() it at the beginning of every
PHP file. Include path restrictions do apply.

auto-append-file = [path/to/file]

If a path is specified here, PHP must automatically include() it at the end of every PHP
file.unless you escape by using the exit() function. Include path restrictions do apply.

include_path = [DIR]

If you set this value, you will only be allowed to include or require files from these
directories. The include directory is generally under your document root; this is mandatory
if you.re running in safe mode. Set this to . in order to include files from the same directory

29
your script is in. Multiple directories are separated by colons:
.:/usr/local/apache/htdocs:/usr/local/lib.

doc_root = [DIR]

If you.re using Apache, you.ve already set a document root for this server or virtual host in
httpd.conf. Set this value here if you.re using safe mode or if you want to enable PHP only
on a portion of your site (for example, only in one subdirectory of your Web root).

file_uploads = [on/off]

Turn on this flag if you will upload files using PHP script.

upload_tmp_dir = [DIR]

Do not uncomment this line unless you understand the implications of HTTP uploads!

session.save-handler = files

Except in rare circumstances, you will not want to change this setting. So don't touch it.

ignore_user_abort = [On/Off]

This setting controls what happens if a site visitor clicks the browsers Stop button. The
default is On, which means that the script continues to run to completion or timeout. If the
setting is changed to Off, the script will abort. This setting only works in module mode, not
CGI.

mysql.default_host = hostname

The default server host to use when connecting to the database server if no other host is
specified.

mysql.default_user = username

The default user name to use when connecting to the database server if no other name is
specified.

30
3.3 XAMPP:

XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P). It
is a simple, lightweight Apache distribution that makes it extremely easy for developers to
create a local web server for testing purposes. Everything you need to set up a web server –
server application (Apache), database (MySQL), and scripting language (PHP) – is included
in a simple extractable file. XAMPP is also cross-platform, which means it works equally
well on Linux, Mac and Windows. Since most actual web server deployments use the same
components as XAMPP, it makes transitioning from a local test server to a live server is
extremely easy as well. Web development using XAMPP is especially beginner friendly.

What’s Included in XAMPP?

XAMPP has four primary components. These are:

1. Apache: Apache is the actual web server application that processes and delivers web
content to a computer. Apache is the most popular web server online, powering nearly 54%
of all websites.

2. MySQL: Every web application, howsoever simple or complicated, requires a database


for storing collected data. MySQL, which is open source, is the world’s most popular
database management system. It powers everything from hobbyist websites to professional
platforms like WordPress.

3. PHP: PHP stands for Hypertext Preprocessor. It is a server-side scripting language that
powers some of the most popular websites in the world, including WordPress and Facebook.
It is open source, relatively easy to learn, and works perfectly with MySQL, making it a
popular choice for web developers.

4. Perl: Perl is a high-level, dynamic programming language used extensively in network


programming, system admin, etc. Although less popular for web development purposes, Perl
has a lot of niche applications.

Different versions of XAMPP may have additional components such as phpMyAdmin,


OpenSSL, etc. to create full-fledged web servers.

31
How to install XAMPP?

Step 1:

Install XAMPP

Step 2:

Assume you installed xampp in C Drive. Go to C:\xampp\htdocs. Create your own folder,
name is for example as “web tech”.

Step 3:

Now create your first php program in xampp and name it as “add.php”.

Step 4:

Now double click on “XAMPP CONTROL PANEL” on desktop and START “APACHE”.

[icon also appears on th bottom]

Step 5:

Type localhost on your browser and press enter it will show the following:

32
Step 6:
Now type the following on browser http://localhost/project_folder_name/

33
SYSTEM ANALYSIS

34
CHAPTER-4

SYSTEM SPECIFICATIONS

4.1 Hardware Requirements

Processor : AMD Ryzen 5 Quad Core 2500U

System bus : 32 bits

RAM : 500MB of RAM

4.2 Software Requirements

OS : WINDOWS 10

Front End : HTML, PHP

Back End : MYSQL

Server : XAMPP

35
SYSTEM STUDY

4.3.1 INTRODUCTION:

The objective behind developing this Online Library Management System project is to build
a system which can maintain the work of the library on the web based application. This
software will contain the features by using of which the library becomes smart and any user
will get the information regarding the library instantaneously. This will help the librarian in
maintaining the detail of available books in the library while a student can check the
availability of the required books. The Online Library Management System project will be
web based so the user can access the details of books without going to the library.

4.3.2 INITIAL INVESTIGATION:

The first step in system development life cycle is the identification of need of change to
improve or enhance an existing system. An initial investigation on existing system was
carried out. The present system of library is completely manual. Many problems were
identified during the initial study of the existing system.

4.3.3 EXISTING SYSTEM:

System analysis is a detailed study of the various operations performed by a system and their
relationships within and outside of the system. Here the key question is – What all problems
exist in the present system? What must be done to solve the problem? Analysis begins when
a user or admin begins a study of the program using 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 books; how many books has issued.

36
System analysis can be categorized into five parts:

1. System planning and initial investigation


2. Information gathering
3. Applying analysis tools for structured analysis
4. Feasibility study
5. Cost/ benefit analysis

4.3.4 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.

37
DESIGN

38
CHAPTER-5

DESIGN

5.1 DATA FLOW DIAGRAM:

To implement the above goals, the following methodology needs to be followed:

1. Specifying application development and various tools to implement it.


2. Specifying the bindings between the tasks and the resources either manually or by
design tools.
DFD

DFD can represent Source, destinations, storage and flow of data using the following set of
components-

Data Flow

Entity Process
Data Store

Entities - Entities are source and destination of information data. Entities are represented by
rectangles with their respective names.

Process - Activities and action taken on the data are represented by Circle or Round edged
rectangles.

Data Storage - There are two variants of data storage - it can either be represented as a
rectangle with absence of both smaller sides or as an open-sided rectangle with only one side
missing.

Data Flow - Movement of data is shown by pointed arrows. Data movement is shown from
the base of arrow as its source towards head of the arrow as destination.

39
Level-0:

40
Level-1:

41
Level-2:

42
5.2.ER- DIAGRAM:

The basic idea of the ER Diagram is, it is a graphical representation of an information system
that shows the relationship between people, objects, places, concepts or events within that
system. An ER diagram is a data modeling technique that helps in defining business
processes.

Entity

Entities are represented by means of rectangles. Rectangles are named with the entity set they
represent.

Attributes

Attributes are the properties of entities. Attributes are represented by means of ellipses. Every
ellipse represents one attribute and is directly connected to its entity (rectangle)If the
attributes are composite, they are further divided in a tree like structure. Every node is then
connected to its attribute. That is, composite attributes are represented by ellipses that are
connected with an ellipse).

Relationship

Relationships are represented by diamond-shaped box. Name of the relationship is written


inside the diamond-box. All the entities (rectangles) participating in a relationship, are
connected to it by a line.

Binary Relationship and Cardinality

A relationship where two entities are participating is called a binary relationship. Cardinality
is the number of instance of an entity from a relation that can be associated with the relation.

One-to-one − When only one instance of an entity is associated with the relationship, it is
marked as '1:1'. The following image reflects that only one instance of each entity should be
associated with the relationship. It depicts one-to-one relationship.

One-to-many − When more than one instance of an entity is associated with a relationship,
it is marked as '1:N'. The following image reflects that only one instance of entity on the left
and more than one instance of an entity on the right can be associated with the relationship.
It depicts one-to-many relationship.

43
Many-to-one − When more than one instance of entity is associated with the relationship, it
is marked as 'N:1'. The following image reflects that more than one instance of an entity on
the left and only one instance of an entity on the right can be associated with the relationship.
It depicts many-to-one relationship.

Many-to-many − The following image reflects that more than one instance of an entity on
the left and more than one instance of an entity on the right can be associated with the
relationship. It depicts many-to-many relationship.

44
5.3.USE CASE DIAGRAMS:

A use case diagram in the Unified Modelling Language (UML) is a type of behavioural
diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals (represented
as use cases), and any dependencies between those use cases. Use Case diagrams are formally
included in two modelling languages defined by the OMG: the Unified Modelling Language
(UML) and the Systems Modelling Language (SysML)

45
5.4. CLASS DIAGRAM:

In software engineering, a class diagram in the Unified Modelling Language (UML) is a type
of static structure diagram that describes the structure of a system by showing the system's
classes, their attributes, and the relationships between the classes. The class diagram is the
main building block in object oriented modelling. They are being used both for general
conceptual modelling of the systematic of the application, and for detailed modelling
translating the models into programming code. The classes in a class diagram represent both
the main objects and or interactions in the application and the objects to be programmed. A
class with three sections.

• The upper part holds the name of the class

• The middle part contains the attributes of the class

• The bottom part gives the methods or operations the class can take or undertake.

In the system design of a system, a number of classes are identified and grouped together in
a class diagram which helps to determine the statistical relations between those objects. With
detailed modeling, the classes of the conceptual design are often split in a number of
subclasses.

46
5.5. ACTIVITY DIAGRAM:

Activity diagrams are graphical representations of workflows of stepwise activities and


actions with support for choice, iteration and concurrency. In the Unified Modeling
Language, activity diagrams can be used to describe the business and operational step-by-
step workflows of components in a system. An activity diagram shows the overall flow of
control. Activity diagrams are constructed from a limited repertoire of shapes, connected with
arrows. The most important shape types:

• rounded rectangles represent activities;


• diamonds represent decisions;
• bars represent the start (split) or end (join) of concurrent activities;
• a black circle represents the start (initial state) of the workflow.

47
5.6. SEQUENCE DIAGRAM:

Sequence diagrams are a popular dynamic modeling solution in UML because they
specifically focus on lifelines, or the processes and objects that live simultaneously, and the
messages exchanged between them to perform a function before the lifeline ends. Along with
our UML diagramming tool, use this guide to learn everything there is to know about
sequence diagrams in UML. A sequence diagram is a type of interaction diagram because it
describes how—and in what order—a group of objects works together. These diagrams are
used by software developers and business professionals to understand requirements for a new
system or to document an existing process. Sequence diagrams are sometimes known as event
diagrams or event scenarios.

Benefits of sequence diagrams: Sequence diagrams can be useful references for businesses
and other organizations. Try drawing a sequence diagram to:

• Represent the details of a UML use case.


• Model the logic of a sophisticated procedure, function, or operation.
• See how objects and components interact with each other to complete a process.

48
SYSTEM IMPLEMENTATION

49
CHAPTER 6

CODING

Index.php:

<?php

session_start();

error_reporting(0);

include('includes/config.php');

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

$_SESSION['login']='';

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

//code for captach verification

if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') {

echo "<script>alert('Incorrect verification code');</script>" ;

else {

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

50
$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" />

51
<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">USER LOGIN FORM</h4>

</div>

</div>

52
<!--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>

<div class="form-group">

<label>Verification code : </label>

<input type="text" class="form-control1" name="vercode" maxlength="5"


autocomplete="off" required style="height:25px;" />&nbsp;<img src="captcha.php">

</div>

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


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

53
</form>

</div>

</div>

</div>

</div>

<!---LOGIN PABNEL 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>

Adminlogin.php:

<?php

session_start();

error_reporting(0);

include('includes/config.php');

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

$_SESSION['alogin']='';

54
}

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

//code for captach verification

if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') {

echo "<script>alert('Incorrect verification code');</script>" ;

else {

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

55
}

?>

<!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">

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

<div class="form-group">

57
<label>Verification code : </label>

<input type="text" name="vercode" maxlength="5" autocomplete="off" required


style="width: 150px; height: 25px;" />&nbsp;<img src="captcha.php">

</div>

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

</form>

</div>

</div>

</div>

</div>

<!---LOGIN PABNEL 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>

Issue_books.php:

58
<?php

session_start();

error_reporting(0);

include('includes/config.php');

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

header('location:index.php');

else{

if(isset($_GET['del']))

$id=$_GET['del'];

$sql = "delete from tblbooks WHERE id=:id";

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

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

$query -> execute();

$_SESSION['delmsg']="Category deleted scuccessfully ";

header('location:manage-books.php');

?>

<!DOCTYPE html>

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

<head>

Capatche.php

<?php

59
error_reporting(0);

session_start();

$text = rand(10000,99999);

$_SESSION["vercode"] = $text;

$height = 25;

$width = 65;

$image_p = imagecreate($width, $height);

$black = imagecolorallocate($image_p, 0, 0, 0);

$white = imagecolorallocate($image_p, 255, 255, 255);

$font_size = 14;

imagestring($image_p, $font_size, 5, 5, $text, $white);

imagejpeg($image_p, null, 80); ?>

Dashboard.php:

<?php

session_start();

error_reporting(0);

include('includes/config.php');

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

header('location:index.php');

else{?>

60
<!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 | User Dash Board</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">

61
<div class="row pad-botm">

<div class="col-md-12">

<h4 class="header-line">USER DASHBOARD</h4>

</div>

</div>

<div class="row">

<div class="col-md-3 col-sm-3 col-xs-6">

<div class="alert alert-info back-widget-set text-center">

<i class="fa fa-bars fa-5x"></i>

<?php

$sid=$_SESSION['stdid'];

$sql1 ="SELECT id from tblissuedbookdetails where StudentID=:sid";

$query1 = $dbh -> prepare($sql1);

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

$query1->execute();

$results1=$query1->fetchAll(PDO::FETCH_OBJ);

$issuedbooks=$query1->rowCount();

?>

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

Book Issued

</div>

</div>

<div class="col-md-3 col-sm-3 col-xs-6">

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

62
<i class="fa fa-recycle fa-5x"></i>

<?php

$rsts=0;

$sql2 ="SELECT id from tblissuedbookdetails where StudentID=:sid and


RetrunStatus=:rsts";

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

</div>

</div>

</div>

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

63
<script src="assets/js/bootstrap.js"></script>

<!-- CUSTOM SCRIPTS -->

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

</body>

</html>

<?php } ?>

My Profile.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']))

$sid=$_SESSION['stdid'];

$fname=$_POST['fullanme'];

$mobileno=$_POST['mobileno'];

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


StudentId=:sid";

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

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

65
<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">

66
<?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>

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

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

<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 } ?>

69
TESTING

70
CHAPTER-7

TESTING

7.1 INTRODUCTION:

Software testing methods are traditionally divided into white- and black-box testing. These
two approaches are used to describe the point of view that a test engineer takes when
designing test cases.

7.2 TESTING METHODS:

White Box Testing:

White box testing is when the tester has access to the internal data structures and algorithms
including the code that implement these.

Types of white box testing:

The following types of white box testing exist:

• API testing (application programming interface) - testing of the application using


public and private APIs
• Code coverage - creating tests to satisfy some criteria of code coverage (e.g., the test
designer can create tests to cause all statements in the program to be executed at least
once)
• Fault injection methods - improving the coverage of a test

Grey Box Testing:

Grey box testing (American spelling: grey box testing) involves having knowledge of internal
data structures and algorithms for purposes of designing the test cases, but testing at the user,
or black-box level. Manipulating input data and formatting output do not qualify as grey box,
because the input and output are clearly outside of the "black-box" that we are calling the
system under test. This distinction is particularly important when conducting integration

71
testing between two modules of code written by two different developers, where only the
interfaces are exposed for test. However, modifying a data repository does qualify

as grey box, as the user would not normally be able to change the data outside of the system
under test. Grey box testing may also include reverse engineering to determine, for instance,
boundary values or error messages.

Testing levels:

Tests are frequently grouped by where they are added in the software development process,
or by the level of specificity of the test.

1) Unit Testing- Unit testing refers to tests that verify the functionality of a specific

section of code, usually at the function level. In an object-oriented environment, this is


usually at the class level, and the minimal unit tests include the constructors and destructors
These types of tests are usually written by developers as they work on code (white-box style),
to ensure that the specific function is working as expected. One function might have multiple
tests, to catch corner cases or other branches in the code. Unit testing alone cannot verify the
functionality of a piece of software, but rather is used to assure that the building blocks the
software uses work independently of each other. Unit testing is also called component testing.

2) Integration Testing- Integration testing is any type of software testing that seeks to verify
the interfaces between components against a software design. Software components may be
integrated in an iterative way or all together ("big bang"). Normally the former is considered
a better practice since it allows interface issues to be localised more quickly and fixed.
Integration testing works to expose defects in the interfaces and interaction between
integrated components (modules). Progressively larger groups of tested software components
corresponding to elements of the architectural design are integrated and tested until the
software works as a system.

3) System Testing - System testing tests a completely integrated system to verify that it meets
its requirement

72
4) System Integration Testing- System integration testing verifies that a system is integrated
to any external or third-party systems defined in the system requirements.

5) Regression Testing - Regression testing focuses on finding defects after a major code change
has occurred. Specifically, it seeks to uncover software regressions, or old bugs that have
come back. Such regressions occur whenever software functionality that was previously
working correctly stops working as intended. Typically, regressions occur as an unintended
consequence of program changes, when the newly developed part of the software collides
with the previously existing code. Common methods of regression testing include re-running
previously run tests and checking whether previously fixed faults have re-emerged. The depth
of testing depends on the phase in the release process and the risk of the added features. They
can either be complete, for changes added late in the release or deemed to be risky, to very
shallow, consisting of positive tests on each feature, if the changes are early in the release or
deemed to be of low risk.

6) Acceptance Testing - Acceptance testing can mean one of two things:


• A smoke test is used as an acceptance test prior to introducing a new build to the main testing
process, i.e. before integration or regression.
• Acceptance testing performed by the customer, often in their lab environment on their own
hardware, is known as user acceptance testing (UAT). Acceptance testing may be performed
as part of the hand-off process between any two phases of development.

7) Alpha Testing- Alpha testing is simulated or actual operational testing by potential


users/customers or an independent test team at the developers' site. Alpha testing is often
employed for off-the-shelf software as a form of internal acceptance testing, before the
software goes to beta testing.

8) Beta Testing - Beta testing comes after alpha testing. Versions of the software, known as
beta versions, are released to a limited audience outside of the programming team. The
software is released to groups of people so that further testing can ensure the product has few
faults or bugs. Sometimes, beta versions are made available to the open public to increase the
feedback field to a maximal number of future users.

73
9) Non-Functional Testing - Special methods exist to test non-functional aspects of software.
In contrast to functional testing, which establishes the correct operation of the software
(correct in that it matches the expected behaviour defined in the design requirements), non-
functional testing verifies that the software functions properly even when it receives invalid
or unexpected inputs. Software fault injection, in the form of fuzzing, is an example of non-
functional testing. Non-functional testing, especially for software, is designed to establish
whether the device under test can tolerate invalid or unexpected inputs, thereby establishing
the robustness of input validation routines as well as error-handling routines. Various
commercial non-functional testing tools are linked from the software fault injection page;
there are also numerous open-source and free software tools available that perform non-
functional testing.

10) Software Performance Testing and Load Testing - Performance testing is executed to
determine how fast a system or sub-system performs under a particular workload. It can also
serve to validate and verify other quality attributes of the system, such as scalability,
reliability and resource usage. Load testing is primarily concerned with testing that can
continue to operate under a specific load, whether that be large quantities of data or a large
number of users. This is generally referred to as software scalability. The related load testing
activity of when performed as a non-functional activity is often referred to as endurance
testing. Volume testing is a way to test functionality. Stress testing is a way to test reliability.
Load testing is a way to test performance.

11) There is little agreement on what the specific goals of load testing are. The terms load testing,
performance testing, reliability testing, and volume testing, are often used interchangeably.

12) Stability Testing - Stability testing checks to see if the software can continuously function
well in or above an acceptable period. This activity of non-functional software testing is often
referred to as load (or endurance) testing.

13) Usability Testing- Usability testing is needed to check if the user interface is easy to use and
understand.

74
14) Security Testing -Security testing is essential for software that processes confidential data
to prevent system intrusion by hackers.

7.3 TEST CASES:

S.NO OF TEST CASE TC1

Name of test Admin Login

Sample input Enter email and password

Expected output Login Successful

Actual Output It will be another Screen

Remarks By providing correct details

S.NO OF TEST CASE TC2

Name of test Invalid login credentials

Sample input Sign up with your account

Expected output It will not continue to next process

Actual output Couldn’t find your Account is the error


message
Remarks By providing invalid username and
password

75
S.NO OF TEST CASE TC3

Name of test Adding Book

Sample input Giving Book name

Expected output Book should be added

Actual output Book is added to the database

Remarks By providing correct details

S.NO OF TEST CASE TC4

Name of test Return Book

Sample input Give your id and book details to be


returned
Expected output Book should be returned

Actual output Book returned successfully

76
SCREENS

77
CHAPTER-8

SCREENS

Admin Login:

78
User Login:

79
User Sign up:

80
Admin Dashboard:

81
Add Category Panel:

82
Manage Category:

83
Add Author Panel:

84
Book add panel:

85
Manage books:

86
Issue Books:

87
Manage Reg Students:

88
Change password:

89
Manage user issued book:

90
User Dashboard:

91
Update user profile:

92
FUTURE SCOPE

93
CHAPTER-9

FUTURE SCOPE

This website provides a computerized version of library management system which


will benefit the students as well as the staff of the library. It makes entire process online
where student can search books, staff can generate reports and do book transactions. It also
has a facility for student login where student can login and can see status of books issued as
well request for book or give some suggestions.

It has a facility of teacher’s login where teachers can add lectures notes and also give
necessary suggestion to library and also add info about workshops or events happening in
our college or nearby college in the online notice board. There is a future scope of this facility
that many more features such as online lectures video tutorials can be added by teachers as
well as online assignments submission facility, a feature of group chat where students can
discuss various issues of engineering can be added to this project thus making it more
interactive more user friendly and project which fulfils each user need in the best way
possible.

Significance of the Project


This study helps the librarians to keep track of library resources properly: -

1. The Library Management system enables Librarians to keep track of available books.
2. The Library Management System can easily keep track of Library users.
3. The Library Management System makes it easier for the librarian to track those who
have borrowed books and have not returned them.

94
CONCLUSION

95
CHAPTER-10

CONCLUSION

This doctoral research is a base line assessment of utilisation of


library technology services by institutions, professors and students. The impact of
Information Technology (IT) is widely seen across the globe and in different types of
libraries. IT has become an important part of all aspects of the library management spanning
all its functions right from: library operations and administration, information resources, to
research-based services etc. IT has virtually unlimited potential for variety of useful
applications in libraries offering large and variety of knowledge services. Globally proper
exploitation of new technologies in library is no longer a matter of choice but a matter of
survival in an era of rapidly changing technology as information has become a new age
currency in a world which is now more focused on information/knowledge as a capital
resource to develop itself. In fact, basis this, success of many educational institutions is now
dependent on a modern library that is increasingly offering all the modern and technology
led services.

The evidence gathered in this report reflects ongoing progress


toward more openness in library automation systems, but also that much work remains. We
see a variety of options and opportunities. Libraries that expect to work with their automation
system as delivered and not become involved in local extensions or programming will find
that the majority of systems were built for that kind of use. For libraries that want to do more
with their automation systems, however, we see a great deal of functionality possible today
through open interfaces with momentum toward creating much more.

96
BIBLIOGRAPHY

97
CHAPTER-11

BIBLIOGRAPHY

MySQL AB. "What is MySQL? MySQL 5.1 Reference Manual". [wwwdocument] available
at: http://dev.mysql.com/doc/refman/5.1/en/ Retrieved 19.03.2010

“HTML, 4.0.1 Specification”, Raggett, A. Le Hors, I. Jacobs, 24 December 1999. The latest
version of the specification is available at http://www.w3.org/TR/html4/ The
recommendation defines three document type definitions Strict, Transitional and Frameset,
all reachable from the recommendation.

“Cascading Style Sheets, level 2, CSS2 Specification “, B. Bos, H. W. Lie, C. Lilley and I. I.
Jacobs http://www.w3.org/TR/html4/2008/REC-CSS2-20080411/

“ISO : Information processing- Text and office system- Standard Generalized Markup
Language(SGML)”, International Organisation for Standardization (ISO), 15 october1986.

98

You might also like