<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="usercookies.asp"-->
<!--#include file="foxx.asp"-->
<%
dim username,id,xxid,jiename,bbb
dim rs,sql
username=trim(request("username"))
jiename=trim(request("jiename"))
id=trim(request("id"))
xxid=trim(request("xxid"))
bbb=trim(request("bbb"))

if id="" or username="" then
response.Write "<script LANGUAGE='javascript'>alert('您的参数有误！');history.go(-1);</script>"
response.end
end if

set rs=server.createobject("adodb.recordset")
sql="select * from [FOX_xinxi] where id="&xxid&""
rs.open sql,conn,1,3
if rs("ok")=1 then
response.Write "<script LANGUAGE='javascript'>alert('您已经结帖了！');history.go(-1);</script>"
response.end
else
rs("ok")=1
rs.update
end if
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")

set rs=server.createobject("adodb.recordset")
sql="select ok from [FOX_hf] where id="&id&""
rs.open sql,conn,1,3
rs("ok")=1
rs.update
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select zhidaojf from [FOX_user] where username='"&jiename&"'"
rs.open sql,conn,1,3
rs("zhidaojf")=rs("zhidaojf")-bbb
rs.update
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select zhidaojf from [FOX_user] where username='"&username&"'"
rs.open sql,conn,1,3
rs("zhidaojf")=rs("zhidaojf")+bbb+xtjf
rs.update
rs.close
set rs=nothing
response.Write "<script LANGUAGE='javascript'>alert('结帖成功！');this.location.href='mywenlist.asp?fox="&xxid&"';</script>"
	Response.Write"<meta http-equiv='refresh' content='180;URL=mywenlist.asp?fox="&xxid&"'>"
%>