0% found this document useful (0 votes)
40 views84 pages

Library Management System

The document outlines a Library Management System project aimed at creating a computerized system for managing library operations, including user and admin logins, an online notice board, and book management functionalities. Key features include online book issuance, a digital library, event management for teachers, and the ability for students to request new books. The proposed system aims to improve efficiency, reduce human error, and enhance user experience compared to existing library management systems.

Uploaded by

Daniel Akinwande
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)
40 views84 pages

Library Management System

The document outlines a Library Management System project aimed at creating a computerized system for managing library operations, including user and admin logins, an online notice board, and book management functionalities. Key features include online book issuance, a digital library, event management for teachers, and the ability for students to request new books. The proposed system aims to improve efficiency, reduce human error, and enhance user experience compared to existing library management systems.

Uploaded by

Daniel Akinwande
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/ 84

lOMoARcPSD|51233020

Library management system

marketing (Indian Institute of Education and Business Management)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Daniel Akinwande ([email protected])
lOMoARcPSD|51233020

ABSTRACT

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


system to maintain all the daily work of library .This project has many features
which are generally not available in normal library management systems like
facility of user login and a facility of teachers login .It also has a facility of admin
login through which the admin can monitor the whole system .It also has facility
of an online notice board where teachers can student can put up information about
workshops or seminars being held in our colleges or nearby colleges and librarian
after proper verification from the concerned institution organizing the seminar can
add it to the notice board . It has also a facility where student after logging in their
accounts can see list of books issued and its issue date and return date and also the
students can request the librarian to add new books by filling the book request
form. The librarian after logging into his account i.e. admin account can generate
various reports such as student report , issue report, teacher report and book report

Overall this project of ours is being developed to help the students as well as staff
of library to maintain the library in the best way possible and also reduce the human
efforts.

Page 1

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

CHAPTER1
INTRODUCTION

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

1.1PROJECT AIMS AND OBJECTIVES


The project aims and objectives that will be achieved after completion of this project are
discussed in this subchapter. The aims and objectives areas follows:
Online book issue
Request column for librarian for providing new books
A separate column for digital library
Student login page where student can find books issued by him/her and date of return.
A search column to search availability of books
 A teacher login page where teacher can add any events being organized in the
college and important suggestions regarding books.
Online notice board about the workshop.

Page 2

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

1.2 BACKGROUND OF PROJECT

Library Management System is an application which refers to library systems which are
generally small or medium in size. It is used by librarian to manage the library using a
computerized system where he/she can record various transactions like issue of books, return of
books, addition of new books, addition of new students etc.

Books and student maintenance modules are also included in this system which would keep track
of the students using the library and also a detailed description about the books a library
contains. With this computerized system there will be no loss of book record or member record
which generally happens when a non computerized system is used.

In addition, report module is also included in Library Management System. If user’s position is
admin, the user is able to generate different kinds of reports like lists of students registered, list
of books, issue and return reports.

All these modules are able to help librarian to manage the library with more convenience and in
a more efficient way as compared to library systems which are not computerized.

PROCESSOR INTELCORE PROCESSOR OR BETTER


PERFORMANCE

OPERATING SYSTEM WINDOWSVISTA ,WINDOWS7, UBUNTU

MEMORY 1GBRAM OR MORE

HARD DISK SPACE MINIMUM 3 GBFOR DATABASE USAGE FOR


FUTURE
DATABASE MY SQL

Page 3

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

CHAPTER2

SYSTEMANALYSIS

In this chapter, wewilldiscuss and analyze about thedevelopingprocess ofLibrary


Management System includingsoftwarerequirement specification(SRS) and comparison
between existingand proposed system. The functional and nonfunctional requirements
areincluded in SRSpart to provide complete description and overview of system
requirement beforethe developingprocessis carried out.Besides that,existing vs
proposed provides a view ofhow theproposed systemwillbemoreefficient than the
existingone.

2.1 SOFTWARE REQUIREMENT SPECIFICATION


2.1.1 GENERAL DESCRIPTION

PRODUCT DESCRIPTION:
LibraryManagement System is a computerized system which helps
user(librarian)to managethe librarydailyactivityin electronic format.It reduces the
risk of paper work such as file lost, filedamaged and time consuming.
It can help user to managethe transaction or record more effectivelyand time-
saving.

PROBLEM STATEMENT:
Theproblem occurred beforehaving computerized system includes:
Filelost
When computerized system is not implemented fileis always lost becauseofhuman
environment.Some times dueto some human error theremaybealossof records.

 Filedamaged When a computerized system is not there fileis alwayslostdueto


some accdent like spillingofwaterbysomemember on fileaccidentally.Besides
some natural disasterlikefloods or fires mayalso damagethe files.

Page 4

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

Difficult to search record


When thereis no computerized system thereis always a difficultyin searchingof
records if the records are largein number .
Space consuming
Afterthe number ofrecords become largethe space forphysical storageoffile and
recordsalso increases ifno computerized systemis implemented.
Cost consuming
As thereis nocomputerized system theto add each record paperwillbeneeded
which willincreasethe cost forthe management of library.

2.1.2SYSTEMOBJECTIVES
Improvement in control and performance
Thesystem is developedto copeup with the current issues and problems oflibrary
.Thesystem can add user, validate userand is also bugfree.
Save cost
After computerized system is implemented less human forcewillbe required to
maintain the librarythus reducingthe overallcost.
Savetime
Librarian is ableto searchrecord byusingfew clicks of mouse and few search
keywords thus savinghis valuabletime.
Option of onlineNoticeboard
Librarian willbe ableto provideadetailed description ofworkshops goingin the
college as wellas in nearbycolleges
LectureNotes
Teacher haveafacilityto upload lectures notes inapdf filehavingsizenot more than
10mb

Page 5

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

2.1.3SYSTEMREQUIREMENTS
2.1.3.1 NON FUNCTIONALREQUIREMENTS
Product Requirements
EFFICIENCY REQUIREMENT
When alibrarymanagement system willbeimplemented librarianand user will
easilyacess libraryas searching and book transaction willbeveryfaster .

RELIABILITY REQUIREMENT
Thesystem should accuratelyperforms member registration ,member validation ,
reportgeneration, book transaction and search

USABILITY REQUIREMENT
Thesystem is designed forauserfriendlyenvironment so that student and staff of
librarycan perform thevarious tasks easilyand in an effectiveway.

ORGANIZATIONALREQUIREMENTIMP
LEMENTATIONREQUIREMNTS
In implementingwholesystem ituses htmlin front end with php as server side
scriptinglanguagewhichwillbeused fordatabaseconnectivityand the backend ie the
databasepart is developed usingmysql.

DELIVERY REQUIREMENTS
Thewholesystem is expected to bedelivered in sixmonths of time with aweekly
evaluation bythe project guide.

Page 6

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

2.1.3.2 FUNCTIONAL REQUIREMENTS


1. NORMALUSER

1.1 USERLOGIN
Description of feature
This featureused bytheuserto login into system. Theyare required to enteruseridand password
beforetheyare allowed to enter thesystem .Theuserid and password willbeverified and if invalid
id is there useris allowed to notenter thesystem.

Functional requirements
-userid is provided whentheyregister
-Thesystem must onlyallow user with valid id and password to enter thesystem
-Thesystem performs authorization process which decides what user levelcan acess to.
-Theusermustbeable tologout after theyfinished usingsystem.

1.2 REGISTER NEWUSER


Description of feature
This featurecan beperformedbyallusers to registernew user to createaccount.

Functional requirements
-System must be able toverifyinformation
-System must be able todeleteinformation if information is wrong

1.3 REGISTER
NEWBOOKDescription of
feature
This featureallowsto add new books to thelibrary
Functional requirements
-System must be able toverifyinformation
-System must be able toenternumberof copies into table.
-System must be able tonot allow two books havingsamebook id.
Page 7

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

1.5 SEARCH BOOK

DESCRIPTIONOFFEATURE
This featureis found in book maintenancepart . we can search book basedon book id ,
book name , publication or byauthor name.

Functional requirements
- System must be able to search thedatabasebasedon select search type
- System must be able to filter book based onkeyword enterd
- System must be able to show the filtered book in table view

1.5ISSUEBOOKSAND RETURN BOOKS

DESCRIPTIONOFFEATURE
This featureallows to issue and return books and also view reports ofbook issued.

Functional requirements
-System mustbe able toenterissueinformation in database.
-System must be able toupdate number ofbooks.
-System must be able tosearch if bookis availableor not beforeissuing books
-System should be able to enterissue andreturn date information

1.6 EVENT ADDITION

DESCRIPTIONOFFEATURE
This featureallows teacher and student to add information about various workshops being
conducted in college andcolleges nearby.

Page 8

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

Functional requirements
-System should be able to add detailed information about events .
-System should be able to displayinformation onnoticeboard available inthe homepageof
site

2.1.4 SOFTWARE ANDHARDWAREREQUIREMENTS


This section describes thesoftware and hardware requirements of the system
2.1.4.1 SOFTWARE REQUIREMENTS
 Operatingsystem-Windows 7 is used as the operatingsystem as itis stable and
supports more features and is moreuser friendly
 DatabaseMYSQL-MYSQLis usedas database asiteasyto maintain andretrieve
records bysimple queries which areinEnglish languagewhichare easyto understand
andeasyto write.
 Development tools and Programminglanguage-HTMLis used to writethewhole
codeand develop webpages with css, javascript forstylingworkand php for
sever sidescripting.

2.1.4.2 HARDWARE REQUIREMENTS


nd
Intelcorei5 2 generation is used as a processor because it is fast than other
processorsan provide reliable and stable andwecan runour pc forlongtime.
Byusingthis processorwe can keep on developingour project without any
worries.
Ram 1 gb is used as itwillprovide fast reading and writingcapabilities and
willinturn support in processing

Page 9

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

2.2 EXISTING VS PROPOSEDSYSTEM

i. Existingsystem does not have anyfacilityof teachers login or student login


where as proposedsystem will havea facilityof student login as wellas
teacher’s login
ii. Existingsystem does not haveafacilityof onlinereservation ofbooks whereas
proposed system has afacilityof onlinereservation ofbooks
iii. Existingsystem does not have anyfacilityof online noticeboardwhere
description of workshopshappeningin our collegeas wellas nearbycolleges is
beingprovided.
iv. Existingsystem does not has anyoption oflectures notes uploaded byteachers
whereas proposed systemwillhavethis facility
v. Existingsystem does not have anyfacilitytogenerate student reports as well
book issue reports whereas proposed system provides librarian with a toolto
generate reports
vi. Existingsystem does not has anyfacilityfor bookrequest and sugeestions
where as in proposed system after loggingin to their accounts student can
request books as wellasprovide suggestions to improvelibrary

Page 10

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

2.3 SOFTWARE TOOLS USED


ThewholeProject is divided in two parts the front end and the back end.

2.3.1 Front end


The front end is designed usingof html , Php ,css, Javascript
 HTML-HTMLor HyperText Markup Languageis themain markup
languagefor creating web pagesand other information thatcanbedisplayed
inawebbrowser.HTMLis writtenin theform ofHTML elementsconsisting
oftagsenclosedin angle brackets(like<html>), withintheweb page
content.HTMLtags mostcommonlycomeinpairs like<h1>and</h1>,
althoughsometags representempty elementsandso areunpaired,for
example<img>.Thefirst tagina pairis thestart tag,andthesecond tagis the
endtag(theyare alsocalledopeningtags andclosingtags).In between
thesetags web designers canaddtext,further tags,comments andother types
oftext-basedcontent.Thepurpose ofaweb browser is toreadHTML
documentsandcompose themintovisible oraudibleweb pages.The browser
does not displaytheHTML tags,butuses thetags tointerpretthe content
ofthepage.HTML elementsformthebuildingblocks ofall websites. HTML
allowsimages andobjects to beembedded andcanbe usedto
createinteractiveforms.It provides a meanstocreatestructured
documentsbydenotingstructuralsemanticsfor textsuchas headings,
paragraphs,lists,links,quotesandother items.Itcanembedscriptswritten
inlanguages such asJavaScriptwhich affectthebehavior ofHTML web
pages.
 CSS-CascadingStyleSheets(CSS) is astylesheetlanguageusedfor
describingthelookandformattingofadocumentwritteninamarkup
language.Whilemostoften usedtostyleweb pagesandinterfaceswritten
inHTML andXHTML,thelanguagecanbeappliedto anykind
ofXMLdocument,includingplainXML,SVGandXUL.CSSis acornerstone
specificationoftheweband almostallwebpages useCSSstylesheetsto
describetheirpresentation.CSSis designedprimarilyto enable the separation
ofdocumentcontentfromdocument presentation,including elementssuchas
thelayout,colors,and fonts.Thisseparationcanimprove content accessibility,
providemoreflexibilityandcontrol inthespecification

Page 11

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

ofpresentationcharacteristics, enablemultiple pagestoshareformatting,


andreducecomplexity andrepetitionin thestructural content(suchas by
allowingfortablelessweb design).CSScanalso allowthesame markup page
tobepresentedin differentstylesfor differentrenderingmethods,such as on-
screen,inprint,by voice (whenread out byaspeech-basedbrowser
or screenreader) andonBraille-based,tactile devices. Itcanalsobe usedto
allowtheweb pagetodisplaydifferentlydependingonthescreensize or device
onwhichit is beingviewed.Whiletheauthor ofadocumenttypically links
thatdocumenttoaCSS file,readers can usea differentstylesheet, perhaps
oneontheir owncomputer, to overridetheonetheauthorhas specified.However
iftheauthor or thereaderdidnotlinkthedocumenttoa specific
stylesheetthedefault styleofthe browserwillbe applied.CSS specifiesa
priorityschemetodeterminewhichstylerules applyifmore than onerulematches
againstaparticularelement. Inthis so-calledcascade, priorities
orweightsarecalculatedand assignedtorules,sothattheresults are predictable.
 JAVA SCRIPT-JavaScript(JS) is adynamiccomputerprogramming
language.Itis mostcommonlyusedas part ofwebbrowsers,whose
implementations allow client-sidescriptstointeractwith theuser,control the
browser, communicateasynchronously, andalter thedocumentcontent that is
displayed.Itis alsobeingusedinserver-side programming,game
developmentandthecreation of desktopandmobileapplications.JavaScript is
aprototype-basedscriptinglanguagewithdynamictypingandhasfirst-
classfunctions.Itssyntaxwas influencedby C.JavaScriptcopiesmany names
andnamingconventionsfromJava,butthe twolanguagesare otherwise
unrelatedand haveverydifferentsemantics.Thekeydesign principles
withinJavaScript are takenfrom
theSelfand Schemeprogramminglanguages.Itis a multi-
paradigmlanguage,supportingobject-oriented,imperative,
andfunctional programming styles.The application ofJavaScript to use
outsideofweb pages—for example,in PDF documents,site-specific
browsers, anddesktopwidgets—is alsosignificant.Newer andfaster
JavaScriptVMs and platforms built uponthem(notablyNode.js)have also
increasedthepopularityofJavaScriptfor server-sideweb applications.On
theclientside,JavaScriptwas traditionallyimplementedas

Page 12

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

aninterpretedlanguage butjust-in-timecompilationis nowperformed by


recent(post-2012) browsers.
 PHP-PHPis aserver-sidescripting languagedesignedforweb development
but alsousedas ageneral-purposeprogramminglanguage. PHPis
nowinstalled onmorethan244millionwebsitesand2.1 millionweb
servers.Originallycreatedby RasmusLerdorfin 1995,thereference
implementationofPHPis nowproducedbyThe PHPGroup.WhilePHP
originallystoodforPersonal Home Page,itnowstandsforPHP:Hypertext
Preprocessor,arecursivebackronym.PHPcodeisinterpretedbya web
serverwitha PHP processor module,whichgenerates theresultingweb
page:PHPcommandscanbeembedded directlyinto anHTMLsource
documentrather thancallingan externalfileto processdata.Ithasalso evolved
toincludeacommand-lineinterfacecapabilityandcanbeused
instandalonegraphical applications.PHPisfreesoftwarereleasedunder
thePHP License.PHPcanbedeployedon mostwebservers andalso asa
standaloneshell onalmostevery operatingsystemandplatform,freeof charge.
2.3.2 BACK END-Theback end is designed usingmysql which is used to design the
databases

MYSQL-MySQL("MyS-Q-L", officially, butalsocalled"MySequel")is (as of


July2013) theworld's secondmostwidelyusedopen-sourcerelational database
managementsystem(RDBMS).Itis namedafter co-founderMichaelWidenius
daughter,My.The SQLphrasestandsforStructuredQueryLanguage.The MySQL
development project hasmadeitssourcecodeavailableunder the terms oftheGNU
General Public License,as wellas under avariety
ofproprietaryagreements.MySQLwas owned andsponsoredbyasinglefor-
profitfirm,theSwedish company MySQL AB,nowowned by OracleCorporation
.MySQLis a popular choice ofdatabaseforuseinweb applications,andis a central
component ofthewidelyusedLAMPopensourceweb application software stack
(andother'AMP'stacks). LAMPis anacronym for "Linux,Apache,
MySQL,Perl/PHP/Python."Free-software-opensource projectsthatrequirea
full-featureddatabasemanagementsystemoftenuseMySQL.For commercial
use,several paideditions areavailable,and offer additionalfunctionality.
Applications which useMySQL databases

Page 13

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

include: TYPO3,MODx,Joomla,WordPress,phpBB,MyBB,Drupal andother


software.MySQLis also usedinmanyhigh-profile,large-scalewebsites,
includingWikipedia,Google(though notfor
searches),Facebook,Twitter,Flickr, andYouTube

Page 14

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

CHAPTER3
SYSTEMDESIGN

3.1 TABLEDESIGN

VARIOUSTABELSTOMAINTAIN
INFORMATION
BOOKTABLE FORKEEPINGTRACKOFBOOKS

Page 15

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

STUDENTTABLE FORSTUDENTINFORMATION

Field Datatype Default Key Extra

libid INT(11) NOTNULL Primarykey Autoincrement


regno INT(10) NULL
branch VARCHAR(255) NULL
section VARCHAR(255) NULL
semester VARCHAR(255) NULL
section VARCHAR(2) NULL
yearofadm INT(5) NULL

TEACHERTABLETO KEEP TEACHER INFORMATION

Field DataType Default Key Extra

Tid INT(11) NOTNULL Primarykey Auto


increment
Name VARCHAR(255) NULL

Designation VARCHAR(255) NULL

Branch VARCHAR(255) NULL

Contactno INT(13) NULL

Lectures LONGBLOB NULL

Page 16

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

Issuetable tokeeptrackofbooksissued

Field DataType Default Key Extra

bookid INT(11) NOTNULL Foreignkey References


book
stuid INT(11) NOTNULL Foreignkey References
Student
issuedate DATE NULL

returndate DATE NULL

STUDENT LOGIN TABLE


Field Datatype Default Key Extra

logid INT(11) NOTNULL Foreignkey References


Student
Username VARCHAR(255) NULL

Password VARCHAR(255) NULL

numbooks INT(1) NULL

Page 17

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

EVENTTABLE FOREVENTINFORMATION

Field Datatype Default Key Extra

Name Varchar(255) NULL


Date Date(yyyy/mm/dd) NULL
Time VARCHAR(255) NULL
Mname VARCHAR(255) NULL
Contactno. Int(30) NULL
Email VARCHAR(255) NULL
Venue varchar(255) NULL

TEACHER LOGIN TABLE

Field DataType Default Key Extra

Loginid INT(11) NOTNULL Foreign References


key teacher

Username VARCHAR(255) NULL

Password VARCHAR(255) NULL

Page 18

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

3.2 DATAFLOW DIAGRAMS

DATA FLOWDIAGRAMFOR TEACHER LOGIN

TEACHER
DATABASE

ENTER
ENTER USERNAME CHECK
TEACHER URL & VALIDITY
PASSWORD

IFVALID
TEACHER
WEBSERVER LOGIN
PAGE

Aferenteringtothehomepageofthe website,teachercan choosetheTEACHER LOGIN


optionwhere theyare askedtoenterusername&password ,andif he/sheisavaliduserthen a
teacherloginpage will bedisplayed.

Page 19

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

DATA FLOWDIAGRAMFOR STUDENTLOGIN

STUDENT
DATABASE

ENTER
ENTER USERNAME CHECK
STUDENT URL & VALIDITY
PASSWORD

IFVALID
STUDENT
WEBSERVER LOGIN
PAGE

Aferenteringtothehomepageofthe website,studentcanchoosetheSTUDENTLOGIN
optionwhere theyare askedtoenterusername&password ,andif he/sheisavaliduserthen
astudentloginpage willbedisplayed.

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

DATA FLOWDIAGRAMFOR BOOK ISSUE

LOGIN
DATABASE

STUDENT SELECT ENTER


IFNO.
MESSAGE
IF OF UPDATE
LOGIN BOOK BOOK SELECT
BOOK
NO.OF “BOOK
ISSUE DETAIL
PAGE AVBL ISSUE
BOOK
ISSUED
COPIES
RESERVED”
LESSTHAN
3

BOOK LOGIN BOOK


DATABASE TABLE DATABASE

nd
I琀椀sa2 levelDataFlowDiagramwhereafterenteringSTUDENTLOGINpage he/she canselect a book
issueoption whereafter enteringthebookdetail,he/shecanselect thebookissue optionandif
themaximumnoof books issuedlimi琀椀snotcrossedthenarequestwillbesentto thelibrarian
whowillapprovethebook issue.

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

DATA FLOWDIAGRAMFOR BOOK SEARCH

IF
SELECT ENTER
ADVANCE BOOK BOOK
HOME FOUND DETAILS
SEARCH DETAIL

BOOK
DATABASE

Afer thehome pageloginthere willbean optionof thebook search whereafter enteringbook


detaillikeauthorname,publication,book nameetc book detailswillbe displayed.

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

DATA FLOWDIAGRAMFOR ACCOUNT CREATION

ENTER ADMIN MESSAGE


SELECT
HOME ACCOUNT STUDENT VERIFY SENT
CREATION DETAIL STUDEN TO
T
IFALLREG. IS IF VALID
PARTIALLY FILLED

ADMIN STUDENT
DATABASE DATABASE

Afer thehome pageloginthere willbean optionofCREATEAN ACCOUNTwhereafter


enteringstudent detail,ifallthefieldsare filled then arequestwillbesenttothelibrarianwho
willapprove himasaregisteredmemberof thelibrary.

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

CHAPTER4
SYSTEMIMPLEMENTATION

4.1.1 Screenshotforhomepage

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

4.1 MODULE DESCRIPTION

ForLibraryManagementSystem it is divided intothe followingModules:

4.1.1 Admin Module

ADMIN

STUDENT TEACHER BOOKADDITION REPORT


VALIDATION REGISTRATION GENERATION

The followingmodulecontains various facilities likestudent validation, teacher


registration, book addition, and reportgeneration.

4.1.1.1 Code forAdminmodule


4.1.1.1 Code for enteringadmin username andpassword
<?php
//Start session
session_start();
//Unset thevariables stored in session
unset($_SESSION['SESS_FIRST_NAME']);
unset($_SESSION['SESS_LAST_NAME']);
?>
<!DOCTYPE html>
<html xml:lang="EN"lang="EN"dir="ltr">
<head>
<title>SOELIBRARYINFORMATION SYSTEM</title>
<metahttp-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<metahttp-equiv="imagetoolbar" content="no"/>
<link rel="stylesheet"href="../styles/layout.css"type="text/css"/>
<!--HomepageSpecificElements-->
<script type="text/javascript"src="../scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript"src="../scripts/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript"src="../scripts/jquery.tabs.setup.js"></script>
<!--EndHomepageSpecific Elements-->
</head>
<bodyid="top">
<div class="wrapperrow1">
<div id="header"class="clear">
<div class="fl_left">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<h1><ahref="homepage.php">SOELIBRARY MANAGEMENT
SYSTEM</a></h1>
<p></p>
</div>
<div class="fl_right">
<ul>
<li><a
href="http://localhost/xampp/project/library/homepage.php">Home</a></li>
<li><a
href="http://localhost/xampp/project/library/contact/Contactus.php">Contact
Us</a></li>
<li><ahref="http://localhost/xampp/project/library/egateway/egateway.php">E-
Gateway</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin/studentlogin.php">Student
Login</a></li>
<li><ahref="teacherlogin.php">Teacherlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/admin/adminlogin.php">Adminlogin</a></
li>
</ul>
<form action="#"method="post"id="sitesearch">
<fieldset>
<strong>Search:</strong>
<inputtype="text"value="Search Ourwebiste forbooks;"
onfocus="this.value=(this.value=='SearchOurwebsite forbooks;')?'': this.value;"/>
<inputtype="image"src="../images/search.gif"id="search" alt="Search"/>
</fieldset>
</form>
</div>
</div>
</div>
<!--
#######################################################################
################################-->
<div class="wrapperrow2">
<div class="rnd">
<!--######-->
<div id="topnav">
<ul>
<liclass="active"><a
href="http://localhost/xampp/project/library/homepage.php">Home</a></li>
<li><ahref="http://localhost/xampp/project/library/newarrivals.php">New
Arrivals</a></li>
<li><ahref="http://localhost/xampp/project/library/onlinebooks.php">Online
Books</a></li>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<li><ahref="http://localhost/xampp/project/library/egallery.php">E
Gallery</a></li>
<li><ahref="http://localhost/xampp/project/library/questionpaper.php">Question
Paper</a></li>
<li><ahref="http://localhost/xampp/project/library/aboutus.php">About
Us</a></li>
<li><ahref="http://localhost/xampp/project/library/bookissue.php">BookIssue
</a></li>
<liclass="last"><ahref="#"></a></li>
</ul>
</div>
<!--######-->
</div>
</div>
<!--
#######################################################################
################################-->
<div class="wrapper">
<div id="featured_slide"class="clear">
<!--######-->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box"id="fc1"><imgsrc="../images/demo/slider/1.gif"alt=""
/>
<div class="floater">
<h2>All ABOUTSOELIBRARY</h2>
<p>School oFEngineering Libraryor theS.O.E libraryis oneof thefinest library
in kerela having agood collection ofbooks relatedto various subjects</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id= "fc2"><imgsrc="../images/demo/slider/2.gif"alt=""
/>
<div class="floater">
<h2>Existence</h2>
<p>School oFEngineeringlibrarycame into existenceinyear 1995and from then
on ithas been apremier sourceof information forcollegestudents</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc3"><imgsrc="../images/demo/slider/3.gif"alt=""
/>
<div class="floater">
<h2>Collection</h2>
<p>School of Engineering Libraryhas acollection ofover 25000 books related to
various subjects in engineering</p>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>


</div>
</div>
<div class="featured_box"id="fc4"><imgsrc="../images/demo/slider/4.gif"alt=""
/>
<div class="floater">
<h2>E-Repository</h2>
<p>School oFEngineering Libraryhas acollection of6000 cds and2800 online
journals and also has asection whereteachers upload theirlectures notes and student
can download them.</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc5"><imgsrc="../images/demo/slider/5.gif"alt=""
/>
<div class="floater">
<h2>Latest Newsand events</h2>
<p></p>
<p class="readmore"><ahref="#">Click hereto go to latest news page;</a></p>
</div>
</div>
</div>
<ul id="featured_tabs">
<li><ahref="#fc1">All About TheLibrary</a></li>
<li><ahref="#fc2">Existence</a></li>
<li><ahref="#fc3">Collection ofBooks</a></li>
<li><ahref="#fc4">E-Repository</a></li>
<liclass="last"><ahref="#fc5">Latest News&amp;Events</a></li>
</ul>
<div class="overlay_right"></div>
<!--######-->
</div>
</div>

<!--
#######################################################################
################################-->
<div class="wrapperrow3">
<div class="rnd">
<div id="container"class="clear">
<!--
#######################################################################
################################-->
<div id="homepage" class="clear">
<!--######-->
<div id="left_column">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<h2>Sugeestion</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/suggestions.jpg" alt=""/></a></div>
<h2>Book request</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/bookrequest1.jpg" alt=""/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><ahref="#"><img src="../images/images/account.jpg"
alt=""/></a></div>
<h2>Photos</h2>
<div class="imgholder"><ahref="#"><img src="../images/images/photos.jpg"
alt=""/></a></div>
</div>
<!--######-->
<div id="latestnews">
<h2>Pls enterusername and password to login</h2>
<table>
<form action="checklogin.php"method="post"><br><br>
Username:<inputname="username"type="text"maxlength="12"><br><br>P
assword:<input name="password" type="password"maxlength="12">
<inputname="submit"type="submit">
</form>
</table>

</div>
<!--######-->

<!--######-->
</div>
<!--
#######################################################################
################################-->
<!--
#######################################################################
################################-->
<div id="academiclinks"class="clear">
<h2>QuicklyFind What You AreLooking For</h2>
<div class="linkbox">
<ul>
<li><ahref="http://localhost/xampp/project/library/homepage.php">&raquo;
Home</a></li>
<li><ahref="http://localhost/xampp/project/library/studentlogin.php">&raquo;
StudentLogin</a></li>
<li><ahref="teacherlogin.php">&raquo;TeacherLogin</a></li>
<li><ahref="http://localhost/xampp/project/library/adminlogin.php">&raquo;
Adminlogin</a></li>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<li><ahref="http://localhost/xampp/project/library/newarrival.php">&raquo;
New Arrivals</a></li>
<li><ahref="http://localhost/xampp/project/library/onlinebooks.php">&raquo;
Online Books</a></li>
<li><ahref="http://localhost/xampp/project/library/egallery.php">&raquo; E-
Gallery</a></li>
<li><ahref="http://localhost/xampp/project/library/aboutus.php">&raquo;
About Us</a></li>
<li><ahref="http://localhost/xampp/project/library/contactus.php">&raquo;
Contact Us</a></li>
<li><ahref="http://localhost/xampp/project/library/questionpaper.php">&raquo;
Question Papers</a></li>
<li><ahref="http://localhost/xampp/project/library/latestnews.php">&raquo;
Latest Events & News</a></li>
</ul>
</div>

<!--
#######################################################################
################################-->
</div>
</div>
</div>
<!--
#######################################################################
################################-->

<!--
#######################################################################
################################-->
<div class="wrapper">
<div id="copyright"class="clear">
<p class="fl_left">Copyright&copy; 2014-All Rights Reserved for SOE
LIBRARY-</p>
</div>
</div>
</body>
</html>

4.1.1.2 Code for checking ofadmin usernameand passwordinformation


<?php
session_start();
$host="localhost";//Host name
$username="root";//Mysql username
$password=""; // Mysql password

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

$db_name="admin"; // Databasename
$tbl_name="adminlogin"; // Table name

//Connect to server and select databse.


mysql_connect("$host", "$username","$password")ordie("cannot connect");
mysql_select_db("$db_name")ordie("cannot select DB");

//username and password sent from form


$myusername=$_POST['username'];
$mypassword=$_POST['password'];
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and
password='$mypassword'";
$result=mysql_query($sql);

//Mysql_num_row is countingtablerow
$count=mysql_num_rows($result);

//Ifresultmatched$myusername and $mypassword, table row must be1 row

if($count>0)
{ session_regenerate_id();
$member =mysql_fetch_assoc($result);
$_SESSION['SESS_FIRST_NAME']=$member['username'];
$_SESSION['SESS_LAST_NAME']=$member['password'];
session_write_close();
header("location: adminlogin1.php");
exit();
}else {
//Login failed
$errmsg_arr[]='username and password not found';
$errflag =true;
if($errflag) {
$_SESSION['ERRMSG_ARR']=$errmsg_arr;
session_write_close();
header("location: adminlogin.php");
exit();
}
}
?>
4.1.1.3 Code forstudent validation
<?php
require'../include/connection.php';
$result=mysqli_query($con,"SELECT *FROM student");
while($row =mysqli_fetch_array($result))
{
$libid=$row['libid'];

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

$regno=$row['regno'];
$name=$row['stuname'];
$branch=$row['branch'];
$semester=$row['semester'];
$section=$row['section'];
$yearofadm= $row['yearofadm'];
$email=$row['email'];
$username=$row['username'];
$password=$row['password'];
}
mysqli_close($con);
?>
<?php
require'../include/connection1.php';
$admin="[email protected]";
$sql="INSERTINTO student(Libid,regno,stuname,branch,semester,section,yearofadm)
VALUES
('$libid','$regno','$name','$branch','$semester','$section','$yearofadm')";
$result="INSERTINTOstudentlogin(logid,username,password,numbooks)
VALUES
('$libid','$username','$password','')";
if (!mysqli_query($connection,$sql))
{
die('Error1: '. mysqli_error($connection));
}
else if (!mysqli_query($connection,$result))
{
die('Error2: '. mysqli_error($connection));
}
else
mail($email,"registrationdetails","you are registered pls login with ur emailid and
password","From: $admin\n");
echo"added 1record";
mysqli_close($connection);
?>
<?php
require'../include/connection.php';
$result=mysqli_query($con,"SELECT *FROM student");
while($row =mysqli_fetch_array($result))
{
$libid=$row['libid'];
$regno=$row['regno'];
$name=$row['stuname'];
$branch=$row['branch'];
$semester=$row['semester'];
$section=$row['section'];

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

$yearofadm= $row['yearofadm'];
$email=$row['email'];
$username=$row['username'];
$password=$row['password'];
}
$sql=mysqli_query($con,"DELETEFROM student WHERE libid='$libid'");
mysqli_close($con);
?>

4.1.1.4 Code For teacher registration

<?php
$con=mysqli_connect("localhost","root","rahul#1991","library");
//Check connection
if (mysqli_connect_errno())
{
echo"Failed to connect to MySQL:". mysqli_connect_error();
}
$loginid=$_POST['teacherid'];
$username=$_POST['username'];
$password=$_POST['password'];
$teachername=$_POST['teachername'];
$designation=$_POST['designation'];
$branch=$_POST['branch'];
$contactno=$_POST['contact'];
$lecture='';
$sql="INSERTINTO teacher (Tid, name, designation, branch, contactno,lectures)
VALUES
( $loginid,$teachername,$designation,$branch,$contactno,$lecture)";
$tql="INSERTINTO teacherlogin ($loginid,$username,$password)
VALUES
( $loginid,$username, $password)";
if (!mysqli_query($con,$sql))
{
echo"error";
}
if (!mysqli_query($con,$tql))
{
echo"error1";
}
echo"successs";

mysqli_close($con);

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

?>

4.1.1.5Code for bookaddition

<?php
$con=mysqli_connect("localhost","root","","library");
//Check connection
if (mysqli_connect_errno())
{
echo"Failed to connect to MySQL:". mysqli_connect_error();
}

$sql="INSERTINTO books (code, bookname, author, publication, subject,


numberofbooks)
VALUES
('$_POST[bookid]','$_POST[bookname]','$_POST[author]','$_POST[publication]','$_P
OST[subject]','$_POST[numberofbooks]')";

if (!mysqli_query($con,$sql))
{
echo"error";
}
echo"successs";

mysqli_close($con);
?>
<?php
$con=mysqli_connect("localhost","root","","admin");
//Check connection
if (mysqli_connect_errno())
{
echo"Failed to connect to MySQL:". mysqli_connect_error();
}

$sql="INSERTINTO newarrivals (code, bookname, author, publication,subject,


numberofbooks,arrivaldate)
VALUES
('$_POST[bookid]','$_POST[bookname]','$_POST[author]','$_POST[publication]','$_P
OST[subject]','$_POST[numberofbooks]','$_POST[arrivaldate]')";

if (!mysqli_query($con,$sql))
{
echo"error";
}
echo"successs";
mysqli_close($con);

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

?>

4.1.1 Screenshotfor Adminlogin

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

4.1.2Student Module

STUDENT

STUDENT STUDENTLOGIN ONLINEBOOK EVENTADDITION


REGISTRATION RESERVATTION

USERNAMEAND FORGOT
PASSWORD PASSWORD
AUTHENTICATION

The followingmodulecontains various facilities likestudent registration, student login,


onlinebook reservation, and event addition. Anystudent if at anymoment forgets his
password hecan retrieve itfrom forgot password option.

4.1.2.1Code For Student account creation

<!DOCTYPEhtml>
<html xml:lang="EN"lang="EN"dir="ltr">
<head>
<title>SOELIBRARYINFORMATION SYSTEM</title>
<metahttp-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<metahttp-equiv="imagetoolbar" content="no"/>
<link rel="stylesheet"href="../styles/layout.css"type="text/css"/>
<!--HomepageSpecificElements-->
<script type="text/javascript"src="../scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript"src="../scripts/jquery-ui-
1.7.2.custom.min.js"></script>
<script type="text/javascript"src="../scripts/jquery.tabs.setup.js"></script>
<!--EndHomepageSpecific Elements-->
</head>
<bodyid="top">
<div class="wrapperrow1">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<div id="header"class="clear">
<div class="fl_left">
<h1><ahref="homepage.php">SOELIBRARY MANAGEMENT
SYSTEM</a></h1>
<p></p>
</div>
<div class="fl_right">
<ul>
<li><a
href="http://localhost/xampp/project/library/homepage.php">Home</a></li>
<li><a
href="http://localhost/xampp/project/library/contact/Contactus.php">Contact
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/egateway/egateway.php">E
- Gateway</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin/studentlogin.php">Student
Login</a></li>
<li><a
href="http://localhost/xampp/project/library/teachrlogin/teacherlogin.php">Teacherl
ogin</a></li>
<li><a
href="http://localhost/xampp/project/library/admin/adminlogin.php">Adminlogin</a
></li>

</ul>
<form action="#"method="post"id="sitesearch">
<fieldset>
<strong>Search:</strong>
<inputtype="text"value="Search Ourwebiste forbooks;"
onfocus="this.value=(this.value=='SearchOurwebsite forbooks;')?'': this.value;"
/>
<inputtype="image"src="../images/search.gif"id="search" alt="Search"/>
</fieldset>
</form>
</div>
</div>
</div>
<!--
####################################################################
###################################-->
<div class="wrapperrow2">
<div class="rnd">
<!--######-->
<div id="topnav">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<ul>
<liclass="active"><ahref="homepage.php">Home</a></li>
<li><ahref="newarrivals.php">New Arrivals</a></li>
<li><ahref="onlinebooks.php">OnlineBooks</a></li>
<li><ahref="egallery.php">EGallery</a></li>
<li><ahref="questionpaper.php">Question Paper</a></li>
<li><ahref="aboutus.php">About Us</a></li>
<li><ahref="bookissue.php">BookIssue</a></li>
<liclass="last"><ahref="#"></a></li>
</ul>
</div>
<!--######-->
</div>
</div>
<!--
####################################################################
###################################-->
<div class="wrapper">
<div id="featured_slide"class="clear">
<!--######-->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box"id="fc1"><imgsrc="../images/demo/slider/1.gif"
alt=""/>
<div class="floater">
<h2>All ABOUTSOELIBRARY</h2>
<p>School oFEngineering Libraryor theS.O.E libraryis oneof thefinest
libraryin kerelahavingagood collection ofbooksrelated to various subjects</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id= "fc2"><imgsrc="../images/demo/slider/2.gif"
alt=""/>
<div class="floater">
<h2>Existence</h2>
<p>School oFEngineeringlibrarycame into existenceinyear 1995and from
then on it has been apremiersourceof information for collegestudents</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc3"><imgsrc="../images/demo/slider/3.gif"
alt=""/>
<divclass="floater">
<h2>Collection</h2>
<p>School of Engineering Libraryhas acollection ofover 25000 books
related to various subjects in engineering</p>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>


</div>
</div>
<div class="featured_box"id="fc4"><imgsrc="../images/demo/slider/4.gif"
alt=""/>
<div class="floater">
<h2>E-Repository</h2>
<p>School oFEngineering Libraryhas acollection of6000 cds and2800
onlinejournals and alsohas a section whereteachers upload theirlecturesnotes and
student can download them.</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc5"><imgsrc="../images/demo/slider/5.gif"
alt=""/>
<div class="floater">
<h2>Latest Newsand events</h2>
<p></p>
<p class="readmore"><ahref="#">Click hereto go to latest news
page;</a></p>
</div>
</div>
</div>
<ul id="featured_tabs">
<li><ahref="#fc1">All About TheLibrary</a></li>
<li><ahref="#fc2">Existence</a></li>
<li><ahref="#fc3">Collection ofBooks</a></li>
<li><ahref="#fc4">E-Repository</a></li>
<liclass="last"><ahref="#fc5">Latest News&amp;Events</a></li>
</ul>
<div class="overlay_right"></div>
<!--######-->
</div>
</div>
<!--
####################################################################
###################################-->
<div class="wrapperrow3">
<div class="rnd">
<div id="container"class="clear">
<!--
####################################################################
###################################-->
<div id="homepage" class="clear">
<!--######-->
<div id="left_column">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<h2>Sugeestion</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/suggestions.jpg" alt=""/></a></div>
<h2>Book request</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/bookrequest1.jpg" alt=""/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/account.jpg"alt=""/></a></div>
<h2>Photos</h2>
<div class="imgholder"><ahref="#"><img src="../images/images/photos.jpg"
alt=""/></a></div>
</div>
<!--######-->

<div id="latestnews">
<h2>ENTER YOUR DETAILS</h2>
<p><span class="error">* required field.</span></p>

<table>
<form action="insertaccount.php"method="POST">
<legend>StudentInformation:</legend>
<tr>
<td>Library Id:</td><td><inputtype="text"name="libid"size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Registration No: </td><td><input type="text"name="regno"size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Name: </td><td><inputtype="text"name="stuname"size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Branch: </td><td><select name="branch" size="1"tabindex="7">
<option selected="selected">ComputerScience</option>
<option>Electronics&Communication</option>
<option>Electrical &Electronics</option>
<option>Mechanical</option>
<option>Safety&Fire</option>
<option>Civil</option>
<option>Information Technology</option>
</select>
<span class="error">* </span><br><br></td>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

</tr>
<tr>
<td>Semester: </td><td><select name="semester"size="1"tabindex="8">
<option selected="selected">1&2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
</select>
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Section: </td><td><select name="section"size="1"tabindex="2">
<option selected="selected">A</option>
<option>B</option>
</select>
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Year ofadm:</td><td><inputtype="text"name="yearofadm"size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Email:</td><td><inputtype="email"name="email"size="30">
<span class="error">* </span><br><br></td>
</tr>

<tr>
<td>Username:</td><td><inputtype="text"name="username"size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Password:</td><td><inputtype="password"name="password"size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td><p>Click the submit</p></td>
</tr>
<tr>
<td height="40"><inputtype="submit"name="submit"value="submit"action=
"insertaccount.php"></td>
</tr>
</form>
</table>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

</div>
<!--######-->

<!--######-->
</div>
<!--
####################################################################
###################################-->
<!--
####################################################################
###################################-->
<div id="academiclinks"class="clear">
<h2>QuicklyFind What You AreLooking For</h2>
<div class="linkbox">
<ul>
<li><a
href="http://localhost/xampp/project/library/homepage.php">&raquo;
Home</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin/studentlogin.php">&raquo
; Student Login</a></li>
<li><a
href="http://localhost/xampp/project/library/teacherlogin/teacherlogin.php">&raquo
; TeacherLogin</a></li>
<li><a
href="http://localhost/xampp/project/library/adminlogin/adminlogin.php">&raquo;
Adminlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/newarrivals/newarrivals.php">&raquo;
New Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks/onlinebooks">&raquo;
Online Books</a></li>
<li><a
href="http://localhost/xampp/project/library/egallery/egallery.php">&raquo;
E- Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/aboutus/aboutus.php">&raquo; About
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/contactus/contactus.php">&raquo;
Contact Us</a></li>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<li><a
href="http://localhost/xampp/project/library/questionpaper/questionpaper.php">&ra
quo; Question Papers</a></li>
<li><a
href="http://localhost/xampp/project/library/latestnews/latestnews.php">&raquo;
Latest Events & News</a></li>
</ul>
</div>

<!--
####################################################################
###################################-->
</div>
</div>
</div>
<!--
####################################################################
################################### -->

<!--
####################################################################
###################################-->
<div class="wrapper">
<div id="copyright"class="clear">
<p class="fl_left">Copyright&copy; 2013-All Rights Reserved for SOE
LIBRARY-</p>
</div>
</div>
</body>
</html>
<?php
//definevariablesand setto emptyvalues
$libidErr=$regnoErr=$stunameErr =$branchErr=$semesterErr =$sectionErr =
$yearofadmErr=$usernameErr =$passwordErr = "";
$libid = $regno= $stuname =$branch =$semester=$section =$yearofadm =
$username=$password="";

if ($_SERVER["REQUEST_METHOD"]=="POST")
{

if (empty($_POST["libid"]))
{$libidErr="libid is required";
echo $libidErr;
include("createaccount.php");
}

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

else
{$libid= test_input($_POST["libid"]);}

if (empty($_POST["regno"]))
{$regnoErr="Registration numberis required";
echo $regnoErr;
include("createaccount.php");
}
else
{$regno =test_input($_POST["regno"]);}

if (empty($_POST["stuname"]))
{ $stunameErr = "student nameis required";
echo $stunameErr;
include("createaccount.php");
}

else
{$stuname =test_input($_POST["stuname"]);}

if (empty($_POST["branch"]))
{$branchErr = "branch is required";
echo $branchErr;
include("createaccount.php");
}
else
{$branch=test_input($_POST["branch"]);

if (empty($_POST["semester"]))
{$semesterErr = "semesteris required";
echo $semesterErr;
include("createaccount.php");
}
else
{$semester=test_input($_POST["semester"]);}

if (empty($_POST["section"]))
{$sectionErr = "section is required";
echo $sectionErr;
include("createaccount.php");
}
else
{$section =test_input($_POST["section"]);}

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

if (empty($_POST["yearofadm"]))
{$yearofadmErr="year of adm. is required";
echo $yearofadmErr;
include("createaccount.php");
}
else
{$yearofadm = test_input($_POST["yearofadm"]);

}
if (empty($_POST["username"]))
{$usernameErr="username is required";
echo $usernameErr;
include("createaccount.php");
}
else
{$username=test_input($_POST["username"]);

}
if (empty($_POST["password"]))
{$passwordErr="password is required";
echo $passwordErr;
include("createaccount.php");
}
else
{$password =test_input($_POST["password"]);}

function test_input($data)
{
$data =trim($data);
$data =stripslashes($data);
$data =htmlspecialchars($data);
return $data;

}
?>
<?php
$con=mysqli_connect("localhost","root","","admin");
//Check connection
if (mysqli_connect_errno())
{
echo"Failed to connect to MySQL:". mysqli_connect_error();
}

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

$sql="INSERTINTO
student(libid,regno,stuname,branch,semester,section,yearofadm,email,username,pass
word)
VALUES
('$_POST[libid]','$_POST[regno]','$_POST[stuname]','$_POST[branch]','$_POST[s
emester]','$_POST[section]','$_POST[yearofadm]','$_POST[email]','$_POST[userna
me]','$_POST[password]')";
if (!mysqli_query($con,$sql))
{
die('Error: '. mysqli_error($con));
}
echo"waitforconformation";

mysqli_close($con);
?>

4.1.2.2Code For Student login check

<?php
//Start session
session_start();
//Unset thevariables stored in session
unset($_SESSION['SESS_username']);
unset($_SESSION['SESS_password']);
?>
<!DOCTYPE html>
<html xml:lang="EN"lang="EN"dir="ltr">
<head>
<title>SOELIBRARYINFORMATION SYSTEM</title>
<metahttp-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<metahttp-equiv="imagetoolbar" content="no"/>
<link rel="stylesheet"href="../styles/layout.css"type="text/css"/>
<!--HomepageSpecificElements-->
<script type="text/javascript"src="../scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript"src="../scripts/jquery-ui-
1.7.2.custom.min.js"></script>
<script type="text/javascript"src="../scripts/jquery.tabs.setup.js"></script>
<!--EndHomepageSpecific Elements-->
</head>
<bodyid="top">
<div class="wrapperrow1">
<div id="header"class="clear">
<div class="fl_left">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<h1><ahref="homepage.php">SOELIBRARY MANAGEMENT
SYSTEM</a></h1>
<p></p>
</div>
<div class="fl_right">
<ul>
<li><a
href="http://localhost/xampp/project/library/homepage.php">Home</a></li>
<li><a
href="http://localhost/xampp/project/library/contact/Contactus.php">Contact
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/egateway/egateway.php">E
- Gateway</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin/studentlogin.php">Student
Login</a></li>
<li><ahref="teacherlogin.php">Teacherlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/admin/adminlogin.php">Adminlogin</a
></li>
</ul>
<form action="#"method="post"id="sitesearch">
<fieldset>
<strong>Search:</strong>
<inputtype="text"value="Search Ourwebiste forbooks;"
onfocus="this.value=(this.value=='SearchOurwebsiteforbooks;')?'': this.value;"
/>
<inputtype="image"src="../images/search.gif"id="search" alt="Search"/>
</fieldset>
</form>
</div>
</div>
</div>
<!--
####################################################################
###################################-->
<div class="wrapperrow2">
<div class="rnd">
<!--######-->
<div id="topnav">
<ul>
<liclass="active"><a
href="http://localhost/xampp/project/library/homepage.php">Home</a></li>
<li><a href="http://localhost/xampp/project/library/newarrivals.php">New
Arrivals</a></li>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<li><ahref="http://localhost/xampp/project/library/onlinebooks.php">Online
Books</a></li>
<li><ahref="http://localhost/xampp/project/library/egallery.php">E
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">Question
Paper</a></li>
<li><ahref="http://localhost/xampp/project/library/aboutus.php">About
Us</a></li>
<li><ahref="http://localhost/xampp/project/library/bookissue.php">BookIssue
</a></li>
<liclass="last"><ahref="#"></a></li>
</ul>
</div>
<!--######-->
</div>
</div>
<!--
####################################################################
################################### -->
<div class="wrapper">
<div id="featured_slide"class="clear">
<!--######-->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box"id="fc1"><imgsrc="../images/demo/slider/1.gif"
alt=""/>
<div class="floater">
<h2>All ABOUTSOELIBRARY</h2>
<p>School oFEngineering Libraryor theS.O.E libraryis oneof thefinest
libraryin kerelahavingagood collection ofbooksrelated to various subjects</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id= "fc2"><imgsrc="../images/demo/slider/2.gif"
alt=""/>
<div class="floater">
<h2>Existence</h2>
<p>School oFEngineeringlibrarycame into existenceinyear 1995and from
then on it has been apremier sourceof information for collegestudents</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc3"><imgsrc="../images/demo/slider/3.gif"
alt=""/>
<div class="floater">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<h2>Collection</h2>
<p>School of Engineering Libraryhas acollection ofover 25000 books
related to various subjects inengineering</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc4"><imgsrc="../images/demo/slider/4.gif"
alt=""/>
<div class="floater">
<h2>E-Repository</h2>
<p>School oFEngineering Libraryhas acollection of6000 cds and2800
onlinejournals and alsohas a section whereteachers upload theirlecturesnotes and
student can download them.</p>
<p class="readmore"><ahref="#">ContinueReading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc5"><imgsrc="../images/demo/slider/5.gif"
alt=""/>
<div class="floater">
<h2>Latest Newsand events</h2>
<p></p>
<p class="readmore"><ahref="#">Click hereto go to latest news
page;</a></p>
</div>
</div>
</div>
<ul id="featured_tabs">
<li><ahref="#fc1">All About TheLibrary</a></li>
<li><ahref="#fc2">Existence</a></li>
<li><ahref="#fc3">Collection ofBooks</a></li>
<li><ahref="#fc4">E-Repository</a></li>
<liclass="last"><ahref="#fc5">Latest News&amp;Events</a></li>
</ul>
<div class="overlay_right"></div>
<!--######-->
</div>
</div>

<!--
####################################################################
###################################-->
<div class="wrapperrow3">
<div class="rnd">
<div id="container"class="clear">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<!--
####################################################################
###################################-->
<div id="homepage" class="clear">
<!--######-->
<div id="left_column">
<h2>Sugeestion</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/suggestions.jpg" alt=""/></a></div>
<h2>Book request</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/bookrequest1.jpg" alt=""/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/account.jpg"alt=""/></a></div>
<h2>Photos</h2>
<div class="imgholder"><ahref="#"><img src="../images/images/photos.jpg"
alt=""/></a></div>
</div>
<!--######-->
<div id="latestnews">
<h2>Pls enterusername and password to login</h2>
<table>
<form action="checklogin.php"method="post"><br><br>
Username:<inputname="username"type="text"maxlength="12"><br><br>P
assword:<input name="password"type="password"maxlength="12">
<input name="submit"type="submit">
</form>
</table>

</div>
<!--######-->

<!--######-->
</div>
<!--
####################################################################
###################################-->
<!--
####################################################################
###################################-->
<div id="academiclinks"class="clear">
<h2>QuicklyFind What You AreLooking For</h2>
<div class="linkbox">
<ul>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<li><ahref="http://localhost/xampp/project/library/homepage.php">&raquo;
Home</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin.php">&raquo; Student
Login</a></li>
<li><ahref="teacherlogin.php">&raquo;TeacherLogin</a></li>
<li><a
href="http://localhost/xampp/project/library/adminlogin.php">&raquo;
Adminlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/newarrival.php">&raquo; New
Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks.php">&raquo; Online
Books</a></li>
<li><ahref="http://localhost/xampp/project/library/egallery.php">&raquo;
E-Gallery</a></li>
<li><ahref="http://localhost/xampp/project/library/aboutus.php">&raquo;
About Us</a></li>
<li><ahref="http://localhost/xampp/project/library/contactus.php">&raquo;
Contact Us</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">&raquo; Question
Papers</a></li>
<li><ahref="http://localhost/xampp/project/library/latestnews.php">&raquo;
Latest Events & News</a></li>
</ul>
</div>

<!--
####################################################################
###################################-->
</div>
</div>
</div>
<!--
####################################################################
###################################-->

<!--
####################################################################
###################################-->
<div class="wrapper">
<div id="copyright"class="clear">
<p class="fl_left">Copyright&copy; 2014-All Rights Reserved for SOE
LIBRARY-</p>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

</div>
</div>
</body>
</html>
<?php
session_start();
$host="localhost";//Host name
$username="root";//Mysql username
$password=""; // Mysql password
$db_name="library";//Databasename
$tbl_name="studentlogin"; // Table name

//Connectto server and select databse.


mysql_connect("$host", "$username","$password")ordie("cannot connect");
mysql_select_db("$db_name")ordie("cannot select DB");

//username and password sent from form


$myusername=$_POST['username'];
$mypassword=$_POST['password'];
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and
password='$mypassword'";
$result=mysql_query($sql);

//Mysql_num_row is countingtablerow
$count=mysql_num_rows($result);

//Ifresultmatched$myusername and $mypassword, table row must be1 row

if($count>0)
{ session_regenerate_id();
$member =mysql_fetch_assoc($result);
$_SESSION['SESS_username']=$member['username'];
$_SESSION['SESS_password']=$member['password'];
session_write_close();
header("location:studentlogin1.php");
exit();
}else {
//Login failed
$errmsg_arr[]='username and password not found';
$errflag =true;
if($errflag) {
$_SESSION['ERRMSG_ARR']=$errmsg_arr;
session_write_close();
header("location: studentlogin.php");
exit();

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

}
}
?>

4.1.2.3 Code For Event Addition

<?php
$con=mysqli_connect("localhost","root","","admin");
//Check connection
if (mysqli_connect_errno())
{
echo"Failed to connect to MySQL:". mysqli_connect_error();
}

$sql="INSERTINTO event(Name,date,time,venue,mname,contactno,email)
VALUES
('$_POST[ename]','$_POST[date]','$_POST[time]','$_POST[venue]','$_POST[name
]','$_POST[phno]','$_POST[email]')";
if (!mysqli_query($con,$sql))
{
die('Error: '. mysqli_error($con));
}
echo"waitforconformation";
mysqli_close($con);
?>
4.1.2 ScreenshotforStudent login

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

LibraryManagementSystem

DivisionOf ComputerScienceAnd Engineering Page 59

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

LibraryManagementSystem

4.1.3Teacher Module

TEACHER

SUGGESTIONS
TEACHERLOGIN EVENTADDITION

USERNAMEAND FORGOT
PASSWORD PASSWORD
AUTHENTICATION

The followingmodulecontains various facilities liketeacher login, suggestions, and event


addition. Further anyteacher if at anymoment forgets his/herpassword he/she can
retrieveit from ‘forgot password’option.

4.1.3.1 Code ForTeacher Login


<?php
session_start();
$host="localhost";//Host name
$username="root";//Mysql username
$password=""; // Mysql password
$db_name="library";//Databasename
$tbl_name="teacherlogin"; // Table name

//Connect to server and select databse.


mysql_connect("$host", "$username","$password")ordie("cannot connect");
mysql_select_db("$db_name")ordie("cannot select DB");

//username and password sent from form


$myusername=$_POST['username'];
$mypassword=$_POST['password'];
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and
password='$mypassword'";

DivisionOf ComputerScienceAnd Engineering Page 60

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

$result=mysql_query($sql);

//Mysql_num_row is countingtablerow
$count=mysql_num_rows($result);

//Ifresultmatched$myusername and $mypassword, table row must be1 row

if($count>0)
{session_regenerate_id();
$member =mysql_fetch_assoc($result);
$_SESSION['SESS_username']=$member['username'];
$_SESSION['SESS_password']=$member['password'];
session_write_close();
header("location:teacherlogin1.php");
exit();
}else {
//Login failed
$errmsg_arr[]='username and password not found';
$errflag =true;
if($errflag) {
$_SESSION['ERRMSG_ARR']=$errmsg_arr;
session_write_close();
header("location: teacherlogin.php");
exit();
}
}
?>

4.1.3.2 Code forSuggestion

<?php
session_start();
?>
<!DOCTYPE html>
<html xml:lang="EN"lang="EN"dir="ltr">
<head>
<title>SOELIBRARYINFORMATION SYSTEM</title>
<metahttp-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<metahttp-equiv="imagetoolbar" content="no"/>
<link rel="stylesheet"href="../styles/layout.css"type="text/css"/>
<!--HomepageSpecificElements-->
<script type="text/javascript"src="../scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript"src="../scripts/jquery-ui-
1.7.2.custom.min.js"></script>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<script type="text/javascript"src="../scripts/jquery.tabs.setup.js"></script>
<!--EndHomepageSpecific Elements-->
</head>
<bodyid="top">
<div class="wrapperrow1">
<div id="header"class="clear">
<div class="fl_left">
<h1><ahref="homepage.php">SOELIBRARY MANAGEMENT
SYSTEM</a></h1>
<p></p>
</div>
<div class="fl_right">
<ul>
<li><a
href="http://localhost/xampp/project/library/homepage.php">Home</a></li>
<li><a
href="http://localhost/xampp/project/library/contact/Contactus.php">Contact
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/egateway/egateway.php">E
- Gateway</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin/studentlogin.php">Student
Login</a></li>
<li><ahref="teacherlogin.php">Teacherlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/admin/adminlogin.php">Adminlogin</a
></li>
</ul>
<form action="#"method="post"id="sitesearch">
<fieldset>
<strong>Search:</strong>
<inputtype="text"value="Search Ourwebiste forbooks;"
onfocus="this.value=(this.value=='SearchOurwebsite forbooks;')?'': this.value;"
/>
<inputtype="image"src="../images/search.gif"id="search" alt="Search"/>
</fieldset>
</form>
</div>
</div>
</div>
<!--
####################################################################
###################################-->
<div class="wrapperrow2">
<div class="rnd">

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<!--######-->
<div id="topnav">
<ul>
<liclass="active"><a
href="http://localhost/xampp/project/library/homepage.php">Home</a></li>
<li><ahref="http://localhost/xampp/project/library/newarrivals.php">New
Arrivals</a></li>
<li><ahref="http://localhost/xampp/project/library/onlinebooks.php">Online
Books</a></li>
<li><ahref="http://localhost/xampp/project/library/egallery.php">E
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">Question
Paper</a></li>
<li><ahref="http://localhost/xampp/project/library/aboutus.php">About
Us</a></li>
<li><ahref="http://localhost/xampp/project/library/bookissue.php">BookIssue
</a></li>
<liclass="last"><ahref="#"></a></li>
</ul>
</div>
<!--######-->
</div>
</div>
<!--
####################################################################
###################################-->
<div class="wrapper">
<div id="featured_slide"class="clear">
<!--######-->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box"id="fc1"><imgsrc="../images/demo/slider/1.gif"
alt=""/>
<div class="floater">
<h2>All ABOUTSOELIBRARY</h2>
<p>School oFEngineering Libraryor theS.O.Elibraryis oneof thefinest
libraryin kerelahavingagood collection ofbooksrelated to various subjects</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id= "fc2"><imgsrc="../images/demo/slider/2.gif"
alt=""/>
<div class="floater">
<h2>Existence</h2>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<p>School oFEngineeringlibrarycame into existenceinyear 1995and from


then on it has been apremier sourceof information for collegestudents</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc3"><imgsrc="../images/demo/slider/3.gif"
alt=""/>
<div class="floater">
<h2>Collection</h2>
<p>School of Engineering Libraryhas acollection ofover 25000 books
related to various subjects in engineering</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc4"><imgsrc="../images/demo/slider/4.gif"
alt=""/>
<div class="floater">
<h2>E-Repository</h2>
<p>School oFEngineering Libraryhas acollection of6000 cds and2800
onlinejournals and alsohas a section whereteachers upload theirlecturesnotes and
student can download them.</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc5"><imgsrc="../images/demo/slider/5.gif"
alt=""/>
<div class="floater">
<h2>Latest Newsand events</h2>
<p></p>
<p class="readmore"><ahref="#">Click hereto go to latest news
page;</a></p>
</div>
</div>
</div>
<ul id="featured_tabs">
<li><ahref="#fc1">All About TheLibrary</a></li>
<li><ahref="#fc2">Existence</a></li>
<li><ahref="#fc3">Collection ofBooks</a></li>
<li><ahref="#fc4">E-Repository</a></li>
<liclass="last"><ahref="#fc5">Latest News&amp;Events</a></li>
</ul>
<div class="overlay_right"></div>
<!--######-->
</div>
</div>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<!--
####################################################################
###################################-->
<div class="wrapperrow3">
<div class="rnd">
<div id="container"class="clear">
<!--
####################################################################
###################################-->
<div id="homepage" class="clear">
<!--######-->
<div id="left_column">
<h2>Sugeestion</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/suggestions.jpg" alt=""/></a></div>
<h2>Book request</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/bookrequest1.jpg" alt=""/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/account.jpg"alt=""/></a></div>
<h2>Photos</h2>
<div class="imgholder"><ahref="#"><img src="../images/images/photos.jpg"
alt=""/></a></div>
</div>
<!--######-->
<div id="latestnews">
<h2>Pls entersugeestion in less than 255 characters</h2>
<tableborder=1>
<form action="suggestion.php"method="post">
<tr>
<td>SUGGESTION</td><td><textareaname="suggestion"rows="5"
cols="50"></textarea><br></br></td>
</tr>
<tr>
<td><inputtype="submit"
value="submit"name="submit"><br></br></td>
</tr>
</form>
</table>
<
</div>
<!--######-->

<!--######-->
</div>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

</div>
<!--
####################################################################
###################################-->
<!--
####################################################################
###################################-->
<div id="academiclinks"class="clear">
<h2>QuicklyFind What You AreLooking For</h2>
<div class="linkbox">
<ul>
<li><ahref="http://localhost/xampp/project/library/homepage.php">&raquo;
Home</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin.php">&raquo; Student
Login</a></li>
<li><ahref="teacherlogin.php">&raquo;TeacherLogin</a></li>
<li><a
href="http://localhost/xampp/project/library/adminlogin.php">&raquo;
Adminlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/newarrival.php">&raquo; New
Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks.php">&raquo; Online
Books</a></li>
<li><ahref="http://localhost/xampp/project/library/egallery.php">&raquo;
E-Gallery</a></li>
<li><ahref="http://localhost/xampp/project/library/aboutus.php">&raquo;
About Us</a></li>
<li><ahref="http://localhost/xampp/project/library/contactus.php">&raquo;
Contact Us</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">&raquo; Question
Papers</a></li>
<li><ahref="http://localhost/xampp/project/library/latestnews.php">&raquo;
Latest Events & News</a></li>
</ul>
</div>

<!--
####################################################################
###################################-->
</div>
</div>
</div>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<!--
####################################################################
###################################-->

<!--
####################################################################
###################################-->
<div class="wrapper">
<div id="copyright"class="clear">
<p class="fl_left">Copyright&copy; 2014-All Rights Reserved for SOE
LIBRARY-</p>
</div>
</div>
</body>
</html>

<?php
session_start();
require'../include/connection1.php';
$sql =mysqli_query($connection,"SELECT *FROM studentlogin
whereusername='$_SESSION[SESS_username]'&&
password='$_SESSION[SESS_password]'");
$rocount=mysqli_num_rows($sql);
if($rocount==1)
{
while($row =mysqli_fetch_array($sql))
{
$logid=$row['logid'];
$username=$row['username'];
$password=$row['password'];
$numbooks= $row['numbooks'];
}
}
$result=mysqli_query($connection,"SELECT* FROM student where
libid='$logid'");
$rowcount=mysqli_num_rows($result);
if($rowcount==1)
{
while($row =mysqli_fetch_array($result))
{
$libid=$row['libid'];
$regno=$row['regno'];
$stuname=$row['stuname'];
$branch=$row['branch'];
$semester=$row['semester'];

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

$section=$row['section'];
$yearofadm= $row['yearofadm'];
}
}
mysqli_close($connection);
?>
<?php
require'../include/connection.php';

$sql="INSERTINTO suggest ( libid,suggestion)


VALUES
('$libid','$_POST[suggestion]')";

if (!mysqli_query($con,$sql))
{
echo"error";
}
echo"successs";
mysqli_close($con);
?>

4.1.3 Screenshotfor teacher’s login

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

4.1.4 BookModule

BOOK MAINTENANCE

ADDNEWBOOK SEARCHBOOK

The followingmodulecontains various facilities like add new bookand search book.In
the ‘add newbook’section if anynew bookcomes in thelibrarythen the librariancan add
its specifications. Similarlyif theuser wantsto search for aspecific book then he/she can
usesearch book option to do it.

4.1.4.1 Code For AddingNewbooks

<?php
$con=mysqli_connect("localhost","root","","library");
//Check connection
if (mysqli_connect_errno())
{
echo"Failed to connect to MySQL:". mysqli_connect_error();
}

$sql="INSERTINTO books (code, bookname, author,publication, subject,


numberofbooks)
VALUES
('$_POST[bookid]','$_POST[bookname]','$_POST[author]','$_POST[publication]','$_P
OST[subject]','$_POST[numberofbooks]')";

if (!mysqli_query($con,$sql))
{
echo"error";
}
echo"successs";

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

mysqli_close($con);
?>
<?php
$con=mysqli_connect("localhost","root","","admin");
//Check connection
if (mysqli_connect_errno())
{
echo"Failed to connect to MySQL:". mysqli_connect_error();
}

$sql="INSERTINTO newarrivals (code, bookname, author, publication, subject,


numberofbooks,arrivaldate)
VALUES
('$_POST[bookid]','$_POST[bookname]','$_POST[author]','$_POST[publication]','$_P
OST[subject]','$_POST[numberofbooks]','$_POST[arrivaldate]')";

if (!mysqli_query($con,$sql))
{
echo"error";
}
echo"successs";
mysqli_close($con);
?>

4.1.4.2 Code For BookSearch

<!DOCTYPE html>
<html xml:lang="EN"lang="EN"dir="ltr">
<head>
<title>SOELIBRARYINFORMATION SYSTEM</title>
<metahttp-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<metahttp-equiv="imagetoolbar" content="no"/>
<link rel="stylesheet"href="../styles/layout.css"type="text/css"/>
<!--HomepageSpecificElements-->
<script type="text/javascript"src="../scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript"src="../scripts/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript"src="../scripts/jquery.tabs.setup.js"></script>
<!--EndHomepageSpecific Elements-->
</head>
<bodyid="top">
<div class="wrapperrow1">
<div id="header"class="clear">
<div class="fl_left">
<h1><ahref="homepage.php">SOELIBRARY MANAGEMENT
SYSTEM</a></h1>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<p></p>
</div>
<div class="fl_right">
<ul>
<li><ahref="homepage.php">Home</a></li>
<li><ahref="http://localhost/xampp/project/library/contact/Contactus.php">Contact
Us</a></li>
<li><ahref="http://localhost/xampp/project/library/egateway/egateway.php">E-
Gateway</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin/studentlogin.php">Student
Login</a></li>
<li><a
href="http://localhost/xampp/project/library/teachrlogin/teacherlogin.php">Teacherlogi
n</a></li>
<li><a
href="http://localhost/xampp/project/library/admin/adminlogin.php">Adminlogin</a></
li>
</ul>
<form action="#"method="post"id="sitesearch">
<fieldset>
<strong>Search:</strong>
<inputtype="text"value="Search Ourwebiste forbooks;"
onfocus="this.value=(this.value=='SearchOurwebsite forbooks;')?'': this.value;"/>
<input type="image"src="images/search.gif"id="search" alt="Search"/>
</fieldset>
</form>
</div>
</div>
</div>

<!--
#######################################################################
################################-->
<div class="wrapperrow2">
<div class="rnd">
<!--######-->
<div id="topnav">
<ul>
<liclass="active"><ahref="homepage.php">Home</a></li>
<li><a
href="http://localhost/xampp/project/library/newarrivals/newarrivals.php">New
Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks/onlinebooks.php">Online
Books</a></li>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<li><ahref="http://localhost/xampp/project/library/egallery/egallery.php">E
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper/questionpaper.php">Questio
n Paper</a></li>
<li><ahref="http://localhost/xampp/project/library/aboutus/aboutus.php">About
Us</a></li>
<li><ahref="http://localhost/xampp/project/library/abouts/bookissue.php">Book
Issue</a></li>
<liclass="last"><ahref="#"></a></li>
</ul>
</div>
<!--######-->
</div>
</div>
<!--
#######################################################################
################################-->
<div class="wrapper">
<div id="featured_slide"class="clear">
<!--######-->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box"id="fc1"><imgsrc="../images/demo/slider/12.gif"alt=""
/>
<div class="floater">
<h2>All ABOUTSOELIBRARY</h2>
<p>School oFEngineering Libraryor theS.O.E libraryis oneof thefinest library
in kerela having agood collection ofbooks relatedto various subjects</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id= "fc2"><imgsrc="../images/demo/slider/21.gif"alt=""
/>
<div class="floater">
<h2>Existence</h2>
<p>School oFEngineeringlibrary came into existenceinyear 1995and from then
on ithas been apremier sourceof information forcollegestudents</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc3"><imgsrc="../images/demo/slider/31.gif"alt=""
/>
<div class="floater">
<h2>Collection</h2>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<p>School of Engineering Libraryhas acollection ofover 25000 books related to


various subjects in engineering</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc4"><imgsrc="../images/demo/slider/41.gif"alt=""
/>
<div class="floater">
<h2>E-Repository</h2>
<p>School oFEngineering Libraryhas acollection of6000 cds and2800 online
journals and also has asection whereteachers upload theirlectures notes and student
can download them.</p>
<p class="readmore"><ahref="#">Continue Reading&raquo;</a></p>
</div>
</div>
<div class="featured_box"id="fc5"><imgsrc="../images/demo/slider/51.gif"alt=""
/>
<div class="floater">
<h2>Latest Newsand events</h2>
<p></p>
<p class="readmore"><ahref="#">Click hereto go to latest news page;</a></p>
</div>
</div>
</div>
<ul id="featured_tabs">
<li><ahref="#fc1">All About TheLibrary</a></li>
<li><ahref="#fc2">Existence</a></li>
<li><ahref="#fc3">Collection ofBooks</a></li>
<li><ahref="#fc4">E-Repository</a></li>
<liclass="last"><ahref="#fc5">Latest News&amp;Events</a></li>
</ul>
<div class="overlay_right"></div>
<!--######-->
</div>
</div>
<!--
#######################################################################
################################-->
<div class="wrapperrow3">
<div class="rnd">
<div id="container"class="clear">
<!--
#######################################################################
################################ -->
<div id="homepage" class="clear">
<!--######-->

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<div id="left_column">
<h2>Sugeestion</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/suggestions.jpg" alt=""/></a></div>
<h2>Book request</h2>
<div class="imgholder"><ahref="#"><img
src="../images/images/bookrequest1.jpg" alt=""/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><a
href="http://localhost/xampp/project/librar y/create/createaccount.php"><img
src="../images/images/account.jpg"alt=""/></a></div>
<h2>Photos</h2>
<div class="imgholder"><ahref="#"><img src="../images/images/photos.jpg"
alt=""/></a></div>
</div>
<!--######-->
<div id="latestnews">
<h2>ENTERBOOK DETAILS</h2>

<table>
<form action="advancesearchresult.php"method="POST">
<legend>BookInformation:</legend>
<tr>
<td>Book Code:</td><td><inputtype="text"name="bookcode"
size="30"><br><br></td>
</tr>
<tr>
<td>BookName: </td><td><inputtype="text"name="bookname"
size="30"><br><br></td>
</tr>
<tr>
<td>Publication: </td><td><inputtype="text"name="publication"
size="30"><br><br></td>
</tr>
<tr>
<td>Author Name: </td><td><inputtype="text"name="authorname"
size="30"><br><br></td>
</tr>
<tr>
<td><p>Click the submit</p></td>
</tr>
<tr>
<td height="40"><inputtype="submit"name="submit"value="submit"action=
"insertaccount.php"></td>
</tr>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

</form>
</table>

<p class="readmore"><ahref="#"></a></p>
</div>
<!--######-->
</div>

<!--######-->
</div>

<!--
#######################################################################
################################ -->
<!--
#######################################################################
################################-->
<div id="academiclinks"class="clear">
<h2>QuicklyFind What You AreLooking For</h2>
<div class="linkbox">
<ul>
<li><ahref="http://localhost/xampp/project/library/homepage.php">&raquo;
Home</a></li>
<li><ahref="http://localhost/xampp/project/library/studentlogin.php">&raquo;
StudentLogin</a></li>
<li><ahref="http://localhost/xampp/project/library/teacherlogin.php">&raquo;
TeacherLogin</a></li>
<li><ahref="http://localhost/xampp/project/library/adminlogin.php">&raquo;
Adminlogin</a></li>
<li><ahref="http://localhost/xampp/project/library/newarrivals.php">&raquo;
New Arrivals</a></li>
<li><ahref="http://localhost/xampp/project/library/onlinebooks.php">&raquo;
Online Books</a></li>
<li><ahref="http://localhost/xampp/project/library/egallery.php">&raquo; E-
Gallery</a></li>
<li><ahref="http://localhost/xampp/project/library/aboutus.php">&raquo;
About Us</a></li>
<li><ahref="http://localhost/xampp/project/library/contactus.php">&raquo;
Contact Us</a></li>
<li><ahref="http://localhost/xampp/project/library/questionpaper.php">&raquo;
Question Papers</a></li>
<li><ahref="http://localhost/xampp/project/library/latestnews.php">&raquo;
Latest Events & News</a></li>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

</ul>
</div>

<!--
#######################################################################
################################-->
</div>
</div>
</div>
<!--
#######################################################################
################################-->

<!--
#######################################################################
################################-->
<div class="wrapper">
<div id="copyright"class="clear">
<p class="fl_left">DEVELOPER: VIKRAM,RAHUL,PRABHAKAR,RAJAT</p>
</div>
</div>
</body>
</html>

<?php
$con=mysqli_connect("localhost","root","","library");
//Check connection
if (mysqli_connect_errno())
{
echo"Failed to connect to MySQL:". mysqli_connect_error();
}
$code=$_POST['bookcode'];
$name=$_POST['bookname'];
$aname=$_POST['authorname'];
$publication=$_POST['publication'];
$result=mysqli_query($con,"SELECT *FROM books WHERE code='$code' ||
bookname ='$name' ||author ='$aname'||publication ='$publication'");

echo"<tableborder='1'>
<tr>
<th>Bookcode</th>
<th>BookName</th>
<th>Author</th>
<th>Publication</th>
<th>Subject</th>
<th>No ofBooks</th>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

</tr>";

while($row =mysqli_fetch_array($result))
{
echo"<tr>";
echo"<td>". $row['code']."</td>";
echo"<td>". $row['bookname']. "</td>";
echo"<td>". $row['author']. "</td>";
echo"<td>". $row['publication']. "</td>";
echo"<td>". $row['subject']. "</td>";
echo"<td>". $row['numberofbooks']. "</td>";
echo"</tr>";
}
echo"</table>";

mysqli_close($con);
?>

4.1.5 BookTransaction Module

BOOK TRANSACTION

ISSUEBOOK RETURNBOOK CHECK


RESERVATION

The followingmodulecontains various facilities likeissuebook, return book and check


reservation.

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

4.1.5.1Code Forissue book

<?php
require'../include/connection1.php';
$result=mysqli_query($connection,"SELECT *FROM studentlogin");
while($row =mysqli_fetch_array($result))
{
$libid=$row['logid'];
$username=$row['username'];
$password=$row['password'];
$numbooks=$row['numbooks'];
}
if($numbooks>3)
{
echo"cannnot issue books limitexceeded";
}
else
{
$libid=$_POST['libid'];
$bookid=$_POST['bookid'];
$issuedate=$_POST['issuedate'];

$returndate=date_add($issuedate,date_interval_create_from_date_string("15 days"));
$sql="INSERTINTO issuebooks(libid,bookid,issuedate,returndate)
VALUES
('$libid','$bookid','$issuedate','$returndate')";
mysqli_query($connection,"UPDATE studentlogin SET
numbooks=numbooks+1
WHERE logid='$libid'");
mysqli_query($connection,"UPDATE book SET
numberofbooks=numberofbooks-1
WHERE code='$bookid'");
if (!mysqli_query($connection,$sql))
{
die('Error1: '. mysqli_error($connection));
}
else
echo"added 1record";
}
mysqli_close($connection);
?>

4.1.5.2 Code For book Return

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

<?php
require'../include/connection1.php';
$libid=$_POST['libid'];
$bookid=$_POST['bookid'];
$result=mysqli_query($connection,"SELECT *FROM issuebooks wherelibid= '$libid' &&
bookid='$bookid'");
$rowcount=mysqli_num_rows($result);
if($rowcount>0)
{
$sql=mysqli_query($connection,"UPDATE studentlogin SET
numbooks=numbooks-1
WHERE logid='$libid'");
$sql1=mysqli_query($connection,"UPDATEbook SET
numberofbooks=numberofbooks+1
WHERE code='$bookid'");
$sql2=mysqli_query($connection,"DELETE FROM issuebooks WHERE
libid=$libid &&bookid='$bookid'");
}
else
echo"no book issued";
mysqli_close($connection);
?>

4.1.2 ScreenshotforBooksearch

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

4.1.6 Report Module

REPORT

STUDENTREPORT TEACHERREPORT BOOKREPORT TRANSACTION


REPORT

The followingmodulecontains various facilities likestudent report, teacherreport, book


report, and transaction report.

Code ForReportGeneration

4.1.6.1 Code For Teacher report

<?php
require'../include/connection1.php';
$result=mysqli_query($connection,"SELECT* FROM
teacher");
$count=mysqli_num_rows($result);
echo"<tableborder='1'style='width=100px'>
<tr>
<td>Teacher id</td>
<td>Name</td>
<td>Designation</td>
<td>Branch</td>
<td>Contact no</td>
</tr>";
while($count>0)
{
while($row =mysqli_fetch_array($result))

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

{echo"<tr>";
echo"<td>". $row['tid']. "</td>";
echo"<td>". $row['name']. "</td>";
echo"<td>". $row['designation']. "</td>";
echo"<td>". $row['branch']."</td>";
echo"<td>". $row['contactno']."</td>";
echo"</tr>";
}
$count=$count-1;
}

mysqli_close($connection);
?>
</table>

4.1.6.2 Code For STUDENT REPORT

<?php
require'../include/connection1.php';
$result=mysqli_query($connection,"SELECT* FROM
student");
$count=mysqli_num_rows($result);
echo"<tableborder='1'style='width=100px'>
<tr>
<td>Libraryid</td>
<td>Registration number</td>
<td>Name</td>
<td>Branch</td>
<td>Semester</td>
<td>Section</td>
<td>Year ofadm</td>
</tr>";
while($count>0)
{
while($row =mysqli_fetch_array($result))
{echo"<tr>";
echo"<td>". $row['libid']. "</td>";
echo"<td>". $row['regno']. "</td>";
echo"<td>". $row['stuname']. "</td>";
echo "<td>". $row['branch'] . "</td>";
echo"<td>". $row['semester']. "</td>";
echo"<td>". $row['section']. "</td>";
echo"<td>". $row['yearofadm']. "</td>";

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

echo"</tr>";
}
$count=$count-1;
}

mysqli_close($connection);
?>
</table>

4.1.6.3 Code For Issue Report

<?php
require'../include/connection1.php';
$result=mysqli_query($connection,"SELECT* FROM
issuebooks order bylibid");
$count=mysqli_num_rows($result);
echo"<tableborder='1'style='width=100px'>
<tr>
<td>Libraryid</td>
<td>Bookid</td>
<td>Issue date</td>
<td>Return date</td>
</tr>";
while($count>0)
{
while($row =mysqli_fetch_array($result))
{echo"<tr>";
echo"<td>". $row['libid']. "</td>";
echo"<td>". $row['bookid']. "</td>";
echo"<td>". $row['issuedate']. "</td>";
echo"<td>". $row['returndate']. "</td>";
echo"</tr>";
}
$count=$count-1;
}

mysqli_close($connection);
?>
</table>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

4.1.6.4 Code For BookReport


<?php
require'../include/connection1.php';
$result=mysqli_query($connection,"SELECT* FROMbooks")
$count=mysqli_num_rows($result);
echo"<tableborder='1'style='width=100px'>
<tr>
<td>BookId</td>
<td>Name</td>
<td>Publication</td>
<td>Author</td>
<td>Subject</td>
<td>NumberOfBooks</td>
</tr>";
while($count>0)
{
while($row =mysqli_fetch_array($result))
{echo"<tr>";
echo"<td>". $row['code']."</td>";
echo"<td>". $row['bookname']. "</td>";
echo"<td>". $row['publication']. "</td>";
echo"<td>". $row['author']. "</td>";
echo"<td>". $row['subject']. "</td>";
echo"<td>". $row['numberofbooks']. "</td>";
echo"</tr>";
}
$count=$count-1;
}
mysqli_close($connection);
?></table>

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

CHAPTER 5
SYSTEMTESTING

The aimof thesystem testingprocess was to determine alldefects in ourproject .Theprogram


was subjected to aset oftest inputs and various observations weremadeand based on these
observations it will be decided whether theprogram behaves asexpected ornot.
OurProject went through two levels of testing
1.Unit testing
2.integration testing

UNITTESTING

Unit testingis undertaken when amodulehas been created and succesfullyreviewed .In order to
test asingle module weneed to provide acomplete environment iebesides the modulewe would
require
Theprocedures belongingto other modules that themoduleunder test calls
Non local data structuresthat module accesses
 A procedureto callthe functions of themoduleunder test with appropriate
parameters
Unit testingwas doneoneachand everymodulethat is described under module description of
chapter4

1. Test Fortheadmin module

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

 Testingadmin login form-This form is used forlogin of administrator of


the system.In this weenter theusername and password if both are correct
administration pagewillopen otherwiseifanyofdata is wrongitwillget
redirected back to thelogin page and again ask forusernameand password
 Student account addition-In this section the admin canverifystudent
details from student academincinfo and then onlyadd student details to
main librarydatabaseit contains add and deletebuttons if user click add
button data will be addedto student database and if heclicks delete button
the student datawillbedeleted
 Book Addition-Admin can enterdetails of book and can add the details to
the main book table alsohe can view thebooks requests.

2. Test forStudent login module


 Test forStudent loginForm-This form is used forlogin of Student .Inthis we
enterthelibraryid, username and password ifalltheseare correct student login
pagewillopen other wise if anyof data is wrongitwillget redirected back to
thelogin pageand again ask for libraryid,usernameand password.
 Test foraccountcreation-This form is used fornew accountcreation when
student does not fill the form completelyitasksagain to fill the wholeform
when he fill the formfullyitgets redirected to pagewhich show waitingfor
conformation message ashis data will beonlyadded byadministrator after
verification.
3. Test forteacher login module-
 Test forteacher login form-This form is used forloggin of teacher .In
this we enterthe username and password ifalltheseare correct teacher
login pagewillopen other wise if anyof data is wrongitwillget redirected
back to thelogin page and again ask for usernameand password.

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

INTEGRATIONTESTING

In this typeof testingwetest various integration of theproject module byprovidingthe input


.Theprimaryobjectiveis to test themoduleinterfaces in order to ensurethat no errorsare
occurringwhen onemodule invokes the othermodule.

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

CHAPTER 6
CONCLUSION&FUTURESCOPE

This websiteprovides a computerized version oflibrarymanagement system which will benefit


the students as wellas thestaff ofthelibrary.
It makes entireprocess onlinewherestudentcan search books,staffcangeneratereports and do
book transactions.It alsohas a facilityfor student loginwherestudent can login andcan see status
of books issued as wellrequest for book orgive some suggestions.Ithas a facilityof teacher’s
login whereteachers can add lectures notes and alsogive necessarysuggestion to libraryand also
add infoabout workshops or events happeningin ourcollegeor nearbycollege in
theonlinenoticeboard.

Thereis afuturescopeof this facilitythat manymore features suchas online lectures video
tutorials can be added byteachers as wellas online assignments submission facility,a feature
Ofgroup chat wherestudents can discuss various issuesof engineeringcanbe added to this
project thus makingitmoreinteractivemoreuserfriendlyand project which fulfills each users
need in thebest waypossible

Downloaded by Daniel Akinwande ([email protected])


lOMoARcPSD|51233020

CHAPTER 7
REFERENCES

http://www.w3schools.com/html/html_intro.asp
http://www.w3schools.com/css/css_background.asp
http://www.w3schools.com/js/js_datatypes.asp
http://www.w3schools.com/sql/sql_insert.asp
http://www.w3schools.com/sql/sql_update.asp
http://www.w3schools.com/php/php_forms.asp
Fundamentals of software engineeringbyRajib mall, PHIlearning
Web development and application development by Ivan Byross BPBpublications

Downloaded by Daniel Akinwande ([email protected])

You might also like