📄 复件 syscode.asp
字号:
' j=1
' do while not rsClass.eof
' strTree= strTree & "<tr><td height=22 width=10></td><td>"
' strTree= strTree & " <img src=Skins/Default/cnimg/flag.gif width=11 height=9> "
' strTree= strTree & "<a href='Product.asp?BigClassName=" & rsBigClass("BigClassName") & "&SmallClassName=" & rsClass("smallClassName")&"'>"
' strTree= strTree & rsClass("smallClassName")
' strTree= strTree & "</a></td></tr>"
' rsClass.movenext
' j=j+1
' loop
' strTree= strTree & "</table>"
' strTree= strTree & "</TD></TR>"
' strTree= strTree & "</table>"
' response.write strTree
' rsBigClass.movenext
' i=i+1
' loop
' rsClass.close
' set rsClass=nothing
' end if
'end sub
'=================================================
'过程名:ShowVote
'作 用:显示网站调查
'参 数:无
'=================================================
sub ShowVote()
dim sqlVote,rsVote,i
sqlVote="select top 1 * from Hover_Vote where IsSelected=True"
Set rsVote= Server.CreateObject("ADODB.Recordset")
rsVote.open sqlVote,conn,1,1
if rsVote.bof and rsVote.eof then
response.Write " 没有任何调查"
else
response.write "<form name='VoteForm' method='post' action='vote.asp' target='_blank'><td>"
response.write " " & rsVote("Title") & "<br>"
if rsVote("VoteType")="Single" then
for i=1 to 8
if trim(rsVote("Select" & i) & "")="" then exit for
response.Write "<input type='radio' name='VoteOption' value='" & i & "'>" & rsVote("Select" & i) & "<br>"
next
else
for i=1 to 8
if trim(rsVote("Select" & i) & "")="" then exit for
response.Write "<input type='checkbox' name='VoteOption' value='" & i & "'>" & rsVote("Select" & i) & "<br>"
next
end if
response.write "<br><input name='VoteType' type='hidden'value='" & rsVote("VoteType") & "'>"
response.write "<input name='Action' type='hidden' value='Vote'>"
response.write "<input name='ID' type='hidden' value='" & rsVote("ID") & "'>"
response.write "<div align='center'>"
response.write "<a href='javascript:VoteForm.submit();'><img src='Skins/Default/cnimg/voteSubmit.gif' width='52' height='18' border='0'></a> "
response.write "<a href='Vote.asp?Action=Show' target='_blank'><img src='Skins/Default/cnimg/voteView.gif' width='52' height='18' border='0'></a>"
response.write "</div></td></form>"
end if
rsVote.close
set rsVote=nothing
end sub
'=================================================
'过程名:ShowClassGuide
'作 用:显示栏目导航位置
'参 数:无
'=================================================
sub ShowClassGuide()
if BigClassName="" and SmallClassName="" then
else
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
end if
end sub
'=================================================
'过程名:ShowArticleTotal
'作 用:显示文章总数
'参 数:无
'=================================================
sub ShowArticleTotal()
dim sqlTotal
dim rsTotal
sqlTotal="select Count(*) From Hover_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
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
rsTotal.close
set rsTotal=nothing
end sub
'=================================================
'过程名:ShowArticle
'=================================================
sub ShowArticle(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
sqlArticle="select top " & MaxPerPage
else
sqlArticle="select "
end if
sqlArticle=sqlArticle & " ArticleID,Product_Id,BigClassName,SmallClassName,IncludePic,Title,Spec,Size,Memo,DefaultPicUrl,UpdateTime,Hits From Hover_Product where Passed=True "
if BigClassName<>"" then
sqlArticle=sqlArticle & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlArticle=sqlArticle & " and SmallClassName='" & SmallClassName & "' "
end if
else
if SpecialName<>"" then
sqlArticle=sqlArticle & " and SpecialName='" & SpecialName & "' "
end if
end if
sqlArticle=sqlArticle & " order by articleid desc"
Set rsArticle= Server.CreateObject("ADODB.Recordset")
rsArticle.open sqlArticle,conn,1,1
if rsArticle.bof and rsArticle.eof then
response.Write("<br><li>没有任何产品</li>")
else
if currentPage=1 then
call ArticleContent(TitleLen)
else
if (currentPage-1)*MaxPerPage<totalPut then
rsArticle.move (currentPage-1)*MaxPerPage
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=155 rowspan=6 align=center height=155 background=Skins/Default/cnimg/nopic.jpg >"
strTemp= strTemp & "<a href=Product_Show.asp?ArticleID=" & rsArticle("articleid") & ">"
strTemp= strTemp & "<img width=153 height=153 border=0 src=" & rsArticle("DefaultPicUrl") & " >"
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "<td width=14% height=12>产品名称:</td>"
strTemp= strTemp & "<td><a href=Product_Show.asp?ArticleID=" & rsArticle("articleid") & ">" & rsArticle("Title") & "</a></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td height=12>产品规格:</td>"
strTemp= strTemp & "<td>" & rsArticle("Spec") & "</td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td height=12>产品类别:</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>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td height=18>产品编号:</td>"
strTemp= strTemp & "<td>" & rsArticle("Product_Id") & "</td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td height=12>产品信息:</td>"
strTemp= strTemp & "<td><a href=Product_Show.asp?ArticleID=" & rsArticle("articleid") & "><img src=Skins/Default/cnimg/B_More2.gif width=79 height=18 border=0></a></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "<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 & "</td>"
strTemp= strTemp & "<td height=12>"
strTemp= strTemp & "<div align=center><a href='javascript:eshop(" & rsArticle("Product_Id") & ")'><img border=0 src=Skins/Default/cnimg/buy.gif width=140 height=20>"
strTemp= strTemp & "</a></div></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "</table>"
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td height=8 colspan=3 background=Skins/Default/cnimg/line.gif ></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "</table>"
response.write strTemp
rsArticle.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end sub
'=================================================
'过程名:ShowSearchTerm
'作 用:显示搜索条件信息
'参 数:无
'=================================================
sub ShowSearchTerm()
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
end if
end sub
'=================================================
'过程名:SearchResultTotal
'作 用:显示搜索结果总数
'参 数:无
'=================================================
sub SearchResultTotal()
dim rsTotal,sqlTotal
sqlTotal="select count(*) From Hover_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 Hover_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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -