<!--#include file="admin_start.asp"-->

<%
dim id
dim ids
dim n_ids

id=request("id")
ids=request("ids")
ids=replace(ids," ","")
n_ids=""

Set fso = CreateObject("Scripting.FileSystemObject")

if not MySys.check.isInteger(id) and request("action")="edit" then
MySys.error.info="请选择您要操作的项目！"
MySys.error.location="back"
MySys.error.err()
end if

select case request("action")
case "delete"

	if ids="" then
		MySys.error.info="请选择你要删除的评论！"
		MySys.error.location="back"
		MySys.error.err()
	end if		

	set rs_t=conn.execute("select review_id from jins_review_list where review_id in ("&ids&") ")
	do while not rs_t.eof
		if fso.FolderExists(server.mappath("../REVIEWPIC/"&rs_t("review_id"))) then fso.deletefolder server.mappath("../REVIEWPIC/"&rs_t("review_id")),true
	rs_t.movenext
	loop

	conn.execute("delete from jins_review_list where review_id in ("&ids&") ")
	
	MySys.error.info="删除评论成功！"
	MySys.error.location="back"
	MySys.error.suc()
	
case else

	sql="select * from jins_review_list where review_id="&id&" "
	
	rs.open sql,conn,1,3
	
	'/////////////////////////////////////////////检测
	
	MySys.error.info="评论编辑成功！"
	MySys.error.location="back"

	if rs.eof then
		MySys.error.info="您选择的评论不存在！"
		MySys.error.location="back"
		MySys.error.err()
	end if
	
	'/////普通项
	'rs("sort_id")=int(request("sort_id"))
	rs("review_verify")=1	
	rs("review_reply_addtime")=now
	rs("review_reply")=trim(request("review_reply"))
	rs.update
	
	MySys.error.location="admin/admin_info_review_list.asp?s_n=6,sort_id,0&sort_id="&rs("sort_id")
	rs.close	

	MySys.error.suc()

	'/////////////////////////////////////////////
end select
Set fso = nothing

%>
<!--#include file="admin_end.asp"-->
