<%temp_detail_goods_detail_review_add_handle=site.object_p%>
<!-- object[<%=site.object_p%>]::temp_detail_goods_detail_review_add_handle -->
<%
if not site.check.isInteger(request("id")) or request("title")="" or request("content")="" or request("score")="" or request("writer")="" then
site.Error.info="评论信息有空！请填写完整！"
site.Error.location="back"
site.Error.err()
end if

set rs_t=conn.execute("select sort_id,sort_verify,sort_customer_grade from jins_review_sort where sort_name='"&site.object(site.object_p).argument(0)&"' and sort_open=1")
if rs_t.eof then
site.Error.info="此评论功能暂时关闭！"
site.Error.location="back"
site.Error.err()
else
if not site.temp.customer.check.GradeCheck(rs_t("sort_customer_grade")) then
site.Error.info="您没有权限发表评论！"
site.Error.location="back"
site.Error.err()
end if

end if

what="review_title,"
what=what+"review_writer,"
what=what+"review_verify,"
what=what+"review_content,"
what=what+"review_score,"
what=what+"review_ip,"
what=what+"sort_id,"
what=what+"id,"
what=what+"review_addtime,"

if rs_t("sort_verify")=1 then sort_verify=0 else sort_verify=1

content="'"&request.form("title")&"',"
content=content+"'"&request.form("writer")&"',"
content=content&sort_verify&","
content=content+"'"&request.form("content")&"',"
content=content&request.form("score")&","
content=content+"'"&request.ServerVariables("REMOTE_ADDR")&"',"
content=content&rs_t("sort_id")&","
content=content&int(request("id"))&","
content=content+"'"&now()&"',"

what=left(what,len(what)-1)
content=left(content,len(content)-1)

conn.execute("insert into jins_review_list ("&what&") values ("&content&") ")

site.Error.info="谢谢您的评论！"
site.Error.location="back"
site.Error.suc()

set rs_t=nothing

%>