<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/ubbcode.asp" -->
<%chk_log()%>
<%Chk_newpwr 4,0,0%>

<%
module=SafeRequest("module")
   turnurl="/master/artmng/wrd_edt.asp?wid="&SafeRequest("wid")
select case module
   case "wrd_del"
substrContent = "entryclass:sys_mng"&VEnd
   substrContent =substrContent &"entrytype:wrd_del"&VEnd
   substrContent =substrContent &"entryuser:"&entryuser&VEnd
   substrContent =substrContent &"entrypass:"&entrypass&VEnd
   substrContent =substrContent &"agentname:"&agentname&VEnd
   substrContent =substrContent &"agentpass:"&agentpass&VEnd
   substrContent = substrContent  &"wid:" & trim(SafeRequest("wid")) & VEnd
   substrContent = substrContent  &"." & VEnd
   turnurl="/master/artmng/wrd_lst.asp"
   case "wrd_add"
substrContent = "entryclass:sys_mng"&VEnd
   substrContent =substrContent &"entrytype:wrd_add"&VEnd
   substrContent =substrContent &"entryuser:"&entryuser&VEnd
   substrContent =substrContent &"entrypass:"&entrypass&VEnd
   substrContent =substrContent &"agentname:"&agentname&VEnd
   substrContent =substrContent &"agentpass:"&agentpass&VEnd
   substrContent = substrContent  &"w_ttl:" & trim(request("w_ttl")) & VEnd
   substrContent = substrContent  &"w_cnt:" & trim(request("w_cnt")) & VEnd
   substrContent = substrContent  &"w_tpe:" & trim(SafeRequest("w_tpe")) & VEnd
   substrContent = substrContent  &"w_cls:" & trim(SafeRequest("w_cls")) & VEnd
   substrContent = substrContent  &"w_dme:" & trim(SafeRequest("w_dme")) & VEnd
   substrContent = substrContent  &"w_ip:" & trim(SafeRequest("w_ip")) & VEnd
   substrContent = substrContent  &"w_top:" & trim(SafeRequest("w_top")) & VEnd
   substrContent = substrContent  &"w_opn:" & trim(SafeRequest("w_opn")) & VEnd
   substrContent = substrContent  &"." & VEnd
   turnurl="/master/artmng/wrd_lst.asp"
   case "wrd_edt"
substrContent = "entryclass:sys_mng"&VEnd
   substrContent =substrContent &"entrytype:wrd_edt"&VEnd
   substrContent =substrContent &"entryuser:"&entryuser&VEnd
   substrContent =substrContent &"entrypass:"&entrypass&VEnd
   substrContent =substrContent &"agentname:"&agentname&VEnd
   substrContent =substrContent &"agentpass:"&agentpass&VEnd
   substrContent = substrContent  &"wid:" & trim(SafeRequest("wid")) & VEnd
   substrContent = substrContent  &"w_ttl:" & trim(request("w_ttl")) & VEnd
   substrContent = substrContent  &"w_cnt:" & trim(request("w_cnt")) & VEnd
   substrContent = substrContent  &"w_tpe:" & trim(SafeRequest("w_tpe")) & VEnd
   substrContent = substrContent  &"w_cls:" & trim(SafeRequest("w_cls")) & VEnd
   substrContent = substrContent  &"w_dme:" & trim(SafeRequest("w_dme")) & VEnd
   substrContent = substrContent  &"w_ip:" & trim(SafeRequest("w_ip")) & VEnd
   substrContent = substrContent  &"w_top:" & trim(SafeRequest("w_top")) & VEnd
   substrContent = substrContent  &"w_opn:" & trim(SafeRequest("w_opn")) & VEnd
   substrContent = substrContent  &"." & VEnd
   turnurl="/master/artmng/wrd_idx.asp?wid="&SafeRequest("w_rot")
   case "wrd_ans"
substrContent = "entryclass:sys_mng"&VEnd
   substrContent =substrContent &"entrytype:wrd_ans"&VEnd
   substrContent =substrContent &"entryuser:"&entryuser&VEnd
   substrContent =substrContent &"entrypass:"&entrypass&VEnd
   substrContent =substrContent &"agentname:"&agentname&VEnd
   substrContent =substrContent &"agentpass:"&agentpass&VEnd
   substrContent = substrContent  &"w_ttl:" & trim(request("w_ttl")) & VEnd
   substrContent = substrContent  &"w_cnt:" & trim(request("w_cnt")) & VEnd
   substrContent = substrContent  &"w_rot:" & trim(SafeRequest("w_rot")) & VEnd
   substrContent = substrContent  &"w_ifans:1" &  VEnd
   substrContent = substrContent  &"." & VEnd
   turnurl="/master/artmng/wrd_idx.asp?wid="&SafeRequest("w_rot")
end select
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
         ''##################回复发信
   if module="wrd_ans" then
   conn.open constr
   query="select * from v_wrdlst where (w_unme<>'"&session("usrname")&"') and w_id="&SafeRequest("w_rot")
   rs.open query,conn,1,1
   if not rs.eof then
   query="select * from memlst where u_nme='"&rs("w_unme")&"'"
   rs1.open query,conn,1,1
   if not rs1.eof then
   ms_rec=trim(rs1("u_eml"))
   end if
   rs1.close
   if ms_rec<>"" then
   ms_ttl="您好：您在"&pl_steurl&"的咨询问题已有回复！"
   ms_ifhtm="1"
   ms_bdy=""
   ms_bdy=ms_bdy&"尊敬的客户/代理商："&"<br><br>"
   ms_bdy=ms_bdy&"您在我司咨询反馈系统中提交的问题已有回复，详情如下："&"<br><br>"
   query="select top 10 * from v_wrdlst where  w_rot="&SafeRequest("w_rot")&" order by w_id desc"
   rs1.open query,conn,1,1
   while not rs1.eof 
   ms_bdy=ms_bdy&"-------------------------------------------------------------------------------"&"<br>"
   ms_bdy=ms_bdy&"[标题]"&ubbcode(trim(rs1("w_ttl")))&"&nbsp;&nbsp;(用户："&rs1("u_nme")&"&nbsp;&nbsp;时间："&rs1("w_addtme")&")<br><br>"
   ms_bdy=ms_bdy&"[内容]"&ubbcode(rs1("w_cnt"))&"<br>"
   rs1.movenext
   wend
   rs1.close
   query="select * from emlmod where  ms_mod='sign'"
   rs1.open query,conn,1,1
   if not rs1.eof then
   ms_bdy=ms_bdy&rs1("ms_bdy")
   end if
   rs1.close
   ms_bdy="<html><body><div style='font-size:12px;line-height:150%'>"&ms_bdy&"</div></body></html>"
   recs=jmailsend(ms_rec,ms_ttl,ms_bdy,ms_ifhtm) 
   end if
   end if
   rs.close
   end if
   ''##################   
   call okpage( turnurl)
   Else
      call errorpage(-2,doresult)
   end if
%>
