Shopping Kart Data

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 24

<%@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>
<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">&nbsp;</td>
<td width="387" valign="top" bgcolor="#330066"><div align="center" class="st
yle1 style2">Product Types</div></td>
<td width="41">&nbsp;</td>
<td width="92"></td>
<tr>
<td height="22"></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td></td>
<tr>
<td height="65"></td>
<td colspan="3" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>

<td width="163" height="10">


</td>
<td width="165"></td>
<td width="134"></td>
</tr>
<tr>
<td height="43" valign="top"><div align="center"><span class="styl
e3">Product Type Name :</span></div></td>
<td valign="top"><label>
<input name="addnpt" type="text" size="27" />
</label></td>
<td valign="top"><label>
<input name="Submit" type="submit" id="Submit" value="AddNewProd
uctType" />
</label></td>
</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>&nbsp;</td>
<td></td>
<td></td>
<td></td>
</table>
</form>
</body>
</html>

<!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>
<style type="text/css">
<!-.style1 {
font-family: "Times New Roman", Times, serif;
font-weight: bold;
font-style: italic;
color: #990000;
font-size: xx-large;
}
-->
</style>
</head>
<body><form action="Reg.do">
<table width="944" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutDefaultTable-->
<tr>
<td width="348" height="11"></td>
<td width="95"></td>

<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">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td></td>
</tr>
<tr>
<td height="400">&nbsp;</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>&nbsp;</td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</form>
</body>
</html>

<!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>Login Page</title>
<script language="JavaScript" type="text/javascript">

//--------------- LOCALIZEABLE GLOBALS --------------var d=new Date();


var monthname=new Array("January","February","March","April","May","June","July"
,"August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear()
;
//--------------- END LOCALIZEABLE --------------</script>
<style type="text/css">
<!-.style1 {
color: #000033;
font-style: italic;
font-weight: bold;
}
-->
</style>
</head>
<body><form action="/ForgetPassword.jsp">
<table width="700" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>

<!--<td height="27" colspan="3" valign="top"><!--DWLayoutEmptyCell--><!--&nb


sp;</td>-->
<td height="27" colspan="3" valign="top" bgcolor="#99CC66" id="dateforma
t">&nbsp;&nbsp;
<script language="JavaScript" type="text/javascript">
document.write(TODAY);
</script>
</td>
</tr>
<tr>
<td width="130" height="81">&nbsp;</td>
<td width="429">&nbsp;</td>
<td width="141">&nbsp;</td>
</tr>
<tr>
<td height="278">&nbsp;</td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing=
"0" bgcolor="#330D16">
<!--DWLayoutTable-->
<tr>
<td width="429" height="14"></td>
</tr>
<tr>
<td height="258" valign="top"><table width="100%" border="0" cellpadding
="0" cellspacing="0" bgcolor="#DAE8DB">
<!--DWLayoutTable-->
<tr>
<td width="429" height="13"></td>
</tr>
<tr>
<td height="231" valign="top"><table width="100%" border="0" cellpad
ding="0" cellspacing="0" bgcolor="#F1C1BF">
<!--DWLayoutTable-->
<tr>

<td width="59" height="20"></td>


<td width="95">&nbsp;</td>
<td width="26"></td>
<td width="61"></td>
<td width="15"></td>
<td width="87"></td>
<td width="86"></td>
</tr>
<tr>
<td height="30"></td>
<td valign="top"><strong>User Id : </strong></td>
<td>&nbsp;</td>
<td colspan="3" valign="top"><label>
<input name="userid" type="text" id="userid" size="27" /
>
</label></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="14"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="30"></td>
<td valign="top"><strong>E-mail : </strong></td>
<td>&nbsp;</td>
<td colspan="3" valign="top"><label>
<input name="mail" type="text" size="27" />
</label></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="15"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="30"></td>
<td valign="top"><strong>Contact No. </strong></td>
<td>&nbsp;</td>
<td colspan="3" valign="top"><label>
<input name="mobile" type="text" size="27" />
</label></td>
<td></td>
</tr>
<tr>
<td height="13"></td>
<td></td>
<td></td>

<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>&nbsp;</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>&nbsp;</td>
</tr>
<tr>
<td height="64">&nbsp;</td>

<td>&nbsp;</td>
<td>&nbsp;</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">&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</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">&nbsp;</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" >&nbsp;</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" >&nbsp;</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>

<td width="25" >&nbsp;</td>


</tr>
<tr>
<td width="25" height="25">&nbsp;</td>
<td width="200">&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
</tr> <%}}%>
<tr>
<td height="50" colspan="7" bgcolor="#996633"><center>
<p>
<input type="submit" class="style2" value="AddToCard"/>
</p>
</center></td>
<%--<td width="200">&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>--%>
</tr>
</table>
</form>
</body>
</html>

#339966 green 700*500


#330066 401*41
#FFFFFF 36

<%@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">&nbsp;</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">&nbsp;</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>

<select name="producttypeid" onchange="showProdSub(this.value)"


>
<%
ResultSet rs=com.connection.ConnectDB.getExecuteQuery("select *from productt
ypemaster");
while(rs.next())
{
%>
<option value="<%=rs.getString(1)%>"><%=rs.getString(2)%> </option>
<%}%>
</select>
</label></td>
<td><div id="divpsubtyp">
</div></td>
</tr>
<tr>
<td height="17"></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td height="224"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table></td>
<td>&nbsp;</td>
</tr>

<tr>
<td height="105" colspan="2">${requestScope['msg']}</td>
<td>&nbsp;</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr><td height="38">
<td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>

<td>&nbsp;</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">&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</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">&nbsp;</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 colspan="3" height="20" align="center"><b><%=productname%></b></
td>
<td width="25" align="right"><input type="checkbox" name="selectedpr
o" value="<%=productid%>;<%=count%>;<%=pad%>;<%=productsubtypeid%>;<%=productima
ge%>;<%=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" >&nbsp;</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" >&nbsp;</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" >&nbsp;</td>
</tr>
<tr>
<td width="25" height="25">&nbsp;</td>
<td width="200">&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>
</tr>
<tr>
<%}}%>
<td colspan="7" height="50"><center><input type="submit" value="AddToCard"/>
</center></td>
<%--<td width="200">&nbsp;</td>
<td width="25" >&nbsp;</td>
<td width="200" >&nbsp;</td>
<td width="25" >&nbsp;</td>

<td width="200" >&nbsp;</td>


<td width="25" >&nbsp;</td>--%>
</tr>
</table></form>
</body>
</html>

You might also like