<!--#include file="../userCheck.asp"-->
<!--#include file="../conn.asp"-->
<%
id = request.QueryString("carId")

set rs = server.CreateObject("adodb.recordset")
sql="select * from product where userId="& session("userId23") &" and fa_chuqiu = '出售' and id = "& id &" order by id desc"
rs.open sql,conn,1,3
if rs.eof then
	response.write "<script>alert('对不起，这不是您发布的汽车，操作未完成。');history.back();</script>"
	response.End()
else
	rs("chushou") = 1
	rs.update
end if
rs.close
set rs = nothing
response.write "<script>alert('操作成功，已经设置为出售状态。');window.open('/view2Car.asp?id="& id &"','_self')</script>"
%>