?? syscode.asp
字號:
rsProduct.open sqlProduct,conn,1,1
if rsProduct.bof and rsProduct.eof then
response.Write("<br><li>nothing product</li>")
else
if currentPage=1 then
call ProductContent(TitleLen)
else
if (currentPage-1)*MaxPerPage<totalPut then
rsProduct.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsProduct.bookmark
call ProductContent(TitleLen)
else
currentPage=1
call ProductContent(TitleLen)
end if
end if
end if
rsProduct.close
set rsProduct=nothing
end sub
sub ProductContent(intTitleLen)
dim i,strTemp
i=0
do while not rsProduct.eof
strTemp=""
strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=25% rowspan=7>"
strTemp= strTemp & "<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
strTemp= strTemp & "<img border=0 src=" & rsProduct("DefaultPicUrl") & " width=105 height=80>"
else
if fileext="swf" then
strTemp= strTemp & "<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'>"
strTemp= strTemp &"<param name=movie value='"&rsProduct("DefaultPicUrl")&"'>"
strTemp= strTemp &"<param name=quality value=high>"
strTemp= strTemp &"<param name='Play' value='-1'>"
strTemp= strTemp &"<param name='Loop' value='0'>"
strTemp= strTemp &"<param name='Menu' value='-1'>"
strTemp= strTemp &"<param name='wmode' value='transparent'>"
strTemp= strTemp &"<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
strTemp= strTemp & "</a></div></td>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "Product name:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsProduct("ID") & ">" & rsProduct("Title") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "Product price:</td>"
strTemp= strTemp & "<td>" & rsProduct("Price") & "yuan</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "product spec:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsProduct("Spec") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "product remark:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsProduct("Memo") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=12>"
strTemp= strTemp & "product regimentation:</td>"
strTemp= strTemp & "<td><a href=Product.asp?BigClassName=" & rsProduct("BigClassName") & ">" & rsProduct("BigClassName") & "</a> → "
strTemp= strTemp & "<a href=Product.asp?BigClassName=" & rsProduct("BigClassName") & "&SmallClassName=" & rsProduct("SmallClassName") & ">" & rsProduct("SmallClassName") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
' strTemp= strTemp & "<td height=12>"
' strTemp= strTemp & "ProductID:</td>"
' strTemp= strTemp & "<td>" & rsProduct("Product_Id") & "</td>"
' strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=12>product information:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsProduct("ID") & "><img src=Img/arrow_7.gif border=0></a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td colspan=2>"
strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=50% height=12>"
strTemp= strTemp & "<div align=center></div></td>"
strTemp= strTemp & "<td width=50% height=12>"
strTemp= strTemp & "<div align=center><a href=# onClick=""window.open('add.asp?Product_Id="&rsProduct("Product_Id")&"','blank_','scrollbars=yes,resizable=no,width=650,height=450')""><img border=0 src=img/addtocart.gif width=100 height=26>"
strTemp= strTemp & "</a></div></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "</table>"
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "</table>"
response.write strTemp
rsProduct.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end sub
'=================================================
'過程名:ShowDown
'=================================================
sub ShowDown(TitleLen)
if TitleLen<0 or TitleLen>200 then
TitleLen=50
end if
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
sqlDown="select top " & MaxPerPage
else
sqlDown="select "
end if
sqlDown=sqlDown & " ID,title,content,BigClassName,SmallClassName,System,Softclass,PhotoUrl,DownloadUrl,FileSize,infotime from download"
if BigClassName<>"" then
sqlDown=sqlDown & " where BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlDown=sqlDown & " and SmallClassName='" & SmallClassName & "' "
end if
else
if SpecialName<>"" then
sqlDown=sqlDown & " and SpecialName='" & SpecialName & "' "
end if
end if
sqlDown=sqlDown & " order by ID desc"
Set rsDown= Server.CreateObject("ADODB.Recordset")
rsDown.open sqlDown,conn,1,1
if rsDown.bof and rsDown.eof then
response.Write("<br><li>Nothing download</li>")
else
if currentPage=1 then
call DownContent(TitleLen)
else
if (currentPage-1)*MaxPerPage<totalPut then
rsDown.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsDown.bookmark
call DownContent(TitleLen)
else
currentPage=1
call DownContent(TitleLen)
end if
end if
end if
rsDown.close
set rsDown=nothing
end sub
sub DownContent(intTitleLen)
dim i,strTemp
i=0
do while not rsDown.eof
strTemp=""
strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=25% rowspan=7>"
strTemp= strTemp & "<div align=center><a href=DownloadShow.asp?ID=" & rsDown("id") & ">"
strTemp= strTemp & "<img border=0 src=" & rsDown("PhotoUrl") & " width=100 height=120>"
strTemp= strTemp & "</a></div></td>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "file name:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsDown("Title") & ""
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "file size:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsDown("FileSize") & "K"
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "issuance date:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsDown("infotime") & ""
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "apply system:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsDown("System") & ""
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=12>"
strTemp= strTemp & "download regimentation:</td>"
strTemp= strTemp & "<td><a href=download.asp?BigClassName=" & rsDown("BigClassName") & ">" & rsDown("BigClassName") & "</a> → "
strTemp= strTemp & "<a href=download.asp?BigClassName=" & rsDown("BigClassName") & "&SmallClassName=" & rsDown("SmallClassName") & ">" & rsDown("SmallClassName") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=12>download explain:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & "<a href=DownloadShow.asp?ID=" & rsDown("id") & "><img src=Img/arrow_7.gif border=0></a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=12></td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & "<a href=" & rsDown("DownloadUrl") & "><img src=Img/download.gif border=0></a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td colspan=2>"
strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=50% height=12>"
strTemp= strTemp & "<div align=center></div></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "</table>"
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "</table>"
response.write strTemp
rsDown.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end sub
'=================================================
'過程名:ShowSearchTerm
'作 用:顯示搜索條件信息
'參 數:無
'=================================================
sub ShowSearchTerm()
response.write "| product search >> "
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 "All small class >> "
end if
end if
if keyword<>"" then
select case strField
case "Title"
response.Write "name include <font color=red>"&keyword&"</font> product"
case "Content"
response.Write "Explains include <font color=red>"&keyword&"</font> product"
case else
response.Write "name include <font color=red>"&keyword&"</font> product"
end select
else
response.write " All products"
end if
end sub
'=================================================
'過程名:SearchResultTotal
'作 用:顯示搜索結果總數
'參 數:無
'=================================================
sub SearchResultTotal()
dim rsTotal,sqlTotal
sqlTotal="select count(*) from Productwygk where Passed=True "
if BigClassName<>"" then
sqlTotal=sqlTotal & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlTotal=sqlTotal & " and SmallClassName='" & SmallClassName & "' "
end if
else
if SpecialName<>"" then
sqlTotal=sqlTotal & " and SpecialName='" & SpecialName & "' "
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 "amount 0 a product"
else
totalPut=rsTotal(0)
response.Write "total find " & totalPut & " a product"
end if
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -