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

📄 administrators.asp

📁 英文版全站B2B仿阿里巴巴贸易平台网站,全英文
💻 ASP
字号:
<%
	if instr(session("EAPurview"),"41")=0 then
		response.redirect "../login.asp"
		response.end
	end if
%>
<!--#include file="../../Inc/DBConn1.asp" -->
<LINK href="../../CSS/style.css" rel="stylesheet" type="text/css"></LINK>

<%	
	if request("action")="del" then
		conn.execute("delete from AdminUser where ID=" & request("ID"))
	end if
%>
<center>
	<TABLE border="0" cellspacing="1" width="100%" cellpadding="4" ID="Table2">
		<tr>
			<td colspan=5 height=30><a href="AddAdmin.asp">添加管理员</a></td>
		</tr>
		<TR height=30 bgcolor="#F78200"> 
			<TD width="10%" align="center"><font color="#FFFFFF"><b>ID号</b></font></TD>
			<TD width="30%" align="center"><font color="#FFFFFF"><b>管理员名称</b></font></TD>
			<TD width="25%" align="center"><font color="#FFFFFF"><b>最后登录时间</b></font></TD>
			<TD width="25%" align="center"><font color="#FFFFFF"><b>最后登录IP</b></font></TD>
			<TD width="10%" align="center"><font color="#FFFFFF"><b>删除</b></font></TD>
		</TR>
		<%
			set Rs=server.CreateObject("ADODB.Recordset")
			RsStr="select * from AdminUser"
			RsStr=RsStr & " Order By ID desc"
			Rs.open RsStr,Conn,3,3
			Rs_Rows=20
			Rs.PageSize=Rs_Rows
			Rs_Total=Rs.RecordCount
			Page_Total=Rs.PageCount
			CurrentPage=1
			if (request.QueryString("CurrentPage")<>"" and isnumeric(request.QueryString("CurrentPage")) and request.QueryString("CurrentPage")>=1) then CurrentPage=request.QueryString("CurrentPage")
			PageBegin=(CurrentPage-1)*Rs_Rows+1
			PageEnd=PageBegin+Rs_Rows-1
			if PageEnd>Rs.RecordCount then PageEnd=Rs.RecordCount
			if Rs.recordCount<>0 then Rs.AbsolutePage=CurrentPage
			if Not(Rs.bof and Rs.eof) then
				while (not Rs.eof) and (PageBegin<=PageEnd)
		%>
		<TR height=23 <%if PageBegin mod 2=1 then%> bgcolor="#F6F6F6" <%else%> bgcolor="#FFFFFF" <%end if%>> 
			<TD width="10%" align="center"><%=Rs("ID")%></TD>
			<TD width="30%" align="left"><a href="EditAdmin.asp?ID=<%=Rs("ID")%>"><%=Rs("AdminName")%></a></TD>
			<TD width="25%" align="center"><%=Rs("LastLogin")%></TD>
			<TD width="25%" align="center"><%=Rs("LastLoginIP")%></TD>
			<TD width="10%" align="center"><a href="Administrators.asp?CurrentPage=<%=CurrentPage%>&action=del&ID=<%=Rs("ID")%>" onclick="return confirm('确定要删除这个管理员吗?')">删除</a></TD>
		</TR>
		<%
					PageBegin=PageBegin+1
					Rs.movenext
				wend
			else
		%>
		<tr height=50>
			<td colspan=5 align=center>暂时还没有管理员!</td>
		</tr>
		<%
			end if
			Rs.close
		%>
		<TR height=30 bgcolor="#F78200"> 
			<TD colspan=5 align=center style="color:#FFFFFF;">
				<%
					if Page_Total=0 then
						CurrentPage=0
					end if
				%>
				(共 <%=Page_Total%>  页,第 <%=CurrentPage%> 页,共检索到 <%=Rs_Total%> 条记录)
				<%
					if Cint(CurrentPage)<>1 and Page_Total<>0 then
						response.Write "<a href='Administrators.asp?CurrentPage=1' class=Head1>首页</a>"
					else
						response.Write "首页"
					end if
				%>&nbsp;
				<%
					if Cint(CurrentPage)<>1 and Page_Total<>0 then
						response.Write "<a href='Administrators.asp?CurrentPage=" & currentPage-1 & "' class=Head1>上一页</a>"
					else
						response.Write "上一页"
					end if
				%>&nbsp;
				<%
					if Cint(CurrentPage)<>Page_Total and Page_Total<>0 then
						response.Write "<a href='Administrators.asp?CurrentPage=" & currentPage+1 & "' class=Head1>下一页</a>"
					else
						response.Write "下一页"
					end if
				%>&nbsp;
				<%
					if Cint(CurrentPage)<>Page_Total and Page_Total<>0 then
						response.Write "<a href='Administrators.asp?CurrentPage=" & Page_Total & "' class=Head1>尾页</a>"
					else
						response.Write "尾页"
					end if
				%>&nbsp;
			</TD>
		</TR>
	</table>
</center>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -