<!--#include file="conn.asp"-->
<%
dim action, carId, userId
action = request.QueryString("action")
carId  = request.QueryString("carId")
userId = request.QueryString("userId")

if action = "jubao" then		'处理举报不良信息
	if carId = "" then
		call wrong("参数传递错误！")
	end if

	set rs_24 = server.CreateObject("adodb.recordset")
	rs_24.open "select top 1 * from badCar where carId="& cint(carId) &"",conn,1,3

	if not rs_24.eof and not rs_24.bof then
		response.write "<script>alert('此信息已经被举报正等待管理员处理，您不能重复提交.');</script>"
		response.End()
	else
		rs_24.addnew
		rs_24("carId") = carId
		if userId <> "" then
			rs_24("userId") = userId
		else
			rs_24("userId") = 0
		end if
		rs_24.update
		response.write "<script>alert('您的举报信息提交成功，感谢您的关注！')</script>"
	end if
	
	rs_24.close
	set rs_24 = nothing
end if
%>