app.asp
来自「1. 硬件环境:MS WINDOWS NT PACK 4 OR LATER /W」· ASP 代码 · 共 208 行
ASP
208 行
<%
Sub SortTop
application.lock
Sql="Select SortCnName,SortDad,SortID From Product_Sort where SortDad=0 Order by SortNum"
Set Rs = Conn.Execute(Sql)
Application(registered&"SortTop")=Application(registered&"SortTop")&"<table cellSpacing=0 cellPadding=0 width=100% border=0 height=15 style=""border-left:0px none;TABLE-LAYOUT:fixed;"">"
do while not rs.eof
Application(registered&"SortTop")=Application(registered&"SortTop")&"<tr><td height=18 width=100% > <IMG src=images/bullet.gif border=0><a href=SortList.asp?SortId="&rs("SortID")&" target=main><font title="&rs("SortCnName")&">"&rs("SortCnName")&"</font></a></td></tr>"
rs.movenext
loop
Rs.Close
Application(registered&"SortTop")=Application(registered&"SortTop")&"</table>"
Set Rs = Nothing
application.unlock
End Sub
Sub SortPlay
application.lock
Application(registered&"SortPl")=""
Application(registered&"SortPl")=Application(registered&"SortPl")&"<table cellSpacing=0 cellPadding=0 width=100% border=0 height=15 style=""border-left:0px none;TABLE-LAYOUT:fixed;"">"
Puin=Split(conn.execute("Select FunctionInfo from Functions where FunctionID=25")(0),"|")
For i=0 to Ubound(Puin)-1
Name=Split(Puin(i),",")
Application(registered&"SortPl")=Application(registered&"SortPl")&"<tr><td height=18 width=100% title="&Name(0)&"> <IMG src=images/bullet.gif border=0><a href=Plug-in.asp?FileName="&Name(1)&"&Title="&Name(0)&" target=main>"&Name(0)&"</a></td></tr>"
Next
Application(registered&"SortPl")=Application(registered&"SortPl")&"</table>"
application.unlock
End Sub
'----------------------------------------------将菜单放入内存--------------------------------------------
Sub BbsMenu
application.lock
Application(registered&"BbsMenu")=""
Application(registered&"BbsMenu")=Application(registered&"BbsMenu")&"<table cellSpacing=0 cellPadding=0 width=100% border=0 height=15 style=""border-left:0px none;TABLE-LAYOUT:fixed;"">"
Sql="Select BbsName,BbsId From BbsInfo Where DelThis=False and BbsShow=False Order by BbsPx"
Set Rs = Conn.Execute(Sql)
Do While Not Rs.Eof
Application(registered&"BbsMenu")=Application(registered&"BbsMenu")&"<tr><td height=18 width=100% title="&Rs("BbsName")&"> <IMG src=images/bullet.gif border=0><a href=BbsList.asp?Menu=List&BbsID="&Rs("BbsId")&" target=main>"&Rs("BbsName")&"</a></td></tr>"
Rs.Movenext
Loop
Rs.close
Application(registered&"BbsMenu")=Application(registered&"BbsMenu")&"</table>"
Set Rs = Nothing
application.unlock
End Sub
'----------------------------------------------将常用信息放入内存--------------------------------------------
Function app
application.lock
sql="Select FunctionOC,FunctionInfo From Functions where FunctionID Between 13 and 15"
Set rs = Conn.execute(sql)
if Rs("FunctionOC")=true then
Application(registered&"ProductI")=Rs("FunctionInfo")
else
Application(registered&"ProductI")=""
end if
rs.movenext
if Rs("FunctionOC")=true then
Application(registered&"ProductII")=Rs("FunctionInfo")
else
Application(registered&"ProductII")=""
end if
rs.movenext
if Rs("FunctionOC")=true then
Application(registered&"ProductIII")=Rs("FunctionInfo")
else
Application(registered&"ProductIII")=""
end if
rs.close
Set Rs = Nothing
application.unlock
End Function
Sub TheWord
application.lock
Application(registered&"TheWord")=""
Sql="Select ShowID,Title,Icon From Forum Where DelThis=False and InIndex=True Order by PostTime Desc"
Set Rs = Conn.Execute(Sql)
Do While Not Rs.Eof
Application(registered&"TheWord")=Application(registered&"TheWord")&"<table cellSpacing=0 cellPadding=0 width=100% border=0 style=""border-left:0px none;TABLE-LAYOUT:fixed;""><tr>"
Application(registered&"TheWord")=Application(registered&"TheWord")&"<tr><td height=1 width=33% ></td><td height=1 width=33% ></td><td height=1 width=33% ></td></tr>"
For i=i to i+2
Application(registered&"TheWord")=Application(registered&"TheWord")&"<td height=16 width=33% ><img src=images/biaoti.gif border=0><font color=#000000> <a style='cursor:hand;' Onclick=javascript:open('ShowNew.asp?ThisId="&rs("ShowID")&"','','width=400,height=400,resizable,scrollbars')>"&Rs("Title")&"</a></font></td>"
Rs.Movenext
if rs.EOF Then Exit For
next
Application(registered&"TheWord")=Application(registered&"TheWord")&"<tr></table>"
Loop
Set Rs = Nothing
application.unlock
End Sub
'-------------------------------输出产品信息``
sub shuchu(bas,img,lis)
Select case lis
case 1
Application(registered&"Commend")=Application(registered&"Commend")&"<a href=ShowProDuct.asp?Proid="&rs("ProductID")&"><img src=UpProductimg/"&bas&"/"&img&" width=80 height=80 border=1 title='货号:"&rs("ProductNum")&"<br>"&rs("ProductCnName")&"<br>"
if Application(registered&"ProductI")<>"" then Application(registered&"Commend")=Application(registered&"Commend")& "<strike>"&Application(registered&"ProductI")&":"&FormatCurrency(rs("ProductI"))&"</strike><br>"
if Application(registered&"ProductII")<>"" then Application(registered&"Commend")=Application(registered&"Commend")& Application(registered&"ProductII")&":"&FormatCurrency(rs("ProductII"))&"<br>"
if Application(registered&"ProductIII")<>"" then Application(registered&"Commend")=Application(registered&"Commend")&"<font color=#ff9966>"& Application(registered&"ProductIII")&":"&FormatCurrency(rs("ProductIII"))&"</font><br>"
Application(registered&"Commend")=Application(registered&"Commend")&"' onmouseover=yidong.stop() onmouseout=yidong.start()></a> "
case 2
Application(registered&"NewP")=Application(registered&"NewP")& "<td width=20% ><center>货号:"&rs("ProductNum")&"<br><a href=ShowProDuct.asp?ProID="&rs("ProductID")&" title=点击查看"&rs("ProductCnName")&"详细介绍><img src=UpProductimg/"&bas&"/"&img&" width=80 height=80 border=1 ></a><br><br>"&rs("ProductCnName")&"<br>"
if Application(registered&"ProductI")<>"" then Application(registered&"NewP")=Application(registered&"NewP")& "<strike>"&Application(registered&"ProductI")&":"&FormatCurrency(rs("ProductI"))&"</strike><br>"
if Application(registered&"ProductII")<>"" then Application(registered&"NewP")=Application(registered&"NewP")& Application(registered&"ProductII")&":"&FormatCurrency(rs("ProductII"))&"<br>"
if Application(registered&"ProductIII")<>"" then Application(registered&"NewP")=Application(registered&"NewP")&"<font color=#ff9966>"&Application(registered&"ProductIII")&":"&FormatCurrency(rs("ProductIII"))&"</font><br>"
Application(registered&"NewP")=Application(registered&"NewP")& "<a href=ShowProDuct.asp?ProID="&rs("ProductID")&"><font color=#A4B6D7>[详细介绍]</a></font><br> <a title=点击订购"&rs("ProductCnName")&" style='cursor:hand;' onclick=javascript:open('OrderList.asp?menu=AddPro&ProID="&rs("ProductID")&"&ProCName="&Trim(rs("ProductCnName"))&"','','width=400,height=150')><img src=images/nico_01.gif border=0>订购</a> <hr width=80% color=#A4B6D7 SIZE=1></center></td>"
case 3
Application(registered&"NewP")=Application(registered&"NewP")& "<td width=20% ><center>货号:"&rs("ProductNum")&"<br><a href=ShowProDuct.asp?ProID="&rs("ProductID")&" title=点击查看"&rs("ProductCnName")&"详细介绍><img src=images/none.gif width=80 height=80 border=1 ></a><br><br>"&rs("ProductCnName")&"<br>"
if Application(registered&"ProductI")<>"" then Application(registered&"NewP")=Application(registered&"NewP")& "<strike>"&Application(registered&"ProductI")&":"&FormatCurrency(rs("ProductI"))&"</strike><br>"
if Application(registered&"ProductII")<>"" then Application(registered&"NewP")=Application(registered&"NewP")& Application(registered&"ProductII")&":"&FormatCurrency(rs("ProductII"))&"<br>"
if Application(registered&"ProductIII")<>"" then Application(registered&"NewP")=Application(registered&"NewP")&"<font color=#ff9966>"&Application(registered&"ProductIII")&":"&FormatCurrency(rs("ProductIII"))&"</font><br>"
Application(registered&"NewP")=Application(registered&"NewP")& "<a href=ShowProDuct.asp?ProID="&rs("ProductID")&"><font color=#A4B6D7>[详细介绍]</font></a><br><img src=images/nico_01.gif> <a title=点击订购"&rs("ProductCnName")&" style='cursor:hand;' onclick=javascript:open('OrderList.asp?menu=AddPro&ProID="&rs("ProductID")&"&ProCName="&Trim(rs("ProductCnName"))&"','','width=400,height=150')>订购</a> <hr width=80% color=#A4B6D7 SIZE=1><center></td>"
End Select
end sub
sub NewP
application.lock
sql="Select top "&conn.execute("Select FunctionInfo from Functions where FunctionID=18")(0)&" ProductID,ProductNum,ProductCnName,ProductEnName,ProductI,ProductII,ProductIII,ProductCommend,ProductConceal,ProductNew,ProductSf,ProductPacking,ProductArrange,ProductSort,ProductInfo,ProductImgI,ProductImgII From Product_Info where Delthis=False and ProductNew = True and ProductConceal=False order by ProductAddtime desc,ProductID desc"
Set Rs = Conn.Execute(Sql)
i=0
do while not rs.eof
Application(registered&"NewP")=Application(registered&"NewP")& "<table border=0 cellpadding=0 cellspacing=4 style=border-collapse: collapse width=100% height=59 class=border1><tr>"
For i=i to i+4
if rs("ProductImgI") <> "" then
shuchu "S",rs("ProductImgI"),2
elseif rs("ProductImgII") <> "" then
shuchu "B",rs("ProductImgII"),2
else
shuchu "","",3
end if
rs.MoveNext
if rs.EOF Then Exit For
Next
Application(registered&"NewP")=Application(registered&"NewP")& "<tr></table>"
loop
rs.close
application.unlock
End sub
sub Commend
sql="Select ProductID,ProductNum,ProductCnName,ProductEnName,ProductI,ProductII,ProductIII,ProductCommend,ProductConceal,ProductNew,ProductSf,ProductPacking,ProductArrange,ProductSort,ProductInfo,ProductImgI,ProductImgII From Product_Info where Delthis=False and ProductConceal=False and ProductCommend=true"
Set Rs = Conn.Execute(sql)
do while not rs.eof
if rs("ProductImgI") <> "" then
shuchu "S",rs("ProductImgI"),1
elseif rs("ProductImgII") <> "" then
shuchu "B",rs("ProductImgII"),1
end if
rs.movenext
loop
rs.close
Set Rs = Nothing
end sub
Sub OnlineRen
application.lock
Application(registered&"OnlineUs")=""
Application(registered&"OR")=conn.execute("Select count(UsSessionid) from Online")(0)
Application(registered&"OR1")=conn.execute("Select count(UsSessionid) from Online Where Cint(UsID) >=0")(0)
Application(registered&"OR2")=conn.execute("Select count(UsSessionid) from Online Where Cint(UsID) =-1")(0)
Application(registered&"TTime")=Now
conn.execute("delete from online where DateDiff('n',UsUTime,Now)>"&(conn.execute("Select FunctionInfo from Functions where FunctionID=24")(0)))
application.unlock
End Sub
Sub OnlineList
Sql="Select UsID,UsName,UsHead From Online Where UsID <> '-1'"
Set Rs = Conn.Execute(Sql)
do while not rs.eof
Response.Write "<table border=0 cellpadding=0 cellspacing=4 width=100% ><tr>"
For i=i to i+5
Response.Write "<td width=16.6% ><a style='cursor:hand;' onclick=javascript:open('friend.asp?menu=post&inceptID="&rs("UsID")&"','','width=320,height=170')><img src=images/face/"&Rs("UsHead")&".gif width=16 heaght=16 border=0 title=发一条信息给"&Rs("UsName")&"></a> <a href=ShowUserInfo.asp?UsId="&Rs("UsID")&">"&Rs("UsName")&"</a></td>"
rs.MoveNext
if rs.EOF Then Exit For
Next
Response.Write "<tr></table>"
loop
Rs.Close
Set Rs = Nothing
End Sub
Sub FriendLink
Application(registered&"Friend")=""
application.lock
if conn.execute("Select len(FunctionInfo) from Functions where FunctionID=17")(0) > 0 Then
Puin=Split(conn.execute("Select FunctionInfo from Functions where FunctionID=17")(0),"|")
i=0
Application(registered&"Friend")=Application(registered&"Friend")& "<table border=0 cellpadding=0 cellspacing=4 style=border-collapse: collapse width=100% >"
do while i < Ubound(Puin)
Application(registered&"Friend")=Application(registered&"Friend")& "<tr>"
For i=i to i+5
if i > Ubound(Puin)Then Exit For
img=Split(Puin(i),",")
if Puin(i)<>"" Then Application(registered&"Friend")=Application(registered&"Friend")& "<td><a href="&img(0)&" target=_blank><img src="&img(1)&" border=0 width=88 height=31></a></td>"
Next
Application(registered&"Friend")=Application(registered&"Friend")& "<tr>"
loop
Application(registered&"Friend")=Application(registered&"Friend")& "</table>"
End if
application.unlock
End Sub
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?