<%Response.Buffer=true response.expires=0 votename=request("name") set rs=conn.execute("select * from vote where votename='"&votename&"' order by id") if rs.eof or rs.bof then errcho("你要查看的投票事件不存在!") response.end end if if rs("begin_time")<>rs("end_flag") and datediff("s",rs("end_flag"),now())>0 then Response.Redirect("tpjg.asp?name="&votename) response.end else errstr="" myid=Session("myid") myname=Session("myname") application.lock call get_guests if myid="" or myname="" then errstr="你尚未进入聊天室!" elseif myname<>guests(myid,0) or Session("mytemp")<>guests(myid,1) then errstr="你尚未进入聊天室!" elseif instr(rs("voted_user"),myname&" ")<>0 then errstr="你已经投过票了!" else set rs1=conn.execute("select * from user where username='"&myname&"'") if DATEDIFF("s",rs1("log_time"),rs("begin_time"))<0 then errstr="你是投票事件产生后才注册的用户!" elseif rs("exp_num")<10 and rs1("user_level")10 and rs1("exp_num")rs("end_flag") then autoend=true else autoend=false end if %>
<%=i%><%=rs("voteoptions")%><%if autoend then%><%=rs("votenum")%><%end if%>"> <%rs.movenext i=i+1 loop%>

<%if errstr="" then%>请投出你神圣的一票: <%else%><%=errstr%><%end if%>


[后退]
<%end if application.unlock%>