%response.expires=0
application.lock
myid=Session("myid")
if myid="" then response.end
myname=Session("myname")
call get_guests
call get_maxuser
call get_votes
user_num=0
for i=0 to MaxUser
if guests(i,0)<>"" then user_num=user_num+1
next
call get_says
say_id=says(current,0)+1
current=current+1
set rsparam=conn.execute("select * from param")
if not rsparam("envoteonline") then
response.write ""
response.end
end if
if votes(0)=0 then
newsay=""
votetype=request("type")
if votetype>1 and user_num>4 then
who=request("who")
forwhat=left(trdb(request("forwhat")),40)
if forwhat="" then
response.write ""
response.end
else
votes(8)=forwhat
end if
nowho=true
for i=0 to MaxUser
if (guests(i,0)<>"" and guests(i,0)=who and guests(i,0)<>votes(1) and guests(i,4)<>rsparam("superlevel") ) then
nowho=false
votes(7)=guests(i,2)
exit for
end if
next
if nowho then
response.write ""
response.end
end if
if votetype=2 then
votes(0)=2
newsay="'【提议】有人以理由〖"&votes(8)&"〗提议弹劾管理员"&who&"!请你点击:[同意],[不同意]?','大家','大家'"
elseif votetype=3 then
votes(0)=3
newsay="'【提议】有人以理由〖"&votes(8)&"〗提议把"&who&"请出聊天室!请你点击:[同意],[不同意]?','大家','大家'"
end if
votes(1)=who
for i=0 to MaxUser
if guests(i,0)<>"" then
if guests(i,0)<>who and guests(i,0)<>myname then
guests(i,8)=true
else
guests(i,8)=false
end if
end if
next
votes(2)=1
votes(3)=0
votes(4)=user_num
votes(5)=now()
votes(6)=true
votes(9)=myname
end if
if newsay<>"" then
if current>MaxTalk then current=0
says(current,0)=say_id
says(current,1)="大家"
says(current,2)="大家"
says(current,3)=false
says(current,4)=-2
says(current,5)=newsay&",0,'green','red',-4,'"&time()&"',"
call put_says
call put_guests
call put_votes
end if
end if
application.unlock%>