<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp" -->
<%
chk_log()
chk_newpwr 1,4,1
%>
<script>
function addhost(){
		var temp;
		var hostname;
		var hostip;
		temp = '第一步，请输入主机名（不用写域名，如增加记录bbs.domain.com，则只需填bbs,不需填后面的domain.com;特别注意：如果需要增加domain.com本身，则不必填写主机名并请直接按确定）：';
		hostname =prompt(temp, '');
   if (hostname == null )
  return ;
  if(hostname == '')
  hostname="@"
 if (hostname.length > 30)
  {
    alert("在主机名称中，请最多输入 30 个字符。");
    return;
  }		
  var checkOK = "@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789--*.";
  var checkStr = hostname;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("只能输入由 字母、数字与 - 字符组成的主机名或保持为空。");
    return;
  }
  document.add_host.resolvehost.value=hostname;
//////////////////
		temp = '第二步，请输入IP地址（只能有数字和.如 192.168.0.1）：';
		hostip =prompt(temp, '');

		if (hostip == null || hostip == '')
		{return;}
		else {
               if (hostip.length < 8)
                 {
                   alert("在 IP地址 域中，请至少输入 8 个字符。");
                   return;
                 }

               if (hostip.length > 15)
                {
                  alert("在 IP地址 域中，请最多输入 15 个字符。");
                  return;
                }

                var checkOK = "0123456789-.";
                var checkStr = hostip;
                var allValid = true;
                for (i = 0;  i < checkStr.length;  i++)
                {
                  ch = checkStr.charAt(i);
                  for (j = 0;  j < checkOK.length;  j++)
                    if (ch == checkOK.charAt(j))
                      break;
                  if (j == checkOK.length)
                     {
                     allValid = false;
                     break;
                     }
                }
              if (!allValid)
               {
                alert("在 IP地址 域中，只能输入 数字与 . 字符。");
                return;
               }
			    document.add_host.resolvevalue.value=hostip;
		}

	document.add_host.submit();
}
////////////////////
    function modia(hostname,oldhostip)
    {
	var hostip;
        var temp;
	this.document.modi_a.resolveoldvalue.value=oldhostip;
	this.document.modi_a.resolvehost.value=hostname;

        temp = '请输入新IP地址（只能有数字和.如 192.168.0.1）：';
        hostip =prompt(temp, '');
        if (hostip == null || hostip == ''){
            return;
        }
        else {
	  if (hostip.length < 8)
	  {
	    alert("在 IP地址 域中，请至少输入 8 个字符。");
	    return;
	  }
	  if (hostip.length > 15)
	  {
	    alert("在 IP地址 域中，请最多输入 15 个字符。");
	    return;
	  }
	  var checkOK = "0123456789-.";
	  var checkStr = hostip;
	  var allValid = true;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
	    ch = checkStr.charAt(i);
	    for (j = 0;  j < checkOK.length;  j++)
	      if (ch == checkOK.charAt(j))
	        break;
	    if (j == checkOK.length)
	    {
	      allValid = false;
	      break;
	    }
	  }
	  if (!allValid)
	  {
	    alert("在 IP地址 域中，只能输入 数字与 . 字符。");
	    return;
	  }
        this.document.modi_a.resolvevalue.value=hostip;
        this.document.modi_a.submit();
    }
    }
/////////////////////////
    function delea(hostname,oldhostip)
    {
	var hostip;
        var temp;
	if(confirm("您是否确定删除此主机？"))
	{
	this.document.dele_a.resolveoldvalue.value=oldhostip;
	this.document.dele_a.resolvehost.value=hostname;
    this.document.dele_a.submit();
    }
    }
	/////////////////////
	function addc(){
                var temp;
                var oricname;
                var descname;
                temp = '第一步，请输入主机名（不用写域名，如增加记录bbs.domain.com，则只需填bbs,不需填后面的domain.com）：';
                oricname =prompt(temp, '');
                if (oricname == null || oricname == ''){
                        return;
                }
                else {
		  if (oricname.length < 1)
		  {
		    alert("在主机名称中，请至少输入 1 个字符。");
		    return;
		  }

		  if (oricname.length > 30)
		  {
		    alert("在主机名称中，请最多输入 30 个字符。");
		    return;
		  }

		  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789--.";
		  var checkStr = oricname;
		  var allValid = true;
		  for (i = 0;  i < checkStr.length;  i++)
		  {
		    ch = checkStr.charAt(i);
		    for (j = 0;  j < checkOK.length;  j++)
		      if (ch == checkOK.charAt(j))
		        break;
		    if (j == checkOK.length)
		    {
		      allValid = false;
		      break;
		    }
		  }
		  if (!allValid)
		  {
		    alert("在主机名称中，只能输入 字母、数字与 - 字符。");
		    return;
		  }
                        this.document.add_c.resolvehost.value=oricname;
                }
                temp = '第二步，请输入要指向的已有主机名：';
                descname =prompt(temp, '');
                if (descname == null || descname == ''){
                        return;
                }
                else {
		  if (descname.length < 1)
		  {
		    alert("在别名主机名称中，请至少输入 1 个字符。");
		    return;
		  }

		  if (descname.length > 80)
		  {
		    alert("在别名主机名称中，请最多输入 80 个字符。");
		    return;
		  }

		  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789--.";
		  var checkStr = descname;
		  var allValid = true;
		  for (i = 0;  i < checkStr.length;  i++)
		  {
		    ch = checkStr.charAt(i);
		    for (j = 0;  j < checkOK.length;  j++)
		      if (ch == checkOK.charAt(j))
		        break;
		    if (j == checkOK.length)
		    {
		      allValid = false;
		      break;
		    }
		  }
		  if (!allValid)
		  {
		    alert("在别名主机名称中，只能输入 字母、数字与 - . 字符。");
		    return;
		  }
                        this.document.add_c.resolvevalue.value=descname;
                }
                this.document.add_c.submit();
        }
//////////////////////////////////
function modic(oricname,oldcname)
	    {
	        var newcname;
	        var temp;
	        this.document.modi_c.resolvehost.value=oricname;
	        this.document.modi_c.resolveoldvalue.value=oldcname;

		temp = '请输入新的别名主机名称';
                newcname =prompt(temp, '');
                if (newcname == null || newcname == ''){
                        return;
                }
                else {
		  if (newcname.length < 1)
		  {
		    alert("在新的别名主机名称中，请至少输入 1 个字符。");
		    return;
		  }

		  if (newcname.length > 80)
		  {
		    alert("在新的别名主机名称中，请最多输入 80 个字符。");
		    return;
		  }

		  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.-";
		  var checkStr = newcname;
		  var allValid = true;
		  for (i = 0;  i < checkStr.length;  i++)
		  {
		    ch = checkStr.charAt(i);
		    for (j = 0;  j < checkOK.length;  j++)
		      if (ch == checkOK.charAt(j))
		        break;
		    if (j == checkOK.length)
		    {
		      allValid = false;
		      break;
		    }
		  }
		  if (!allValid)
		  {
		    alert("在别名主机名称中，只能输入 字母、数字与 - . 字符。");
		    return;
		  }
                }
                this.document.modi_c.resolvevalue.value=newcname;
	        this.document.modi_c.submit();
	    }
/////////////////////////
    function delec(hostname,oldhostip)
    {
	var hostip;
        var temp;
	if(confirm("您是否确定删除此别名？"))
	{
	this.document.dele_c.resolveoldvalue.value=oldhostip;
	this.document.dele_c.resolvehost.value=hostname;
    this.document.dele_c.submit();
    }
    }
	/////////////////////
	function addmx()
    {
	var temp;
	var orimxname;
	var orimxlevel;
	var desmxname;
	
	/////
	               temp = '第一步，请输入主机名（建议保持为空）：';
                oricname =prompt(temp, '');
                if (oricname == null || oricname == '')
                        {oricname="@" }
               
                else {
		             
		                 if (oricname.length > 30)
		                 {
		                 alert("在主机名称中，请最多输入 30 个字符。");
		                 return;
		                 }
         		         var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789--.";
		                var checkStr = oricname;
		                var allValid = true;
						
						for(i = 0; i <checkStr.length; i ++)
{
	if (checkOK.indexOf(checkStr.substring(i,i+1))==-1)
	{
		              alert("在主机名称中，只能输入 字母、数字与 - 字符。");
		return false;
	}
}
						
               }
			     this.document.add_mx.resolvehost.value=oricname;
	/////
	temp = '第二步，请输入MX的级别（只能是数字5~99,如 15,其中10的级别最高，建议设成10）：';
	orimxlevel =prompt(temp, '');
	if (orimxlevel == null || orimxlevel == ''){
		return;
	}
	else {
	  if (orimxlevel.length > 2)
	  {
	    alert("在 mx的级别 域中，请最多输入 2 个数字。");
	    return;
	  }
	  var checkOK = "0123456789";
	  var checkStr = orimxlevel;
	  var allValid = true;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
	    ch = checkStr.charAt(i);
	    for (j = 0;  j < checkOK.length;  j++)
	      if (ch == checkOK.charAt(j))
	        break;
	    if (j == checkOK.length)
	    {
	      allValid = false;
	      break;
	    }
	  }
	  if (!allValid)
	  {
	    alert("在 mx的级别 域中，只能输入 数字。");
	    return;
	  }
	  this.document.add_mx.mxlevel.value=orimxlevel;
	}

	temp = '下一步，请输入主机名（主机名不必加域名，如：mail.domain.com，则只需填mail)';
	desmxname =prompt(temp, '');
	if (desmxname == null || desmxname == '')
	{
		return;
	}
	else {
	  if (desmxname.length < 1)
	  {
	    alert("在主机名称中，请至少输入 1 个字符。");
	    return;
	  }
	  if (desmxname.length > 90)
	  {
	    alert("在主机名称中，请最多输入 90 个字符。");
	    return;
	  }

	  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789--.";
	  var checkStr = desmxname;
	  var allValid = true;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
	    ch = checkStr.charAt(i);
	    for (j = 0;  j < checkOK.length;  j++)
	      if (ch == checkOK.charAt(j))
	        break;
	    if (j == checkOK.length)
	    {
	      allValid = false;
	      break;
	    }
	  }
	  if (!allValid)
	  {
	    alert("在主机名称中，只能输入 字母、数字与 - 字符。");
	    return;
	  }
	  this.document.add_mx.resolvevalue.value=desmxname;
	}	
    this.document.add_mx.submit();
    }
/////////////////////////
    function delemx(hostname,oldhostip)
    {
	var hostip;
        var temp;
	if(confirm("您是否确定删除此邮件记录？"))
	{
	this.document.dele_mx.resolveoldvalue.value=oldhostip;
	this.document.dele_mx.resolvehost.value=hostname;
    this.document.dele_mx.submit();
    }
    }
	/////////////////////
		function modimx(oricname,oldcname)
    {
	var temp;
	var orimxname;
	var orimxlevel;
	var desmxname;
		        this.document.modi_mx.resolvehost.value=oricname;
	        this.document.modi_mx.resolveoldvalue.value=oldcname;

	/////
               
	/////
	temp = '第一步，请输入MX的级别（只能是数字5~99,如 15,其中10的级别最高，建议设成10）：';
	orimxlevel =prompt(temp, '');
	if (orimxlevel == null || orimxlevel == ''){
		return;
	}
	else {
	  if (orimxlevel.length > 2)
	  {
	    alert("在 mx的级别 域中，请最多输入 2 个数字。");
	    return;
	  }
	  var checkOK = "0123456789";
	  var checkStr = orimxlevel;
	  var allValid = true;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
	    ch = checkStr.charAt(i);
	    for (j = 0;  j < checkOK.length;  j++)
	      if (ch == checkOK.charAt(j))
	        break;
	    if (j == checkOK.length)
	    {
	      allValid = false;
	      break;
	    }
	  }
	  if (!allValid)
	  {
	    alert("在 mx的级别 域中，只能输入 数字。");
	    return;
	  }
	  this.document.modi_mx.mxlevel.value=orimxlevel;
	}

	temp = '下一步，请输入主机名（主机名不必加域名，如：mail.domain.com，则只需填mail)';
	desmxname =prompt(temp, '');
	if (desmxname == null || desmxname == '')
	{
		return;
	}
	else {
	  if (desmxname.length < 1)
	  {
	    alert("在主机名称中，请至少输入 1 个字符。");
	    return;
	  }
	  if (desmxname.length > 90)
	  {
	    alert("在主机名称中，请最多输入 90 个字符。");
	    return;
	  }

	  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789--.";
	  var checkStr = desmxname;
	  var allValid = true;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
	    ch = checkStr.charAt(i);
	    for (j = 0;  j < checkOK.length;  j++)
	      if (ch == checkOK.charAt(j))
	        break;
	    if (j == checkOK.length)
	    {
	      allValid = false;
	      break;
	    }
	  }
	  if (!allValid)
	  {
	    alert("在主机名称中，只能输入 字母、数字与 - 字符。");
	    return;
	  }
	  this.document.modi_mx.resolvevalue.value=desmxname;
	}	
    this.document.modi_mx.submit();
    }
	function deldns()
	{
	if (confirm("如果确定，所有解析都将被删除，请慎重！"))
	document.dnsdel.submit();
	
	}
	<% if session("sysclass")>=4 then %>
function onlydel(domainname,dtype,ditem)
{
if (confirm("确认删除？仅删除数据库记录，请到合作商处手工删除解析！"))
{
location.href="dme_rec_rez.asp?module=onlydel&domainname="+domainname+"&resolvetype="+dtype+"&resolvehost="+ditem;
}
}
<% end if %>
/////////////////////////
</script>


<%
''''''''''''''''''''''''''''''''
	dnme=SafeRequest("dnme")
If dnme="" Then
 call errorpage(-2,"请选择域名!")
end if
	conn.open constr
if session("sysclass")>=5 then
query="select * from v_dmelst   where d_dme ='"&dnme&"'"
elseif session("sysclass")>=4 then
query="select * from v_dmelst  where d_dme ='"&dnme&"'  and  ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"')"
else
query="select * from v_dmelst  where d_unme='"&session("usrname")&"' and d_dme ='"&dnme&"'"
end if
	rs.open query,conn,1,1

	  if rs.recordcount<>1 then
      call errorpage(-2,"对不起，该域名不存在！")
      end if
	  cooper=rs("d_cpr")
	  d_cpr=cooper
	  d_lck=rs("d_lck")
	  d_dnspri=rs("d_dnspri")
	  dnsnumber=d_dnspri
	domain_to_modi= rs("d_dme")
	domainname=trim(rs("d_dme"))
	rs.close
	query="select * from pltdns where pl_tpe="&d_dnspri
	rs.open query,conn,1,1
	if not rs.eof then
	pl_pri=rs("pl_pri")
	end if
	rs.close
query="select * from dmerec where dr_dme = '"&dnme&"' order by dr_tpe"
rs.open query,conn,1,1

rscount=rs.recordcount

%>

  <table cellspacing=2 cellpadding=0 width="100%" border=0>
              <tbody> 
              <tr> 
                
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><b>英文域名列表</b><a href="index.asp" class=commonface><font color="#FF0000">（查询）</font></a> 
          </td>
          <td valign=bottom noWrap align=right 
                        width="75%"><a href="dme_lst.asp?querytype=8" class=commonface>今日新注册</a> 
            | <a href="dme_lst.asp?querytype=9" class=commonface>本周新注册</a> | <a href="dme_lst.asp?querytype=10" class=commonface>本周到期</a> 
            | <a href="dme_lst.asp?querytype=11" class=commonface>本月到期</a></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2 class=menuline></td>
        </tr>
        </tbody> 
      </table>
      
    </td>
              </tr>
              <tr> 
                <td  colspan=2 valign="middle" height="28" align="center"> 
                  
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
                      <td height=8></td>
                    </tr>
                    <tr> 
                      <td style="font-size:12px"> 
                        <div align="center"> 
                          <!--#include virtual="/master/pdtmng/dme_mng/menu.asp" -->
                          <br>
                          域名: <font style="FONT-FAMILY: Tahoma,verdana,arial;"><b><%= domain_to_modi%></b></font> 
                          <br>
                          <br>
                        </div>
                      </td>
                    </tr>
                  </table>
                  
      <table cellspacing=0 cellpadding=0 width=100% border=0  align="center">
        <tbody> 
        <tr> 
          <td colspan = 3 height="25" valign="top" align="center"> 
            <%if (dnsnumber=0 and pl_pri=1)  or (dnsnumber=1 and pl_pri=1)   or (dnsnumber=2 and pl_pri=1)   or (dnsnumber=4 and pl_pri=1)   or (dnsnumber=5 and pl_pri=1)   or (dnsnumber=6 and pl_pri=1)  then  %>
<!--#include file="domainform.asp"-->
            <% else %>
			<% if dnsnumber=6 then %>
              <%
  substrContent = "entryclass:dme_rec"&Vend
   substrContent =substrContent& "entrytype:getdnsrecs"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&session("agentname")&Vend
   substrContent = substrContent & "domainname:" & domainname & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
 

   tempstr=split(doresult,chr(10))
		%>
			<table cellspacing=0 cellpadding=0 width="100%" border=0 class=datalist>
                          
              <tr align="left" > 
                <th  class=datalistheader height="25" colspan = 3>&nbsp; <b>主机记录解析(A记录)</b> 
                  <img src="/imgs/dnshost.gif" width="100" height="16" align="absmiddle" name="image"  onclick="javascript:addhost();"  style="cursor:hand;"> 
                </th>
                </tr>
                          <tr > 
                            <td colspan=3 height="20" class=datalistgrida>&nbsp; </td>
              </tr>
              <tr > 
                <td class=datalistgridb  height="20" width="40%"> 
                  <div align="center">主机名</div>
                </td>
                <td class=datalistgridb  width="40%" > 
                  <div align="center">解析服务器地址 </div>
                </td>
                <td class=datalistgridb > 
                  <div align="center">管理操作</div>
                </td>
              </tr>
              <%
   for i=0 to ubound(tempstr)
   if instr(tempstr(i),"rr_host")  then
   tempsingle=tempstr(i)&Vend
   dr_tpe=getval(tempsingle,"rr_type")
   if dr_tpe="a" then
   dr_itm=getval(tempsingle,"rr_host")
   if dr_itm="" then
   dr_itm="@"
   end if
   dr_val=getval(tempsingle,"rr_data")
   dr_mx=getval(tempsingle,"rr_aux")
		%>
                          <tr > 
                            
                <td height="20"  class=datalistgrida > 
                  <div align="center"><%=replace(dr_itm&"."&domain_to_modi,"@.","")%></div>
                </td>
                            <td class=datalistgrida > 
                              <div align="center"><%= dr_val%><% if session("sysclass")>=4 then %>[<a href="javascript:onlydel('<%=domainname%>','<%=dr_tpe%>','<%=dr_itm%>')"><font color="#FF0000">仅删除记录</font></a>]<% end if %></div>
                </td>
                            <td class=datalistgrida > 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/edit.gif"  onclick="javascript:modia('<%=dr_itm%>','<%=dr_val%>');" style="cursor:hand;"></div>
                      </td>
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/del.gif"  onclick="javascript:delea('<%=dr_itm%>','<%=dr_val%>');" style="cursor:hand;"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <%
			  end if
			  end if
		next
		%>
            </table>
            <br>
              
                          <table cellspacing=0 cellpadding=0 width="100%" border=0 class=datalist>
                            
                <tr align="left"> 
                  <th  class=datalistheader height="25" colspan = 3 >&nbsp; <b>别名记录设置(CNAME记录)</b> 
                    <img  src="/imgs/dnsname.gif" width="100" height="16" align="absmiddle" name="image" onClick="javascript:addc();"  style="cursor:hand;"> 
                  </th>
                </tr>
                            <tr > 
                              
                  <td   colspan=3 height="20" class=datalistgrida >&nbsp; </td>
                </tr>
                            <tr> 
                              
                  <td  class=datalistgridb height="20" width="40%" > 
                    <div align="center">别名</div>
                  </td>
                              <td width="40%"  class=datalistgridb > 
                                <div align="center">主机名</div>
                  </td>
                              <td  class=datalistgridb > 
                                <div align="center">管理操作</div>
                  </td>
                </tr>
           <%
   for i=0 to ubound(tempstr)
   if instr(tempstr(i),"rr_host")  then
   tempsingle=tempstr(i)&Vend
   dr_tpe=getval(tempsingle,"rr_type")
   if dr_tpe="cname" then
   dr_itm=getval(tempsingle,"rr_host")
   if dr_itm="" then
   dr_itm="@"
   end if
   dr_val=getval(tempsingle,"rr_data")
   dr_mx=getval(tempsingle,"rr_aux")
		%>
                            <tr > 
                              
                  <td  class=datalistgrida height="20" align="center"><%=replace(dr_itm&"."&domain_to_modi,"@.","")%></td>
                  
                              <td align="center" class=datalistgrida > 
                                <%
				if right(dr_val,1)="." then
				response.write dr_val
				else
				  response.write replace(dr_val&"."&domain_to_modi,"@.","")
				  end if
				%>
                                <% if session("sysclass")>=4 then %>
                                [<a href="javascript:onlydel('<%=domainname%>','<%=dr_tpe%>','<%=dr_itm%>')"><font color="#FF0000">仅删除记录</font></a>] 
                                <% end if %>
                              </td>
                              <td class=datalistgrida > 
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="50%"> 
                          <div align="center"><img src="/imgs/edit.gif"  onClick="javascript:modic('<%=dr_itm%>','<%=dr_val%>');" style="cursor:hand;" name=ade></div>
                        </td>
                        <td width="50%"> 
                          <div align="center"><img src="/imgs/del.gif"  onClick="javascript:delec('<%=dr_itm%>','<%=dr_val%>');" style="cursor:hand;"></div>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
              <%
			  end if
			  end if
		next
		%>
              </table>
              <br>
                          <table cellspacing=0 cellpadding=0 width="100%" border=0 class=datalist>
                            <form name=mod action="../../dme_mng/rsadd.asp"  method=post>
                              
                  <tr align="left"> 
                    <th height="25" class=datalistheader  colspan = 4 >&nbsp; 
                      <b>邮件记录解析(MX记录)</b> <img src="/imgs/dnsmail.gif" width="100" height="16" align="absmiddle" onclick="javascript:addmx();"  style="cursor:hand;"></th>
                </tr>
              </form>
                            <tr > 
                              
                  <td colspan=4 height="20" class=datalistgrida >&nbsp; </td>
              </tr>
                            <tr> 
                              
                  <td  class=datalistgridb height="20" width="35%" > 
                    <div align="center">邮件记录</div>
                </td>
                              <td class=datalistgridb  width="10%" > 
                                <div align="center">优先级</div>
                </td>
                              <td  class=datalistgridb width="35%" > 
                                <div align="center">邮件主机地址</div>
                </td>
                              <td  class=datalistgridb > 
                                <div align="center">管理操作</div>
                </td>
              </tr>
           <%
   for i=0 to ubound(tempstr)
   if instr(tempstr(i),"rr_host")  then
   tempsingle=tempstr(i)&Vend
   dr_tpe=getval(tempsingle,"rr_type")
   if dr_tpe="mx" then
   dr_itm=getval(tempsingle,"rr_host")
   if dr_itm="" then
   dr_itm="@"
   end if
   dr_val=getval(tempsingle,"rr_data")
   dr_mx=getval(tempsingle,"rr_aux")
		%>
                            <tr > 
                              
                  <td height="20" class=datalistgrida > 
                    <div align="center"><%=replace(dr_itm&"."&domain_to_modi,"@.","")%></div>
                </td>
                              <td class=datalistgrida > 
                                <div align="center"><%=dr_mx %></div>
                </td>
                              <td class=datalistgrida > 
                                <div align="center">
                      <%
				if right(dr_val,1)="." then
				response.write dr_val
				else
				  response.write replace(dr_val&"."&domain_to_modi,"@.","")
				  end if
				%>
                <% if session("sysclass")>=4 then %>[<a href="javascript:onlydel('<%=domainname%>','<%=dr_tpe%>','<%=dr_itm%>')"><font color="#FF0000">仅删除记录</font></a>]<% end if %></div>
                </td>
                              <td class=datalistgrida > 
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/edit.gif"  onClick="javascript:modimx('<%=dr_itm%>','<%=dr_val%>');" style="cursor:hand;"></div>
                      </td>
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/del.gif"  onClick="javascript:delemx('<%=dr_itm%>','<%=dr_val%>');" style="cursor:hand;"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <%
			  end if
			  end if
		next
		%>
            </table>
            
              
			<% else %>
            <table cellspacing=0 cellpadding=0 width="100%" border=0 class=datalist>
                          
              <tr align="left" > 
                <th  class=datalistheader height="25" colspan = 3>&nbsp; <b>主机记录解析(A记录)</b> 
                  <img src="/imgs/dnshost.gif" width="100" height="16" align="absmiddle" name="image"  onclick="javascript:addhost();"  style="cursor:hand;"> 
                </th>
                </tr>
                          <tr > 
                            <td colspan=3 height="20" class=datalistgrida>&nbsp; </td>
              </tr>
              <tr > 
                <td class=datalistgridb  height="20" width="40%"> 
                  <div align="center">主机名</div>
                </td>
                <td class=datalistgridb  width="40%" > 
                  <div align="center">解析服务器地址 </div>
                </td>
                <td class=datalistgridb > 
                  <div align="center">管理操作</div>
                </td>
              </tr>
              <%
		Do While Not rs.eof
			if lcase(rs("dr_tpe"))<>"a"  then exit do
		%>
                          <tr > 
                            
                <td height="20"  class=datalistgrida > 
                  <div align="center"><%=replace(rs("dr_itm")&"."&domain_to_modi,"@.","")%></div>
                </td>
                            <td class=datalistgrida > 
                              <div align="center"><%= rs("dr_val") %><% if session("sysclass")>=4 then %>[<a href="javascript:onlydel('<%=domainname%>','<%=rs("dr_tpe")%>','<%=rs("dr_itm")%>')"><font color="#FF0000">仅删除记录</font></a>]<% end if %></div>
                </td>
                            <td class=datalistgrida > 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/edit.gif"  onclick="javascript:modia('<%=rs("dr_itm")%>','<%=rs("dr_val")%>');" style="cursor:hand;"></div>
                      </td>
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/del.gif"  onclick="javascript:delea('<%=rs("dr_itm")%>','<%=rs("dr_val")%>');" style="cursor:hand;"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <%
		rs.movenext
		Loop
		If rs.eof and rscount>0  Then 
		rs.moveprevious
		end if
		%>
            </table>
            <br>
            <div align="center">
                          <table cellspacing=0 cellpadding=0 width="100%" border=0 class=datalist>
                            
                <tr align="left"> 
                  <th  class=datalistheader height="25" colspan = 3 >&nbsp; <b>别名记录设置(CNAME记录)</b> 
                    <img  src="/imgs/dnsname.gif" width="100" height="16" align="absmiddle" name="image" onClick="javascript:addc();"  style="cursor:hand;"> 
                  </th>
                </tr>
                            <tr > 
                              
                  <td   colspan=3 height="20" class=datalistgrida >&nbsp; </td>
                </tr>
                            <tr> 
                              
                  <td  class=datalistgridb height="20" width="40%" > 
                    <div align="center">别名</div>
                  </td>
                              <td width="40%"  class=datalistgridb > 
                                <div align="center">主机名</div>
                  </td>
                              <td  class=datalistgridb > 
                                <div align="center">管理操作</div>
                  </td>
                </tr>
                <%
		Do While Not rs.eof
			if lcase(rs("dr_tpe"))<>"cname"  then exit do
		%>
                            <tr > 
                              
                  <td  class=datalistgrida height="20" align="center"><%=replace(rs("dr_itm")&"."&domain_to_modi,"@.","")%></td>
                  
                              <td align="center" class=datalistgrida > 
                                <%
				if right(rs("dr_val"),1)="." then
				response.write rs("dr_val")
				else
				  response.write replace(rs("dr_val")&"."&domain_to_modi,"@.","")
				  end if
				%>
                                <% if session("sysclass")>=4 then %>
                                [<a href="javascript:onlydel('<%=domainname%>','<%=rs("dr_tpe")%>','<%=rs("dr_itm")%>')"><font color="#FF0000">仅删除记录</font></a>] 
                                <% end if %>
                              </td>
                              <td class=datalistgrida > 
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="50%"> 
                          <div align="center"><img src="/imgs/edit.gif"  onClick="javascript:modic('<%=rs("dr_itm")%>','<%=rs("dr_val")%>');" style="cursor:hand;" name=ade></div>
                        </td>
                        <td width="50%"> 
                          <div align="center"><img src="/imgs/del.gif"  onClick="javascript:delec('<%=rs("dr_itm")%>','<%=rs("dr_val")%>');" style="cursor:hand;"></div>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <%
			rs.movenext
		loop
		If rs.eof and rscount>0  Then 
		rs.moveprevious
		end if
		%>
              </table>
              <br>
                          <table cellspacing=0 cellpadding=0 width="100%" border=0 class=datalist>
                            <form name=mod action="../../dme_mng/rsadd.asp"  method=post>
                              
                  <tr align="left"> 
                    <th height="25" class=datalistheader  colspan = 4 >&nbsp; 
                      <b>邮件记录解析(MX记录)</b> <img src="/imgs/dnsmail.gif" width="100" height="16" align="absmiddle" onclick="javascript:addmx();"  style="cursor:hand;"></th>
                </tr>
              </form>
                            <tr > 
                              
                  <td colspan=4 height="20" class=datalistgrida >&nbsp; </td>
              </tr>
                            <tr> 
                              
                  <td  class=datalistgridb height="20" width="35%" > 
                    <div align="center">邮件记录</div>
                </td>
                              <td class=datalistgridb  width="10%" > 
                                <div align="center">优先级</div>
                </td>
                              <td  class=datalistgridb width="35%" > 
                                <div align="center">邮件主机地址</div>
                </td>
                              <td  class=datalistgridb > 
                                <div align="center">管理操作</div>
                </td>
              </tr>
              <%
		Do While Not rs.eof
			if lcase(rs("dr_tpe"))<>"mx" then exit do
		%>
                            <tr > 
                              
                  <td height="20" class=datalistgrida > 
                    <div align="center"><%=replace(rs("dr_itm")&"."&domain_to_modi,"@.","")%></div>
                </td>
                              <td class=datalistgrida > 
                                <div align="center"><%= rs("dr_mx") %></div>
                </td>
                              <td class=datalistgrida > 
                                <div align="center">
                      <%
				if right(rs("dr_val"),1)="." then
				response.write rs("dr_val")
				else
				  response.write replace(rs("dr_val")&"."&domain_to_modi,"@.","")
				  end if
				%>
                <% if session("sysclass")>=4 then %>[<a href="javascript:onlydel('<%=domainname%>','<%=rs("dr_tpe")%>','<%=rs("dr_itm")%>')"><font color="#FF0000">仅删除记录</font></a>]<% end if %></div>
                </td>
                              <td class=datalistgrida > 
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/edit.gif"  onClick="javascript:modimx('<%=rs("dr_itm")%>','<%=rs("dr_val")%>');" style="cursor:hand;"></div>
                      </td>
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/del.gif"  onClick="javascript:delemx('<%=rs("dr_itm")%>','<%=rs("dr_val")%>');" style="cursor:hand;"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <%
		rs.movenext
		Loop
		%>
            </table>
            <% end if %>
              <br>
            </div>
          </td>
        </tr>
        </tbody> 
      </table>

      <br>
      <table width="300" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td>
                        <div align="right"><img src="/imgs/letoka.gif" height="20" onClick="javascript:document.refreshdns.submit();" style="cursor:hand;" width="102"></div>
          </td>
          <td width="20">&nbsp;</td>
                      <td><img src="/imgs/letokb.gif" onClick="javascript:deldns();" style="cursor:hand;" width="102" height="20"></td>
        </tr>
      </table>

                  <% end if %><br>
                  <br>
                </td> 
              </tr>
              </tbody> 
            </table>
          
	  
<FORM name=add_host action=dme_rec_rez.asp method=post>
  <input type="hidden" name=module value="addrecord">
<input type="hidden" name="resolvetype" value="A"> 
<input name="resolvehost" type=hidden> 
<input name="resolvevalue" type=hidden>
<input name="mxlevel" type=hidden value=10> 
<input name="domainname" type=hidden value="<%=domainname%>"> 
</FORM>
<FORM name=modi_a action=dme_rec_rez.asp method=post>
  <input name="domainname" type=hidden value="<%=domainname%>"> 
<input type="hidden" name="module" value="edtrecord">
<input type="hidden" name="resolvetype" value="A">
<input type="hidden" name="resolvevalue" >
<input type="hidden" name="resolveoldvalue" >
<input type="hidden" name="mxlevel" value="10">
<input type="hidden" name="resolvehost">
</FORM>
<FORM name=dele_a action=dme_rec_rez.asp method=post>
  <input name="domainname" type=hidden value="<%=domainname%>"> 
<input type="hidden" name="module" value="delrecord">
<input type="hidden" name="resolvetype" value="A">
<input type="hidden" name="resolvehost">
<input type="hidden" name="resolveoldvalue" >
<input type="hidden" name="mxlevel" value="10">
</FORM>
<FORM name=add_c action=dme_rec_rez.asp method=post>
  <input type="hidden" name=module value="addrecord">
<input type="hidden" name="resolvetype" value="CNAME"> 
<input name="resolvehost" type=hidden> 
<input name="resolvevalue" type=hidden>
<input name="mxlevel" type=hidden value=10> 
<input name="domainname" type=hidden value="<%=domainname%>"> 
</FORM>
<FORM name=modi_c action=dme_rec_rez.asp method=post>
  <input name="domainname" type=hidden value="<%=domainname%>"> 
<input type="hidden" name="module" value="edtrecord">
<input type="hidden" name="resolvetype" value="CNAME">
<input type="hidden" name="resolvevalue" >
<input type="hidden" name="resolveoldvalue" >
<input type="hidden" name="mxlevel" value="10">
<input type="hidden" name="resolvehost">
</FORM>
<FORM name=dele_c action=dme_rec_rez.asp method=post>
  <input name="domainname" type=hidden value="<%=domainname%>"> 
<input type="hidden" name="module" value="delrecord">
<input type="hidden" name="resolvetype" value="CNAME">
<input type="hidden" name="resolvehost">
<input type="hidden" name="resolveoldvalue" >
<input type="hidden" name="mxlevel" value="10">
</FORM>
<FORM name=add_mx action=dme_rec_rez.asp method=post>
  <input type="hidden" name=module value="addrecord">
<input type="hidden" name="resolvetype" value="MX"> 
<input name="resolvehost" type=hidden> 
<input name="resolvevalue" type=hidden>
<input name="mxlevel" type=hidden> 
<input name="domainname" type=hidden value="<%=domainname%>"> 
</FORM>
<FORM name=modi_mx action=dme_rec_rez.asp method=post>
  <input name="domainname" type=hidden value="<%=domainname%>"> 
<input type="hidden" name="module" value="edtrecord">
<input type="hidden" name="resolvetype" value="MX">
<input type="hidden" name="resolvevalue" >
<input type="hidden" name="resolveoldvalue" >
<input type="hidden" name="mxlevel" >
<input type="hidden" name="resolvehost">
</FORM>
<FORM name=dele_mx action=dme_rec_rez.asp method=post>
  <input name="domainname" type=hidden value="<%=domainname%>"> 
<input type="hidden" name="module" value="delrecord">
<input type="hidden" name="resolvetype" value="MX">
<input type="hidden" name="resolvehost">
<input type="hidden" name="resolveoldvalue" >
<input type="hidden" name="mxlevel" value="10">
</FORM>
<FORM name=refreshdns action=dme_rec_rez.asp method=post>
  <input name="domainname" type=hidden value="<%=domainname%>"> 
<input type="hidden" name="module" value="dnsrefresh">
</FORM>
<FORM name=dnsdel action=dme_rec_rez.asp method=post>
  <input name="domainname" type=hidden value="<%=domainname%>"> 
<input type="hidden" name="module" value="dnsdel">
</FORM>
      <!--#include virtual="/incs/bottom.asp"-->

