📄 hostlist.asp
字号:
<!--#include file="top.asp"-->
<script language=Javascript>
<!--
function DeleteMe(i){
if (confirm("确定要删除该主机吗?\n\n注:假如此站点有BBS或是大空间\n请先手动删除用户目录,防止ASP运行超时\n切记")==1){
window.location="HostDel.asp?WebID="+i
}
}
//-->
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form1" method="post" action="?">
<div align="center">输入用户名:
<input name="usrid" type="text" id="usrid">
<input type="submit" name="Submit" value="搜索" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
</div>
</form></td>
<td><form name="form1" method="post" action="?">
<div align="center">输入FTP用户名:
<input name="useridf" type="text" id="useridf">
<input type="submit" name="Submit" value="搜索" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
</div>
</form></td>
<td><form name="form1" method="post" action="?">
<div align="center">输入到期时间:
<input name="EndDate" type="text" id="Endate" value=<%=date()%>>
<input type="submit" name="Submit" value="搜索" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
</div>
</form></td>
</tr>
</table>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select A.WebID,A.HostID,A.HostName,A.HostSize,A.Price,A.Years,A.FtpName,A.WebState,A.ScriptMaps,A.BeginDate,A.EndDate,B.ID,B.UserID,B.Name from [Host_OK] A, [Agent_User] B where A.UserID=B.ID and B.UserID like '%"&request("usrid")&"%' and A.FtpName like '%"&request("useridf")&"%' and A.EndDate like '%"&request("EndDate")&"%' ORDER BY HostID DESC"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "<!--没有内容-->"
response.end()
else
RowCount=PageNum
Tmp=IsNumeric(Request("PageNo"))
if (Tmp=False) then
PageNo=1
else
PageNo=Request("PageNo")
end if
TSum=INT(rs.RECORDCOUNT/RowCount*-1)*-1
if PageNo="" or PageNo=0 then
PageNo=1
else
PageNo=PageNo+1
PageNo=PageNo-1
end if
if CINT(PageNo)>1 then
if CINT(PageNo)>CINT(TSum) then
PageNo=1
end if
end if
if PageNo<0 then
PageNo=1
End if
RS.PageSize=RowCount
RS.AbsolutePage=PageNo
RECORDCOUNT=rs.RECORDCOUNT
%>
<table width="100%" align="center" bgcolor="#cccccc" border="0" cellpadding="5" cellspacing="1">
<tr bgcolor="#ffffff"><td colspan="13" align=right><img border=0 src=../images/run.gif>网站运行中 <img border=0 src=../images/pause.gif>网站暂停中 <img border=0 src=../images/stop.gif>网站停止中 <img border=0 src=../images/test.gif>网站试用中 <img border=0 src=../images/false.gif>网站已过期 </td></tr>
<tr bgcolor="#ffffff">
<td align=center>序号</td>
<td align=center>商品名称</td>
<td align=center>FTP</td>
<td width=50 align=center>空间大小</td>
<td width=50 align=center>空间类型</td>
<td width=60 align=center>交易价格</td>
<td width=50 align=center>购买年限</td>
<td width=60 align=center>购买时间</td>
<td width=60 align=center>到期时间</td>
<td width=40 align=center>状态</td>
<td width=100 align=center>所属会员</td>
<td align=center>编辑</td>
<td align=center>删除</td>
</tr>
<%i=(PageNo-1)*RowCount+1
DO WHILE NOT rs.EOF AND RowCount>0
HostID=rs("HostID")
ScriptMaps=ucase(rs("ScriptMaps"))
if isnull(rs("ScriptMaps")) or rs("ScriptMaps")="" then ScriptMaps="全能型"
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1="select WebIP,WebDefaultDomain from [Host_List] where HostID=" & HostID
rs1.open sql1,conn,1,1
webip=rs1("WebIP")
DefDomain=rs1("WebDefaultDomain")
%>
<tr bgcolor="#FFFFFF">
<td align=center><%=i%></td>
<td align=center><a href=http://<%=rs("ftpname")%>.<%=DefDomain%> target="_blank"><%=rs("HostName")%></a></td>
<td align=center><%=rs("FtpName")%></td>
<td align=center><%=rs("HostSize")%> M</td>
<td align=center><%=ScriptMaps%></td>
<td align=center><%=rs("Price")%> 元/年</td>
<td align=center><%=rs("Years")%> 年</td>
<td align=center>
<%if Cdate(rs("BeginDate"))=Date then%>
<font color=red><%=rs("BeginDate")%></font>
<%else%>
<%=rs("BeginDate")%>
<%end if%>
</td>
<td align=center>
<%if Cdate(rs("EndDate"))<Date then%>
<font color=red><%=rs("EndDate")%></font>
<%else%>
<%=rs("EndDate")%>
<%end if%>
</td>
<td align=center><%
if rs("WebState")=0 then
Response.Write ("<a href=HostBuyNow.asp?WebID="&rs("WebID")&"><img border=0 src=../images/test.gif></a>")
elseif rs("WebState")=2 then
Response.Write ("<img border=0 src=../images/run.gif>")
elseif rs("WebState")=4 then
Response.Write ("<img border=0 src=../images/stop.gif>")
elseif rs("WebState")=6 then
Response.Write ("<img border=0 src=../images/pause.gif>")
end if
if Cdate(rs("EndDate"))<Date then Response.Write ("<img border=0 src=../images/false.gif>")
%></td>
<td align=center><a href="UserEdit.asp?ID=<%=rs("ID")%>"><%=rs("Name")%>(<%=rs("UserID")%>)</a></td>
<td align=center><a href="UserHostEdit.asp?WebID=<%=rs("WebID")%>"><img border=0 src=../images/edit.gif></a></td>
<td align=center><a href="Javascript:DeleteMe(<%=rs("WebID")%>)"><img border=0 src=../images/del.gif></a></td>
</tr>
<%
RowCount = RowCount - 1
rs.MoveNext
i=i+1
Loop
rs1.close
set rs1 = nothing
rs.close
set rs = nothing
end if%>
</table>
<br>
<table width="100%" align="center" bgcolor="#cccccc" border="0" cellpadding="5" cellspacing="1">
<tr bgcolor="#FFFFFF">
<td align=center>
<table width=100% border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
共有信息 <%=RECORDCOUNT%> 条 当前第 <%=PageNo%>/<%=TSum%> 页
</td>
<td align=center width=40%>
<a href="HostIpCh.asp">已开通主机IP管理</a>
</td>
<td align=right>
<%=PageList%>
</td>
</tr>
</table>
</td>
</tr>
<%if TSum>3 then%>
<tr bgcolor="#FFFFFF">
<td align=center>
<%for i=1 to TSum%>
<a href="?PageNo=<%=i%>">第<%=i%>页</a>
<%next%>
</td>
</tr>
<%end if%>
</table>
<%Function PageList()
if TSum>1 then
if PageNo=1 then
NextPage=PageNo+1
response.write"首页 上一页 <a href='?PageNo="&NextPage&"'>下一页</a> <a href='?PageNo="&TSum&"'>尾页</a>"
end if
if PageNo=TSum then
PrwePage=PageNo-1
response.write "<a href='?PageNo=1'>首页</a> <a href='?PageNo="&PrwePage&"'>上一页</a> 下一页 尾页"
end if
if PageNo>1 and TSum>PageNo then
NextPage=PageNo+1
PrwePage=PageNo-1
response.write "<a href='?PageNo=1'>首页</a> <a href='?PageNo="&PrwePage&"'>上一页</a> <a href='?PageNo="&NextPage&"'>下一页</a> <a href='?PageNo="&TSum&"'>尾页</a>"
end if
else
response.write "首页 上一页 下一页 尾页"
end if
End Function%>
</td>
</tr>
</table>
<!--#include file="foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -