manage_admin.asp

来自「非常有商业价值的软件」· ASP 代码 · 共 93 行

ASP
93
字号
<!--#include file="chk.asp"-->
<!--#include file="db_conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理员管理</title>
<LINK href="style.css" rel=stylesheet type=text/css>
<script language="javascript1.2" src="../my_lib/warning.js"></script>
</head>

<body>
<div align="center">
<table width="760"  border="0" cellspacing="1">
  <tr>
    <td colspan="4" height="20" bgcolor="#EAEAEA"><div align="center">用户管理</div></td>
  </tr>
  <tr bgcolor="#666666">
    <td height="20" bgcolor="#EFEFEF" width="103"><div align="center">序列号</div></td>
    <td height="20" bgcolor="#EFEFEF" width="312"><div align="center">用户名</div></td>
    <td height="20" bgcolor="#EFEFEF" width="206"><div align="center">加入时间</div></td>
    <td height="20" bgcolor="#EFEFEF" width="126"><div align="center">删除</div></td>
  </tr>
  <% 
set rs=server.createobject("adodb.recordset")
sql="select id,login_txt_name,login_txt_pass,addtime from yqj_manager order by addtime desc"
rs.open sql,conn,1,1
        if  not (rs.eof or rs.bof) then '判断记录是否为空
        rs.pagesize=20 '每页显示20条信息
        page=clng(request("page"))
        if page<1 then page=1
        if page>rs.pagecount then page=rs.pagecount
        rs.absolutepage=page
        for i=1 to rs.pagesize
        if rs.eof=false then
        id=rs("id")
        username_m=rs("login_txt_name")
        realname=rs("login_txt_pass")
        addtime=rs("addtime")
        %>
  <tr>
    <td height="20" width="103" align=center><%=(page-1)*19+i%></td>
    <td height="20" width="312"><a href="mailto:<%=email%>" title="发送邮件"><%=username_m%></a></td>
    <td height="20" width="206"><%=addtime%></td>
    <td height="20" width="126">
	<p align="center"><a title="删除" href="javascript:ask('您真的要这么做?','del_manager.asp?id=<%=id%>')">删除</a></td>
  </tr>
  <%
rs.movenext
else
exit for
end if
next
%>
<form action="manage_admin.asp" method="post">
  <tr>
    <td colspan="4" height="20"><div align="right"><span style="font-size: 14px">
          <%
  if page<>1 then
     response.write "&nbsp;[<a href=manage_admin.asp?page=1><font color=#000000>首页</font></a>]"
     response.write "&nbsp;[<a href=manage_admin.asp?page="&(page-1)&"><font color=#000000>前页</font></a>]"
  end if

  if page<>rs.pagecount then
     response.write "&nbsp;[<a href=manage_admin.asp?page="&(page+1)&"><font color=#000000>后页</font></a>]"
     response.write "&nbsp;[<a href=manage_admin.asp?page="&rs.pagecount&"><font color=#000000>末页</font></a>]"
  end if
  %> 
          </font>
						  </span>
						  </div>
      <p align="right">	  <font color="#000000" style="font-size: 14px">共</font><font style="font-size: 14px"><font color="#FF0000"><%=rs.recordcount%></font><font color="#000000">个记录 当前第[</font><font color="#FF0000"><%=page%></font><font color="#000000">]页</font>/共<font color="#00000">[</font><font color="#FF0000"><%=rs.pagecount%></font><font color="#000000">]页</font>
		  </font><font size="2"><span style="font-size: 14px">
		  <input type="text" name="page" size="2" maxlength="10" value="<%=page%>" align="center"></span></font><font style="font-size: 14px">
		  </font><font size="2"><span style="font-size: 14px">
		  <input type="submit" value="Goto" size="2" name="submit"></span></font><span style="font-size: 14px">
	  </span></p></td>
  </tr>
    </form>
				<%else%>
  <tr>
    <td colspan="4" height="20"><p align="center"><font style="font-size: 14px">暂无任何记录!</font></p></td>
  </tr>
    				<%
rs.close
set rs=nothing
conn.close
set conn=nothing
end if 
%>
</table>
</div>
</body>
</html>

⌨️ 快捷键说明

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