<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("canadmdomain")="" Then
	ef=True
	ec="您没有此操作的权限。"
elseIf Application("urlcheck")=false Then
	ef=True
	ec="请先在系统参数中，设置URL转发需要审查此功能才能使用。"
ElseIf not IsNumeric(Request("id"))  Then
	ef=True
	ec="ID应该是数字！"
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
if Request("op")<>"" then
	Set dsdm = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_URLRE where id ='"&Request("id")&"'"
	dsdm.Open Sql,conn,1,3
if not dsdm.Eof then
if Request("op")="d" then dsdm.delete
if Request("op")="y" then dsdm("havecheck")="y"
if Request("op")="n" then dsdm("havecheck")="x"
dsdm.update
end if
'response.write Request("op")
'response.end
response.redirect "urlcheck.asp"
end if
end if

if not ef then
 
hostname=trim(replace(Request("domain"),"http://",""))
if hostname<>"" then hostname=ComX.idntoac_7i24_com(cstr(hostname))
hostnamecheck=replace(hostname,".","")
hostnamecheck=replace(hostnamecheck,"xn--","")
If RegExpTest("[^A-Za-z0-9--]",hostnamecheck) Then
	ef=True
	ec="请输入合法的域名！"
end if
hostname=Request("domain")
end if

if not ef then
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD width="83"><table height="59"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="7" background="img/midtop.gif">&nbsp;</td>
            <td width="60" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="listmydomain.asp"><font color="#FFFFFF">域名管理</font></a></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></TD>
      <TD width="83"><table height="59"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="7" background="img/midtop.gif">&nbsp;</td>
          <td width="60" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="urlcheck.asp"><font color="#FFFFFF">URL转发</font></a></td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></TD>
      <TD width="83"><table height="59"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="7" background="img/midtop.gif">&nbsp;</td>
          <td width="60" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="domainpreopen.asp"><font color="#FFFFFF">赠送域名</font></a></td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif" id=rightid>&nbsp;</TD>
      <TD height="300" align="center" vAlign=top bgcolor="#FFFFFF">
<form name="form1" method="get" action="urlcheck.asp">
         <DIV class="tableborder"><table width="100%"  border="0" cellspacing="1">
        <tr >
          <td height="24" colspan="2" align="center" background="img/tablebg.gif"><font color="#FFFFFF">查找域名</font></td>
        </tr>
        <tr bgcolor="#E4EAF2">
          <td width="9%" height="40" align="right" bgcolor="#E4EAF2">&nbsp;</td>
          <td width="91%" align="left">用户名：
<input name="username" type="text" id="domain" size="10">
或域名：
<input name="domain" type="text" id="domain" size="15"><input type="submit" name="Submit" value="搜索">
　　　<a href="urlcheck.asp?notcheck=y"><font color="#000000">所有未审查的</font></a></td>
        </tr>
      </table>
         </div>
</form>	
<%
'if Request("id")="" then
	Set dsdm = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_URLRE order by id desc"
if Request("id")<>"" then 	Sql="Select * from FreeHost.FreeHost_Product_Domain where  id ='"&Request("id")&"' order by id desc"
if Request("domain")<>"" then 	Sql="Select * from FreeHost.FreeHost_Product_URLRE where  hostname like '%"&hostname&"%' order by id desc"
if Request("username")<>"" then 	Sql="Select * from FreeHost.FreeHost_Product_URLRE where  username = '"&Request("username")&"' order by id desc"
if Request("notcheck")="y" then 	Sql="Select * from FreeHost.FreeHost_Product_URLRE  where havecheck='n' order by id desc"

			if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsdm.PageSize = 25
	dsdm.Open Sql,conn,1,1
if dsdm.Eof then
%>
<br>
没有这类内容。
<%
else%>
<%if Request.ServerVariables("QUERY_STRING")<>"" then
ask=Split(Request.ServerVariables("QUERY_STRING"), chr(38)&"pn")
else
ask=Split("freehost=1", "")
ask(0)="freehost=lsoft"
end if
	pn=1
if Request.QueryString ("pn")<>"" then pn=Request.QueryString ("pn")
If dsdm.RecordCount <> 0 Then dsdm.AbsolutePage = CLng(pn)  
    if clng(pn)<=10 then
    begini=1
      if dsdm.PageCount<=10 then
       endini=dsdm.PageCount 
       else
       endini=10
      end if
    end if
%>
<%if clng(pn)<=10 then%>最新 <%for i=begini to endini
    if clng(pn)=i then%><font color=red>[<%=i%>]</font><%else%><a href="?<%=ask(0)%>&pn=<%=i%>"><font color="#000000">[<%=i%>]</font></a><%end if%>　<%next%> 
        <%else%>　<a href="?<%=ask(0)%>&pn=1"><font color="#000000">最新[1]--[10]</font></a>　　现在是第<font color=red>[<%=pn%>]</font>页 
        　共<%=dsdm.PageCount%>页　<%end if%><%If Clng(pn)>1 Then%><a href="?<%=ask(0)%>&pn=<%=pn-1%>">上一页</a><%End If%>|<%If Clng(pn)<dsdm.PageCount Then%><a href="?<%=ask(0)%>&pn=<%=pn+1%>"><font color="#000000">下一页</font></a>
        <%End If%>
<DIV class="tableborder"><table width="100%"  border="0" cellspacing="1">
          <tr bgcolor="#CCCCCC">
            <td width="6%" height="24" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">编号</font></td>
            <td width="10%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">用户名</font></td>
            <td width="22%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">域名</font></td>
            <td width="22%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">目标</font></td>
            <td width="9%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">状态</font></td>
            <td width="12%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">时间</font></td>
            <td width="8%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">隐藏转发</font></td>
            <td width="11%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">操作</font></td>
          </tr>
<%
For N=1 To dsdm.PageSize 
					If dsdm.RecordCount=0 Then Exit For
%>
          <tr bgcolor="#E4EAF2" onmouseover=this.bgColor='#cccccc'; onmouseout=this.bgColor='#E4EAF2';>
            <td width="6%" height="90" align="center"><%=dsdm("id")%></td>
            <td width="10%" height="90" align="center"><font color="#000000"><a href="searchuser.asp?username=<%=dsdm("username")%>" target="_blank"><font color="#000000"><%=dsdm("username")%></font></a>
        <font color="#FF0000">
        <%if not isnull(dsdm("agent1")) and dsdm("agent1")<>"n" and dsdm("agent1")<>"" then%>
        <br>
(<a href="searchagent.asp?username=<%=dsdm("agent1")%>" target="_blank"><font color="#FF0000"><%=dsdm("agent1")%></font></a>)
<%end if%>
        </font></font></td>
            <td height="90" align="center"><a href="http://<%=dsdm("hostname")%>"><font color="#000000"><%=dsdm("hostname")%></font></a></td>
            <td height="90" align="center"><a href="<%=dsdm("url")%>"><font color="#000000"><%=dsdm("url")%></font></a></td>
            <td width="9%" height="90" align="center">
			<%if dsdm("havecheck")="y" then%>已审查<%elseif dsdm("havecheck")="x" then%>审查不通过<%else%>未审查<%end if%></td>
            <td width="12%" height="90" align="center"><%=dsdm("addtime")%></td>
            <td width="8%" height="90" align="center"><%if dsdm("re")="y" then%>
            否
              <%else%>
              是
              <%end if%></td>
            <td width="11%" height="90" align="center">
<a href="urlcheck.asp?id=<%=dsdm("id")%>&op=y"><font color="#000000">审查通过</font></a><br>
<br>
<a href="urlcheck.asp?id=<%=dsdm("id")%>&op=n"><font color="#000000">审查不通过</font></a><br>
<br>
<a href="urlcheck.asp?id=<%=dsdm("id")%>&op=d"><font color="#000000">删除</font></a></td>
          </tr>

        <%
If clng(pn)=dsdm.PageCount Then
I = dsdm.RecordCount - (dsdm.PageCount-1) * dsdm.PageSize
If N=I Then Exit For
End If
dsdm.movenext
Next%>
</table>
</div>
<%end if
dsdm.close
set dsdm=nothing
'end if
%>

<%if Request("id")<>"" and Instr(Request("id"), "'")<1  then


	Set dsdm = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_Domain where id='"&Request("id")&"'"
		dsdm.Open Sql,conn,1,1
If not dsdm.Eof Then
username=dsdm("username")
Domain=dsdm("Domain")
status=dsdm("status")
starttime=dsdm("starttime")
endtime=dsdm("endtime")
inipass=dsdm("inipass")
agent1=dsdm("agent1")
if agent1="n" then agent1=""
Domain_API=dsdm("Domain_API")
id=dsdm("id")
isbyhost=dsdm("isbyhost")
Hosttype=dsdm("Hosttype")
byid=dsdm("byid")
years=dsdm("years")
DNS_API=dsdm("DNS_API")
end if
end if
if Domain_API="" then
Domain_API=Application("Domain_API")
starttime=now
endtime=now
years=1
end if

%>
      </TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>

<%=htmlwrite("html10")%>
<%
end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
