Sie sind auf Seite 1von 74

LIBRARY MANAGEMENT SYSTEM

A PROJECT REPORT
Submitted by
in partial fulfillment for the award of the degree
of
BACHELOR OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY
KLN COLLEGE OF ENGINEERING
ANNA UNIVERSITY :: CHENNAI !! !"#
OCTOBER:"!$"
1
BONAFI%E CERTIFICATE

Certified that this project report &ONLINE LIBRARY MANAGEMENT' is the
bonafide work of S(G(NIVETHITHA ) K(M(ILAKKIYA' who carried out the
project work under my supervision.

SIGNATURE SIGNATURE

(Dr. N. Balaji) (r. !.".#. $arthik)
.%(C&%)' (h.D()N*N + C,. %N--) B..ech ().) .%(C&%)
HEA% OF THE %EPARTMENT SUPERVISOR
). Department ). Department
$!NC% $!NC%
&iva/an/ai &iva/an/ai
2

A*+,-./ed0eme,t
0e esteem our self to articulate our sincere thanks to %1(N(B2/23i M(E4CSE56
P7(%(4INFN)COMMN(ENGG5 1ead of the Department information technolo/y
for providin/ us the needed /uidance to complete this project work
successfully.
0e e2press our /rateful thanks to our internal /uide M1(L(R(J(K21t7i+ B(Te*7'
A88t( P1-9e88-1 $6 %e:21tme,t -9 I,9-1m2ti-, Te*7,-/-0y6 K(L(N( C-//e0e -9
E,0i,ee1i,0' for their invaluable /uidance and motivation. .heir assistance and
advises had been very helpful throu/hout our project. ) would like to thank all our
professors of our department who have been the sources of encoura/ement and
ideas. ) thank them for lendin/ their support whenever needed.

BY6
S(G(NIVETHITHA4;!<!;$=<!==5
K(M(ILAKKIYA4;!<!;$=<!$5
3
LIBRARY
MANAGEMENT SYSTEM
4
T2b/e -9 C-,te,t8:
Ab8t12*t>>>>>>>>>>>>>>>>>>>>>>>>((((((((((((
((((((
Li8t -9 Fi0u1e8
Li8t -9 Symb-/8 ?
$(I,t1-du*ti-,>>>>>>>>>>>>>>>>>>>>>>>>>>?
3.3 (roblem &tatement 4
3.5 ,bjective 6
3.7 &cope of the (roject 6
3.7.3 %2istin/ &ystem 6
3.7.5 (roposed &ystem 6
3.8 &oftware !ifeCycle odel 9
3.8.3 "eason for Choosin/ this model 3:
3.; (roject (lan 3:
"( A,2/y8i8>>>>>>>>>>>>>>>>>>>>>>>>>>>(($$
5.3 "e<uirement =nalysis 33
5.3.3 *unctional "e<uirement 33
5.3.5 Non>*unctional "e<uirement 33
5.3.7 1ardware "e<uirements 35
5.3.8 &oftware "e<uirements 35
5.5 odule &pecification 35
5.5.3 !o/in 37
5.5.5 =dd Book 37
5.5.7 embership 37
5
5.5.8 Books =vailable 37
5.5.; )ssue Books 37
5.5.? "eturn Books 37
=(Sy8tem
%e8i0,>>>>>>>>>>>>>>>>>>>>>>>>>$<
7.3 @! Dia/rams 38
7.3.3 Detailed Dia/ram 3;
7.3.3.3 @se Case Dia/ram 3;
7.3.3.5 =ctivity Dia/ram 3?
7.3.3.7 Class Dia/ram 57
7.3.3.8 &e<uence Dia/ram 58
7.3.3.; Collaboration Dia/ram 5;
<( C-di,0>>>>>>>>>>>>>>>>>>>>>>>>>>>(("
#(Te8ti,0>>>>>>>>>>>>>>>>>>>>>>>>>>>><;
(S*1ee,87-t8>>>>>>>>>>>>>>>>>>>>>>>>>>#$
?(C-,*/u8i-,>>>>>>>>>>>>>>>>>>>>>>>>>>(#?
@(Futu1e E,72,*eme,t>>>>>>>>>>>>>>>>>>>>>>#?
;( A::e,diA >>>>>>>>>>>>>>>>>>>>>>>>>>(#@
9.3 1.!
9.5 C&&
9.7. #=A= &C")(.
9.8 #B@%"C
9.; (1(
9.? C&B!
6
$!(
Bib/i-012:7y>>>>>>>>>>>>>>>>>>>>>>>>(
"
ABSTRACT:
.he project of library mana/ement system /ives us the complete
information about the library. 0e can enter the record of new books and retrieve
the details of books available in the library.0e can issue books to the students by
maintainin/ separate lo/in for each and here their roll no serves as lo/in for them.
.he issuance and returnin/ of the book is entered in their lo/in. we can also check
how many books are issued and stock available in the library. .he purpose of this
document is to analyDe and elaborate on the capabilities and facilities provided by
a online library system. .he details of what all are the needs of the online library
system and these needs are detailed in the use>case and supplementary
specifications.
LIST OF FIGURES
FIGURE NO FIGURE NAME
*i/ 7.3.3 Data *low Dia/ram
*i/ 7.3.5.3 @se Case Dia/ram
*i/ 7.3.5.5 =ctivity Dia/ram
*i/ 7.3.5.7 Class Dia/ram
*i/ 7.3.5.8 &e<uence Dia/ram
7
*i/ 7.3.5.;
Communication Dia/ram
LIST OF SYMBOLS
S(NO SYMPOL NAME SYMBOLS
3 @se Case
5 =ctor
7 (rocess
8 =ssociation
; Decision
? &top

$( INTRO%UCTION
$($ PROBLEM STATEMENT
.he !ibrary ana/ement &ystem will store all the books and members
information that consist book no 'book title 'author name and racks to the system
database. .he system also provide search function to help student find the book by
number of the book. &earch function will search throu/h the book database to look
for the book and view where the book is situated.
8
$(" OBJECTIVE
.he main objective of the application is to automate the e2istin/ system and
maintain the records of the Book )ssue' Book "eturn from the student' &tock
aintenance' Catalo/ and Book &earch to be computeriDed.
$(= SCOPE
.his application can be used by any !ibrary to automate the process of
maintainin/ the records related to the subject of maintainin/ the stock and Book
)ssues.
$(=($ EAi8ti,0 Sy8tem
.his system would be used by the members who may be students or staffs
to check the availability of the books and borrow the books. .he librarian update
the database )f the member needs a book ur/ently'but heEshe is out>of station then
they cannot be able to /et the book.
$(=(" P1-:-8ed Sy8tem
=s soon as a reservation is made for a particular book' an automation mail
will be sent to the person who made the reservation about the details. =n =dvance
Bookin/ for a bookEjournal is provided online and the book should be borrowed by
them with a deadline of 7 days. ,therwise the bookin/ is cancelled automatically
$(< SOFTBARE LIFECYCLE MO%EL
= &oftware !ifecycle odel is a structure imposed on the development of a
software product. .here are several models for such processes each describin/
approaches to a variety of tasks or activities that take place durin/ the process.
.hese models describe phases of the software cycle and the order in which those
9
plans are e2ecuted. (resently .here are many models and many companies adopt
their own'but all have very similar patterns.)NC"%%N.=! model is the
lifecycle model used in this project.
I,*1eme,t2/ deCe/-:me,t
Aarious methods are acceptable for combinin/ linear and iterative systems
development methodolo/ies' with the primary objective of each bein/ to reduce
inherent project risk by breakin/ a project into smaller se/ments and providin/
more ease>of>chan/e durin/ the development process.
.he basic principles areF
= series of mini>0aterfalls are performed' where all phases of the 0aterfall
are completed for a small part of a system' before proceedin/ to the ne2t
increment' or
,verall re<uirements are defined before proceedin/ to evolutionary' mini>
0aterfall development of individual increments of a system' or
.he initial software concept' re<uirements analysis' and desi/n of
architecture and system core are defined via 0aterfall' followed by iterative
(rototypin/' which culminates in installin/ the final prototype' a workin/
system.
$(<($ REASON FOR CHOOSING INCREMENTAL MO%EL
&ystem is developed and delivered in increments after establishin/ an
overall architecture.
"e<uirements and specifications for each increment may be developed.
@sers may e2periment with delivered increments while others are bein/
developed.
10
)ntended to combine some of the advanta/es of prototypin/ but with a more
mana/eable process and better system structure.
)ncremental development is especially useful when staffin/ us unavailable
for a complete implementation by the business deadline.
%arly increments can be implemented with fewer people.
$(# PROJECT PLAN
11
"($ REDUIREMENT ANALYSIS
"($($ Fu,*ti-,2/ ReEui1eme,t8
= functional re<uirement defines a function of a software system and its
component. = function is described as a set of inputs' the behavior' and outputs .
*unctional re<uirements may be calculations' technical details' data manipulation
and processin/ and other specific functionality that define what a system is
supposed to accomplish.
.1% !)B"=")=NF
=dd =rticles F New entries must be entered in the database
@pdate =rticlesF=ny chan/e in articles shoule be updated in the case of
update
Delete =rticlesFwron/ entry must be removed from the system
)n<uiry emberF )n<uire all enrolled member to view their detailsG
Check out articlesF to issue any article must be check out
"eserve =rticleF .his use case is used to reserve any books with a name of
librarian'it can be pled/ed
"($(" N-,F Fu,*ti-,2/ ReEui1eme,t8
Non>functional re<uirement is a re<uirement that specifies the criteria that
can be used to jud/e the operation of a system rather than specific behaviors.
Non>functional re<uirements are often called <ualities of a system. ,ther
terms for non>functional re<uirements are constraints' <uality attributes'
12
<uality /oals' <uality of service re<uirements and non>behavioral
re<uirements.
(%"*,"=NC% "%B@)"%%N.&
&=*%.C "%B@)"%%N.&
&%C@").C "%B@)"%%N.&
&,*.0="% "%B@)"%%N.&
"($(= HAR%BARE REDUIREMENTS
(rocessor F )ntel (entium )A or hi/her
1ard disk F 6: -B of 1ard disk or hi/her
"= F ;35 B of "= or hi/her
"($(< SOFTBARE REDUIREMENTS
,peratin/ &ystem F 0indows H( or @B@N.@
*ront %nd F 1.!'#=A=&C")(.'(1(
Back %nd F C&B!
5.5 MO%ULE SPECIFICATION
5.5.3 !,-)N ,D@!%
5.5.5 =DD B,,$& ,D@!%
5.5.7 %B%"&1)( ,D@!%
5.5.8 B,,$& =A=)!=B!% ,D@!%
5.5.; )&@@% B,,$& ,D@!%
5.5.? "%.@"N B,,$ ,D@!%
13
"("($ L-0i, M-du/e
)n lo/in pa/e the librarian can lo/in by /ivin/ correct username and
password. =fter si/nin/ in he can perform the operation. *or/ot (asswordF )f
heEshe for/ot the password then'it will be send to their mail id.
"("(" Add B--+8 M-du/e :
)n this pa/e the librarian can add new books to the library which is also
updated in the database to update the total count of books etc.
"("(= Membe187i: M-du/e:
)n this module the librarian add new members to the library when an add
member re<uest is received. .hese informations are also updated in the database so
that when the member re<uest for a particular book we can retrieve their details
from the database.
"("(< B--+8 AC2i/2b/e:
.his function is used to search particular data from the database. .o search
for a particular book' is to know whether it is currently available in library or not.
.his can be done by enterin/ value in any one or more fields in the form to
perform the search such as title or author name.
"("(# I88ue B--+8:
)n this pa/e the librarian has details to issue a book to the member.
.he book is issued accordin/ to the correspondin/ memberIs )D so that we can
check whether heEshe is a member or not.
"("( Retu1, B--+8:
)n this pa/e the librarian can enter details when the members return their
books. when the book is returned by the member the librarian checks the date of
14
issue and date of return and /ets the book and finally updates them into the
database
=(SYSTEM %ESIGN
=($ UML %i2012m
@! (@nified odelin/ !an/ua/e) is a standard notation for the modelin/
of real>world objects as a first step in developin/ an object>oriented desi/n
methodolo/y. )ts notation is derived from and unifies the notations of three object>
oriented desi/n and analysis methodolo/iesF
-rady BoochJs methodolo/y for describin/ a set of objects and their
relationships
#ames "umbau/hJs ,bject>odelin/ .echni<ue (,.)
)var #acobsonJs approach which includes a use case methodolo/y
-oals of @! dia/ram
a. (rovide users with a ready>to>use' e2pressive visual modelin/ lan/ua/e so
they can develop and e2chan/e meanin/ful models.
b. (rovide e2tensibility and specialiDation mechanisms to e2tend the core
concepts.
c. Be independent of particular pro/rammin/ lan/ua/es and development
processes.
d. (rovide a formal basis for understandin/ the modelin/ lan/ua/e.
15
=($($ %et2i/ed %e8i0,
=($($($ U8e C28e %i2012m
)n many desi/n process'the use case dia/ram is the first that desi/ners will
work with when startin/ a project.Creatin/ a usecase dia/ram for describin/ the
behaviour of the tar/et system for from an e2ternal point of view.= use case is
made up of set of scenarios. %ach scenario is a se<uence of steps that encompass
an interaction between users and a system.
16
=($($(" A*tiCity %i2012m
=citivity dia/ram describe the work flow behaviour of system.
=ctivity dia/ram also useful for analysin/ a usecase by describin/ what
actions need to take place and when they shoul occurGdescribin/ a
complicated se<uential al/orithmGand modellin/ application with parallel
process.the dia/rams describe'the state of activities by the followin/
se<uence.
*or every use case there is an activity dia/rams.
A%% BOOKSF
17
Se21*7i,0 B--+F
18
LEN%ING:
19

20
A%% MEMBERS: A%VANCE BOOKING:
21
AUTOMATION: LOGIN:
22
=($($(= CLASS %IAGRAM:
23
Class Dia/ram provides an overview of the tar/et system by describin/ the
objects and classes inside the system and the relationships between them. )t
provides a wide variety of usa/esG from modelin/ the domain>specific data
structure to detailed desi/n of the tar/et system. 0ith the share model facilities'
you can reuse your class model in the interaction dia/ram for modelin/ the
detailed desi/n of the dynamic behavior. .he *orm Dia/ram allows you to
/enerate dia/ram automatically with user>defined scope
=($($(< SeEue,*e %i2012m
24
.he &e<uence Dia/ram models the collaboration of objects based on a time
se<uence. )t shows how the objects interact with others in a particular scenario of a
use case. 0ith the advanced visual modelin/ capability' you can create comple2
se<uence dia/ram in few clicks. Besides' A(>@! can /enerate se<uence dia/ram
from the flow of events which you have defined in the use case description
=($($(# C-//2b-12ti-, %i2012m
25
&imilar to &e<uence Dia/ram' the Communication Dia/ram is also used to
model the dynamic behavior of the use case. 0hen compare to &e<uence Dia/ram'
the Communication Dia/ram is more focused on showin/ the collaboration of
objects rather than the time se<uence. Cou donJt need to create both dia/rams
manually because A(>@! allows you to /enerate it from one to the other.
26
<( CO%ING
H-me :20e:
GGLib121y F1-,t P20e:
KhtmlL
KheadL
KtitleL!)B"="C =N=-%%N. &C&.%KEtitleL
KEheadL
KbodyL
Kh3 styleMNte2t>ali/nFcenterNL!)B"="C =N=-%%N. &C&.%KEh3L
Ka hrefMNadmininfo.htmlNLKh3 styleMNte2t>ali/nFcenterNL!ibrarianKEh3LKEaLKbrL
Ka hrefMNmeminfo.htmlNLKh3 styleMNte2t>ali/nFcenterNLemberKEh3LKEaLKbrL
KEbodyL
KEhtmlL
GGLib121i2, 91-,t :20e:
KhtmlL
KheadL
KtitleLKEtitleL
KEheadL
KbodyL
27
Kh3 styleMNte2t>ali/nFcenterNL0elcome to !ibraryKEh3L
Ka hrefMNliblo/in.htmlNLKh3 styleMNte2t>ali/nFcenterNL!o/inKEh3LKEaL
Ka hrefMNlibaccount.htmlNLKh3 styleMNte2t>ali/nFcenterNLCreate =ccountKEh3L
KEbodyL
KEhtmlL
GGLib121y *1e2te 2**-u,t:
Kscript typeMNte2tEjavascriptNL
function check*orm(form)
O
if(form.Name.value MM NN)
O
alert(N%rrorF @sername cannot be blankPN)G
form.Name.focus()G
return falseG
Q
if(form.(assword.value MM NN)
O
alert(N%rrorF (assword cannot be left blankN)G
form.(assword.focus()G
28
return falseG
Q
if(form.(assword.value PM form.Copassword.value)
O
alert(Npassword doesnot matchN)G
form.Copassword.focus()G
return falseG
Q
var 2Mdocument.formsRNmy*ormNSRN%mailNS.valueG
var atposM2.inde2,f(NTN)G
var dotposM2.last)nde2,f(N.N)G
if (atposK3 UU dotposKatposV5 UU dotposV5LM2.len/th)
O
alert(NNot a valid e>mail addressN)G
return falseG
Q
Q
KEscriptL
KhtmlL
29
KheadL
Kmeta http>e<uivMNContent>.ypeN contentMNte2tEhtmlG charsetM@.*>6NL
KtitleL,nline !ibrary ana/ement &ystemKEtitleL
KEheadL
Kbody b/colorMNW**%8B;NL
Kform nameMNmy*ormN ali/nMNcenterN actionMNlibaccount3.phpN methodMNpostN
onsubmitMNreturn validate(this)GNL
Kdiv styleMNmar/inFautoG paddin/F3:p2 7:p2 :p2 7:p2G te2t>ali/nMcenterNL
Kh3L=D)N)&."=.,"KEh3L
KtableL
KtrLKtdLKh3LName KEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMNNameN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L=ddressKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN=ddressN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LCreate (assswordKEtdL KtdLKinput typeMN(asswordN siDeMN7:N
nameMN(asswordN valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LConfirm (asswordKEtdL KtdLKinput typeMNpasswordN siDeMN7:N
nameMNCopasswordN valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L&elect -enderFKEtdLKEh3LKtdLKh3LKinput typeMNradioN
nameMNse2N valueMNmaleN EL ale
Kinput typeMNradioN nameMNse2N valueMNfemaleN EL *emaleKbr ELKEtdLKEtrLKEh3L
30
KtrLKtdLKh3L%nter phone numberKEtdLKtdL Kinput typeMNte2tN
nameMNphXnumberN ma2len/thMN5:N siDeMN8:NLKEtdLKEtrLKEh3L
KtrLKtdLKh3L%mail )dKEtdL KtdLKinput typeMNte2tN siDeMN;:N nameMN%mailN
valueMNN ELKEtdLKEtrLKEh3L
KEtableL
Kinput typeMNsubmitN valueMNCreate accountNL
Kinput typeMNresetN valueMN"esetN L
KEdivL
KEbodyL
KpL
Kh3LKa hrefMNhttpFEElocalhostE!ibraryElibrary.htmlN
ali/nMNbottomNL1omeKEaLKEh3L
KEpL
KEformL
KEhtmlL
GGP7: *-de 9-1 /ib121y2**-u,t:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
Odie(JCould not connectF J . mys<lXerror())GQ
31
mys<lXselectXdb(NlibrarysystemN'Zcon)G
Zs<lMN)N&%". )N.,
libaccount(Name'=ddress'(assword'Copassword'se2'phXnumber'%mail) values
(JZX(,&.RNameSJ'JZX(,&.R=ddressSJ'JZX(,&.R(asswordSJ'JZX(,&.RCopasswordS
J'JZX(,&.Rse2SJ'JZX(,&.RphXnumberSJ'JZX(,&.R%mailSJ)NG
if(mys<lX<uery(Zs<l'Zcon))
O
echo Nyour account createdNG
print( JKa hrefMNliblo/in.htmlNL!o/in here..KEaLJ )G
Q
else
Odie(J%rrorFJ .mys<lXerror())GQ
mys<lXclose(Zcon)G YL
GGLib121y L-0i,:
KhtmlL
KheadL
KtitleL!ibrarian !o/inKEtitleL
KEheadL
KbodyL
32
Kh5LKp styleMNfont>familyFtimesGcolorFpurpleGte2t>ali/nFcenterGfont>
siDeF;:p2GNL!ibrarian !o/inKEpLKEh5L
Kform actionMNlo/incon.phpN methodMN(,&.N ali/nMNcenterNL
Kh3 styleMNte2t>ali/nFcenterNL!o/in )dKinput typeMNte2tN nameMNNameN
valueMNNLKEh3LKbrL
Kh3 styleMNte2t>ali/nFcenterNL(asswordKinput typeMNpasswordN
nameMN(asswordN valueMNNLKEh3LKbrL
Kh3 styleMNte2t>ali/nFcenterNLKinput typeMNsubmitN valueMN!,-)NNL
Kinput typeMNresetN valueMN"%&%.NKEh3LKEaLKbrL
KpL
Ka hrefMNhttpFEElocalhostE!ibraryElibrary.htmlN ali/nMNbottomNL1omeKEaL
KEpL
KEformL
KEbodyL
KEhtmlL
GGP7: *-de 9-1 /ib121y /-0i, 2,d *7e*+ u8e1 ,2me 2,d :288.-1d:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
die(JCould not connectF J . mys<lXerror())G
33
mys<lXselectXdb(NlibrarysystemN'Zcon)G
ZName M ZX(,&.RJNameJSG EEmissin/ this is the $ey to transfer the info from one
file to another
Z(assword M ZX(,&.RJ(asswordJSG EE(assword
Zs<lMmys<lX<uery(N&%!%C. [ *", libaccount 01%"% NameMJZNameJ =ND
(asswordMJZ(asswordJN)G
Zcount M mys<lXnumXrows(Zs<l)G EE Counts the rows to 3 since only one user can
have the same number or username .
if(Zcount MM 3)
O
sessionXstart()GEE&tartin/ the session to make the pa/e flow from lo/in to lo/out
EEZX&%&&),NRJlo/inJS M trueG pls do not use this since this may not work in
0=( .
EE "edirect to admincp
header(J!ocationFfront.htmlJ)G
Q
else
echo mys<lXerror()G
die(NCheck the @sername and (asswordN)G
YL
34
GGLib121i2, 2**e88 :20e:
KhtmlL
KheadL
Kmeta http>e<uivMNContent>.ypeN contentMNte2tEhtmlG charsetM@.*>6NL
KtitleL!ibrary ana/ement &ystemKEtitleL
KEheadL
Kbody b/colorMNW*=*=D5NL
KformL
Kh3 styleMNte2t>ali/nFcenterNL,nline !ibrary &ystemKEh3L
Ka hrefMNaddbooks.htmlNLKh3 styleMNte2t>ali/nFcenterNL =dd BooksKEh3LKEaL
Ka hrefMNlendin/.htmlNLKh3 styleMNte2t>ali/nFcenterNL !endin/KEh3LKEaL
Ka hrefMNreturn.htmlNLKh3 styleMNte2t>ali/nFcenterNL "eturnKEh3LKEaL
Ka hrefMNmemshow.phpNLKh3 styleMNte2t>ali/nFcenterNLembers ,f
!ibraryKEaLKEh3L
Ka hrefMNlibrary.htmlNLKh3 styleMNte2t>ali/nFri/htNL!o/out..KEaLKEh3L
KEformL
KEbodyL
KEhtmlL
35
GGAdd b--+8:
KhtmlL
KheadL
Kmeta http>e<uivMNContent>.ypeN contentMNte2tEhtmlG charsetM@.*>6NL
KtitleL,nline !ibrary ana/ement &ystemKEtitleL
KEheadL
Kbody b/colorMNW**%8%3NL
Kform actionMNaddbook3.phpN methodMNpostNL
Kdiv styleMNmar/inFautoG paddin/F3:p2 7:p2 :p2 7:p2G te2t>ali/nMcenterNL
Kh3L=DD B,,$&KEh3L
KtableL
KtrLKtdLKh3LBook Name KEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMNBooknameN valueMNNELKEtdLKEtrLKEh3L
KtrLKtdLKh3LBook Code KEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMNBookcodeN valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L.itle NameKEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMN.itlenameN valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L=uthorKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN=uthorN
valueMNN ELKEtdLKEtrLKEh3L
36
KtrLKtdLKh3LDate of =rrival KEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMND,=N valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L(riceKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN(riceN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L"ackNoKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN"acknoN
valueMNNELKEtdLKEtrLKEh3L
KtrLKtdLKh3LNo ,f BooksKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMNN,BN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L%ditionKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN%ditionN
valueMNN ELKEtdLKEtrLKEh3L
KEtableL
Kinput typeMNsubmitN valueMN=DDN styleMNmar/inF;p2 :p2 :p2 56?p2GN EL
KEdivL
KEformL
KEbodyL
KEhtmlL
GGP7: *-de 9-1 2dd b--+8:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
37
Odie(JCould not connectF J . mys<lXerror())GQ
E[if (mys<lX<uery(NC"%=.% D=.=B=&% librarysystemN'Zcon))
Oecho NDatabase createdNGQ
else
O echo N%rror creatin/ databaseF N . mys<lXerror()GQ
[Emys<lXselectXdb(NlibrarysystemN' Zcon)G
Zs<l M NC"%=.% .=B!% addbooks3(Bookname varchar(3::)'Bookcode
varchar(7:)'.itlename varchar(3::)'=uthor varchar(3::)'D,= date'(rice
varchar(7:)'"ackno varchar(5:)'No,fBooks varchar(7:)'%dition varchar(5:)')NG
Zs<lMN)N&%". )N.,
addbooks3(Bookname'Bookcode'.itlename'=uthor'D,='(rice'"ackno'No,fBoo
ks'%dition)A=!@%&(JZX(,&.RBooknameSJ'JZX(,&.RBookcodeSJ'JZX(,&.R.itlena
meSJ'JZX(,&.R=uthorSJ'JZX(,&.RD,=SJ'JZX(,&.R(riceSJ'JZX(,&.R"acknoSJ'JZX(
,&.RN,BSJ'JZX(,&.R%ditionSJ)NG
if (Pmys<lX<uery(Zs<l'Zcon))
Odie(J%rrorF J . mys<lXerror())GQ
echo N.he Book has been added to the libraryNG
EEmys<lX<uery(Zs<l'Zcon)G
EEmys<lXclose(Zcon)G
YL
38
GGLe,di,0 -9 b--+8:
KhtmlL
KheadL
Kmeta http>e<uivMNContent>.ypeN contentMNte2tEhtmlG charsetM@.*>6NL
KtitleL,nline !ibrary ana/ement &ystemKEtitleL
KEheadL
Kbody b/colorMNW***:*;NL
Kform actionMNlendin/3.phpN methodMN(,&.NL
Kdiv styleMNmar/inFautoG paddin/F3:p2 7:p2 :p2 7:p2G te2t>ali/nMcenterNL
Kh3L!%ND)N- ,* B,,$&KEh3L
KtableL
KtrLKtdLKh3Lember )d KEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN)DN
valueMNNELKEtdLKEtrLKEh3L
KtrLKtdLKh3LBook Code KEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMNBookcodeN valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LDate of )ssue KEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMND,)N
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LDue DateKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMNDueDateN
valueMNN ELKEtdLKEtrLKEh3L
KEtableL
39
Kinput typeMNsubmitN valueMN=DDN styleMNmar/inF;p2 :p2 :p2 56?p2GN EL
KEdivL
KEformL
KEbodyL
KEhtmlL
GGP7: *-de 9-1 /e,di,0 b--+8:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
Odie(JCould not connectF J . mys<lXerror())GQ
E[if (mys<lX<uery(NC"%=.% D=.=B=&% librarysystemN'Zcon))
Oecho NDatabase createdNG
Q
else
Oecho N%rror creatin/ databaseF N . mys<lXerror()GQ
[Emys<lXselectXdb(NlibrarysystemN' Zcon)G
Zs<l M Ncreate table lendin/()D varchar(3;)'Bookcode varchar(3;)'D,)
date'DueDate date')NG
Zs<lMN)N&%". )N., lendin/ ()D'Bookcode'D,)'DueDate)A=!@%&
40
(JZX(,&.R)DSJ'JZX(,&.RBookcodeSJ'JZX(,&.RD,)SJ'JZX(,&.RDueDateSJ)NG
if (Pmys<lX<uery(Zs<l'Zcon))
Odie(J%rrorF J . mys<lXerror())GQ
echo N.he has been lended to the memberNG
EEmys<lX<uery(Zs<l'Zcon)G
EEmys<lXclose(Zcon)G
YL
GGRetu1, -9 b--+8:
KhtmlL
KheadL
Kmeta http>e<uivMNContent>.ypeN contentMNte2tEhtmlG charsetM@.*>6NL
KtitleL,nline !ibrary ana/ement &ystemKEtitleL
KEheadL
Kbody b/colorMNW**%*D;NL
Kform actionMNreturn3.phpN methodMN(,&.NL
Kdiv styleMNmar/inFautoG paddin/F3:p2 7:p2 :p2 7:p2G te2t>ali/nMcenterNL
Kh3L"%.@"N ,* B,,$&KEh3L
KtableL
41
KtrLKtdLKh3Lember )d KEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN)DN
valueMNNELKEtdLKEtrLKEh3L
KtrLKtdLKh3LBook Code KEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMNBookcodeN valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LDate of )ssue KEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMND,)N
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LDue DateKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMNDueDateN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LDate ,f "eturnKEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMND,"N valueMNNELKEtdLKEtrLKEh3L
KEtableL
Kinput typeMNsubmitN valueMN=DDN styleMNmar/inF;p2 :p2 :p2 56?p2GN EL
KEdivL
KEformL
KEbodyL
KEhtmlL
GGP7: *-de 9-1 1etu1, b--+8:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
42
Odie(JCould not connectF J . mys<lXerror())GQ
E[if (mys<lX<uery(NC"%=.% D=.=B=&% librarysystemN'Zcon))
Oecho NDatabase createdNGQ
else
Oecho N%rror creatin/ databaseF N . mys<lXerror()GQ
[Emys<lXselectXdb(NlibrarysystemN' Zcon)G
Zs<l M Ncreate table return3()D varchar(3;)'Bookcode varchar(7:)'D,)
date'DueDate date'D," date'NumDays int')NG
Zs<lMN)N&%". )N., return3 ()D'Bookcode'D,)'DueDate'D,")A=!@%&
(JZX(,&.R)DSJ'JZX(,&.RBookcodeSJ'JZX(,&.RD,)SJ'JZX(,&.RDueDateSJ'JZX(,&.
RD,"SJ)NG
if (Pmys<lX<uery(Zs<l'Zcon))
Odie(J%rrorF J . mys<lXerror())GQ
echo N.he book is returned and added to the libraryNG
E[&%!%C. D,"' DueDate' DateDiff(NdN'D,"' DueDate) as NumDays
*", return3G
ZyM5G
echo N.he fine amount isFN'd[ZyG[E
EEmys<lX<uery(Zs<l'Zcon)G
EEmys<lXclose(Zcon)GYL
43
GGP7: *-de 9-1 Membe18 -9 /ib121y:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
Odie(JCould not connectF J . mys<lXerror())GQ
mys<lXselectXdb(NlibrarysystemN' Zcon)G
Zresult M mys<lX<uery(N&%!%C. [ *", accountN)G
echo Nembers ,f !ibraryNG
echo NKtable borderMJ3JL
KtrL
KthLNameKEthL
KthL=ddressKEthL
KthL-enderKEthL
KthL(hXnumberKEthL
KthL%mailKEthL
KEtrLNG
while(Zrow M mys<lXfetchXarray(Zresult))
O
echo NKtrLNG
44
echo NKtdLN . ZrowRJNameJS . NKEtdLNG
echo NKtdLN . ZrowRJ=ddressJS . NKEtdLNG
echo NKtdLN . ZrowRJse2JS . NKEtdLNG
echo NKtdLN . ZrowRJphXnumberJS . NKEtdLNG
echo NKtdLN . ZrowRJ%mailJS . NKEtdLNG
echo NKEtrLNGQ
echo NKEtableLNG
mys<lXclose(Zcon)G
YL
GGMembe1 91-,t :20e:
KhtmlL
KheadL
KtitleLKEtitleL
KEheadL
KbodyL
Kh3 styleMNte2t>ali/nFcenterNL0elcome to !ibraryKEh3L
Ka hrefMNmemlo/in.htmlNLKh3 styleMNte2t>ali/nFcenterNL!o/inKEh3LKEaL
Ka hrefMNaccount3.htmlNLKh3 styleMNte2t>ali/nFcenterNLCreate =ccountKEh3L
KEbodyLKEhtmlL
45
GGMembe1 *1e2te 2**-u,t:
Kscript typeMNte2tEjavascriptNL
function check*orm(form)
O
if(form.Name.value MM NN)
O
alert(N%rrorF @sername cannot be blankPN)G
form.Name.focus()G
return falseG
Q
if(form.(assword.value MM NN)
O
alert(N%rrorF (assword cannot be left blankN)G
form.(assword.focus()G
return falseG
Q
if(form.(assword.value PM form.Copassword.value)
O
alert(Npassword doesnot matchN)G
46
form.Copassword.focus()G
return falseG
Q
var 2Mdocument.formsRNmy*ormNSRN%mailNS.valueG
var atposM2.inde2,f(NTN)G
var dotposM2.last)nde2,f(N.N)G
if (atposK3 UU dotposKatposV5 UU dotposV5LM2.len/th)
O
alert(NNot a valid e>mail addressN)G
return falseG
Q
Q
KEscriptL
KhtmlL
KheadL
Kmeta http>e<uivMNContent>.ypeN contentMNte2tEhtmlG charsetM@.*>6NL
KtitleL,nline !ibrary ana/ement &ystemKEtitleL
KEheadL
Kbody b/colorMNW**%8B;NL
47
Kform nameMNmy*ormN ali/nMNcenterN actionMNaccon.phpN methodMNpostN
onsubmitMNreturn validate(this)GNL
Kdiv styleMNmar/inFautoG paddin/F3:p2 7:p2 :p2 7:p2G te2t>ali/nMcenterNL
Kh3L%B%"&1)(KEh3L
KtableL
KtrLKtdLKh3LName KEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMNNameN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L=ddressKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN=ddressN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LCreate (assswordKEtdL KtdLKinput typeMN(asswordN siDeMN7:N
nameMN(asswordN valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3LConfirm (asswordKEtdL KtdLKinput typeMNpasswordN siDeMN7:N
nameMNCopasswordN valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L&elect -enderFKEtdLKEh3LKtdLKh3LKinput typeMNradioN
nameMNse2N valueMNmaleN EL ale
Kinput typeMNradioN nameMNse2N valueMNfemaleN EL *emaleKbr ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L%nter phone numberKEtdLKtdL Kinput typeMNte2tN
nameMNphXnumberN ma2len/thMN5:N siDeMN8:NLKEtdLKEtrLKEh3L
KtrLKtdLKh3L%mail )dKEtdL KtdLKinput typeMNte2tN siDeMN;:N nameMN%mailN
valueMNN ELKEtdLKEtrLKEh3L
KEtableL
48
Kinput typeMNsubmitN valueMNCreate accountNL
Kinput typeMNresetN valueMN"esetN L
KEdivL
KEbodyL
KpL
Kh3LKahrefMNhttpFEElocalhostE!ibraryElibrary.htmlN
ali/nMNbottomNL1omeKEaLKEh3L
KEpL
KEformL
KEhtmlL
GGP7: *-de 9-1 membe1 2**-u,t:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
Odie(JCould not connectF J . mys<lXerror())GQ
mys<lXselectXdb(NlibrarysystemN'Zcon)G
Zs<lMN)N&%". )N.,
account(Name'=ddress'(assword'Copassword'se2'phXnumber'%mail'memid)
values(JZX(,&.RNameSJ'JZX(,&.R=ddressSJ'JZX(,&.R(asswordSJ'JZX(,&.RCopas
swordSJ'JZX(,&.Rse2SJ'JZX(,&.RphXnumberSJ'JZX(,&.R%mailSJ'JZmemidJ)NG
49
if(mys<lX<uery(Zs<l'Zcon))
Oecho Nyour account createdNG
print( JKa hrefMNmemlo/in.htmlNL!o/in here..KEaLJ )G
header(J!ocationFmemid/en3.phpJ)G
Q
else
Odie(J%rrorFJ .mys<lXerror())GQ
mys<lXclose(Zcon)G YL
GGP7: *-de 9-1 membe1 I% 0e,e12ti-,:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
Odie(JCould not connectF J . mys<lXerror())GQ
mys<lXselectXdb(NlibrarysystemN' Zcon)G
ZphXnumber M JZX(,&.RphXnumberSJG
Zmemid M ZphXnumber V 3::?74G
Zs<lMN)N&%". )N.,
account(Name'=ddress'(assword'Copassword'se2'phXnumber'%mail'memid)
values(JZX(,&.RNameSJ'JZX(,&.R=ddressSJ'JZX(,&.R(asswordSJ'JZX(,&.RCopas
swordSJ'JZX(,&.Rse2SJ'JZX(,&.RphXnumberSJ'JZX(,&.R%mailSJ'JZmemidJ)NG
50
if (Pmys<lX<uery(Zs<l'Zcon))
Odie(J%rrorF J . mys<lXerror())GQ
header(NlocationFmemid/en.phpN)G
mys<lXclose(Zcon)GYL
GGGe,e12ti,0 Membe1 I% 91-m d2t2b28e:
KhtmlL
KheadLKtitleL-et your ember )DKEtitleL
KEheadL
KbodyL
Kform actionMNKYphp ZX&%"A%"RJ(1(X&%!*JS YLN nameMNN methodMpost L
(hone numberKinput typeMte2t nameMphXnumberL
KbuttonL&ubmitKEbuttonL
KEformL
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
Odie(JCould not connectF J . mys<lXerror())GQ
mys<lXselectXdb(NlibrarysystemN' Zcon)G
ZphXnumber M JZX(,&.RphXnumberSJG
51
Z<uery M mys<lX<uery(N&%!%C. [ *", account 01%"%
phXnumberMJZphXnumberJN)G
while(Zrow M mys<lXfetchXarray(Z<uery))
echoNCour ember )D number is ZrowRmemidSNG
YL
KbrLKbrL
KEbodyL
KEhtmlL
GGMembe1 /-0i,:
KhtmlL
KheadL
KtitleLember !o/inKEtitleL
KEheadL
KbodyL
Kh5LKp styleMNfont>familyFtimesGcolorFpurpleGte2t>ali/nFcenterGfont>
siDeF;:p2GNLember !o/inKEpLKEh5L
Kform actionMNmemlo/in3.phpN methodMN(,&.N ali/nMNcenterNL
Kh3 styleMNte2t>ali/nFcenterNL!o/in )dKinput typeMNte2tN nameMNNameN
valueMNNLKEh3LKbrL
52
Kh3 styleMNte2t>ali/nFcenterNL(asswordKinput typeMNpasswordN
nameMN(asswordN valueMNNLKEh3LKbrL
Kh3 styleMNte2t>ali/nFcenterNLKinput typeMNsubmitN valueMN!o/inNL
Kinput typeMNresetN valueMN"%&%.NKEh3LKEaLKbrL
Ka hrefMNhttpFEElocalhostE!ibraryEmeminfo.htmlN ali/nMNbottomNL1omeKEaL
KEformL
KEbodyL
KEhtmlL
GGP7: *-de 9-1 Membe1 /-0i, 2,d *7e*+ u8e1,2me 2,d :288.-1d:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
die(JCould not connectF J . mys<lXerror())G
mys<lXselectXdb(NlibrarysystemN'Zcon)G
ZName M ZX(,&.RJNameJSG EEmissin/ this is the $ey to transfer the info from one
file to another
Z(assword M ZX(,&.RJ(asswordJSG EE(assword
Zs<lMmys<lX<uery(N&%!%C. [ *", account 01%"% NameMJZNameJ =ND
(asswordMJZ(asswordJN)G
53
Zcount M mys<lXnumXrows(Zs<l)G EE Counts the rows to 3 since only one user can
have the same number or username .
if(Zcount MM 3)
O
sessionXstart()GEE&tartin/ the session to make the pa/e flow from lo/in to lo/out
EEZX&%&&),NRJlo/inJS M trueG pls do not use this since this may not work in 0=(
EE "edirect to admincp
header(J!ocationFmemfront.htmlJ)G
Q
else
echo mys<lXerror()G
die(NCheck the @sername and (asswordN)G
YL
GGMembe1 :20e 29te1 /-0i,:
KhtmlL
KheadL
KtitleLKEtitleL
KEheadL
KbodyL
54
Kh3 styleMNte2t>ali/nFcenterNL0%!C,% ., .1% ,N!)N% !)B"="CKEh3L
KdivL
Kform actionMNbooksXshow.phpN methodMN(,&.NL
Kh3 styleMNte2t>ali/nFcenterNL
Ka hrefMNbooksXshow.phpNLBooks =vailbleKEaL
KEh3L
KEformL
KEdivL
KdivL
Kh3 styleMNte2t>ali/nFcenterNL
Ka hrefMNadvance.htmlNL=dvance Bookin/KEaL
KEh3L
Ka hrefMNlibrary.htmlNLKh3 styleMNte2t>ali/nFri/htNL!o/out..KEaLKEh3L
KEformL
KEdivL
KEbodyL
KEhtmlL
55
GGP7: *-de 9-1 B--+8 2C2i/2b/e:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
Odie(JCould not connectF J . mys<lXerror())GQ
mys<lXselectXdb(NlibrarysystemN' Zcon)G
Zresult M mys<lX<uery(N&%!%C. [ *", addbooks3N)G
echo NKtable borderMJ3JL
KtrL
KthLBooknameKEthL
KthLBookcodeKEthL
KthL.itlenameKEthL
KthL=uthorKEthL
KthLD,=KEthL
KthL(riceKEthL
KthL"acknoKEthL
KthLNo,fBooksKEthL
KthL%ditionKEthL
KEtrLNG
56
while(Zrow M mys<lXfetchXarray(Zresult))
O
echo NKtrLNG
echo NKtdLN . ZrowRJBooknameJS . NKEtdLNG
echo NKtdLN . ZrowRJBookcodeJS . NKEtdLNG
echo NKtdLN . ZrowRJ.itlenameJS . NKEtdLNG
echo NKtdLN . ZrowRJ=uthorJS . NKEtdLNG
echo NKtdLN . ZrowRJD,=JS . NKEtdLNG
echo NKtdLN . ZrowRJ(riceJS . NKEtdLNG
echo NKtdLN . ZrowRJ"acknoJS . NKEtdLNG
echo NKtdLN . ZrowRJNo,fBooksJS . NKEtdLNG
echo NKtdLN . ZrowRJ%ditionJS . NKEtdLNG
echo NKEtrLNG
Q
echo NKEtableLNG
mys<lXclose(Zcon)G
YL
57
GGAdC2,*e B--+i,0:
KhtmlL
KheadL
KtitleL%B%"KEtitleL
KEheadL
Kbody b/colorMNW**%8%3NL
Kform actionMNadvance3.phpN methodMN(,&.NL
Kdiv styleMNmar/inFautoG paddin/F3:p2 7:p2 :p2 7:p2G te2t>ali/nMcenterNL
Kh3L=DA=NC% B,,$)N-KEh3L
KtableL
KtrLKtdLKh3Lember )DKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN)DN
valueMNNELKEtdLKEtrLKEh3L
KtrLKtdLKh3LName KEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN@serXidN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L%mail )DKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN%mailXidN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L=ddress KEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN=ddressN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L(hone NumberKEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMN(honeXNoN valueMNN ELKEtdLKEtrLKEh3L
58
KtrLKtdLKh3LBook NameKEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMNBooknameN valueMNNELKEtdLKEtrLKEh3L
KtrLKtdLKh3L.itle NameKEtdL KtdLKinput typeMNte2tN siDeMN7:N
nameMN.itlenameN valueMNNELKEtdLKEtrLKEh3L
KtrLKtdLKh3L=uthorKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN=uthorN
valueMNN ELKEtdLKEtrLKEh3L
KtrLKtdLKh3L%ditionKEtdL KtdLKinput typeMNte2tN siDeMN7:N nameMN%ditionN
valueMNN ELKEtdLKEtrLKEh3L
KEtableL
Kh3 styleMNte2t>ali/nFcenterNLKinput typeMNsubmitN valueMN&@B).N
styleMNmar/inF;p2 :p2 :p2 56?p2GN EL
KEdivL
KEformL
KEbodyL
KEhtmlL
GGP7: *-de 9-1 AdC2,*e b--+i,0:
KYphp
Zcon M mys<lXconnect(NlocalhostN'NrootN'NN)G
if (PZcon)
Odie(JCould not connectF J . mys<lXerror())GQ
59
E[if (mys<lX<uery(NC"%=.% D=.=B=&% librarysystemN'Zcon))
Oecho NDatabase createdNGQ
else
Oecho N%rror creatin/ databaseF N . mys<lXerror()GQ
[Emys<lXselectXdb(NlibrarysystemN' Zcon)G
Zs<l M Ncreate table advance()D varchar(3;)'@serXid varchar(5:)'%mailXid
varchar(8:)'=ddress varchar(;:)'(honeXNo varchar(5:)'Bookname
varchar(3::)'.itlename varchar(3::)'=uthor varchar(3::)'%dition varchar(7:)')NG
Zs<lMN)N&%". )N.,
advance()D'@serXid'%mailXid'=ddress'(honeXno'Bookname'.itlename'=uthor'%d
ition)
A=!@%&(JZX(,&.R)DSJ'JZX(,&.R@serXidSJ'JZX(,&.R%mailXidSJ'JZX(,&.R=ddres
sSJ'JZX(,&.R(honeXNoSJ'JZX(,&.RBooknameSJ'JZX(,&.R.itlenameSJ'JZX(,&.R=u
thorSJ'JZX(,&.R%ditionSJ)NG
if (Pmys<lX<uery(Zs<l'Zcon))
Odie(J%rrorF J . mys<lXerror())GQ
echo N3 record addedNG
header(J!ocationFthank.htmlJ)G
EEmys<lX<uery(Zs<l'Zcon)G
EEmys<lXclose(Zcon)G
YL
60
GGT72,+ y-u :20e:
KhtmlL
KheadL
KtitleLConfirmation (a/eKEtitleL
KEheadL
KbodyL
Kh3 styleMNte2t>ali/nFcenterNL.he Book has been ,rdered and you will /et the
book within 7 daysKEh3LKbrLKbrL
Kh3 styleMNte2t>ali/nFcenterNL.he Confirmation mail has been sent to your
mailKEh3LKbrLKbrL
Kh3 styleMNte2t>ali/nFcenterNL.hank Cou for usin/ this *acilityKEh3LKbrLKbrL
KEbodyL
KEhtmlL
#( TESTING
.he most common types of testin/ involved in the development process are
\ Black Bo2 .estin/
\ 0hite Bo2 .estin/
\ @nit .estin/
\ &ystem .estin/
\ )nte/ration .estin/
61
#($ REASON FOR CHOOSING TESTING
U,it te8ti,0 is a method by which individual units of source code '
sets of one or more computer pro/ram modules to/ether with associated
controldata' usa/e procedures' and operatin/ procedures' are tested to determine if
they are fit for use.R3S )ntuitively' one can view a unit as the smallest testable part
of an application. )n procedural pro/rammin/ a unit could be an entire module but
is more commonly an individual function or procedure. )n object>oriented
pro/rammin/ a unit is often an entire interface' such as a class' but could be an
individual method. R5S @nit tests are created by pro/rammers or occasionally by
white bo2 testers durin/ the development process.
)deally' each test case is independent from the othersF substitutes like
method stubs' mock objects'R7S fakes and test harnesses can be used to assist
testin/ a module in isolation. @nit tests are typically written and run by software
developers to ensure that code meets its desi/n and behaves as intended.
(SCREEN SHOTS
62
HOME PAGE:
BELCOME PAGE:
63
MEMBERSHIP PAGE:
MENU PAGE:
64
LEN%ING BOOKS PAGE:
RETURN BOOKS PAGE:
65
MEMBERS OF LIBRARY:
LOGIN PAGE:
66
MEMBERHS MENU PAGE:
BOOKS AVAILABLE:
67
A%VANCE BOOKING PAGE:
?( CONCLUSION
68
!ibrary ana/ement (ro has been created keepin/ in mind the needs of
&mall and edium scale libraries. )ts an efficient software that includes all the
basic functionalities like makin/ data entries for new books' newspapers and
ma/aDines' re/isterin/ a new user' editin/ and deletin/ records that are re<uired
for smooth functionin/ of a library. =dditionally the user lo/in and book history
are also stored and can be accessed by the administrator.
)t also facilitates the librarian to create new user /roups and edit their access
levels and functions (like that of the assistants). =part from this the /eneral users
are also /iven the ri/hts to not only keep track of the books that they have issued
and fines due but they too can search for the booksEma/aDinesEnewspapers that
interest them.
@( FUTURE ENHANCEMENT
!ibrary ana/ement (ro is in itself a complete system' thou/h it has a few
limitations but it has a lot of future scope and features that could be added to make
it more widely acceptable. ,ne limitation is that our software is limited to small
and medium scaled libraries. =lso apart from Books' a/aDine and Newspaper no
new cate/ory can be added in the system (or in turn be issued) like CDs etc.
,ne of the major future scope is makin/ our system online. Connectin/
libraries to a common data centre will provide /lobaliDation to the libraries' and
then the user will be able to search books all over the city and nearby areas.
"eviews' ratin/' comparin/ of books and libraries can also be incorporated. .his
would help the user to browse throu/h popular books and make his selection based
on the books ratin/. =lso data obtained from this can be used to discover topics'
/enre and books that the readers are )nterested in readin;( APPEN%ICES
69
;( A::e,diA
;($ HTML
1yperte2t arkup !an/ua/e (1.!) is the main markup lan/ua/e for
displayin/ web pa/es and other information that can be displayed in a web
browser.
1.! is written in the form of 1.! elements consistin/
of ta/s enclosed in an/le brackets (like KhtmlL)' within the web pa/e content.
1.! ta/s most commonly come in pairs like Kh3L and KEh3L' althou/h some
ta/s' known as empty elements' are unpaired' for e2ample Kim/L. .he first ta/ in a
pair is the start ta/' the second ta/ is the end ta/ (they are also called openin/
ta/s and closin/ ta/s). )n between these ta/s web desi/ners can add te2t' ta/s'
comments and other types of te2t>based content.
.he purpose of a web browser is to read 1.! documents and compose
them into visible or audible web pa/es. .he browser does not display the 1.!
ta/s' but uses the ta/s to interpret the content of the pa/e.
1.! elements form the buildin/ blocks of all websites. 1.!
allows ima/es and objects to be embedded and can be used to create interactive
forms. )t provides a means to create structured documents by denotin/
structural semantics for te2t such as headin/s' para/raphs' lists' links' <uotes and
other items. )t can embed scripts in lan/ua/es such as #ava&cript which affect the
behavior of 1.! webpa/es.
0eb browsers can also refer to Cascadin/ &tyle &heets (C&&) to define the
appearance and layout of te2t and other material. .he 07C' maintainer of both the
1.! and the C&& standards' encoura/es the use of C&& over e2plicitly
presentational 1.! markup.
70
;(" CASCA%ING STYLE SHEETS
Cascadin/ &tyle &heets (C&&) is a style sheet lan/ua/e used for describin/
the presentation semantics (the look and formattin/) of a document written in
a markup lan/ua/e. )ts most common application is to style web pa/es written
in 1.! and H1.!' but the lan/ua/e can also be applied to any kind
of H! document' includin/ plain H!' &A- and H@!.
C&& is desi/ned primarily to enable the separation of document content
(written in 1.! or a similar markup lan/ua/e) from document presentation'
includin/ elements such as the layout' colors' and fonts.R3S .his separation can
improve content accessibility' provide more fle2ibility and control in the
specification of presentation characteristics' enable multiple pa/es to share
formattin/' and reduce comple2ity and repetition in the structural content (such as
by allowin/ for tableless web desi/n). C&& can also allow the same markup pa/e
to be presented in different styles for different renderin/ methods' such as on>
screen' in print' by voice (when read out by a speech>based browser or screen
reader) and on Braille>based' tactile devices. )t can also be used to allow the web
pa/e to display differently dependin/ on the screen siDe or device on which it is
bein/ viewed. 0hile the author of a document typically links that document to a
C&& style sheet' readers can use a different style sheet' perhaps one on their own
computer' to override the one the author has specified.
C&& specifies a priority scheme to determine which style rules apply if
more than one rule matches a/ainst a particular element. )n this so>called cascade'
priorities or wei/hts are calculated and assi/ned to rules' so that the results are
predictable.
71
;(= JAVA SCRIPT
#ava&cript (sometimes abbreviated #&) is a prototype>based scriptin/
lan/ua/e that is dynamic' weakly typed and has first>class functions. )t is amulti>
paradi/m lan/ua/e'supportin/ object>oriented' functionalR3SR?S pro/rammin/
styles.
#ava&cript was formaliDed in the %C=&cript lan/ua/e standard and is
primarily used in the form of client>side #ava&cript' implemented as part of a0eb
browser in order to /ive enhanced user interfaces and dynamic websites. .his
enables pro/rammatic access to computational objects within a host environment.
#ava&criptJs use in applications outside 0eb pa/es]for e2ample
in (D* documents' site>specific browsers' and desktop wid/ets]is also
si/nificant. Newer and faster #ava&cript As and frameworks built upon them
(notably Node.js) have also increased the popularity of #ava&cript for server>side
web applications.
#ava&cript uses synta2 influenced by that of C. #ava&cript copies many
names and namin/ conventions from #ava' but the two lan/ua/es are otherwise
unrelated and have very different semantics. .he key desi/n principles within
#ava&cript are taken from the &elf and &cheme pro/rammin/ lan/ua/es.
#ava&cript has become one of the most popular pro/rammin/ lan/ua/es on
the web. )nitially' however' many professional pro/rammers deni/rated the
lan/ua/e because its tar/et audience was web authors and other such NamateursN'
amon/ other reasons. .he advent of =ja2 returned #ava&cript to the spotli/ht and
brou/ht more professional pro/rammin/ attention. .he result was a proliferation of
comprehensive frameworks and libraries' improved #ava&cript pro/rammin/
practices' and increased usa/e of #ava&cript outside of web browsers' as seen by
the proliferation ofserver>side #ava&cript platforms.
72
;(< PHP
(1( is a /eneral>purpose server>side scriptin/ lan/ua/e ori/inally
desi/ned for 0eb development to produce dynamic 0eb pa/es. )t is one of the
first developed server>side scriptin/ lan/ua/es to be embedded into
an 1.! source document rather than callin/ an e2ternal file to process data. .he
code is interpreted by a 0eb server with a (1( processor module which /enerates
the resultin/ 0eb pa/e. )t also has evolved to include a command>line
interface capability and can be used in standalone /raphical applications. (1( can
be deployed on most 0eb servers and also as a standaloneshell on almost
every operatin/ system and platform free of char/e. = competitor
to icrosoftJs =ctive &erver (a/es (=&() server>side script en/ine .
;(# MYSDL
y&B! Ny &>B>!N' officially' but also called Ema si kw^lE Ny
&e<uelN) is the worldJs most used open sourcerelational database mana/ement
system ("DB&) that runs as a server providin/ multi>user access to a number of
databases.
)t is named after co>founder ichael 0ideniusJ dau/hter' y.
.he &B! phrase stands for &tructured Buery !an/ua/e.
.he y&B! development project has made its source code available under
the terms of the -N@ -eneral (ublic !icense' as well as under a variety
of proprietary a/reements. y&B! was owned and sponsored by a sin/le for>
profit firm' the &wedish company y&B! =B' now owned by ,racle Corporation.
y&B! is a popular choice of database for use in web applications' and is a
central component of the widely used !=( open source web application
software stack]!=( is an acronym for N!inu2' =pache'
73
y&B!' (erlE(1(E(ythonN. *ree>software>open source projects that re<uire a full>
featured database mana/ement system often use y&B!.
*or commercial use' several paid editions are available' and offer additional
functionality. =pplications which use y&B! databases
includeF.C(,7' #oomla' 0ord(ress' phpBB' yBB' Drupal and other software
built on the !=( software stack. y&B! is also used in many hi/h>profile'
lar/e>scale 0orld0ide0eb products'includin/ 0ikipedia' -oo/le (thou/h
notforsearches)' *acebook ' .witter'*lickr' Nokia.com
$!( Bib/i-012:7y
000.w7schools .com
000.phpeasysteps.com
httpFEEmsdn.microsoft.comEen>usElibraryEDwdw3kwh(vMvs.6:).asp2
httpFEEmsdn.microsoft.comEen>usElibraryEdcs7d2he(vMvs.6:).asp2
httpFEEmsdn.microsoft.comEen>usElibraryEk8cbh8dh(vMvs.6:).asp2
httpFEEmsdn.microsoft.comEen>usElibraryEms36?33:(vMvs.6:).asp2
httpFEEen.wikipedia.or/EwikiE!istXofX1.!Xeditors
74