
<%if session("username")="" then response.redirect "ever.asp?lr=未注册用户不能投票"%>
<!--#include file="filetou.asp"-->
<!--#include file="fun_lT.asp"-->
<%
ID=request("ID")
MENUID=request("MENUID")
FS=request("FS")
sql="select 总票数,投票数量,最后评论时,最后评论人,开放评论 from lr where id="&id
Set rs=Server.CreateObject("ADODB.RecordSet") 
rs.Open sql,conn,1,3
if not rs("开放评论") then
  rs.close
  set conn=nothing
  response.redirect "ever.asp?lr=本投票已关闭，无法投票"
end if
TPSN=RS("投票数量")
TPS=MYDATA(TPSN,",")
NEWLR=""
zps=0
if fs="单" THEN
   R1=request.form("R1")
   TPS(R1)=TPS(R1)+1
   FOR I=0 TO 15
     IF TPS(I)="" THEN EXIT FOR
     NEWLR=NEWLR&TPS(I)&","
     zps=zps+tps(i)
   NEXT
else
  for i=0 to 15 
     if tps(i)="" then exIt for
     CLR=request.form("C"&I)
     IF CLR="ON" THEN
      TPS(I)=TPS(I)+1
     END IF
     NEWLR=NEWLR&TPS(I)&","
     zps=zps+tps(i)
  next
end if
RS("投票数量")=NEWLR
RS("总票数")=zps
RS("最后评论时")=now()
RS("最后评论人")=SESSION("USERNAME")
RS.UPDATE
rs.close
set conn=nothing
response.cookies("TP"&ID&SESSION("USERID"))="YES"
RESPONSE.COOKIES("TP"&ID&SESSION("USERID")).EXPIRES=DATE()+30


%>
<html>

<head>
<meta http-equiv="refresh" content="3;URL=<%="ltlist.asp?menuid="&menuid%>"> 
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>
<body bgcolor="#99CCFF"><div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-size: 10pt" bordercolor="#7396C6" width="60%" height="214" bgcolor="#FFFFFF">
    <tr>
      <td width="100%" height="214" valign="top">
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" background="ltimg/bg1.gif" height="25">
        <tr>
          <td width="100%">&nbsp;&nbsp; <b><font color="#FFFFFF" size="2">投票成功</font></b></td>
        </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-size: 10pt" bordercolor="#111111" width="100%" height="184">
        <tr>
          <td width="100%" height="61" align="center"><a href="index.asp">返回首页</a></td>
        </tr>
        <tr>
          <td width="100%" height="61" align="center"><a href="ltxxlr.asp?MENUID=<%=MENUID%>&id=<%=id%>">返回贴子</a></td>
        </tr>
        <tr>
          <td width="100%" height="62" align="center"><a href="ltlist.asp?menuid=<%=menuid%>">返回栏目</a></td>
        </tr>
      </table>
      <p>&nbsp; 如不选择,三秒后自动返回贴子所在版面<br>
　</td>
    </tr>
  </table>
  </center>
</div></body></html>