⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hostindex.asp

📁 一个非常优秀的自动建站程序
💻 ASP
字号:
<!--#include file="top.asp"-->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select HostID,HostName,HostSize,MailSize,MailNum,Webip,Price1,Other1,sales from [Host_List] ORDER BY HostID"' DESC
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "<center><a href='HostAdd.asp'><font color=red>添加主机</font></a></center>"
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 width=40 align=center>序号</td>
<td align=center>商品名称</td>
<td width=220 align=center>功能简介</td>
<td width=50 align=center>空间大小</td>
<td width=50 align=center>邮箱数量</td>
<td width=50 align=center>邮箱大小</td>
<td width=80 align=center>市场价格</td>
<td align=center colspan="2">操作</td>
</tr>
<%
DO WHILE NOT rs.EOF AND RowCount>0
if rs("sales")=0 then sale="(<font color=red>未销售</font>)" else sale=""
%>
<tr bgcolor="#FFFFFF">
<td align=center><%=rs("HostID")%></td>
<td align=center><%=rs("HostName")%><%=sale%></td>
<td><%=rs("Other1")%></td>
<td align=center><%=rs("HostSize")%> M</td>
<td align=center><%=rs("MailNum")%> 个</td>
<td align=center><%=rs("MailSize")%> M</td>
<td align=center><%=rs("Price1")%> 元/年</td>
<td align=center><a href="HostEdit.asp?HostID=<%=rs("HostID")%>">编辑</a></td>
<td align=center><a href="../HostShop.asp?HostID=<%=rs("HostID")%>">购买</a></td>
</tr>
<%
RowCount = RowCount - 1
rs.MoveNext
Loop
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 width=30%>
共有信息 <%=RECORDCOUNT%> 条 当前第 <%=PageNo%>/<%=TSum%> 页
</td>
<td align=center width=40%>
<a href="HostAdd.asp"><font color=red>添加主机</font></a>
</td>
<td align=right width=30%>
<%=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 + -