网上商城的设计与实现(五)
'用来判断用户所进入的柜台start
If SmallSortName="" and GoodsName="" Then
Sql="select * from Goods where BigSortName='"+BigSortName+"' order by BigSortName"
End If
If SmallSortName<>"" and GoodsName="" Then
Sql="select * from Goods where BigSortName='"+BigSortName+"' and SmallSortName='"+SmallSortName+"' order by BigSortName,SmallSortName"
End If
If SmallSortName="" and GoodsName<>"" Then
Sql="select * from Goods where BigSortName='"+BigSortName+"' and GoodsName like'%"+GoodsName+"%' order by BigSortName,GoodsName"
End If
If SmallSortName<>"" and GoodsName<>"" Then
Sql="select * from Goods where BigSortName='"+BigSortName+"' and SmallSortName='"+SmallSortName+"' and GoodsName like'%"+GoodsName+"%'"
End If
If BigSortName="" and SmallSortName="" and GoodsName="" then
Sql="select * from Goods"
End If
'用来判断用户所在的柜台结束
set MainRs=server.CreateObject("ADODB.RecordSet")
MainRs.open Sql,Conn,1,1
If MainRs.bof or MainRs.eof then
response.Write("没有任何商品")
Else
Page=CInt(request("Page"))
MainRs.PageSize=4 '设置每个场景显示四家商铺
If Page<1 then
Page=1
End If
If Page>MainRs.PageCount Then
Page=MainRs.PageCount
End If
MainRs.AbsolutePage=Page
%>
<!--显示整个页面的表begin-->
<table border="1" cellspacing="0" cellpadding="0" align="center" width="500">
<tr>
<td width="20%">
<table>
<tr><td> </td><td><img src="Images/wall4.jpg" width="50" onmouseover="wallover(this);" onmouseout="wallout(this);"></td></tr>
</table>
</td>
<td>
<!--中间商场表显示begin-->
<table border="1" cellspacing="0" cellpadding="1" align="center" width="90%">
<%
For i=1 to MainRs.PageSize step 4
propvalue="商品名:"+MainRs("GoodsName")+"---商品大类:"+MainRs("BigSortName")+"---商品小类:"+MainRs("SmallSortName")+"---商场价:"+CStr(MainRs("ComPrice"))
%>
<!--第一行物品显示begin-->
<tr>
<td background="Images/table1.jpg" align="center" valign="top">
<form method="post" name="Goods" action="Right.asp?Id=<%=MainRs("Id")%>" target="mainFrame">
<%
if MainRs("ImageFile")="" then%>
<input type="image" src='../eshop/admin/Image/NoImg.jpg' width='40' height='60' alt="<%=propvalue%>" >
<% else%>
<input type="image" src="../eshop/admin/Image/<%=MainRs("ImageFile")%>" width='40' height='60' alt="<%=propvalue%>" >
<% End If
MainRs.movenext
%>
</form>
</td>
<td>
<!--商场第一行中部地板显示begin-->
<table>
<tr>
<td><img src="Images/target2.jpg" width="40" height="40" onclick="personmove(this);"></td>
</tr>
<tr>
<td>
<img src="Images/target2.jpg" width="40" height="40" onclick="personmove(this);">
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
<img src="Images/target2.jpg" width="40" height="40" onclick="personmove(this);">
</td>
</tr>
<tr>
<td>
<img src="Images/target2.jpg" width="40" height="40" onclick="personmove(this);">
</td>
</tr>
</table>
<!--#商场第一行中部地板显示end-->
</td>
<td background="Images/table2.jpg" align="center" valign="top">
<%
if not MainRs.eof then
propvalue="商品名:"+MainRs("GoodsName")+"---商品大类:"+MainRs("BigSortName")+"---商品小类:"+MainRs("SmallSortName")+"---商场价:"+CStr(MainRs("ComPrice"))
%>
<form method="post" name="Goods" action="Right.asp?Id=<%=MainRs("Id")%>" target="mainFrame">
<% if MainRs("ImageFile")="" then%>
<input type="image" src='../eshop/admin/Image/NoImg.jpg' width='30' height='60' alt="<%=propvalue%>" >
<%else%>
<input type="image" src="../eshop/admin/Image/<%=MainRs("ImageFile")%>" width='30' height='60' alt="<%=propvalue%>" >
<% End If
MainRs.movenext
%>
</form>
</td>
</tr>
<!--第一行物品显示end-->
…
<!--商场第二行地板显示begin-->
…
<!--商场地板第二行显示end-->
…
<!--第二行物品显示start-->
…
<!--第三行地板显示start-->
…
<!--第三行地板显示end-->
…
<!--第二行物品显示end-->
…
<!--地板第四行显示start-->
…
<!--第四行地板显示end-->
…
<%
end if
end if
end if
Next
%>
</td>
</tr>
</table>
<!--中部商场表显示end-->
</td>
<td width="15%" valign="bottom">
<!--右部切换店铺begin-->
<table border="1" cellspacing="0" cellpadding="1">
<tr>
网上商城的设计与实现(五)由毕业论文网(www.huoyuandh.com)会员上传。