Professional Documents
Culture Documents
Submitted to:SANJEEV GUPTA: Submitted by:MOHITA MOHINDROO
Submitted to:SANJEEV GUPTA: Submitted by:MOHITA MOHINDROO
Submitted to:SANJEEV GUPTA: Submitted by:MOHITA MOHINDROO
-Mohita Mohindroo
Summary
Team size :1
INTRODUCTION
Purpose
Interface :
The software provides good graphical interface for the
front end of the database and a good informative interface
for the rear end.
Hardware Interface :-
Software Requirements
Performance Requirements :-
Future Developments :-
multiple user interface
support for large database
Apache Tomcat Server
Objectives Of Database:
Controlled Redundancy
Data Integration
Data Integrity
It means storing all the data. This leads to more
consistency, less redundancy and reduces direct access
storage requirement.
Data Independence
Newuser
This is the new user registeration form.user have to fill it
up because without it,the processing of the software
cannot be judged.
Newuserv
This is the backend form for newuser,which connects the
form with the database(yellowpages).the values entered at
the time of registeration are now added to the
database.next the user have to click on the okay button
after verifying the values he had entered.The page then
goes to the LOGIN screen.
Login
The login screen asks the Userid and password with the for
the authentication
CHKLOGIN
The chklogin frame verifies the userid and password from
the database and if it is verified,it opens the homepage.and
the controls goes to index file.
INDEX
The index file checks the session for the user,and displays
the contents of the homepage by referring the control to
advsdisp frame.
ADVSDISP
The advsdisp frame gets the advertisement id and name
from the database ,checks the content and display it on the
screen.
SHOWSUB
The showsub frame displays the sub contents of the
homepage that is the title of of sub-category choosen.
SHOWADV
This frame displays the details and information of the
subcategory choosen
Source code
Header
<html>
<head>
<title>Untitled Document</title>
<link href="c.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
background-color: #FFFF01;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body>
<div class="whole">
<div class="new"><img src="top.jpg" border="0"
usemap="#Map" />
<map name="Map" id="Map">
<area shape=rect coords=269,26,467,145
href=newuser.jsp />");
<area shape=rect coords=531,12,769,137
href=login.jsp />");
}
%>
</map>
</div>
<div class="middle"><img src="mid.jpg"
width="995" height="389" /></div>
<div class="bot"></div>
</div>
</body>
</html>
Headers.jsp
<body background=mid.jpg>
<br><h2 align=right><a href=logoff.jsp>logoff</a>
</h4>
</body>
Index.jsp
%>
Login.jsp
<body background="mid.jpg"
<h1 class="new"><span class="new">Login Screen
</span></h1>
<span class="new"><b><font color=red> <i> <span
class="mn">UserId and Password is Case
Sensitive</span></i></font></b></span><b><font
color=red><i><span class="mn"></span><br>
</i>
</font></b>
</center>
<form align="right" cname=myform method="post"
action="chklogin.jsp">
<table width="601" height="244" border=1
align=center cellpadding="1" cellspacing="2"
bgcolor="#ffffff">
<tr>
<td width="237" height="74" align="right"> <span
class="style6"><font color="#FFFF00">
UserId:</font></span>
<td width="218"><input type=text name=uid
maxlength=50>
<tr>
<td height="94" align="right"><p><font
color="#FFFF00"><b><span class="style2
style6">P</span></b><span class="style4
style6">assword </span><span
class="style4">:</span></font> </p>
<html>
<head> <title> New User </title>
</head>
<body background="mid.jpg">
<center>
<h2><font color="#339900" size="+3" face="Verdana,
Arial, Helvetica, sans-serif">New User Registeration
Form</font></h2>
</h1></center>
<tr>
<td height="23"> Gender: <td height="23">
<input type="radio" name="sex" value="M"
checked> Male
<input type="radio" name="sex" value="F">
Female
<tr>
<td height="25">Date of Birth:<td height="25"><select
name="date1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="month1">
<option value="jan">January</option>
<option value="feb">February</option>
<option value="march">March</option>
<option value="april">April</option>
<option value="may">May</option>
<option value="june">June</option>
<option value="july">July</option>
<option value="aug">August</option>
<option value="sept">September</option>
<option value="oct">October</option>
<option value="nov">November</option>
<option value="dec">December</option>
</select>
<select name="year1">
<option value="1900">1990</option>
<option value="1901">1991</option>
<option value="1900">1992</option>
<option value="1900">1993</option>
<option value="1900">1994</option>
<option value="1900">1995</option>
<option value="1900">1996</option>
<option value="1900">1997</option>
<option value="1900">1998</option>
<option value="1900">1999</option>
<option value="1900">2000</option>
<option value="1900">2001</option>
<option value="1900">2002</option>
<option value="1900">2003</option>
<option value="1900">2004</option>
<option value="1900">2005</option>
<option value="1900">2006</option>
<option value="1900">2007</option>
<option value="1900">2008</option>
<option value="1900">2009</option>
<option value="1900">2010</option>
</select>
<tr>
<td height="23"> Email : <td height="23">
<input type="text" name="email" size=40
maxlength=40>
<tr>
<td height="23" colspan="2" align="center"
valign="bottom">
<input type="submit" name="submit"
value="Submit">
<input type="reset" name="reset" value="Clear
Form">
</table>
</form>
</body>
</html>
NEWUSERV
try
{
String sql = "Insert into newuser
(fname,lname,uid,pass,sex,date1,month1,year1,email)
values('"+ request.getParameter("firstname")+"','"+
request.getParameter("lastname") + "','" +
request.getParameter("uid") + "','"+
request.getParameter("pass") + "','" +
request.getParameter("sex")
+"','"+request.getParameter("date1") + "','"
+request.getParameter("month1") + "','"
+request.getParameter("year1") + "','"
+request.getParameter("email")+"');";
out.println( sql) ;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:YellowPages");
Statement stmt = con.createStatement();
stmt.executeUpdate( sql ) ;
stmt.close();
con.close();
}
catch(Exception e)
{
out.println(e);
}
SHOWADV
<%@ page import="java.sql.*" %>
<br />
<%
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
Connection con2 =
DriverManager.getConnection("jdbc:odbc:YellowPages") ;
Statement stmt2 = con2.createStatement() ;
out.print(sql2) ;
ResultSet rs2 = stmt2.executeQuery(sql2) ;
if (rs2.next() == false)
{
out.print("Sorry No INFORMATION HAS
UPLOADED YET") ;
}
else
{
int cnt=0 ;
out.print("<table border=1 bgcolor=#FFFF33
bordercolor=#000000 align=center>") ;
out.print("<tr><th>Sr.No.</th><th>TITLE</th><th>Detai
l</th><th>View Adv.</th></tr>") ;
do
{
} while(rs2.next()) ;
out.print("</table>");
}
rs2.close() ;
con2.close() ;
}catch(Exception e){
out.println("error occured: "+e);}
%>
Showsub
<%
if (session.getAttribute("tuserid") != null)
{ %>
<table width="100%" border="1">
<tr>
<td colspan="2" ><%@ include file="advsdisp.jsp"
%></td>
</tr>
<tr>
<td width="25%" valign="top" >
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
Connection con1 =
DriverManager.getConnection("jdbc:odbc:YellowPages") ;
Statement st1 = con1.createStatement() ;
} while(rs1.next()) ;
}
rs1.close() ;
con1.close() ;
%>
</td>
<td width="75%" >
<%
if (request.getParameter("tsubadvsid") != null)
{
%>
<%@ include file="showadv.jsp" %>
<% }
%>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<%
}
else
response.sendRedirect("login.jsp") ;
%>
Advs
<%@ page import="java.sql.*" %>
<form name=myform method=post
action=showsub.jsp>
<select name=txtadvsid>
<%
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")
;
Connection con =
DriverManager.getConnection("jdbc:odbc:YellowPag
es") ;
Statement st = con.createStatement() ;
do
{
String tadvsid = rs.getString("advsid") ;
String tadvsname =
rs.getString("advsname");
out.print("<option value=" + tadvsid + ">" +
tadvsname + "</option>") ;
} while(rs.next()) ;
}
rs.close() ;
con.close() ;
}
catch(Exception e){
out.println("error occured: "+e);}
%>
</select>
<input type=submit>
</form>
ADVSDISP
<%@ page import="java.sql.*" %>
<%
try{
if (session.getAttribute("tuserid") != null)
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")
;
Connection con =
DriverManager.getConnection("jdbc:odbc:YellowPag
es") ;
Statement st = con.createStatement() ;
}
rs.close() ;
con.close();
}
else
response.sendRedirect("login.jsp") ;
}
catch(Exception e){
out.println("error occurred:” +e);
}
%>
Snapshots of database
BIBLIOGRAPHY