<!--#include file="inc_const.asp"-->
<%response.expires=0

application.lock
set cschat=server.createobject("ffcschat.cssbchat")

my_level=cschat.getLevel(Session,Application(ConstStr & "_user_list"),Application(ConstStr & "_room_list"))

if my_level=0 then
  set cschat=nothing
  application.unlock
  response.end
end if

myname=cschat.myname
votes=application(ConstStr & "_votes")
errstr=""
if (votes(0)=0) then
  errstr="投票已经终止了！"
elseif (cschat.getListvalue(Application( ConstStr & "_user_list"),myname,7)<>"1") then
  errstr="你没有投票权利，可能理由：你投过了或你是在事件产生后才进来的！"
elseif votes(0)>1 then
  if request("agree")="1" then
    votes(2)=votes(2)+1
  elseif request("agree")="0" then
    votes(3)=votes(3)+1
  end if
  
  errstr="当前共有"&votes(2)&"票赞成"&votes(3)&"票反对！"
  application(ConstStr & "_votes")=votes
  
  Application( ConstStr & "_user_list")=cschat.SetListValue(Application( ConstStr & "_user_list"),myname,7,0,0)
end if
if errstr<>"" then response.write "<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'><meta content='text/html;charset=gb2312' http-equiv='content-type'><SCRIPT>parent.addsay(-1,'【系统】"&errstr&"','','"&myname&"',0,'990066','',-2,'"&cschat.gettimestr()&"');</script>"
application.unlock
set cschat=nothing%>