<!--#include file="setting/conn.asp"--><%:Dim sql,rs:cid=SoonBiz.rid("cid") : If cid<0 Then cid=8 :SoonBiz.readchannel(cid)
SoonBiz.chkrepost :id=SoonBiz.rid("id")
If id<0 Then
ShowErr("请选择投票内容")
End If:classid=SoonBiz.rid("classid"):sql="select * from "& sheethead &"_vote where classid="&classid&" and ip='"& SoonBiz.UserTrueIP &"' and datediff("& SoonBiz.mdbtime("s") &",stime,"& soonbizcom &")<"& votetime:Set rs=SoonBiz.execute(sql)
If Not rs.eof Then
ShowErr("请不要重复投票")
End If:sql="update "& sheethead &"_article set hits=hits+1 where classid="& classid &" and id="&id:SoonBiz.execute(sql):sql="insert into "& sheethead &"_vote (uid,classid,fid,stime,ip) values (":sql=sql & SoonBiz.user_id:sql=sql & "," & classid:sql=sql & "," & id:sql=sql & "," & soonbizcom:sql=sql & ",'"& SoonBiz.usertrueip &"'":sql=sql & ")":SoonBiz.execute(sql):SoonBiz.success("投票成功"):setallnothing
%>