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

<%chk_log()%>
  <%
	conn.open constr
chk_newpwr 1,6,4
	domainname=trim(SafeRequest("domainname"))
	if domainname="" then
	call errorpage(-2,"对不起，请选择通用网址！")
	end if
	
	if session("agentname")<>"" and  mid(session("oldpower"),7,1)<>"1" then
call errorpage(-2,"对不起，您没有产品管理权限")
end if
if session("sysclass")>=5 then
query="select * from v_dmtlst   where d_dme ='"&dnme&"'"
elseif session("sysclass")>=4 then
query="select * from v_dmtlst  where d_dme ='"&dnme&"'  and  ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"')"
else
query="select * from v_dmtlst  where d_unme='"&session("usrname")&"' and d_dme ='"&dnme&"'"
end if
rs.open query,conn,1,1
	if rs.recordcount<=0 then
	    call errorpage(-2,"对不起，该通用网址不存在！")
        elseif rs("d_exptme")<now() then
            call errorpage(-2,"对不起，该通用网址已经过期，无法操作!")
		    response.end
		end if
			did =rs("d_id")

rs.close		
Select Case SafeRequest("module")
 case "whoismodifyowner"
   substrContent = "entryclass:dmt_mng"&Vend
   substrContent =substrContent& "entrytype:whoismodifyowner"&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 & "dom_org:" & trim(SafeRequest("dom_org")) & Vend
   substrContent = substrContent & "dom_org_cn:" & trim(SafeRequest("dom_org_cn")) & Vend
   substrContent = substrContent & "dom_org_ping:" & trim(SafeRequest("dom_org_ping")) & Vend
   substrContent = substrContent & "dom_org_suo:" & trim(SafeRequest("dom_org_suo")) & Vend
   substrContent = substrContent & "dom_adr1:" & trim(SafeRequest("dom_adr1")) & Vend
   substrContent = substrContent & "dom_adr1_cn:" & trim(SafeRequest("dom_adr1_cn")) & Vend
   substrContent = substrContent & "dom_pc:" & trim(SafeRequest("dom_pc"))& Vend
   substrContent = substrContent & "dom_chf:" & trim(SafeRequest("dom_chf")) & Vend
   substrContent = substrContent & "dom_st_cn:" & trim(SafeRequest("dom_st_cn")) & Vend
   substrContent = substrContent & "dom_ct_cn:" & trim(SafeRequest("dom_ct_cn")) & Vend
   substrContent = substrContent & "." & Vend
case "whoismodifyadmin"

   substrContent = "entryclass:dmt_mng"&Vend
   substrContent =substrContent& "entrytype:whoismodifyadmin"&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 & "admi_ln_cn:" & trim(SafeRequest("admi_ln_cn")) & Vend
   substrContent = substrContent & "admi_fn_cn:" & trim(SafeRequest("admi_fn_cn")) & Vend
   substrContent = substrContent & "admi_ln:" & trim(SafeRequest("admi_ln"))& Vend
   substrContent = substrContent & "admi_fn:" & trim(SafeRequest("admi_fn")) & Vend
   substrContent = substrContent & "admi_adr1:" & trim(SafeRequest("admi_adr1")) & Vend
   substrContent = substrContent & "admi_adr1_cn:" & trim(SafeRequest("admi_adr1_cn")) & Vend
   substrContent = substrContent & "admi_org:" & trim(SafeRequest("admi_org")) & Vend
   substrContent = substrContent & "admi_org_cn:" & trim(SafeRequest("admi_org_cn")) & Vend
   substrContent = substrContent & "admi_pc:" & trim(SafeRequest("admi_pc")) & Vend
   substrContent = substrContent & "admi_em:" & trim(SafeRequest("admi_em")) & Vend
   substrContent = substrContent & "admi_ph_cc:" & trim(SafeRequest("admi_ph_cc")) & Vend
   substrContent = substrContent & "admi_ph_ct:" & trim(SafeRequest("admi_ph_ct")) & Vend
   substrContent = substrContent & "admi_ph:" & trim(SafeRequest("admi_ph")) & Vend
   substrContent = substrContent & "admi_fax_cc:" & trim(SafeRequest("admi_fax_cc")) & Vend
   substrContent = substrContent & "admi_fax_ct:" & trim(SafeRequest("admi_fax_ct")) & Vend
   substrContent = substrContent & "admi_fax:" & trim(SafeRequest("admi_fax")) & Vend
   substrContent = substrContent & "." & Vend

	end select
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/master/pdtmng/dmt_mng/dmt_ctt.asp?dnme=" & domainname)
   Else
      call errorpage(-2,doresult)
   end if

conn.close

%>

