?? syscode.asp
字號:
<!--#Include File="Check_Sql.asp"-->
<!--#include file="Conn.asp"-->
<!--#include file="Config.asp"-->
<!--#include file="Ubbcode.asp"-->
<!--#include file="Function.asp"-->
<%
dim strFileName,MaxPerPage,ShowSmallClassType
dim totalPut,CurrentPage,TotalPages
dim BeginTime,EndTime
dim founderr, errmsg
dim BigClassName,SmallClassName,SpecialName,keyword,strField
dim rs,sql,sqlProduct,sqlDown,rsProduct,rsDown,sqlSearch,rsSearch,sqlBigClass,rsBigClass,sqlBigClass_Down,sqlSpecial,rsSpecial
dim SpecialTotal
BeginTime=Timer
BigClassName=Trim(request("BigClassName"))
SmallClassName=Trim(request("SmallClassName"))
SpecialName=trim(request("SpecialName"))
keyword=trim(request("keyword"))
if keyword<>"" then
keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","<"),">",">")," "," ")
end if
strField=trim(request("Field"))
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
sqlBigClass="select * from BigClass order by BigClassID"
Set rsBigClass= Server.CreateObject("ADODB.Recordset")
rsBigClass.open sqlBigClass,conn,1,1
sqlBigClass_Down="select * from BigClass_Down order by BigClassID"
Set rsBigClass_Down= Server.CreateObject("ADODB.Recordset")
rsBigClass_Down.open sqlBigClass_Down,conn,1,1
'=================================================
'過程名:ShowSmallClass_Tree
'作 用:樹形目錄方式顯示欄目
'參 數:無
'=================================================
sub ShowSmallClass_Tree()
if rsBigClass.bof and rsBigClass.eof then
response.Write "Building……"
else
dim sqlClass,rsClass,strTree,BigClassNum,i,j
rsBigClass.movefirst
BigClassNum=rsBigClass.recordcount
i=1
do while not rsBigClass.eof
if i<BigClassNum then
strTree=""
else
strTree=""
end if
sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
strTree= strTree & "<table width=180 border=0 cellpadding=0 cellspacing=0>"
strTree= strTree & "<tr>"
strTree= strTree & "<td width=24 height=22>"
strTree= strTree & "<div align=center><img src=Img/arrow_6.gif width=13 height=11></div></td>"
strTree= strTree & "<td width=150>"
strTree= strTree & "<a href='Product.asp?BigClassName=" & rsBigClass("BigClassName") & "'>"
strTree=strTree & rsBigClass("BigClassName")
strTree=strTree & "</a></td>"
'strTree=strTree & "</td>"
strTree= strTree & "</tr><tr>"
strTree=strTree & "<TD height=1 colspan=2 background=img/naSzarym.gif>"
strTree=strTree & "<IMG height=1 src=img/1x1_pix.gif width=10></TD>"
strTree=strTree & "</TR>"
strTree=strTree & "</table>"
SmallClassNum=rsClass.recordcount
j=1
do while not rsClass.eof
rsClass.movenext
j=j+1
loop
response.write strTree
rsBigClass.movenext
i=i+1
loop
rsClass.close
set rsClass=nothing
end if
end sub
'=================================================
'過程名:ShowSmallClass_Down_Tree
'作 用:樹形目錄方式顯示欄目
'參 數:無
'=================================================
sub ShowSmallClass_Down_Tree()
if rsBigClass_Down.bof and rsBigClass_Down.eof then
response.Write "Building……"
else
dim sqlClass,rsClass,strTree,BigClassNum,i,j
rsBigClass_Down.movefirst
BigClassNum=rsBigClass_Down.recordcount
i=1
do while not rsBigClass_Down.eof
if i<BigClassNum then
strTree=""
else
strTree=""
end if
sqlClass="select * from SmallClass_Down where BigClassName='" &rsBigClass_Down("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
strTree= strTree & "<table width=180 border=0 cellpadding=0 cellspacing=0>"
strTree= strTree & "<tr>"
strTree= strTree & "<td width=24 height=22>"
strTree= strTree & "<div align=center><img src=Img/arrow_6.gif width=13 height=11></div></td>"
strTree= strTree & "<td width=150>"
strTree= strTree & "<a href='download.asp?BigClassName=" & rsBigClass_Down("BigClassName") & "'>"
strTree=strTree & rsBigClass_Down("BigClassName")
strTree=strTree & "</a></td>"
'strTree=strTree & "</td>"
strTree= strTree & "</tr><tr>"
strTree=strTree & "<TD height=1 colspan=2 background=img/naSzarym.gif>"
strTree=strTree & "<IMG height=1 src=img/1x1_pix.gif width=10></TD>"
strTree=strTree & "</TR>"
strTree=strTree & "</table>"
SmallClassNum=rsClass.recordcount
j=1
do while not rsClass.eof
rsClass.movenext
j=j+1
loop
response.write strTree
rsBigClass_Down.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 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 " nothing vote"
else
response.write "<form name='VoteForm' method='post' action='vote.asp' target='_blank'><td>"
response.write rsVote("Title") & "<br><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 "<a href='javascript:VoteForm.submit();'><img src='images/voteSubmit.gif' width='52' height='18' border='0'></a> "
response.write "<a href='Vote.asp?Action=Show' target='_blank'><img src='images/voteView.gif' width='52' height='18' border='0'></a>"
response.write "</td></form>"
end if
rsVote.close
set rsVote=nothing
end sub
'=================================================
'過程名:ShowClassGuide
'作 用:顯示欄目導航位置
'參 數:無
'=================================================
sub ShowClassGuide()
response.write " <a href='Products.asp'>Products</a> >>"
if BigClassName="" and SmallClassName="" then
response.write " All products"
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 "All small class"
end if
end if
end if
end sub
'=================================================
'過程名:ShowClass_DownGuide
'作 用:顯示欄目導航位置
'參 數:無
'=================================================
sub ShowClass_DownGuide()
response.write " <a href='download.asp'>Download</a> >>"
if BigClassName="" and SmallClassName="" then
response.write " All download"
else
if BigClassName<>"" then
response.write " <a href='Download.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a> >> "
if SmallClassName<>"" then
response.write "<a href='Download.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a>"
else
response.write "All small class"
end if
end if
end if
end sub
'=================================================
'過程名:ShowProductTotal
'作 用:顯示文章總數
'參 數:無
'=================================================
sub ShowProductTotal()
dim sqlTotal
dim rsTotal
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
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 "amount " & totalPut & " a product"
end if
rsTotal.close
set rsTotal=nothing
end sub
'=================================================
'過程名:ShowDownTotal
'作 用:顯示文章總數
'參 數:無
'=================================================
sub ShowDownTotal()
dim sqlTotal
dim rsTotal
sqlTotal="select Count(*) from download "
if BigClassName<>"" then
sqlTotal=sqlTotal & " where BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlTotal=sqlTotal & " and SmallClassName='" & SmallClassName & "' "
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 "amount 0 a download"
else
totalPut=rsTotal(0)
response.Write "amount " & totalPut & " a download"
end if
rsTotal.close
set rsTotal=nothing
end sub
'=================================================
'過程名:ShowProduct
'=================================================
sub ShowProduct(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
sqlProduct="select top " & MaxPerPage
else
sqlProduct="select "
end if
sqlProduct=sqlProduct & " ID,Product_Id,BigClassName,SmallClassName,IncludePic,Title,Price,Spec,Unit,Memo,DefaultPicUrl,UpdateTime,Hits from Productwygk where Passed=True "
if BigClassName<>"" then
sqlProduct=sqlProduct & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlProduct=sqlProduct & " and SmallClassName='" & SmallClassName & "' "
end if
else
if SpecialName<>"" then
sqlProduct=sqlProduct & " and SpecialName='" & SpecialName & "' "
end if
end if
sqlProduct=sqlProduct & " order by ID desc"
Set rsProduct= Server.CreateObject("ADODB.Recordset")
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -