这是一个系统的所有用户的页面,很简单~
<!--#include file="conn.asp"-->
<% set rs=server.CreateObject("adodb.recordset")
sql="select username from tb_user" rs.open sql,conn,1,3
if rs.bof and rs.eof then response.Write"此系统目前还没有用户"
response.write"<a href='admin.asp'>返回管理页面</a>" end if
if not rs.bof then rs.movefirst
response.Write"<table width='300' border='2'>"
response.Write"<th align=center><font size='5'>全部用户</font></th>"
while not rs.eof response.Write"<tr>"
response.Write"<td width='150' height='40'>"&rs("username")&"</td>"
response.Write"<td width='150' height='40'><input type='button' value='删除' onclick=window.location.href='deluser.asp'></td>"
response.write"</td>"
rs.movenext wend response.Write"</table>"
end if rs.close %>
<!--#include file="conn.asp"-->
<% set rs=server.CreateObject("adodb.recordset")
sql="select username from tb_user" rs.open sql,conn,1,3
if rs.bof and rs.eof then response.Write"此系统目前还没有用户"
response.write"<a href='admin.asp'>返回管理页面</a>" end if
if not rs.bof then rs.movefirst
response.Write"<table width='300' border='2'>"
response.Write"<th align=center><font size='5'>全部用户</font></th>"
while not rs.eof response.Write"<tr>"
response.Write"<td width='150' height='40'>"&rs("username")&"</td>"
response.Write"<td width='150' height='40'><input type='button' value='删除' onclick=window.location.href='deluser.asp'></td>"
response.write"</td>"
rs.movenext wend response.Write"</table>"
end if rs.close %>