<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp" -->
<%
chk_log()
chk_newpwr 1,4,1
''''''''''''''''''''''''''''''''
	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")
	domain_to_modi= rs("d_dme")
	domainname=trim(rs("d_dme"))
	d_dnspri=rs("d_dnspri")
	d_urlpri=rs("d_urlpri")
	dnsnumber=d_urlpri
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")
	pl_pri=rs("pl_pri")
pl_urldo=trim(rs("pl_urldo"))
	end if
	rs.close

rs.open "select * from dmeurl where du_dme='"&dnme &"'",conn,1,1
rscount=rs.recordcount
 
%>
<script Language="JavaScript">

    function addurl()
    {
	var temp;
	var hostname;
	var url;
	this.document.add_url.module.value="add";
	temp = '前提：<%=pl_urldo%>  请输入主机名，(不要加域名,如：bbs.domain.com，则输入bbs；domain.com则保持为空 )：';
	hostname =prompt(temp, '');
	if (hostname == null || hostname == ''){
		hostname="@"
}
	  this.document.add_url.resolvehost.value=hostname;
	

	temp = '下一步，请输入URL地址 ( 不用写 http:// )';
	url =prompt(temp, '');
	if (url == null || url == '')
	{
		return;
	}
	else {
	  this.document.add_url.resolvevalue.value=url;
	}
	
	temp = '下一步，请选择是否隐藏（需要隐藏请填写YES,否则请填写NO）';
	hidden =prompt(temp, '');
	if ((hidden=="YES") ||(hidden=="yes"))
	hidden=1;
	else
	hidden=0;
	this.document.add_url.hidden.value=hidden;
    this.document.add_url.submit();
    }

    function deleurl(oldhost)
    {
        this.document.add_url.module.value="del";
        this.document.add_url.resolvehost.value=oldhost;
       if (confirm("确认删除此转发吗？"))
        this.document.add_url.submit();
        else
		return;
    }

    function modiurl(oldhost)
    {
	var temp;
	var url;
	this.document.add_url.module.value="modi";
	this.document.add_url.resolvehost.value=oldhost;
	temp = '请输入新的URL地址 ( 不用写 http:// )';
	url =prompt(temp, '');
	if (url == null || url == '')
	{
		return;
	}
	else {
	  this.document.add_url.resolvevalue.value=url;
	}
	temp = '下一步，请选择是否隐藏（需要隐藏请填写YES,否则请填写NO）';
	hidden =prompt(temp, '');
	if ((hidden=="YES") ||(hidden=="yes"))
	hidden=1;
	else
	hidden=0;
	this.document.add_url.hidden.value=hidden;
    this.document.add_url.submit();
    }
	
	<% if session("sysclass")>=4 then %>
function onlydel(domainname,ditem)
{
if (confirm("确认删除？仅删除数据库记录，请到合作商处手工删除解析！"))
{
location.href="dme_url_rez.asp?module=onlydel&domainname="+domainname+"&resolvehost="+ditem;
}
}
<% end if %>
</script>
<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"> 
      <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=1 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 %>
            <table cellspacing=0 cellpadding=0 width="100%" border=0 class=datalist>
              <tr> 
                <th height="25" colspan = 4 class=datalistheader align="left">&nbsp; 
                  <b>网址转发管理(URL转发)</b> <img src="/imgs/dnsurl.gif" width="100" height="16" align="absmiddle" name="image"  onclick="javascript:addurl();"  style="cursor:hand;"> 
                </th>
              </tr>
              <tr> 
                <td colspan=4 height="20" class=datalistgrida >&nbsp;</td>
              </tr>
              <tr> 
                <td height="20" width="25%"  class=datalistgridb > 
                  <div align="center">主机名</div>
                </td>
                <td width="45%" class=datalistgridb > 
                  <div align="center">转发地址 </div>
                </td>
                <td width="15%" class=datalistgridb > 
                  <div align="center">是否隐藏</div>
                </td>
                <td class=datalistgridb > 
                  <div align="center">管理操作</div>
                </td>
              </tr>
			  <% if dnsnumber=6 then %>
              <%
  substrContent = "entryclass:dme_url"&Vend
   substrContent =substrContent& "entrytype:getdnsurls"&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))
   for i=0 to ubound(tempstr)
   if instr(tempstr(i),"forward_name")  then
   tempsingle=tempstr(i)&Vend
   du_itm=getval(tempsingle,"forward_name")
   if du_itm="" then
   du_itm="@"
   end if
   forward_url=getval(tempsingle,"forward_url")
   forward_type=getval(tempsingle,"forward_type")
		%>
              <tr> 
                <td height="20"class=datalistgrida > 
                  <div align="center"><%=replace(du_itm&"."&domain_to_modi,"@.","")%></div>
                </td>
                <td class=datalistgrida > 
                  <div align="center"><%=forward_url%> 
                    <% if session("sysclass")>=4 then %>
                    [<a href="javascript:onlydel('<%=domainname%>','<%=du_itm%>')"><font color="#FF0000">仅删除记录</font></a>] 
                    <% end if %>
                  </div>
                </td>
                <td class=datalistgrida > 
                  <div align="center"> 
                    <% if forward_type="frame" then
				response.write "隐藏"
				elseif forward_type="location" then
				response.write "不隐藏"
				elseif forward_type="parking" then
				response.write "建设中"
				elseif forward_type="sale" then
				response.write "出售"
				else
				response.write "未知"
				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" width="23" height="17" onClick="javascript:modiurl('<%=du_itm%>');" style="cursor:hand;"></div>
                      </td>
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/del.gif" width="17" height="17" onClick="javascript:deleurl('<%=du_itm%>');" style="cursor:hand;"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <%
			 end if
		next
		%>
		<% else %>
		              <%
		Do While Not rs.eof
			
		%>
              <tr> 
                <td height="20"class=datalistgrida > 
                  <div align="center"><%=replace(rs("du_itm")&"."&domain_to_modi,"@.","")%></div>
                </td>
                <td class=datalistgrida > 
                  <div align="center">http://<%= rs("du_url") %> 
                    <% if session("sysclass")>=4 then %>
                    [<a href="javascript:onlydel('<%=domainname%>','<%=rs("du_itm")%>')"><font color="#FF0000">仅删除记录</font></a>] 
                    <% end if %>
                  </div>
                </td>
                <td class=datalistgrida > 
                  <div align="center"> 
                    <% if cint(rs("du_hid"))=1 then
				response.write "隐藏"
				else
				response.write "不隐藏"
				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" width="23" height="17" onClick="javascript:modiurl('<%=rs("du_itm")%>');" style="cursor:hand;"></div>
                      </td>
                      <td width="50%"> 
                        <div align="center"><img src="/imgs/del.gif" width="17" height="17" onClick="javascript:deleurl('<%=rs("du_itm")%>');" style="cursor:hand;"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <%
		rs.movenext
		Loop
		%>

		<% end if %>
            </table>
            <div align="center"> <br>
            </div>
          </td>
        </tr>
        </tbody> 
      </table>
      注意：<%=pl_urldo%><br>
      <% end if %>
      <FORM name=add_url action=dme_url_rez.asp method=post>
        <input name="module" type=hidden>
        <input name="resolvehost" type=hidden>
        <input name="resolvevalue" type=hidden>
        <input name="hidden" type=hidden>
        <input name="urlid" type=hidden>
        <input name="domainname" type=hidden value="<%=domainname%>">
      </FORM>
      <br>
    </td>
  </tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->


