<!--#include virtual="/incs/config.asp"-->
<!--#include virtual="/incs/web_top.asp"-->
<%
chk_log_usr()

''''''''''''''''''''''''''''''''

If SafeRequest("dnme")<>"" Then
	dnme=SafeRequest("dnme")
End If
If dnme="" Then
 call errorpage(-2,"错误域名!")
end if
	query="select * from v_dmelst where d_unme='"&session("usrname")&"'  and d_dme ='"&dnme&"'"
	  rs.open query,conn,1,1
	  if rs.recordcount<=0 then
      call errorpage(-2,"对不起，该域名不存在！")
      end if
	  cooper=rs("d_cpr")
	  d_cpr=cooper
	domain_to_modi= rs("d_dme")
	domainname=trim(rs("d_dme"))
	d_dns=rs("d_dnspri")
	d_urlpri=rs("d_urlpri")
	dnsnumber=d_urlpri
rs.close
		query="select * from pltdns where pl_tpe="&d_urlpri
	rs.open query,conn,1,1
	if not rs.eof then
	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();
    }
</script>

      <table cellspacing=0 cellpadding=0 width="100%" border=0>
        <tbody> 
        <tr> 
          <td colspan=2><img height=3 
            src="/imgs/spacer.gif" width=3></td>
        </tr>
        <tr> 
          
    <td width=438 
          background=/imgs/bg_inside_pages_link.jpg 
          height=30><img height=11 
            src="/imgs/aword_square.gif" width=11 
            align=absMiddle> <a href="/">首 页</a> <strong>&gt;</strong> <a href="/control/">管理中心</a> 
      <b>&gt;</b> <a href="/control/dme_mng/dme_lst.asp">英文域名管理</a></td>
          <td>&nbsp;</td>
        </tr>
        <tr> 
          <td colspan=2><img height=10 
            src="/imgs/shadow_inside_pages.jpg" 
        width=438></td>
        </tr>
        </tbody> 
      </table>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY> 
        <TR> 
          <TD vAlign=top width=180 bgColor=#f3f3f3> 
            <!--#include virtual="/incs/control_left.asp"-->
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
          </TD>
          <TD vAlign=top width=10 
          background=/imgs/bg_inside_pages_block.jpg><IMG 
            height=1 src="/imgs/bg_inside_pages_block.jpg" 
            width=10></TD>
          <TD vAlign=top> 
            <table cellspacing=2 cellpadding=0 width="100%" border=0>
              <tbody> 
              <tr> 
                <td  colspan=2 valign="middle"> 
                  <table class=line cellspacing=0 cellpadding=0 width="98%" 
                  border=0 align="center">
                    <tbody> 
                    <tr> 
                      <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>域名<font color="#000000">列表<a href="index.asp"><font color="#FF0000">（查询）</font></a></font></strong></span></b></font></td>
                      <td valign=bottom noWrap align=right 
                        width="75%"><a href="dme_lst.asp?querytype=8"><font color="#000000">今天新注册</font></a> 
                        <font color="#000000">|</font> <a href="dme_lst.asp?querytype=9"><font color="#000000">本周新注册</font></a> 
                        <font color="#000000">|</font> <a href="dme_lst.asp?querytype=10"><font color="#000000">本周到期</font></a> 
                        <font color="#000000">| </font><a href="dme_lst.asp?querytype=11"><font color="#000000">本月到期</font></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 bgcolor="#5F5F5F"></td>
                    </tr>
                    </tbody> 
                  </table>
                  <br>
                </td>
              </tr>
              <tr> 
                <td  colspan=2 valign="middle" height="28"> 
                  <table width="95%" 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="/control/dme_mng/menu.asp" -->
                          <br>
                          域名: <font style="FONT-FAMILY: Tahoma,verdana,arial;"><b><%=domain_to_modi%></b></font> 
                          <br>
                          <br>
                        </div>
                      </td>
                    </tr>
                  </table>
				  				  		              <%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  %>
									  
                  <table width=95% cellpadding="0" cellspacing="0" align="center" >
                    <tr><td><!--#include file="domainform.asp"--></td></tr>
                  </table>

            <% else %>

                  <table cellspacing=1 cellpadding=0 width=95% border=0  align="center">
                    <tbody> 
                    <tr> 
                      <td colspan = 3 height="25" valign="top"> 
                        <table cellspacing=1 cellpadding=3 width="100%" border=0 bordercolordark="#ffffff" bgcolor="#666666">
                          <tr> 
                            <td height="25" colspan = 4 bgcolor="#8b8b8b">&nbsp; 
                              <b>网址转发管理(URL转发)</b> <img src="/imgs/dnsurl.gif" width="100" height="16" align="absmiddle" name="image"  onclick="javascript:addurl();"  style="cursor:hand;"> 
                            </td>
                          </tr>
                          <tr> 
                            <td colspan=4 height="25" bgcolor="#ffffff">&nbsp;</td>
                          </tr>
                          <tr> 
                            <td height="25" width="25%" bgcolor="#F2F9FD"> 
                              <div align="center">主机名</div>
                            </td>
                            <td width="45%" bgcolor="#F2F9FD"> 
                              <div align="center">转发地址 </div>
                            </td>
                            <td width="15%" bgcolor="#F2F9FD"> 
                              <div align="center">是否隐藏</div>
                            </td>
                            <td bgcolor="#F2F9FD"> 
                              <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 bgcolor="#FFFFFF"> 
                            <td height="25"> 
                              <div align="center"><%=replace(du_itm&"."&domain_to_modi,"@.","")%></div>
                            </td>
                            <td> 
                              <div align="center"><%=forward_url%></div>
                            </td>
                            <td> 
                              <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> 
                              <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 bgcolor="#FFFFFF"> 
                            <td height="25"> 
                              <div align="center"><%=replace(rs("du_itm")&"."&domain_to_modi,"@.","")%></div>
                            </td>
                            <td> 
                              <div align="center">http://<%= rs("du_url") %></div>
                            </td>
                            <td> 
                              <div align="center"> 
                                <% if cint(rs("du_hid"))=1 then
				response.write "隐藏"
				else
				response.write "不隐藏"
				end if %>
                              </div>
                            </td>
                            <td> 
                              <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="left"><br>
                          注意：<%=pl_urldo%><br>
                        </div>
                      </td>
                    </tr>
                    </tbody> 
                  </table><% end if %>
                  <br>
                  <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>
          </TD>
        </TR>
        </TBODY> 
      </TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY> 
        <TR> 
          <TD bgColor=#cccccc><IMG height=1 
            src="/imgs/spacer.gif" 
      width=1></TD>
        </TR>
        </TBODY> 
      </TABLE>
      <!--#include virtual="/incs/web_bottom.asp"-->

