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

<%chk_log_usr()%>
  <%
	if session("agentname")<>"" and  mid(session("oldpower"),7,1)<>"1" then
call errorpage(-2,"对不起，您没有产品管理权限")
end if
conn.open constr
	
	domainname=trim(SafeRequest("domainname"))
	if domainname="" then
	call errorpage(-2,"对不起，请选择域名！")
	end if 
	rs.open "select * from dmelst where  d_unme='"&session("usrname")&"'   and  d_dme= '"&domainname&"'",conn,3

	if rs.recordcount<=0 then
	    call errorpage(-2,"对不起，该域名不存在！")
        elseif rs("d_regstt")<>1 then
            call errorpage(-2,"对不起，该域名不处于正常状态，无法操作!")
		    
        elseif rs("d_exptme")<now() then
            call errorpage(-2,"对不起，该域名已经过期，无法操作!")
		    
		end if
			did =rs("d_id")
			 d_id=did
		dr_tpe=ucase(SafeRequest("resolvetype"))
		du_itm=lcase(SafeRequest("resolvehost"))
		du_val=trim(SafeRequest("resolvevalue"))
		dr_mx=SafeRequest("mxlevel")
		dr_val_new=trim(SafeRequest("resolvevalue"))
		hidden=SafeRequest("hidden")
		rs.close		

Select Case SafeRequest("module")
 case "add"
 
    substrContent = "entryclass:dme_url"&Vend
   substrContent =substrContent& "entrytype:add"&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 & "resolvehost:" & du_itm & Vend
   substrContent = substrContent & "resolvevalue:" & du_val & Vend
   substrContent = substrContent & "hidden:" & hidden & Vend
   substrContent = substrContent & "." & Vend
 
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "del"

   substrContent = "entryclass:dme_url"&Vend
   substrContent =substrContent& "entrytype: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 & "resolvehost:" & du_itm & Vend
   substrContent = substrContent & "resolvevalue:" & du_val & Vend
   substrContent = substrContent & "hidden:" & hidden & Vend
   substrContent = substrContent & "." & Vend
	 
	case "modi"
   substrContent = "entryclass:dme_url"&Vend
   substrContent =substrContent& "entrytype:modi"&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 & "resolvehost:" & du_itm & Vend
   substrContent = substrContent & "resolvevalue:" & du_val & Vend
   substrContent = substrContent & "hidden:" & hidden & Vend
   substrContent = substrContent & "." & Vend
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
	case "getdnsurls"
   substrContent = "entryclass:dme_url"&Vend
   substrContent =substrContent& "entrytype:getdnsurls"&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

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

%>

