📄 htmlproduct.asp
字号:
strproduct= strproduct & "<tr>"
strproduct= strproduct & "<td width=50% height=12>"
strproduct= strproduct & "<div align=center></div></td>"
strproduct= strproduct & "<td width=50% height=12>"
strproduct= strproduct & "<div align=center><input name='Product_Id' type='checkbox' id='Product_Id' value="&cstr(rsProduct("Product_Id"))&"> 选取"
strproduct= strproduct & "</div></td>"
strproduct= strproduct & "</tr>"
strproduct= strproduct & "</table>"
strproduct= strproduct & "</td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
strproduct= strproduct & "</tr>"
strproduct= strproduct & "</table>"
rsProduct.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
else
if (currentPage-1)*MaxPerPage<totalPut then
rsProduct.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsProduct.bookmark
do while not rsProduct.eof
strproduct=""
strproduct= strproduct & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
strproduct= strproduct & "<tr>"
strproduct= strproduct & "<td width=25% rowspan=6>"
strproduct= strproduct & "<div align=center><a href=ProductShow.asp?ID=" & rsProduct("ID") & ">"
fileExt=lcase(getFileExtName(rsProduct("DefaultPicUrl")))
if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
strproduct= strproduct & "<img style='BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-COLOR: #cccccc; BORDER-TOP-COLOR: #cccccc; BORDER-RIGHT-COLOR: #cccccc' src=" & rsProduct("DefaultPicUrl") & " width=105 height=80 onload='javascript:DrawImage(this);'>"
else
if fileext="swf" then
strproduct= strproduct & "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105' height='84'>"
strproduct= strproduct &"<param name=movie value='"&rsProduct("DefaultPicUrl")&"'>"
strproduct= strproduct &"<param name=quality value=high>"
strproduct= strproduct &"<param name='Play' value='-1'>"
strproduct= strproduct &"<param name='Loop' value='0'>"
strproduct= strproduct &"<param name='Menu' value='-1'>"
strproduct= strproduct &"<embed src='"&rsProduct("DefaultPicUrl")&"' width='105' height='84' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed> </object>"
end if
end if
strproduct= strproduct & "</a></div></td>"
strproduct= strproduct & "<td width=12% height=12>"
strproduct= strproduct & "产品名称:</td>"
strproduct= strproduct & "<td>"
strproduct= strproduct & "<a href=ProductShow.asp?ID=" & rsProduct("ID") & ">" & rsProduct("Title") & ""
strproduct= strproduct & "</a></td>"
'strproduct= strproduct & "</tr><tr>"
'strproduct= strproduct & "<td width=12% height=12>"
'strproduct= strproduct & "产品售价:</td>"
'strproduct= strproduct & "<td>" & rsProduct("Price") & "元</td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td width=12% height=12>"
strproduct= strproduct & "产品规格:</td>"
strproduct= strproduct & "<td>"
strproduct= strproduct & rsProduct("Spec") & ""
strproduct= strproduct & "</a></td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td width=12% height=12>"
strproduct= strproduct & "产品备注:</td>"
strproduct= strproduct & "<td>"
strproduct= strproduct & rsProduct("Memo") & ""
strproduct= strproduct & "</a></td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td height=12>"
strproduct= strproduct & "产品类别:</td>"
strproduct= strproduct & "<td><a href=Product.asp?BigClassName="& rsProduct("BigClassName")&">"&rsProduct("BigClassName")&"</a> → "
strproduct= strproduct & "<a href=Product.asp?BigClassName=" & rsProduct("BigClassName") & "&SmallClassName=" & rsProduct("SmallClassName") & ">" & rsProduct("SmallClassName") & ""
strproduct= strproduct & "</a></td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td height=12>产品信息:</td>"
strproduct= strproduct & "<td>"
strproduct= strproduct & "<a href=ProductShow.asp?ID=" & rsProduct("ID") & " target=_blank><img src=Img/arrow_7.gif border=0></a></td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td colspan=2>"
strproduct= strproduct & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
strproduct= strproduct & "<tr>"
strproduct= strproduct & "<td width=50% height=12>"
strproduct= strproduct & "<div align=center></div></td>"
strproduct= strproduct & "<td width=50% height=12>"
strproduct= strproduct & "<div align=center><input name='Product_Id' type='checkbox' id='Product_Id' value="&cstr(rsProduct("Product_Id"))&"> 选取"
strproduct= strproduct & "</div></td>"
strproduct= strproduct & "</tr>"
strproduct= strproduct & "</table>"
strproduct= strproduct & "</td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
strproduct= strproduct & "</tr>"
strproduct= strproduct & "</table>"
rsProduct.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
else
currentPage=1
do while not rsProduct.eof
strproduct=""
strproduct= strproduct & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
strproduct= strproduct & "<tr>"
strproduct= strproduct & "<td width=25% rowspan=6>"
strproduct= strproduct & "<div align=center><a href=ProductShow.asp?ID=" & rsProduct("ID") & ">"
fileExt=lcase(getFileExtName(rsProduct("DefaultPicUrl")))
if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
strproduct= strproduct & "<img style='BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-COLOR: #cccccc; BORDER-TOP-COLOR: #cccccc; BORDER-RIGHT-COLOR: #cccccc' src=" & rsProduct("DefaultPicUrl") & " width=105 height=80 onload='javascript:DrawImage(this);'>"
else
if fileext="swf" then
strproduct= strproduct & "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105' height='84'>"
strproduct= strproduct &"<param name=movie value='"&rsProduct("DefaultPicUrl")&"'>"
strproduct= strproduct &"<param name=quality value=high>"
strproduct= strproduct &"<param name='Play' value='-1'>"
strproduct= strproduct &"<param name='Loop' value='0'>"
strproduct= strproduct &"<param name='Menu' value='-1'>"
strproduct= strproduct &"<embed src='"&rsProduct("DefaultPicUrl")&"' width='105' height='84' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed> </object>"
end if
end if
strproduct= strproduct & "</a></div></td>"
strproduct= strproduct & "<td width=12% height=12>"
strproduct= strproduct & "产品名称:</td>"
strproduct= strproduct & "<td>"
strproduct= strproduct & "<a href=ProductShow.asp?ID=" & rsProduct("ID") & ">" & rsProduct("Title") & ""
strproduct= strproduct & "</a></td>"
'strproduct= strproduct & "</tr><tr>"
'strproduct= strproduct & "<td width=12% height=12>"
'strproduct= strproduct & "产品售价:</td>"
'strproduct= strproduct & "<td>" & rsProduct("Price") & "元</td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td width=12% height=12>"
strproduct= strproduct & "产品规格:</td>"
strproduct= strproduct & "<td>"
strproduct= strproduct & rsProduct("Spec") & ""
strproduct= strproduct & "</a></td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td width=12% height=12>"
strproduct= strproduct & "产品备注:</td>"
strproduct= strproduct & "<td>"
strproduct= strproduct & rsProduct("Memo") & ""
strproduct= strproduct & "</a></td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td height=12>"
strproduct= strproduct & "产品类别:</td>"
strproduct= strproduct & "<td><a href=Product.asp?BigClassName="& rsProduct("BigClassName")&">"&rsProduct("BigClassName")&"</a> → "
strproduct= strproduct & "<a href=Product.asp?BigClassName=" & rsProduct("BigClassName") & "&SmallClassName=" & rsProduct("SmallClassName") & ">" & rsProduct("SmallClassName") & ""
strproduct= strproduct & "</a></td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td height=12>产品信息:</td>"
strproduct= strproduct & "<td>"
strproduct= strproduct & "<a href=ProductShow.asp?ID=" & rsProduct("ID") & " target=_blank><img src=Img/arrow_7.gif border=0></a></td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td colspan=2>"
strproduct= strproduct & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
strproduct= strproduct & "<tr>"
strproduct= strproduct & "<td width=50% height=12>"
strproduct= strproduct & "<div align=center></div></td>"
strproduct= strproduct & "<td width=50% height=12>"
strproduct= strproduct & "<div align=center><input name='Product_Id' type='checkbox' id='Product_Id' value="&cstr(rsProduct("Product_Id"))&"> 选取"
strproduct= strproduct & "</div></td>"
strproduct= strproduct & "</tr>"
strproduct= strproduct & "</table>"
strproduct= strproduct & "</td>"
strproduct= strproduct & "</tr><tr>"
strproduct= strproduct & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
strproduct= strproduct & "</tr>"
strproduct= strproduct & "</table>"
rsProduct.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end if
end if
end if
rsProduct.close
set rsProduct=nothing
'=================================================
'过程名:ShowSearchTerm
'作 用:显示搜索条件信息
'参 数:无
'=================================================
sub ShowSearchTerm()
response.write " 产品搜索 >> "
if BigClassName<>"" then
response.write "<a href='Product.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a> >> "
if SmallClassName<>"" then
response.write "<a href='Product.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a> >> "
else
response.write "所有小类 >> "
end if
end if
if keyword<>"" then
select case strField
case "Title"
response.Write "名称中含有 <font color=red>"&keyword&"</font> 的产品"
case "Content"
response.Write "说明含有 <font color=red>"&keyword&"</font> 的产品"
case else
response.Write "名称中含有 <font color=red>"&keyword&"</font> 的产品"
end select
else
response.write " 所有产品"
end if
end sub
'=================================================
'过程名:SearchResultTotal
'作 用:显示搜索结果总数
'参 数:无
'=================================================
sub SearchResultTotal()
dim rsTotal,sqlTotal
sqlTotal="select count(*) from Product where Passed=True "
if BigClassName<>"" then
sqlTotal=sqlTotal & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlTotal=sqlTotal & " and SmallClassName='" & SmallClassName & "' "
end if
end if
if keyword<>"" then
select case strField
case "Title"
sqlTotal=sqlTotal & " and Title like '%" & keyword & "%' "
case "Content"
sqlTotal=sqlTotal & " and Content like '%" & keyword & "%' "
case else
sqlTotal=sqlTotal & " and Title like '%" & keyword & "%' "
end select
end if
Set rsTotal= Server.CreateObject("ADODB.Recordset")
rsTotal.open sqlTotal,conn,1,1
if rsTotal.eof and rsTotal.bof then
totalPut=0
response.write "共有 0 个产品"
else
totalPut=rsTotal(0)
response.Write "共找到 " & totalPut & " 个产品"
end if
end sub
'=================================================
'过程名:ShowSearchResult
'作 用:分页显示搜索结果
'参 数:无
'=================================================
sub ShowSearchResult()
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
if currentPage=1 then
sqlSearch="select top " & MaxPerPage
else
sqlSearch="select "
end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -