📄 xnzjlist.asp
字号:
<%CheckAdmin1%>
<!--#include file="conn.asp"-->
<!--#include file="function.asp"-->
<html>
<head>
<title>-=虚拟主机申请列表=-</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0">
<!--#include file="center.asp"-->
<table border="0" width="778" cellspacing="1" cellpadding="1" align="center">
<tr>
<td width="70%" valign="top" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from user order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>暂时没有人申请</p>"
else
MaxPerPage=20
PageUrl="xnzjlist.asp"
totalPut=rs.recordcount
currentpage=request("page")
if currentpage<1 then currentpage=1
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
currentPage=1
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
end if
end if
end if
rs.close
sub showContent
%>
<table border="0" width="95%" cellspacing="1" cellpadding="2" class="TableLine" bordercolor="#527792" bgcolor="#527792">
<tr bgcolor="#CCCCCC">
<td width="7%" height=18 align=center>ID</td>
<td width="15%" height=18 align=center>联系人</td>
<td width="17%" height=18 align=center>主机类型</td>
<td width="28%" height=18 align=center>网址</td>
<td width="16%" height=18 align=center>电话</td>
<td width="9%" height=18 align=center>会员</td>
<td width="8%" height=18 align=center>删除</td>
</tr>
<%
i=0
do while not rs.eof
i=i+1
%>
<tr bgcolor="#FFFFFF">
<td align=center width="7%">
<%'=rs("id")%>
<%=totalPut-(i+MaxPerPage*(currentpage-1)-1)%> </td>
<td align=center width="15%"><a href="xnzjlist1.asp?ID=<%=rs("ID")%>" target="_blank">
<%=rs("relation")%></a>
<%if DateValue(rs("addDate"))=date() then%>
<img src="images/new.gif">
<%end if%>
</td>
<td align=center width="17%"><%=rs("dlbtype")%></td>
<td align=center width="28%"><%=rs("yuming")%></td>
<td align=center width="16%"><%=rs("phone")%></td>
<td align=center width="9%"><%=rs("sibie")%> </td>
<td align=center width="8%">
<input type=button name=del value=删除 onclick="javascript:window.open('xnzjDel.asp?id=<%=rs("id")%>','_self','')">
</td>
</tr>
<%
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="<%=filename%>">
<center>共<font color="#000000"><b><%=totalnumber%></b></font>条记录
<%if CurrentPage<2 then%>
首页 上一页
<%else%>
 <a href="<%=filename%>?page=1">首页</a>
<a href="<%=filename%>?page=<%=CurrentPage-1%>">上一页</a>
<%
end if
if n-currentpage<1 then
%>
下一页 末页
<%else%>
<a href="<%=filename%>?page=<%=CurrentPage+1%>">下一页</a>
<a href="<%=filename%>?page=<%=n%>">末页</a>
<%end if%>
页次:<strong><font color="#ffffff"><%=CurrentPage%>/<%=n%></font></strong>页
转到:<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>
<option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
<%next%>
</select>
</form>
<%end function%>
</td>
</tr>
</table>
</body>
</html>
<%
set rs=nothing
conn.close
set conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -