急,asp产品展示怎么改,才能显示一行3个,一页5列。 10
<%dimstrFileNameconstMaxPerPage=15dimBigClassName,SmallClassNameBigClassName=trim(req...
<%
dim strFileName
const MaxPerPage=15
dim BigClassName,SmallClassName
BigClassName=trim(request("BigClassName"))
SmallClassName=trim(request("SmallClassName"))
strFileName="ProductManage.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName
Title=Trim(request("Title"))
ID=Request("ID")
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
sql="select * from Product where ID>0"
if Title<>"" then
sql=sql & " and title like '%" & Title & "%' "
end if
if BigClassName<>"" then
sql=sql & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sql=sql & " and SmallClassName='" & SmallClassName & "' "
end if
end if
sql=sql & " order by ID desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="862" align="center" valign="top"> <br>
<table style="margin-bottom:5px;" width="713" border="0" cellpadding="0" cellspacing="1" class="table_southidc">
<tr>
<td width="506" height="25" align="left"><a href="Product.asp"> 产品管理</a> >>
<%
if request.querystring="" then
response.write "所有产品"
else
if request("Query")<>"" then
if Title<>"" then
response.write "名称中含有“<font color=blue>" & Title & "</font>”的产品"
else
response.Write("所有产品")
end if
else
if BigClassName<>"" then
response.write "<a href='ProductManage.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a> >> "
if SmallClassName<>"" then
response.write "<a href='ProductManage.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a>"
else
response.write "所有小类"
end if
end if
end if
end if
%></td>
<td width="161">
<%
if rs.eof and rs.bof then
response.write "共找到 0 个产品</td></tr></table>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
response.Write "共找到 " & totalPut & " 个产品"
%></td> 展开
dim strFileName
const MaxPerPage=15
dim BigClassName,SmallClassName
BigClassName=trim(request("BigClassName"))
SmallClassName=trim(request("SmallClassName"))
strFileName="ProductManage.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName
Title=Trim(request("Title"))
ID=Request("ID")
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
sql="select * from Product where ID>0"
if Title<>"" then
sql=sql & " and title like '%" & Title & "%' "
end if
if BigClassName<>"" then
sql=sql & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sql=sql & " and SmallClassName='" & SmallClassName & "' "
end if
end if
sql=sql & " order by ID desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="862" align="center" valign="top"> <br>
<table style="margin-bottom:5px;" width="713" border="0" cellpadding="0" cellspacing="1" class="table_southidc">
<tr>
<td width="506" height="25" align="left"><a href="Product.asp"> 产品管理</a> >>
<%
if request.querystring="" then
response.write "所有产品"
else
if request("Query")<>"" then
if Title<>"" then
response.write "名称中含有“<font color=blue>" & Title & "</font>”的产品"
else
response.Write("所有产品")
end if
else
if BigClassName<>"" then
response.write "<a href='ProductManage.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a> >> "
if SmallClassName<>"" then
response.write "<a href='ProductManage.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a>"
else
response.write "所有小类"
end if
end if
end if
end if
%></td>
<td width="161">
<%
if rs.eof and rs.bof then
response.write "共找到 0 个产品</td></tr></table>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
response.Write "共找到 " & totalPut & " 个产品"
%></td> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询