user_gl.asp
来自「吻宇考试管理系统源码 吻宇考试管理系统源码」· ASP 代码 · 共 145 行
ASP
145 行
<!--#include file="checkuser.asp"-->
<!--#include file="conn.asp"-->
<%
dim rs,sql
dim id,user,kt,class2
class2=trim(request.querystring("class"))
if class2="" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from user order by id DESC"
rs.open sql,conn,1,1
url=""
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from user where class='"&class2&"' order by id DESC"
rs.open sql,conn,1,1
url="class="&class2
end if
pagesize=20 '每一页的信息条数
Page=clng(Request.QueryString ("Page"))
if page<1 then page=1
if page>rs.PageCount then page=rs.PageCount
%>
<script language="vbScript">
sub del(id)
if confirm("你真的要删除这个学生资料的记录吗~?") then
window.location.href"user_del.asp?id="&id
end if
end sub
sub sd(id)
if confirm("你真的要锁定该用户的状态吗~?") then
window.location.href"user_zt.asp?action=lock&id="&id
end if
end sub
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>吻宇网络管理系统</title>
<style type="text/css">
<!--
body {
background-color: #EFF8FE;
}
body,td,th {
font-size: 12px;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="476" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#67B0ED">
<tr bgcolor="#EFF8FE">
<td colspan="7"><div align="center">考生管理系统</div></td>
</tr>
<tr bgcolor="#EFF8FE">
<td colspan="7"><table width="478" cellpadding="0" cellspacing="0">
<tr>
<form name="cnwy" method="get" action="user_query.asp" onsubmit="return checkform()">
<td width="84">考生条件查询:
</td>
<td width="233"><select name="lx" id="lx">
<option value="0">查询类型</option>
<option value="1">真实姓名</option>
<option value="2">准考证号</option>
<option value="3">所在班级</option>
</select>
<input name="tj" type="text" id="tj" value="输入你要查询的条件" size="18"></td>
<td width="62">
<input type="submit" name="Submit" value="查找">
</td></form>
<td width="97"><a href="user_gl.asp">返回考生管理首页</a></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#EFF8FE">
<td width="93"><div align="center">用户名</div> </td>
<td width="96"><div align="center">用户状态</div></td>
<td width="120"><div align="center">考生班级</div></td>
<td width="36"><div align="center">锁定</div></td>
<td width="37"><div align="center">解锁</div></td>
<td width="30"><div align="center">修改</div></td>
<td width="42"><div align="center">删除</div></td>
<%
if not rs.eof then
rs.movefirst
rs.AbsolutePage=Page
for i=1 to pagesize
id=rs("id")
user=rs("name")
kt=rs("kt")
class1=rs("class")%>
</tr>
<tr bgcolor="#EFF8FE">
<td><div align="center"><%=user%></div></td>
<td><div align="center"><%=kt%></div></td>
<td><div align="center"><a href="user_gl.asp?class=<%=class1%>"><%=class1%></a></div></td>
<td><div align="center"><a href="#" onClick="call sd(<%=id%>)">锁定</a></div></td>
<td><div align="center"><a href="user_zt.asp?action=unlock&id=<%=id%>">解锁</a></div></td>
<td><div align="center"><a href="user_xg.asp?id=<%=id%>">修改</a></div></td>
<td><div align="center"><a href="#" onClick="call del(<%=id%>)">删除</a></div></td>
</tr>
<%
rs.MoveNext
if rs.eof then exit for
next
else
response.Write"暂时没有数据"
end if
%>
<tr bgcolor="#EFF8FE"><td colspan="7"><div align="center">
<table border=0 width='100%'>
<tr>
<td width="268" height="20" align=left>
<div align="center">考生总数:<font color=#ff3333><%=rs.recordcount%></font>人 总页数:<font color=#ff3333><%=rs.PageCount%></font>页 当前第<font color=#ff3333><%=Page%></font>/<font color=#ff3333><%=rs.pagecount%></font>页</div></td>
<td width="194" align="right">
<div align="center"></div>
<div align="center"> |<a href="user_gl.asp?<%=url%>&Page=1">第一页</a>|<a href="user_gl.asp?<%=url%>&Page=<%=Page-1%>">上一页</a>|<a href="user_gl.asp?<%=url%>&Page=<%=Page+1%>">下一页</a>|<a href="user_gl.asp?<%=url%>&Page=<%=rs.PageCount%>">最后一页</a>|</div></td>
</tr>
</table>
</div></td>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
set conn=nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?