<!--#include virtual="/incs/config.asp" -->

<%chk_log_usr()%>
  <%
	domainname =trim(SafeRequestform("domainname"))
	dr_tpe=ucase(SafeRequestform("resolvetype"))
	dr_itm=lcase(SafeRequestform("resolvehost"))
	dr_val=trim(SafeRequestform("resolvevalue"))
	dns_hst1=trim(SafeRequestform("dnsname1"))
	dns_hst2=trim(SafeRequestform("dnsname2"))		
	dr_mx=SafeRequestform("mxlevel")
	dr_val_new=trim(SafeRequestform("resolvevalue"))
	module=trim(SafeRequestform("module"))
	if domainname="" then
	   call errorpage(-2,"对不起，请选择域名！")
	end if
	conn.open constr
if session("agentname")<>"" and  mid(session("oldpower"),7,1)<>"1" then
call errorpage(-2,"对不起，您没有产品管理权限")
end if
dnme=domainname	
query="select * from dmelst where d_dme='"&domainname&"'"
rs.open query,conn,1,1
if rs.eof then
call errorpage(-2,"对不起，该域名不存在！")
end if 
	did =rs("d_id")

rs.close
	
	
Select Case SafeRequestform("module")
 case "addrecord"
   substrContent = "entryclass:dme_rec"&Vend
   substrContent =substrContent& "entrytype:addrecord"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "resolvetype:" & UCase(dr_tpe) & Vend
   substrContent = substrContent & "resolvehost:" & dr_itm & Vend
   substrContent = substrContent & "resolvevalue:" & dr_val & Vend
   substrContent = substrContent & "mxlevel:" & dr_mx & Vend
   substrContent = substrContent & "." & Vend

   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_rec.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
case "delrecord"
dr_val=trim(SafeRequestform("resolveoldvalue"))
   substrContent = "entryclass:dme_rec"&Vend
   substrContent =substrContent& "entrytype:delrecord"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "resolvetype:" & UCase(dr_tpe) & Vend
   substrContent = substrContent & "resolvehost:" & dr_itm & Vend
   substrContent = substrContent & "resolveoldvalue:" & dr_val & Vend
   substrContent = substrContent & "mxlevel:" & dr_mx & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_rec.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
case "edtrecord"
dr_val=trim(SafeRequestform("resolveoldvalue"))
   substrContent = "entryclass:dme_rec"&Vend
   substrContent =substrContent& "entrytype:edtrecord"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "resolvetype:" & UCase(dr_tpe) & Vend
   substrContent = substrContent & "resolvehost:" & dr_itm & Vend
   substrContent = substrContent & "resolveoldvalue:" & dr_val & Vend
   substrContent = substrContent & "resolvevalue:" & dr_val_new & Vend
   substrContent = substrContent & "mxlevel:" & dr_mx & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_rec.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
case "dnsdel"

   substrContent = "entryclass:dme_rec"&Vend
   substrContent =substrContent& "entrytype:dnsdel"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "." & Vend

   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_rec.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
case "dnsrefresh"

   substrContent = "entryclass:dme_rec"&Vend
   substrContent =substrContent& "entrytype:dnsrefresh"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_rec.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
case "dnsmodify"
   substrContent = "entryclass:dme_mng"&Vend
   substrContent =substrContent& "entrytype:dnsmodify"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "dns_hst1:" & dns_hst1 & Vend
   substrContent = substrContent & "dns_hst2:" & dns_hst2 & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_dns.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if

case "dme_lck"
   substrContent = "entryclass:dme_mng"&Vend
   substrContent =substrContent& "entrytype:dme_lck"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_idx.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
case "dme_unlck"
   substrContent = "entryclass:dme_mng"&Vend
   substrContent =substrContent& "entrytype:dme_unlck"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_idx.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
case "dme_del"
   substrContent = "entryclass:dme_odr"&Vend
   substrContent =substrContent& "entrytype:dme_del"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_idx.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
case "getdnsrecs"

   substrContent = "entryclass:dme_rec"&Vend
   substrContent =substrContent& "entrytype:getdnsrecs"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
    substrContent =substrContent& "agentname:"&agentname&Vend
    substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/dme_mng/dme_rec.asp?dnme="&dnme)
   Else
      call errorpage(-2,doresult)
   end if
end select
%>

