📄 syscode.asp
字号:
dim bookmark
bookmark=rsArticle.bookmark
call ArticleContent(TitleLen)
else
currentPage=1
call ArticleContent(TitleLen)
end if
end if
end if
rsArticle.close
set rsArticle=nothing
end sub
sub ArticleContent(intTitleLen)
dim i,strTemp
i=0
do while not rsArticle.eof
strTemp=""
'strTemp = strTemp & ""
strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=25% rowspan=5>"
strTemp= strTemp & "<div align=center><a href=ArticleShow.asp?ArticleID=" & rsArticle("articleid") & ">"
strTemp= strTemp & "<img border=0 src=" & rsArticle("DefaultPicUrl") & " width=100 height=120>"
strTemp= strTemp & "</a></div></td>"
strTemp= strTemp & "<td width=12% height=18>"
strTemp= strTemp & "产品名称:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & "<a href=ArticleShow.asp?ArticleID=" & rsArticle("articleid") & ">" & rsArticle("Title") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=18>"
strTemp= strTemp & "产品类别:</td>"
strTemp= strTemp & "<td><a href=Product.asp?BigClassName=" & rsArticle("BigClassName") & ">" & rsArticle("BigClassName") & "</a> → "
strTemp= strTemp & "<a href=Product.asp?BigClassName=" & rsArticle("BigClassName") & "&SmallClassName=" & rsArticle("SmallClassName") & ">" & rsArticle("SmallClassName") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=18>"
strTemp= strTemp & "产品编号:</td>"
strTemp= strTemp & "<td>" & rsArticle("Product_Id") & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=18>产品信息:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & "<a href=ArticleShow.asp?ArticleID=" & rsArticle("articleid") & "><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=18>"
strTemp= strTemp & "<div align=center></div></td>"
strTemp= strTemp & "<td width=50% height=18>"
strTemp= strTemp & "<div align=center><a href='javascript:eshop(" & rsArticle("Product_Id") & ")'><img border=0 src=img/addtocart.gif width=75 height=18>"
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
rsArticle.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,imagenum,firstImageName,System,Softclass,PhotoUrl,DownloadUrl,FileSize,infotime,hits,ok 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>没有任何产品</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 & ""
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 & "文件名称:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsDown("Title") & ""
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "文件大小:</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 & "发布日期:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsDown("infotime") & ""
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=12% height=12>"
strTemp= strTemp & "适用系统:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsDown("System") & ""
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=12>"
strTemp= strTemp & "下载类别:</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>下载说明:</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>"
' strTemp= strTemp & "产品编号:</td>"
' strTemp= strTemp & "<td>" & rsArticle("Product_Id") & "</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 "| 产品搜索 >> "
if BigClassName<>"" then
response.write "<a href='Default.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a> >> "
if SmallClassName<>"" then
response.write "<a href='Default.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
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 "共有 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
sqlSearch=sqlSearch & " * from Product where Passed=True "
if BigClassName<>"" then
sqlSearch=sqlSearch & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlSearch=sqlSearch & " and SmallClassName='" & SmallClassName & "' "
end if
else
if SpecialName<>"" then
sqlSearch=sqlSearch & " and SpecialName='" & SpecialName & "' "
end if
end if
if keyword<>"" then
select case strField
case "Title"
sqlSearch=sqlSearch & " and Title like '%" & keyword & "%' "
case "Content"
sqlSearch=sqlSearch & " and Content like '%" & keyword & "%' "
case else
sqlSearch=sqlSearch & " and Title like '%" & keyword & "%' "
end select
end if
sqlSearch=sqlSearch & " order by articleid desc"
Set rsSearch= Server.CreateObject("ADODB.Recordset")
rsSearch.open sqlSearch,conn,1,1
if rsSearch.eof and rsSearch.bof then
response.write "<p align='center'><br><br>没有或没有找到任何产品</p>"
else
if currentPage=1 then
call SearchResultContent()
else
if (currentPage-1)*MaxPerPage<totalPut then
rsSearch.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsSearch.bookmark
call SearchResultContent()
else
currentPage=1
call SearchResultContent()
end if
end if
end if
rsSearch.close
set rsSearch=nothing
end sub
sub SearchResultContent()
dim i,strTemp,content
i=1
do while not rsSearch.eof
strTemp=""
strTemp=strTemp & cstr(i) & ".<a href='ArticleShow.asp?ArticleID=" & rsSearch("articleid") & "'>"
if strField="Title" then
strTemp=strTemp & "<b>" & replace(rsSearch("title"),""&keyword&"","<font color=red>"&keyword&"</font>") & "</b></font></a>"
else
strTemp=strTemp & "<b>" & rsSearch("title") & "</b></a>"
end if
strTemp=strTemp & " [" & FormatDateTime(rsSearch("UpdateTime"),1) & "]"
content=left(nohtml(rsSearch("content")),200)
if strField="Content" then
strTemp=strTemp & "<div style='padding:10px 20px'>" & replace(content,""&keyword&"","<font color=red>"&keyword&"</font>") & "……</div>"
else
strTemp=strTemp & "<div style='padding:10px 20px'>" & content & "……</div>"
end if
'strTemp=strTemp & "</a>"
response.write strTemp
i=i+1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -