Anda di halaman 1dari 43

MEERUT INSTITUTE OF ENGINEERING & TECHNOLOGY

PROJECT REPORT FOR


ONLINE LIBRARY MANAGEMENT SYSTEM

SUBMITTED BY: Naveen Yadav (0906814018) Pravesh Sharma (0906814028)

SUBMITTED TO:

CONTENTS

Introduction System Study System Analyses System Design System Testing Future Application Coding Interfaces

INTRODUCTION
Objective
The purpose of project documention is to describe the external behavior of the Online Library System. It defines and describes the operations, interfaces, performance, and quality assurance requirements of the Online Library System. The document also describes the nonfunctional requirements such as the user interfaces. It also describes the design constraints that are to be considered when the system is to be designed, and other factors necessary to provide a complete and comprehensive description of the requirements for the software. It captures the complete software requirements for the system, or a portion of the system. Requirements described in this document are derived from the Vision Document prepared for the Online Library System.

Scope
Project documentation captures all the requirements in a single document. The Online Library System that is to be developed provides the members of the Library and employees of the library with books information, online blocking of books and many other facilities. The Online Library System is supposed to have the following features. The product provides the members with online blocking of books capabilities and the Online Library System is up and running all day. The system provides logon facility to the users. The system provides the members with the option to check their account and/or change their options like password of the account whenever needed all through the day during the library hours. The system allows the members to block the books 24 hours a day and all the through the semester. The system lets the library staff to check which all members have blocked the books and whether they can borrow any more books or not. The system allows the Librarian to create the books catalog, add/delete books and maintain the books catalog. The system updates the billing system as and when the member borrows or returns a book. The book catalog is automated and the decision of offering the book based on the category of the book is automatically decided.

Overview
The Project documentation will provide a detailed description of the Online Library System. This document will provide the outline of the requirements, overview of the characteristics and constraints of the system.
1.

This section of the documentation will provide the general factors that affect the product and its requirements. It provides the background for those requirements. The items such as product perspective, product function, user characteristics, constraints, assumptions and dependencies and requirements subsets are described in this section. This section of documentation contains all the software requirements mentioned in section 2 in detail sufficient enough to enable designers to design the system to satisfy the requirements and testers to test if the system satisfies those requirements.

2.

System Study
This show the study of our system that is in which faces our project or system works. It follows the SDLC phases. To understand system development, we need to recognize that a candidate has a life cycle. System analysis and design are keyed to the system life cycle.

Recognition of need
One must know what the problem is before it can be solved. It help to improve an information system.

Analysis
Analysis is a detailed study of the various operation performed by system and their relationship within and outside the system. It requires special skill and sensitivity to the subject being interviewed. One this step complete, the next step is to decide how the problem might be solved.

Feasible study
It is broadly divided into three parts as Economic Feasibility Technical Feasibility Operational Feasibility

System Analysis
Entity Relationship Diagram
It specifies the data objects that are input and output form of a system. The attribute that define the properties of object. ERD symbol are as:

Entity

Attribute

Data Flow

Relationship Key Attribute

Book Id

dd
Book

Book author Book name

Ha s Taggi ng Password

Name_of_librar y

Admin

Feedin g Entry

Library management System

Admin Id Viewin g Book Record User_Id/MembershipId

User

Purchasin g Book

Issuing Searching Book Book Password

0-Level DFD:
User/Guest

Online Library Management System Admin

Confirmation Page

1-Level DFD:
Book Issue User/guest Book Purchase P Book Search

Login

Admin

Confirmation Page Page Book Return

Requirement Specification
Hardware Interface:
The computer as a machine and all other equipment associated with it constitute hardware and the hardware requirement as follows: . Processor- p4/Celeron/dual-core . Hard disk- 20GB . RAM -1GB

Software Interface:
There should be minimum requirement as follows . Window- 2000/xp/vista/7 . Application software- JDK 1.4/1.5/RAD v7.0 DB2 Express-c9.5/WEBSPHERE SERVER v6.1

System Design
Software design sits at the technical kernel of software engineering process and is applied regardless of the development paradigm and area of application. This section describes the design of the development from various perspectives: Architectural design

System flow design

Database design

System Testing
Software Testing Fundamentals:
Testing presents an interesting anomaly for the software engineering. Earlier in the software process, the engineer attempts build from an abstract concept to a tangible implementation.

Testing Objective:
A good test case is that which have great probability of finding undiscovered error. A successful test is one that uncovers an as undiscovered error.

Software Testing:
System Testing Recovery Testing Functional Testing

Future Application
This package can be only developed successfully if the developer has a widespread understanding about the existing problem. The online library system help to buy, read and home delivery services of book at your home. Therefore there is more scope of online library system in upcoming days.

Advantages:
It is easy to use. Better manageability of books.

Facilitates easy retrieval of complex records of books.

Support and enhances an efficient working of the library.

Coding
VIEW BOOK CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="java.sql.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@taglib uri="http://www.ibm.com/siteedit/sitelib" prefix="siteedit"%> <html> <head> <title>view</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Rational Application Developer"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <link type="text/css" href="menu.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="menu.js"></script> </head> <body bgcolor="#e2fefd"><br> <H1 align="center"><font color="white" face="Times New Roman">VIEW ALL BOOK</font></H1><br> <p><br> </p><div id="menu"><ul class="menu"> <li><a href="login.jsp"><span>HOME</span></a></li> <li><a href="purchase1.jsp"><span>PURCHASE BOOK</span></a></li> <li><a href="view.jsp"><span>VIEW</span></a></li> <li><a href="#"><span>FINE RECORD</span></a></li> </ul></div>

<div id="copyright"> <a href="http://apycom.com/"></a></div> <%try{ Class.forName("com.ibm.db2.jcc.DB2Driver"); Connection Conn=DriverManager.getConnection("jdbc:db2://localhost:50000/LIBRARY"," king","123"); PreparedStatement Stmt=Conn.prepareStatement("SELECT * FROM KING.NEW_BOOK_ENTRY"); Stmt.executeQuery(); ResultSet rs=Stmt.getResultSet(); out.write("<table border=1 align=center><tr><th>BOOK_NAME</th><th>BOOK_ID</th><th>AUTHER_NAME</th> <th>BOOK_PRICE</th><th>COURSE</th><th>PUBLISHER</th></tr>"); while(rs.next()) { String s1=rs.getString(1); String s2=rs.getString(2); String s3=rs.getString(3); String s4=rs.getString(4); String s5=rs.getString(5); String s6=rs.getString(6); out.write("<tr>"); out.write("<td>"+s1+"</td>"); out.write("<td>"+s2+"</td>"); out.write("<td>"+s3+"</td>"); out.write("<td>"+s4+"</td>"); out.write("<td>"+s5+"</td>"); out.write("<td>"+s6+"</td>"); out.write("</tr>"); } rs.close();Stmt.close();Conn.close(); } catch(Exception e) {} %> </body> </html>

NEW BOOK ENTRY CODE


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="java.sql.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@taglib uri="http://www.ibm.com/siteedit/sitelib" prefix="siteedit"%> <html> <head> <title>new</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <link rel="stylesheet" type="text/css" href="theme/horizontalmenu3.css"> <link type="text/css" href="menu.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="menu.js"></script> <meta name="GENERATOR" content="Rational Application Developer"> </head> <body bgcolor="#e2fefd"> <form method="post"> <BR><H1 align="center"><font color="white" face="Times New Roman">NEW BOOK ENTRY</font></H1><br><BR> <div id="menu"><ul class="menu"> <li><a href="new.jsp"><span>NEW</span></a></li> <li><a href="book issue.jsp"><span>BOOK ISSUE</span></a></li>

<li><a <li><a <li><a <li><a <li><a

href="book return.jsp"><span>BOOK RETURN</span></a></li> href="purchase.jsp"><span>PURCHASE</span></a></li> href="membership.jsp"><span>MEMBERSHIP</span></a></li> href="#"><span>FINE RECORD</span></a></li> href="view.jsp"><span>VIEW</span></a></li>

</ul></div> <div id="copyright"> <a href="http://apycom.com/"></a></div> <table border="0" width="964"> <tbody> <tr> <td width="290"> <p style='color: purple; font-family: "Times New Roman"; font-size: 14pt'>Book Name&nbsp;&nbsp;&nbsp; &nbsp;<input type="text" name="text" size="20"></p> <p style='color: purple; font-family: "Times New Roman"; font-size: 14pt; oocolor: purple'>Book Id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text1" size="20"></p> <p style='color: purple; font-family: "Times New Roman"; font-size: 14pt; oocolor: purple'>Auther Name&nbsp;&nbsp;&nbsp;<input type="text" name="text3" size="20"></p> <p style='color: purple; font-family: "Times New Roman"; font-size: 14pt; oocolor: purple'>Book Price&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="text4" size="20"></p> <p style='color: purple; font-family: "Times New Roman"; font-size: 14pt; oocolor: purple'>Course &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <select name="menu" > <option>MBA</option> <option>MCA</option> <option>B.Tech</option> </select></p> <p style='color: purple; font-family: "Times New Roman"; font-size: 14pt; oocolor: purple'>Publisher&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="text5" size="20"></p> <p align="center" style='color: purple; font-family: "Times New Roman"; font-size: 14pt'><input type="submit" name="submit" value="SUBMIT" onClick="func(this.form)"

style='color: white; font-family: "Times New Roman"; background-repeat: repeat-x; background-color: #737cf9; fontsize: 14pt; border-width: medium'></p> <p style='color: purple; font-family: "Times New Roman"; font-size: 14pt; oocolor: purple'></p> </td> <td width="661"><img border="0" src="images/photo5.JPG" width="660" height="367"></td> </tr> </tbody> </table> </form> <% try{ Class.forName("com.ibm.db2.jcc.DB2Driver"); Connection Conn=DriverManager.getConnection("jdbc:db2://localhost:50000/LIBRARY"," king","123"); String text1=request.getParameter("text"); String text2=request.getParameter("text1"); String text3=request.getParameter("text3"); String text4=request.getParameter("text4"); String text5=request.getParameter("menu"); String text6=request.getParameter("text5"); out.println(text4); PreparedStatement Stmt=Conn.prepareStatement("INSERT INTO KING.NEW_BOOK_ENTRY VALUES('"+text1+"','"+text2+"','"+text3+"','"+text4+"','"+text5+"','"+t ext6+"')"); Stmt.executeUpdate(); Stmt.close();Conn.close(); out.println("hello"); } catch(Exception e) {out.println(e.getMessage());} %> </body> </html>

MEMBERSHIP CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="java.sql.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@taglib uri="http://www.ibm.com/siteedit/sitelib" prefix="siteedit"%> <html> <head> <title>membership</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <link rel="stylesheet" type="text/css" href="theme/horizontalmenu3.css"> <link type="text/css" href="menu.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="menu.js"></script> <meta name="GENERATOR" content="Rational Application Developer"> </head> <body bgcolor="#e2fefd"><BR> <BR><H1 align="center"><font color="white" face="Times New Roman">MEMBERSHIP </font></H1><BR> <div id="menu"><ul class="menu"> <li><a href="new.jsp"><span>NEW</span></a></li> <li><a href="book issue.jsp"><span>BOOK ISSUE</span></a></li> <li><a href="book return.jsp"><span>BOOK RETURN</span></a></li> <li><a href="purchase.jsp"><span>PURCHASE</span></a></li> <li><a href="membership.jsp"><span>MEMBERSHIP</span></a></li> <li><a href="#"><span>FINE RECORD</span></a></li> <li><a href="view.jsp"><span>VIEW</span></a></li> </ul></div> <div id="copyright"> <a href="http://apycom.com/"></a></div>

<table border="0" width="959" height="433"> <tbody> <tr> <td height="35" style='color: purple; font-family: "Times New Roman"; font-size: 14pt' width="281"><b></b> <form>Student Name&nbsp;&nbsp;&nbsp;<input type="text" name="text21" size="20"><br> <br> Membership Id <input type="text" name="text22" size="20"> <br> <br> E_Mail Id &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text23" size="20"> <br> <br> Phone No.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text24" size="20"> <br> <br> Address<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<textarea rows="2" cols="20" name="area"></textarea> <br> <br> Course&nbsp;&nbsp;<select name="menu2"> <option>MBA</option> <option>MCA</option> <option>B.Tech</option> </select> <p><label> Male &nbsp;&nbsp;&nbsp;<input type="radio" name="RadioGroup1" value="Male"></label> <br> <label> Female <input type="radio" name="RadioGroup1" value="Female"> </label> <br> </p> <p><label> Student<input type="radio" name="RadioGroup2" value="Student"></label></p> <br> <label> Other &nbsp;&nbsp;<input type="radio" name="RadioGroup2" value="Other"> </label> <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <p align="center" style='color: purple; font-family: "Times New Roman"; font-size: 14pt'><input type="submit" name="submit" value="SUBMIT" style='color: white; font-family: "Times New Roman"; background-repeat: repeat-x; background-color: #737cf9; fontsize: 14pt; border-width: medium'></p> </form>

<hr> </td> <td height="35" width="674"><img border="0" src="images\hand.62153201_std.gif" width="670" height="546"></td> </tr> </tbody> </table> <% try{ Class.forName("com.ibm.db2.jcc.DB2Driver"); Connection Conn=DriverManager.getConnection("jdbc:db2://localhost:50000/LIBRARY"," king","123"); String text1=request.getParameter("text21"); String text2=request.getParameter("text22"); String text3=request.getParameter("text23"); String text4=request.getParameter("text24"); String text5=request.getParameter("area"); String text6=request.getParameter("menu2"); String text7=request.getParameter("RadioGroup1"); String text8=request.getParameter("RadioGroup2"); PreparedStatement Stmt=Conn.prepareStatement("INSERT INTO KING.MEMBERSHIP VALUES('"+text1+"','"+text2+"','"+text3+"','"+text4+"','"+text5+"','"+t ext6+"','"+text7+"','"+text8+"')"); Stmt.executeUpdate(); Stmt.close();Conn.close(); out.println("hello"); } catch(Exception e) {out.println(e.toString());} %> </body> </html>

GUEST CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@taglib uri="http://www.ibm.com/siteedit/sitelib" prefix="siteedit"%> <html> <head> <title>detail</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Rational Application Developer"> <link rel="stylesheet" type="text/css" href="theme/horizontalmenu3.css"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <link type="text/css" href="menu.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="menu.js"></script> </head> <body bgcolor="#e2fefd"> <BR><BR><H1 align="center"><font color="white" face="Times New Roman">WELCOME GUEST</font></H1><BR> <div id="menu"><ul class="menu"> <li><a href="login.jsp"><span>HOME</span></a></li> <li><a href="purchase1.jsp"><span>PURCHASE BOOK</span></a></li> <li><a href="view.jsp"><span>VIEW</span></a></li> <li><a href="#"><span>FINE RECORD</span></a></li> </ul></div> <div id="copyright"> <a href="http://apycom.com/"></a></div>

<img border="0" src="images/Library.JPG" width="1223" height="388"> </body> </html>

ADMINISTRATOR CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@taglib uri="http://www.ibm.com/siteedit/sitelib" prefix="siteedit"%> <html> <head> <title>detail</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Rational Application Developer"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <link rel="stylesheet" type="text/css" href="theme/horizontalmenu3.css"> <link type="text/css" href="menu.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="menu.js"></script> </head> <body bgcolor="#e2fefd"> <BR><BR><H1 align="center"><font color="white" face="Times New Roman">WELCOME ADMINISTRATOR</font></H1><BR> <div id="menu"><ul class="menu"> <li><a href="login.jsp"><span>HOME</span></a></li> <li><a href="new.jsp"><span>NEW</span></a></li> <li><a href="book issue.jsp"><span>BOOK ISSUE</span></a></li> <li><a href="book return.jsp"><span>BOOK RETURN</span></a></li> <li><a href="purchase.jsp"><span>PURCHASE</span></a></li> <li><a href="membership.jsp"><span>MEMBERSHIP</span></a></li> <li><a href="#"><span>FINE RECORD</span></a></li> <li><a href="view.jsp"><span>VIEW</span></a></li> </ul></div>

<div id="copyright"> <a href="http://apycom.com/"></a></div> <img border="0" src="images/Library.JPG" width="1217" height="388"> </body> </html>

BOOK ISSUE CODE


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="java.sql.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@taglib uri="http://www.ibm.com/siteedit/sitelib" prefix="siteedit"%> <html> <head> <title>book issue</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <link rel="stylesheet" type="text/css" href="theme/horizontalmenu3.css"> <link type="text/css" href="menu.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="menu.js"></script> <meta name="GENERATOR" content="Rational Application Developer"> </head> <body bgcolor="#e2fefd"> <BR><H1 align="center"><font color="white" face="Times New Roman">BOOK ISSUE </font></H1><br> <BR><div id="menu"><ul class="menu"> <li><a href="new.jsp"><span>NEW</span></a></li> <li><a href="book issue.jsp"><span>BOOK ISSUE</span></a></li> <li><a href="book return.jsp"><span>BOOK RETURN</span></a></li> <li><a href="purchase.jsp"><span>PURCHASE</span></a></li> <li><a href="membership.jsp"><span>MEMBERSHIP</span></a></li> <li><a href="#"><span>FINE RECORD</span></a></li> <li><a href="view.jsp"><span>VIEW</span></a></li> </ul></div> <div id="copyright"> <a href="http://apycom.com/"></a></div>

<br> <table border="0" width="973"> <tbody> <tr> <td style='color: purple; font-family: "Times New Roman"; font-size: 14pt' width="294" height="525"><form method="post">Book Name&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text11" size="20"><br> <br> Book Id &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text12" size="20"> <br> <br> Course&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="text13" size="20"><br> <br> Student Name&nbsp;<input type="text" name="text14" size="20"><br> <br> Student Id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text17" size="20"> <br> <br> Issue Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text15" size="20"><br> <br> Due Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text16" size="20"> <br> <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp; <p align="center" style='color: purple; font-family: "Times New Roman"; font-size: 14pt'><input type="submit" name="submit" value="SUBMIT" style='color: white; font-family: "Times New Roman"; background-repeat: repeat-x; background-color: #737cf9; fontsize: 14pt; border-width: medium'></p> <br> <br> <br> </form></td> <td width="679" height="525"><img border="0" src="images/5931979.jpg" width="684" height="614"></td> </tr> </tbody>

</table> <table border="1" width="965" height="120" style="background-color: #ff8080"> <tbody> <tr> <td style='color: blue; font-family: "Times New Roman"; font-size: 14pt' height="37" align="center" width="171">Book Name</td> <td style='color: blue; font-family: "Times New Roman"; font-size: 14pt' height="37" align="center" width="161">Book Id</td> <td style='color: blue; font-family: "Times New Roman"; font-size: 14pt' height="37" align="center" width="183">Course</td> <td style='color: blue; font-family: "Times New Roman"; font-size: 14pt' height="37" align="center" width="202">Issue Date</td> <td style='color: blue; font-family: "Times New Roman"; font-size: 14pt' height="37" align="center" width="240">Due date</td> </tr> <tr> <td height="83" width="171"></td> <td height="83" width="161"></td> <td style="background-color: #ff8080" height="83" width="183"></td> <td height="83" width="202"></td> <td height="83" width="240"></td> </tr> </tbody> </table> <% try{ Class.forName("com.ibm.db2.jcc.DB2Driver"); Connection Conn=DriverManager.getConnection("jdbc:db2://localhost:50000/LIBRARY"," king","123"); String text1=request.getParameter("text11"); String text2=request.getParameter("text12"); String text3=request.getParameter("text13"); String text4=request.getParameter("text14"); String text5=request.getParameter("text17"); String text6=request.getParameter("text15"); String text7=request.getParameter("text16");

PreparedStatement Stmt=Conn.prepareStatement("INSERT INTO KING.BOOK_ISSUE VALUES('"+text1+"','"+text2+"','"+text3+"','"+text4+"','"+text5+"','"+t ext6+"','"+text7+"')"); Stmt.executeUpdate(); Stmt.close();Conn.close(); out.println("hello"); } catch(Exception e) {out.println(e.toString());} %> </body> </html>

LOGIN CODE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="java.sql.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <html> <head> <title>login</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <meta name="GENERATOR" content="Rational Application Developer"> </head> <body bgcolor="#e2fefd"><BR><BR><H1 align="center"><font color="white" face="Times New Roman">LOGIN FRAME</font></H1><br> <br> <br> <br> <br><br><br><br> <form method="post"> <p align="center" style='color: purple; font-family: "Times New Roman"; font-size: 14pt'>USER ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text101" size="20"></p> <p align="center"></p> <p align="center" style='color: purple; font-family: "Times New Roman"; font-size: 14pt'>PASSWORD&nbsp;&nbsp;<input type="password" name="text102" size="20"></p> <p align="center" style='color: purple; font-family: "Times New Roman"; font-size: 14pt'><input type="submit" name="submit" value="SUBMIT" style='color: white; font-family: "Times New Roman"; background-repeat: repeat-x; background-color: #737cf9; font-size: 14pt; border-width: medium'></p> </form> <%try{

Class.forName("com.ibm.db2.jcc.DB2Driver"); Connection Conn=DriverManager.getConnection("jdbc:db2://localhost:50000/LIBRARY"," king","123"); String username=request.getParameter("text101"); String password=request.getParameter("text102"); PreparedStatement Stmt=Conn.prepareStatement("SELECT * FROM KING.LOGIN WHERE LOGIN_ID='"+username+"'AND PASSWORD='"+password+"'"); Stmt.executeQuery(); ResultSet rs=Stmt.getResultSet(); String username1=null; String password1=null; while(rs.next()) { username1=rs.getString(1); out.println(username1); password1=rs.getString(2); out.println(password1); } if(username1.equals("admin")&& password1.equals("*123#")) { response.sendRedirect("detail.jsp"); } else if(username1.equals("guest")&& password1.equals("test")) { response.sendRedirect("guest.jsp"); } else { out.println("Please check your voter name and voter id..."); } rs.close();Stmt.close();Conn.close(); } catch(Exception e) {} %> </body> </html>

PURCHASE BOOK CODE


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <html> <head> <title>puchase</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <link rel="stylesheet" type="text/css" href="theme/horizontalmenu3.css"> <link type="text/css" href="menu.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="menu.js"></script> <meta name="GENERATOR" content="Rational Application Developer"> </head> <body bgcolor="#e2fefd"><BR> <BR><H1 align="center"><font color="white" face="Times New Roman">PURCHASE BOOK</font></H1><br> <div id="menu"><ul class="menu"> <li><a href="new.jsp"><span>NEW</span></a></li> <li><a href="book issue.jsp"><span>BOOK ISSUE</span></a></li> <li><a href="book return.jsp"><span>BOOK RETURN</span></a></li> <li><a href="purchase.jsp"><span>PURCHASE</span></a></li> <li><a href="membership.jsp"><span>MEMBERSHIP</span></a></li> <li><a href="#"><span>FINE RECORD</span></a></li> <li><a href="view.jsp"><span>VIEW</span></a></li> </ul></div> <div id="copyright"> <a href="http://apycom.com/"></a></div> <table border="0" width="958" height="48"> <tbody> <tr> <td

Roman"; font-size: 14pt'

style='color: purple; font-family: "Times New

width="289"><form>Book Name&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="text51" size="20"><br> <br> Book Id &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text52" size="20"><br> <br> Publisher &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text53" size="20"><br> <br> Price/Book &nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text54" size="20"><br> <br> No. of Book&nbsp;&nbsp; <input type="text" name="text55" size="20"><br> <br> Date

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;<input type="text" name="text56" size="20"><br> <br> <br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <p align="center" style='color: purple; font-family: "Times New Roman"; font-size: 14pt'><input type="submit" name="submit" value="SUBMIT" style='color: white; font-family: "Times New Roman"; background-repeat: repeat-x; background-color: #737cf9; fontsize: 14pt; border-width: medium'></p> </form></td> <td width="668"><img border="0" src="images/2125896.jpg" width="664" height="379"></td> </tr> </tbody> </table> </body> </html>

PURCHASE1 BOOK CODE


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="java.sql.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <html> <head> <title>puchase</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link rel="stylesheet" type="text/css" href="LIN.CSS"> <link rel="stylesheet" type="text/css" href="theme/horizontalmenu3.css"> <link type="text/css" href="menu.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="menu.js"></script> <meta name="GENERATOR" content="Rational Application Developer"> </head> <body bgcolor="#e2fefd"><BR> <BR><H1 align="center"><font color="white" face="Times New Roman">PURCHASE BOOK</font></H1><br> <div id="menu"><ul class="menu"> <li><a href="login.jsp"><span>HOME</span></a></li> <li><a href="#"><span>PURCHASE BOOK</span></a></li> <li><a href="view.jsp"><span>VIEW</span></a></li> <li><a href="#"><span>FINE RECORD</span></a></li> </ul></div> <div id="copyright"> <a href="http://apycom.com/"></a></div>

<table border="0" width="958" height="48"> <tbody> <tr> <td style='color: purple; font-family: "Times New Roman"; font-size: 14pt' width="289"><form method="post">Book Name&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="text51" size="20"><br> <br> Book Id &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text52" size="20"><br> <br> Publisher &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text53" size="20"><br> <br> E_mail&nbsp;Id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text54" size="20"><br> <br> No. of Book&nbsp;&nbsp; <input type="text" name="text55" size="20"><br> <br> Date &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;<input type="text" name="text56" size="20"><br> <br> Student Name <input type="text" name="text57" size="20"> <br> <br> Phone No.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="text58" size="20"> <br> <br> Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<textarea rows="2" cols="20" name="textarea1"></textarea> <br> <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="submit" name="submit" value="SUBMIT" style='color: white; font-family: "Times New Roman"; background-repeat: repeat-x; background-color: #737cf9; fontsize: 14pt; border-width: medium'></form></td> <td width="668"><img border="0" src="images/2125896.jpg" width="664"

height="524"></td> </tr> </tbody> </table> <% try{ Class.forName("com.ibm.db2.jcc.DB2Driver"); Connection Conn=DriverManager.getConnection("jdbc:db2://localhost:50000/LIBRARY"," king","123"); String text1=request.getParameter("text51"); String text2=request.getParameter("text52"); String text3=request.getParameter("text53"); String text4=request.getParameter("text54"); String text5=request.getParameter("text55"); String text6=request.getParameter("text56"); String text7=request.getParameter("text57"); String text8=request.getParameter("text58"); String text9=request.getParameter("textarea1");

PreparedStatement Stmt=Conn.prepareStatement("INSERT INTO KING.PURCHASE1 VALUES('"+text1+"','"+text2+"','"+text3+"','"+text4+"','"+text5+"','"+t ext6+"','"+text7+"','"+text8+"','"+text9+"')"); Stmt.executeUpdate(); Stmt.close();Conn.close(); out.println("hello"); } catch(Exception e) {out.println(e.toString());} %> </body> </html>

Anda mungkin juga menyukai