📄 product.asp
字号:
<!--#include file="top.asp"-->
<%
dim names
bigClassName = request("bigClassName")
smallClassName = request("smallClassName")
filename = "product.asp"
if bigClassName <> "" then
names = bigClassName
smallnames = smallClassName
end if
%>
<TABLE cellSpacing=0 cellPadding=0 width=1002 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top align=middle background=images/bj01.jpg>
<TABLE cellSpacing=0 cellPadding=0 width=924 align=center border=0>
<TBODY>
<TR>
<TD width=8 height=249 rowSpan=2></TD>
<TD vAlign=top align=middle width=907
background=images/bj.jpg>
<TABLE cellSpacing=0 cellPadding=0 width="98%" align=center
border=0>
<TBODY>
<TR>
<TD vAlign=top align=middle width=261 height=637><BR>
<%
set rs_pro = server.CreateObject("adodb.recordset")
rs_pro.open"select * from bigClass order by BigClassid ",conn,1,3
%>
<%
do while not rs_pro.eof
%>
<TABLE class=style02 cellSpacing=0 cellPadding=0 width=176
align=center border=0>
<TBODY>
<TR>
<TD class=STYLE1 align=middle
background=images/bj_l.jpg height=36>
<TABLE cellSpacing=0 cellPadding=0 width="80%"
border=0><TBODY>
<TR>
<TD align=left width="31%" height=20></TD>
<TD align=left width="60%"><STRONG><A class=m1
href="product.asp?bigClassName=<%=rs_pro("bigClassName")%>"><%=rs_pro("bigClassName")%></A></STRONG></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<%
set rs_pro2 = server.CreateObject("adodb.recordset")
rs_pro2.open"select * from smallClass where BigClassName='"&rs_pro("bigClassName")&"' order by smallClassid ",conn,1,3
%>
<%
do while not rs_pro2.eof
%>
<TABLE class=style02 cellSpacing=0 cellPadding=0 width=176
align=center border=0>
<TBODY>
<TR>
<TD class=style11 align=middle height=25><TABLE cellSpacing=0 cellPadding=0 width="80%"
border=0>
<TBODY>
<TR>
<TD align=middle width="31%" height=20> </TD>
<TD align=left width="60%"><STRONG><A class=m2
href="product.asp?bigClassName=<%=rs_pro2("bigClassName")%>&smallclassname=<%=rs_pro2("smallClassName")%>"><%=rs_pro2("smallClassName")%></A></STRONG></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<%
rs_pro2.movenext
loop
%>
<%
rs_pro.movenext
loop
%>
<IMG height=208 src="images/left_p.jpg"
width=210></P></TD>
<TD vAlign=top align=middle width=637><BR>
<TABLE cellSpacing=0 cellPadding=0 width=526 align=center
border=0>
<TBODY>
<TR>
<TD align=left height=46>
<IMG height=44
src="images/pro.jpg" width=511>
</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="85%" align=center
border=0>
<TBODY>
<TR>
<TD vAlign=top><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div>
<%
const MarPerPage = 9'每页显示数目
if not isempty(request("page")) then
CurrentPage = cint(request("page"))
else
CurrentPage = 1
end if
set rs_Product = server.CreateObject("adodb.recordset")
sqltext = "select * from Product "
if BigClassName <> "" then
sqltext = sqltext & " where BigClassName='"&names&"'"
if smallClassName and bigclassname <> "" then
sqltext = sqltext & "and smallclassname='"&smallnames&"'"
end if
end if
sqltext = sqltext & " order by UpdateTime desc"
rs_Product.open sqltext,conn,1,3
if rs_Product.eof and rs_Product.bof then
response.write "<p align='center' class='text2'> 数据库中暂时无数据!</p>"
else
totalPut = rs_Product.recordcount
if CurrentPage < 1 then
CurrentPage = 1
end if
if(CurrentPage -1)*MarPerPage > totalPut then
if(totalPut mod MarPerPage) = 0 then
CurrentPage = totalPut \ MarPerPage
else
CurrentPage = totalPut \ MarPerPage + 1
end if
end if
if CurrentPage = 1 then
showcontent
showpage totalPut,MarPerpage,fileName
else
if(CurrentPage-1)*MarPerPage < totalPut then
rs_Product.move (CurrentPage-1)*MarPerPage
dim bookmark
bookmark = rs_Product.bookmark
showcontent
showpage totalPut,MarPerpage,fileName
else
CurrentPage = 1
showcontent
showpage totalPut,MarPerpage,fileName
end if
end if
end if
sub showcontent
i = 0
%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr >
<%
do while not rs_Product.eof
%>
<td width="30%" height="25" style="border-bottom:1px solid #FFFFFF"><br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><TABLE cellSpacing=0 cellPadding=0 width=160
align=center border=0>
<TBODY>
<TR>
<TD width=140><TABLE height=140 cellSpacing=1 cellPadding=0
width=150 align=top bgColor=#cccccc border=0
valign="center">
<TBODY>
<TR>
<TD vAlign=center align=top bgColor=#ffffff><DIV align=center><a href="productinfo.asp?id=<%=rs_Product("ArticleID")%>"><img src="<%=rs_Product("UploadFiles")%>" height="100"
width=120 onload=javascript:drawimage(this);
border=0></A> </DIV></TD>
</TR>
<TR>
<TD vAlign=center align=top bgColor=#eeeeee
height=20><DIV align=center><a href="productinfo.asp?id=<%=rs_Product("ArticleID")%>"><%=rs_Product("Title")%></A></DIV></TD>
</TR>
</TBODY>
</TABLE></TD>
<TD vAlign=top width=6><IMG height=93 src="images/new_16.jpg"
width=6></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table></td>
<%
i = i + 1
rs_Product.movenext
if(I Mod 3 = 0 And I <> 0) then
response.Write("<tr></tr>")
end if
if i>=MarPerPage then Exit Do
loop
%>
</tr>
<%
rs_Product.close
set rs_Product = nothing
%>
</table>
<br />
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><%
end sub
function showpage(totalnumber,maxpage,filename)
dim n
if totalnumber mod maxpage = 0 then
n = totalnumber \ maxpage
else
n = totalnumber \ maxpage + 1
end if
Response.Write "<form method=Post action="&filename&">"
Response.Write "<p align='center'> "
If CurrentPage<2 Then
Response.Write "<font class=text2>首 页 上一页</font> "
Else
if BigClassName <> "" then
Response.Write "<a href="&filename&"?page=1&BigClassName="&names&" class=text2>首 页</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&BigClassName="&names&" class=text2>上一页</a> "
else
Response.Write "<a href="&filename&"?page=1 class=text2>首 页</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&" class=text2>上一页</a> "
end if
End If
If n-currentpage<1 Then
Response.Write "<font class=text2>下一页 末 页</font>"
Else
if BigclassName <> "" then
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&BigClassName="&names&" class=text2>"
Response.Write "下一页</a> <a href="&filename&"?page="&n&"&BigClassName="&names&" class=text2>末 页</a>"
else
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&" class=text2>"
Response.Write "下一页</a> <a href="&filename&"?page="&n&" class=text2>末 页</a>"
end if
end if
Response.Write "<font class=text2> 页次:</font><font class=text2>"&CurrentPage&"</font><font class=text2>/"&n&"页</font> "
Response.Write "<font class=text2> 共有"&totalnumber&"个"&names&"产品信息 "
Response.Write "<font class=text2>转到第:</font><input type='text' name='page' size=2 maxlength=10 value="¤tpage&" class=9>页"
Response.Write " <input type='submit' value='跳转' name='cndok' ></form>"
end function
%>
</td>
</tr>
</table>
</div></td>
</tr>
</table></TD></TR></TBODY></TABLE>
</TD>
</TR></TBODY></TABLE></TD></TR>
<TR>
<TD align=middle background=images/bj_base.jpg
height=28> </TD></TR></TBODY></TABLE><LINK
href="images/css.css" type=text/css rel=stylesheet>
<TABLE class=m1 cellSpacing=0 cellPadding=0 width=924 align=center
border=0>
<TBODY>
<TR>
<TD width="113" height=82 align=center class=about></TD>
<TD width="811" align=center class=about><!--#include file="bottom.asp"--></TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -