Shopping Kart Data
Shopping Kart Data
Shopping Kart Data
ResultSet"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="s" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Add New Product Type</title>
<style type="text/css">
<!-.style1 {
font-size: 24px;
font-weight: bold;
color: #FFFFFF;
}
.style2 {font-size: 20px}
.style3 {
font-size: 16px;
font-weight: bold;
}
.style4 {color: #FF0000}
-->
</style>
</head>
<body><form action="addnewproducttype.do">
<table width="700" border="0" cellpadding="0" cellspacing="0" bgcolor="#339966">
<!--DWLayoutTable-->
<tr>
<td width="146" height="41"></td>
<td width="34"> </td>
<td width="387" valign="top" bgcolor="#330066"><div align="center" class="st
yle1 style2">Product Types</div></td>
<td width="41"> </td>
<td width="92"></td>
<tr>
<td height="22"></td>
<td> </td>
<td> </td>
<td> </td>
<td></td>
<tr>
<td height="65"></td>
<td colspan="3" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<tr>
<td height="15"></td>
<td></td>
<td></td>
</tr>
<%
ResultSet rs=com.connection.ConnectDB.getExecuteQuery("select *from producttypem
aster");
while(rs.next()){
%>
<%=rs.getString(1)%> --> <%=rs.getString(2)%><br/>
<%}%>
<br/><hr/>
</table></td>
<td></td>
<tr>
<td height="15"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<tr>
<td height="24"></td>
<td colspan="3" valign="top"><div align="center" class="style4">${requestSco
pe['msg']}</div></td>
<td></td>
<tr>
<td height="83"></td>
<td> </td>
<td></td>
<td></td>
<td></td>
</table>
</form>
</body>
</html>
<td width="408"></td>
<td width="93"></td>
</tr>
<tr>
<td height="50"></td>
<td></td>
<td valign="top" bgcolor="#CCCC99"><h1 align="center"><span class="style1">R
EGISTRATION FORM </span></h1></td>
<td></td>
</tr>
<tr>
<td height="61"> </td>
<td> </td>
<td> </td>
<td></td>
</tr>
<tr>
<td height="400"> </td>
<td colspan="3" valign="top"><table width="100%" border="0" cellpadding="0"
cellspacing="0" bgcolor="#E1F7FB">
<!--DWLayoutTable-->
<tr>
<td width="296" height="40" valign="top"><div align="center"><strong>Fir
st Name : </strong></div></td>
<td width="300" valign="top"><label></label>
<label>
<input name="fname" type="text" size="35" />
</label></td>
</tr>
<tr>
<td height="40" valign="top"><div align="center"><strong>Last Name : </s
trong></div></td>
<td valign="top"><label></label>
<input name="lname" type="text" size="35" /></td>
</tr>
<tr>
<td height="40" valign="top"><div align="center"><strong>User Id : </str
ong></div></td>
<td valign="top"><label>
<input name="userid" type="text" size="35" />
</label></td>
</tr>
<tr>
<td height="40" valign="top"><div align="center"><strong>Password : </st
rong></div></td>
<td valign="top"><label></label>
<label>
<input name="pass" type="password" size="35" />
</label></td>
</tr>
<tr>
<td height="40" valign="top"><div align="center"><strong>Email Id : </st
rong></div></td>
<td valign="top"><label></label>
<label>
<input name="emailid" type="text" size="35" />
</label></td>
</tr>
<tr>
<td height="40" valign="top"><div align="center"><strong>Contact No : </
strong></div></td>
<td valign="top"><label></label>
<label>
<input name="mobileno" type="text" size="35" />
</label></td>
</tr>
<tr>
<td height="40" valign="top"><div align="center"><strong>City : </strong
></div></td>
<td valign="top"><label></label>
<label>
<input name="cityname" type="text" size="35" />
</label></td>
</tr>
<tr>
<td height="40" valign="top"><div align="center"><strong>Address : </str
ong></div></td>
<td valign="top"><label></label>
<label>
<textarea name="address" cols="30"></textarea>
</label></td>
</tr>
<tr>
<td height="80" colspan="2" valign="top"><label><br />
<center><input name="Submit" type="submit" class="style1" value="Submi
t" /></center>
</label>
<div align="right"></div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="135" color="RED" size="15">${requestScope['msg']}</td>
<td> </td>
<td> </td>
<td></td>
</tr>
</table>
</form>
</body>
</html>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="30"></td>
<td valign="top"><strong>User Type : </strong></td>
<td></td>
<td colspan="2" valign="top"><label>
<select name="usertype">
<option>User</option>
<option>Admin</option>
</select>
</label></td>
<td> </td>
<td></td>
</tr>
<tr>
<td height="10"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="24"></td>
<td></td>
<td></td>
<td valign="top"><label>
<input name="getpass" type="submit" class="style1" id="l
ogin" value="Get Password" />
</label></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="15"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14"></td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td height="64"> </td>
<td> </td>
<td> </td>
</tr>
</table></form>
</body>
</html>
<%@page import="java.sql.ResultSet"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Show Products</title>
<style type="text/css">
<!-.style2 {
color: #000066;
font-weight: bold;
font-size: 18px;
}
.style4 {
color: #000066;
font-weight: bold;
}
-->
</style>
</head>
<body>
<form action="addtocard.do">
<table width="700" border="0" cellpadding="0" cellspacing="0" bgcolor="#C8ACAC">
<!--DWLayoutTable-->
<tr>
<td width="25" height="25"> </td>
<td width="200" > </td>
<td width="25" > </td>
<td width="200" > </td>
<td width="25" > </td>
<td width="200" > </td>
<td width="25" > </td>
</tr>
<%!
String productname=null;
String productid=null;
String productsubtypeid=null;
String productimage=null;
int price=0,discount=0,pad=0,count;
%>
<%
if(request.getAttribute("productlist")!=null) {
ResultSet rs=(ResultSet)request.getAttribute("productlist");
count=-1;
while(rs.next()){
productid=rs.getString(1);
productname=rs.getString(2);
productsubtypeid=rs.getString(3);
price=rs.getInt(5);
discount=rs.getInt(6);
productimage=rs.getString(7);
pad=price-(price*discount/100);
count++;
%>
<tr>
<td width="25" height="250"> </td>
<td valign="top" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcol
or="#999999">
<!--DWLayoutTable-->
<tr>
<td colspan="4" height="200">
<img src="<%=productsubtypeid%>/<%=productimage%>" width="200px"
height="200px"/></td>
</tr>
<tr bgcolor="#999999">
<td width="90" height="5"></td>
<td width="30" ></td>
<td width="55" ></td>
<td width="25" ></td>
</tr>
<tr>
<td height="20" colspan="3" align="center" bgcolor="#996633"><b><%=p
roductname%></b></td>
<td width="25" align="right" bgcolor="#996633"><input type="checkbox
" name="selectedproduct" value="<%=productid%>;<%=count%>;<%=pad%>;<%=productsub
typeid%>;<%=productimage%>;<%=productname%>"/> </td>
</tr>
<tr>
<td width="90" height="25" align="left" bgcolor="#996633"><span clas
s="style4">Rs.</span><%=price%></td>
<td width="30" align="right" bgcolor="#996633"><%=discount%>%</td>
<td colspan="2" align="right" bgcolor="#996633">
<select name="noofpieces">
<option
<option
<option
<option
<option
<option
value="1">1</option>
value="2">2</option>
value="3">3</option>
value="4">4</option>
value="5">5</option>
value="6">6</option>
<option
<option
<option
<option
value="7">7</option>
value="8">8</option>
value="9">9</option>
value="10">10</option>
</td>
</select>
</tr>
</table>
</td>
<td width="25" > </td>
<td width="200" >
<%
if(rs.next()){
productid=rs.getString(1);
productname=rs.getString(2);
productsubtypeid=rs.getString(3);
price=rs.getInt(5);
discount=rs.getInt(6);
productimage=rs.getString(7);
pad=price-(price*discount/100);
count++;
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#999999"
>
<!--DWLayoutTable-->
<tr>
<td colspan="4" height="200">
<img src="<%=productsubtypeid%>/<%=productimage%>" width="200px"
height="200px"/>
</td>
</tr>
<tr bgcolor="#999999">
<td width="90" height="5"></td>
<td width="30" ></td>
<td width="55" ></td>
<td width="25" ></td>
</tr>
<tr>
<td height="20" colspan="3" align="center" bgcolor="#996633"><b><%=p
roductname%></b></td>
<td width="25" align="right" bgcolor="#996633">
<input type="checkbox" name="selectedproduct" value="<%=productid%>;<%=count
%>;<%=pad%>;<%=productsubtypeid%>;<%=productimage%>;<%=productname%>"/> </td>
</tr>
<tr>
<td width="90" height="25" align="left" bgcolor="#996633"><span clas
s="style4">Rs.</span><%=price%></td>
<td width="30" align="right" bgcolor="#996633"><%=discount%>%</td>
<td colspan="2" align="right" bgcolor="#996633">
<select name="noofpieces">
<option
<option
<option
<option
<option
<option
<option
<option
<option
<option
value="1">1</option>
value="2">2</option>
value="3">3</option>
value="4">4</option>
value="5">5</option>
value="6">6</option>
value="7">7</option>
value="8">8</option>
value="9">9</option>
value="10">10</option>
</select>
</td>
</tr>
</table>
<%}%>
</td>
<td width="25" > </td>
<td width="200" >
<%
if(rs.next()){
productid=rs.getString(1);
productname=rs.getString(2);
productsubtypeid=rs.getString(3);
productimage=rs.getString(7);
price=rs.getInt(5);
discount=rs.getInt(6);
pad=price-((price*discount)/100);
count++;
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcol
or="#999999">
<!--DWLayoutTable-->
<tr>
<td colspan="4" height="200">
<img src="<%=productsubtypeid%>/<%=productimage%>" width="200px"
height="200px"/>
</td>
</tr>
<tr bgcolor="#999999">
<td width="90" height="5"></td>
<td width="30" ></td>
<td width="55" ></td>
<td width="25" ></td>
</tr>
<tr>
<td height="20" colspan="3" align="center" bgcolor="#996633"><b><%=p
roductname%></b></td>
<td width="25" align="right" bgcolor="#996633"><input type="checkbox
" name="selectedproduct" value="<%=productid%>;<%=count%>;<%=pad%>;<%=productsub
typeid%>;<%=productimage%>;<%=productname%>"/> </td>
</tr>
<tr>
<td width="90" height="25" align="left" bgcolor="#996633"><span clas
s="style4">Rs.</span><%=price%></td>
<td width="30" align="right" bgcolor="#996633"><%=discount%>%</td>
<td colspan="2" align="right" bgcolor="#996633">
<select name="noofpieces">
<option
<option
<option
<option
<option
<option
<option
<option
<option
<option
</select>
</tr>
</table>
<%}%>
</td>
value="1">1</option>
value="2">2</option>
value="3">3</option>
value="4">4</option>
value="5">5</option>
value="6">6</option>
value="7">7</option>
value="8">8</option>
value="9">9</option>
value="10">10</option>
</td>
<%@page import="java.sql.ResultSet"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="s" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Add New Product Type</title>
<script language="javascript" type="text/javascript">
var xmlHttp
// var xmlHttp
function showProdSub(str){
if (typeof XMLHttpRequest != "undefined"){
xmlHttp= new XMLHttpRequest();
}
else if (window.ActiveXObject){
xmlHttp= new ActiveXObject("Microsoft.XMLHTTP");
}
if (xmlHttp==null){
alert("Browser does not support XMLHTTP Request")
return;
}
var url="GetData.jsp";
url +="?psubtype1=" +str;
xmlHttp.onreadystatechange = stateChange;
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
//function stateChange111(){
//
alert(xmlHttp.readyState+" ABhi");
// }
function stateChange(){
// alert(xmlHttp.readyState);
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("divpsubtyp").innerHTML=xmlHttp.responseText
}
}
</script>
<style type="text/css">
<!-.style1 {
font-size: 24px;
font-weight: bold;
color: #FFFFFF;
}
.style2 {font-size: 36px}
.style3 {
font-size: 17px;
font-weight: bold;
}
-->
</style>
</head>
<body><form action="addnewproductsubtype.do">
<table width="700" border="0" cellpadding="0" cellspacing="0" bgcolor="#339966">
<!--DWLayoutTable-->
<tr>
<td width="65" height="9"></td>
<td width="81"></td>
<td width="36"></td>
<td width="405"></td>
<td width="53"></td>
<td width="60"></td>
<tr>
<td height="41"></td>
<td></td>
<td></td>
<td valign="top" bgcolor="#330066"><div align="center" class="style1 style2"
>Sub Product Types</div></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="13"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="342"></td>
<td colspan="4" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="202" height="26"></td>
<td width="9"></td>
<td width="8"> </td>
<td width="155"></td>
<td width="10"></td>
<td width="191"></td>
</tr>
<tr>
<td height="1"></td>
<td></td>
<td colspan="2" rowspan="3" valign="top"><label>
<input name="productsubtypename" type="text" size="23" />
</label></td>
<td></td>
<td></td>
</tr>
<tr>
<td rowspan="2" valign="top"><div align="left"><span class="style3
">Product Type Name :</span></div></td>
<td height="26"> </td>
<td></td>
<td></td>
</tr>
<tr>
<td height="14"></td>
<td></td>
<td rowspan="3" valign="top"><label>
<input name="Submit" type="submit" class="style3" id="Submit"
value="AddProductSubType" />
</label></td>
</tr>
<tr>
<td height="1"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<%
ResultSet rs1=com.connection.ConnectDB.getExecuteQuery("select *from productsubt
ypemaster");
while(rs1.next()){
%>
<%=rs1.getString(1)%> --> <%=rs1.getString(2)%> --> <%=rs1.getSt
ring(3)%><br/>
<%}%>
<br/><hr/>
<tr>
<td rowspan="2" valign="top" class="style3">Product SubType Name :
</td>
<td height="33"></td>
<td></td>
<td rowspan="2" valign="top"><label>
<tr>
<td height="224"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td height="105" colspan="2">${requestScope['msg']}</td>
<td> </td>
<td></td>
<td></td>
<td></td>
</tr>
<tr><td height="38">
<td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
<%@page import="java.sql.ResultSet"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="addtocard.do">
<table width="700" border="0" cellpadding="0" cellspacing="0" bgcolor="#999999">
<!--DWLayoutTable-->
<tr>
<td width="25" height="25"> </td>
<td width="200" > </td>
<td width="25" > </td>
<td width="200" > </td>
<td width="25" > </td>
<td width="200" > </td>
<td width="25" > </td>
</tr>
<%!
String productname=null;
String productid=null;
String productsubtypeid=null;
String productimage=null;
int price=0,discount=0,pad=0,count;
%>
<%
if(request.getAttribute("productlist")!=null) {
ResultSet rs=(ResultSet)request.getAttribute("productlist");
count=-1;
while(rs.next()){
productid=rs.getString(1);
productname=rs.getString(2);
productsubtypeid=rs.getString(3);
price=rs.getInt(5);
discount=rs.getInt(6);
productimage=rs.getString(7);
pad=price-(price*discount/100);
count++;
%>
<tr>
<td width="25" height="250"> </td>
<td valign="top" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcol
or="#999999">
<!--DWLayoutTable-->
<tr>
<td colspan="4" height="200">
value="1">1</option>
value="2">2</option>
value="3">3</option>
value="4">4</option>
value="5">5</option>
value="6">6</option>
value="7">7</option>
value="8">8</option>
value="9">9</option>
value="10">10</option>
</tr>
</table>
</td>
<td width="25" > </td>
<td width="200" >
<%
if(rs.next()){
productid=rs.getString(1);
productname=rs.getString(2);
productsubtypeid=rs.getString(3);
price=rs.getInt(5);
discount=rs.getInt(6);
productimage=rs.getString(7);
pad=price-(price*discount/100);
count++;
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#999999"
>
<!--DWLayoutTable-->
<tr>
<td colspan="4" height="200">
<img src="<%=productsubtypeid%>/<%=productimage%>" width="200px"
height="200px"/>
</td>
</tr>
<tr bgcolor="#999999">
<td width="90" height="5"></td>
<td width="30" ></td>
<td width="55" ></td>
<td width="25" ></td>
</tr>
<tr>
<td colspan="3" height="20" align="center"><b><%=productname%></b></
td>
<td width="25" align="right">
<input type="checkbox" name="selectedpro" value="<%=productid%>;<%=count%>;<
%=pad%>;<%=productsubtypeid%>;<%=productimage%>;<%=productname%>"/> </td>
</tr>
<tr>
<td width="90" height="25" align="left">Rs.<%=price%></td>
<td width="30" align="right"><%=discount%>%</td>
<td colspan="2" align="right">
<select name="noofpieces">
<option
<option
<option
<option
<option
<option
<option
<option
<option
<option
</select>
</td>
value="1">1</option>
value="2">2</option>
value="3">3</option>
value="4">4</option>
value="5">5</option>
value="6">6</option>
value="7">7</option>
value="8">8</option>
value="9">9</option>
value="10">10</option>
</tr>
</table>
<%}%>
</td>
<td width="25" > </td>
<td width="200" >
<%
if(rs.next()){
productid=rs.getString(1);
productname=rs.getString(2);
productsubtypeid=rs.getString(3);
productimage=rs.getString(7);
price=rs.getInt(5);
discount=rs.getInt(6);
pad=price-((price*discount)/100);
count++;
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcol
or="#999999">
<!--DWLayoutTable-->
<tr>
<td colspan="4" height="200">
<img src="<%=productsubtypeid%>/<%=productimage%>" width="200px"
height="200px"/>
</td>
</tr>
<tr bgcolor="#999999">
<td width="90" height="5"></td>
<td width="30" ></td>
<td width="55" ></td>
<td width="25" ></td>
</tr>
<tr>
<td colspan="3" height="20" align="center"><b><%=productname%></b></
td>
<td width="25" align="right"><input type="checkbox" name="selectedpr
oduct" value="<%=productid%>;<%=count%>;<%=pad%>;<%=productsubtypeid%>;<%=produc
timage%>;<%=productname%>"/> </td>
</tr>
<tr>
<td width="90" height="25" align="left">Rs.<%=price%></td>
<td width="30" align="right"><%=discount%>%</td>
<td colspan="2" align="right">
<select name="noofpieces">
<option
<option
<option
<option
<option
<option
<option
<option
<option
<option
</select>
</td>
value="1">1</option>
value="2">2</option>
value="3">3</option>
value="4">4</option>
value="5">5</option>
value="6">6</option>
value="7">7</option>
value="8">8</option>
value="9">9</option>
value="10">10</option>
</tr>
</table>
<%}%>
</td>
<td width="25" > </td>
</tr>
<tr>
<td width="25" height="25"> </td>
<td width="200"> </td>
<td width="25" > </td>
<td width="200" > </td>
<td width="25" > </td>
<td width="200" > </td>
<td width="25" > </td>
</tr>
<tr>
<%}}%>
<td colspan="7" height="50"><center><input type="submit" value="AddToCard"/>
</center></td>
<%--<td width="200"> </td>
<td width="25" > </td>
<td width="200" > </td>
<td width="25" > </td>