<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->


<%Call head()
Call saycardd("鲜花鸡蛋")
dim bbsid,tid,TP
bbsid=request.QueryString("bbsid")
TP=request.QueryString("TP")
TP=clng(TP)
tid=request.QueryString("tid")
if bbsid="" or Isnumeric(bbsid)=False then
  Call Error("ID无效！")
  end if
if tid="" or Isnumeric(tid)=False then
  Call Error("ID无效！")
  end if
if TP<>1 then
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from bbs_bad where tid="&tid&" and ids="&myid,conn,1,2
if not rs.eof then
response.redirect "topic.asp?bbsid="&bbsid&"&tid="&tid&"&sid="&sid&""
end if
rs.addnew
rs("tid")=tid
rs("ids")=myid
rs.update
rs.close
set rs=nothing
conn.Execute("update sell set d=d+1 Where id=" & tid)
conn.close
set conn=nothing
response.redirect "topic.asp?bbsid="&bbsid&"&tid="&tid&"&sid="&sid&""
else
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from bbs_good where tid="&tid&" and ids="&myid,conn,1,2
if not rs.eof then
response.redirect "topic.asp?bbsid="&bbsid&"&tid="&tid&"&sid="&sid&""
end if
rs.addnew
rs("tid")=tid
rs("ids")=myid
rs.update
rs.close
set rs=nothing
conn.Execute("update sell set x=x+1 Where id=" & tid)
conn.close
set conn=nothing
response.redirect "topic.asp?bbsid="&bbsid&"&tid="&tid&"&sid="&sid&""
end If
Call head1%>

