1.我的.asa如下:
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
sub Application_OnStart
connstr="DBQ="+server.mappath("yyjh/jiutian4.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};Pwd=jiutian4;"
Application("hg_connstr")=connstr
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open connstr
sql="SELECT name,value FROM system"
rs.open sql,conn,1,1
do while Not rs.Eof
Select Case rs("name")
Case "adminkey" '
Application("hxf_c_adminkey")=rs("value")
Case "chatroomname"'1
Application("hxf_c_chatroomname")=rs("value")
Case "user"'2
Application("hxf_c_user")=rs("value")
Case "sn"'3
Application("hxf_c_sn")=rs("value")
Case "copyright"'4
Application("hxf_c_copyright")=rs("value")
Case "visitor"'5
Application("hxf_c_visitor")=rs("value")
Case "homepageurl"'6
Application("hxf_c_homepageurl")=rs("value")
Case "opendate"'7
Application("hxf_c_opendate")=rs("value")
Case "chatroombgcolor"'8
Application("hxf_c_chatroombgcolor")=rs("value")
Case "chatbgcolor"'9
Application("hxf_c_chatbgcolor")=rs("value")
Case "chatimage"'10
Application("hxf_c_chatimage")=rs("value")
Case "chatcolor"'11
Application("hxf_c_chatcolor")=rs("value")
Case "ver"'12
Application("hxf_c_ver")=rs("value")
Case "allowhtml"'13
Application("hxf_c_allowhtml")=int(rs("value"))
Case "iplocktime"'14
Application("hxf_c_iplocktime")=int(rs("value"))
Case "level1to2"'15
Application("hxf_c_level1to2")=int(rs("value"))
Case "level2to3"'16
Application("hxf_c_level2to3")=int(rs("value"))
Case "level3to4"'17
Application("hxf_c_level3to4")=int(rs("value"))
Case "level4to5"'18
Application("hxf_c_level4to5")=int(rs("value"))
Case "maxpeople"'19
Application("hxf_c_maxpeople")=int(rs("value"))
Case "maxtimeout"'20
Application("hxf_c_maxtimeout")=int(rs("value"))
Case "pollbegin"'21
Application("hxf_c_pollbegin")=CDate(rs("value"))
Case "pollend"'22
Application("hxf_c_pollend")=CDate(rs("value"))
Case "pollvalue"'23
Application("hxf_c_pollvalue")=CDate(rs("value"))
Case "disproxy"'24
Application("hxf_c_disproxy")=rs("value")
Case "disnewuser"'25
Application("hxf_c_disnewuser")=rs("value")
Case "closedoor"'26
Application("hxf_c_closedoor")=rs("value")
Case "disloginname"'27
Application("hxf_c_disloginname")=rs("value")
Case "userinto"'28
Application("hxf_c_userinto")=rs("value")
Case "userout"'29
Application("hxf_c_userout")=rs("value")
Case "userdown"'30
Application("hxf_c_userdown")=rs("value")
Case "admin"'31
Application("hxf_c_admin")=rs("value")
Case "paofen"'32
Application("hxf_c_paofen")=cint(rs("value"))
Case "banner"'33
Application("hxf_c_banner")=rs("value")
Case "roomsn"'34
Application("hxf_c_chatroominfo")=rs("value")
End Select
rs.MoveNext
loop
rs.close
sql="SELECT act FROM actlib WHERE acttype='1'"
rs.open sql,conn,1,1
totalact=rs.RecordCount
Randomize
mr=Int((totalact-250)*Rnd)
if mr<0 then mr=0
if mr>totalact-250 then mr=totalact-250
rs.Move mr
Dim autoact()
i=0
Do while Not(rs.Eof) and i<250
i=i+1
Redim Preserve autoact(i)
autoact(i)=rs("act")
rs.MoveNext
Loop
rs.close
conn.close
set rs=nothing
set conn=nothing
Application("hxf_c_autoact")=autoact
Dim nameindex(0)
useronlinename=""
onliners=0
Application("hxf_c_chatrs")=onliners
chatroomnamearr=Application("hxf_c_chatroominfo")
chatroominfo=split(chatroomnamearr,";")
for chatroomsn=0 to ubound(chatroominfo)
Application("hxf_c_onlinelist"&chatroomsn)=nameindex
Application("hxf_c_useronlinename"&chatroomsn)=useronlinename
application("hxf_c_chatroomname"&chatroomsn)=chatroominfo(chatroomsn)
application("hxf_c_chatrs"&chatroomsn)=0
next
Application("hxf_c_hidden")=0
Dim wbq(0)
Application("hxf_c_webicq")=wbq
webicqname=" "
Application("hxf_c_webicqname")=webicqname
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
t=s & ":" & f & ":" & m
Dim sd(180)
for i=1 to 171
sd(i)=0
next
sd(172)=1
sd(173)=1
sd(174)=0
sd(175)="AutoMan"
sd(176)="大家"
sd(177)="660099"
sd(178)="660099"
sd(179)="对"
sd(180)="<font color=black>【系统】</font><font color=red>聊天室开门啦!</font><font class=t>(" & t & ")</font>"
for chatroomsn=0 to ubound(chatroominfo)
Application("hxf_c_sd"&chatroomsn)=sd
Application("hxf_c_line"&chatroomsn)=1
next
End sub
</SCRIPT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Session_OnStart
Session.Timeout=3
Application.Lock
Application("hxf_c_active")=Application("hxf_c_active")+1
Application.UnLock
End Sub
</SCRIPT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Session_OnEnd
Application.Lock
Application("hxf_c_active")=Application("hxf_c_active")-1
if session("hxf_u_inthechat")="1" then
nickname=session("hxf_u_nickname")
chatroomsn=session("hxf_u_roomin")
useronlinename=Application("hxf_c_useronlinename"&chatroomsn)
if InStr(useronlinename," " & nickname & " ")<>0 then
onlinelist=Application("hxf_c_onlinelist"&chatroomsn)
dim newonlinelist()
useronlinename=""
onliners=0
js=1
ubl=UBound(onlinelist)
for i=1 to UBound(onlinelist) step 6
if CStr(onlinelist(i+1))<>CStr(nickname) then
onliners=onliners+1
useronlinename=useronlinename & " " & onlinelist(i+1)
Redim Preserve newonlinelist(js),newonlinelist(js+1),newonlinelist(js+2),newonlinelist(js+3),newonlinelist(js+4),newonlinelist(js+5)
newonlinelist(js)=onlinelist(i)
newonlinelist(js+1)=onlinelist(i+1)
newonlinelist(js+2)=onlinelist(i+2)
newonlinelist(js+3)=onlinelist(i+3)
newonlinelist(js+4)=onlinelist(i+4)
newonlinelist(js+5)=onlinelist(i+5)
js=js+6
end if
next
useronlinename=useronlinename&" "
if onliners=0 then
dim listnull(0)
Application("hxf_c_onlinelist"&chatroomsn)=listnull
else
Application("hxf_c_onlinelist"&chatroomsn)=newonlinelist
end if
Application("hxf_c_useronlinename"&chatroomsn)=useronlinename
Application("hxf_c_chatrs"&chatroomsn)=onliners
chatroominfo=split(Application("hxf_c_chatroominfo"),";")
onliners=0
for i = 0 to ubound(chatroominfo)
onliners=onliners+Application("hxf_c_chatrs"&i)
next
Application("hxf_c_chatrs")=onliners
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
t=s & ":" & f & ":" & m
sd=Application("hxf_c_sd"&chatroomsn)
line=int(Application("hxf_c_line"&chatroomsn))+1
Application("hxf_c_line"&chatroomsn)=line
for i=1 to 171
sd(i)=sd(i+9)
next
sd(172)=line
sd(173)=1
sd(174)=0
sd(175)=nickname
sd(176)="大家"
sd(177)="660099"
sd(178)="660099"
sd(179)="对"
sd(180)="<font color=black>【公告】</font><font color=F08000>" & Replace(Application("hxf_c_userdown"),"%%","<font color=black>" & nickname & "</font>") & "</font><font class=t>(" & t & ")</font>"
Application("hxf_c_sd"&chatroomsn)=sd
end if
end if
Application.UnLock
End sub
</SCRIPT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnEnd
End sub
</SCRIPT>
2.我换成
sql="SELECT * FROM 用户 where 会员='yes' order by 入会时间"
还是没有变化
1.我的.asa如下:
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
sub Application_OnStart
connstr="DBQ="+server.mappath("yyjh/jiutian4.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};Pwd=jiutian4;"
Application("hg_connstr")=connstr
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open connstr
sql="SELECT name,value FROM system"
rs.open sql,conn,1,1
do while Not rs.Eof
Select Case rs("name")
Case "adminkey" '
Application("hxf_c_adminkey")=rs("value")
Case "chatroomname"'1
Application("hxf_c_chatroomname")=rs("value")
Case "user"'2
Application("hxf_c_user")=rs("value")
Case "sn"'3
Application("hxf_c_sn")=rs("value")
Case "copyright"'4
Application("hxf_c_copyright")=rs("value")
Case "visitor"'5
Application("hxf_c_visitor")=rs("value")
Case "homepageurl"'6
Application("hxf_c_homepageurl")=rs("value")
Case "opendate"'7
Application("hxf_c_opendate")=rs("value")
Case "chatroombgcolor"'8
Application("hxf_c_chatroombgcolor")=rs("value")
Case "chatbgcolor"'9
Application("hxf_c_chatbgcolor")=rs("value")
Case "chatimage"'10
Application("hxf_c_chatimage")=rs("value")
Case "chatcolor"'11
Application("hxf_c_chatcolor")=rs("value")
Case "ver"'12
Application("hxf_c_ver")=rs("value")
Case "allowhtml"'13
Application("hxf_c_allowhtml")=int(rs("value"))
Case "iplocktime"'14
Application("hxf_c_iplocktime")=int(rs("value"))
Case "level1to2"'15
Application("hxf_c_level1to2")=int(rs("value"))
Case "level2to3"'16
Application("hxf_c_level2to3")=int(rs("value"))
Case "level3to4"'17
Application("hxf_c_level3to4")=int(rs("value"))
Case "level4to5"'18
Application("hxf_c_level4to5")=int(rs("value"))
Case "maxpeople"'19
Application("hxf_c_maxpeople")=int(rs("value"))
Case "maxtimeout"'20
Application("hxf_c_maxtimeout")=int(rs("value"))
Case "pollbegin"'21
Application("hxf_c_pollbegin")=CDate(rs("value"))
Case "pollend"'22
Application("hxf_c_pollend")=CDate(rs("value"))
Case "pollvalue"'23
Application("hxf_c_pollvalue")=CDate(rs("value"))
Case "disproxy"'24
Application("hxf_c_disproxy")=rs("value")
Case "disnewuser"'25
Application("hxf_c_disnewuser")=rs("value")
Case "closedoor"'26
Application("hxf_c_closedoor")=rs("value")
Case "disloginname"'27
Application("hxf_c_disloginname")=rs("value")
Case "userinto"'28
Application("hxf_c_userinto")=rs("value")
Case "userout"'29
Application("hxf_c_userout")=rs("value")
Case "userdown"'30
Application("hxf_c_userdown")=rs("value")
Case "admin"'31
Application("hxf_c_admin")=rs("value")
Case "paofen"'32
Application("hxf_c_paofen")=cint(rs("value"))
Case "banner"'33
Application("hxf_c_banner")=rs("value")
Case "roomsn"'34
Application("hxf_c_chatroominfo")=rs("value")
End Select
rs.MoveNext
loop
rs.close
sql="SELECT act FROM actlib WHERE acttype='1'"
rs.open sql,conn,1,1
totalact=rs.RecordCount
Randomize
mr=Int((totalact-250)*Rnd)
if mr<0 then mr=0
if mr>totalact-250 then mr=totalact-250
rs.Move mr
Dim autoact()
i=0
Do while Not(rs.Eof) and i<250
i=i+1
Redim Preserve autoact(i)
autoact(i)=rs("act")
rs.MoveNext
Loop
rs.close
conn.close
set rs=nothing
set conn=nothing
Application("hxf_c_autoact")=autoact
Dim nameindex(0)
useronlinename=""
onliners=0
Application("hxf_c_chatrs")=onliners
chatroomnamearr=Application("hxf_c_chatroominfo")
chatroominfo=split(chatroomnamearr,";")
for chatroomsn=0 to ubound(chatroominfo)
Application("hxf_c_onlinelist"&chatroomsn)=nameindex
Application("hxf_c_useronlinename"&chatroomsn)=useronlinename
application("hxf_c_chatroomname"&chatroomsn)=chatroominfo(chatroomsn)
application("hxf_c_chatrs"&chatroomsn)=0
next
Application("hxf_c_hidden")=0
Dim wbq(0)
Application("hxf_c_webicq")=wbq
webicqname=" "
Application("hxf_c_webicqname")=webicqname
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
t=s & ":" & f & ":" & m
Dim sd(180)
for i=1 to 171
sd(i)=0
next
sd(172)=1
sd(173)=1
sd(174)=0
sd(175)="AutoMan"
sd(176)="大家"
sd(177)="660099"
sd(178)="660099"
sd(179)="对"
sd(180)="<font color=black>【系统】</font><font color=red>聊天室开门啦!</font><font class=t>(" & t & ")</font>"
for chatroomsn=0 to ubound(chatroominfo)
Application("hxf_c_sd"&chatroomsn)=sd
Application("hxf_c_line"&chatroomsn)=1
next
End sub
</SCRIPT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Session_OnStart
Session.Timeout=3
Application.Lock
Application("hxf_c_active")=Application("hxf_c_active")+1
Application.UnLock
End Sub
</SCRIPT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Session_OnEnd
Application.Lock
Application("hxf_c_active")=Application("hxf_c_active")-1
if session("hxf_u_inthechat")="1" then
nickname=session("hxf_u_nickname")
chatroomsn=session("hxf_u_roomin")
useronlinename=Application("hxf_c_useronlinename"&chatroomsn)
if InStr(useronlinename," " & nickname & " ")<>0 then
onlinelist=Application("hxf_c_onlinelist"&chatroomsn)
dim newonlinelist()
useronlinename=""
onliners=0
js=1
ubl=UBound(onlinelist)
for i=1 to UBound(onlinelist) step 6
if CStr(onlinelist(i+1))<>CStr(nickname) then
onliners=onliners+1
useronlinename=useronlinename & " " & onlinelist(i+1)
Redim Preserve newonlinelist(js),newonlinelist(js+1),newonlinelist(js+2),newonlinelist(js+3),newonlinelist(js+4),newonlinelist(js+5)
newonlinelist(js)=onlinelist(i)
newonlinelist(js+1)=onlinelist(i+1)
newonlinelist(js+2)=onlinelist(i+2)
newonlinelist(js+3)=onlinelist(i+3)
newonlinelist(js+4)=onlinelist(i+4)
newonlinelist(js+5)=onlinelist(i+5)
js=js+6
end if
next
useronlinename=useronlinename&" "
if onliners=0 then
dim listnull(0)
Application("hxf_c_onlinelist"&chatroomsn)=listnull
else
Application("hxf_c_onlinelist"&chatroomsn)=newonlinelist
end if
Application("hxf_c_useronlinename"&chatroomsn)=useronlinename
Application("hxf_c_chatrs"&chatroomsn)=onliners
chatroominfo=split(Application("hxf_c_chatroominfo"),";")
onliners=0
for i = 0 to ubound(chatroominfo)
onliners=onliners+Application("hxf_c_chatrs"&i)
next
Application("hxf_c_chatrs")=onliners
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
t=s & ":" & f & ":" & m
sd=Application("hxf_c_sd"&chatroomsn)
line=int(Application("hxf_c_line"&chatroomsn))+1
Application("hxf_c_line"&chatroomsn)=line
for i=1 to 171
sd(i)=sd(i+9)
next
sd(172)=line
sd(173)=1
sd(174)=0
sd(175)=nickname
sd(176)="大家"
sd(177)="660099"
sd(178)="660099"
sd(179)="对"
sd(180)="<font color=black>【公告】</font><font color=F08000>" & Replace(Application("hxf_c_userdown"),"%%","<font color=black>" & nickname & "</font>") & "</font><font class=t>(" & t & ")</font>"
Application("hxf_c_sd"&chatroomsn)=sd
end if
end if
Application.UnLock
End sub
</SCRIPT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnEnd
End sub
</SCRIPT>
2.我换成
sql="SELECT * FROM 用户 where 会员='yes' order by 入会时间"
还是没有变化