📄 user_sort_list.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'=========================================================
' 学校机房作业管理系统 V 1.0 [创建于200812122100]
' 授权发布网站:清远ABC-http://www.qyabc.com/
' 客服QQ:418322257 E-Mail:qystu@163.com
' 注意:如想得到关于本程序免费的技术支持,
' 必须承诺使用一周后,用平邮回寄“相关文件”文件夹中的“学校机房作业管理系统调查反馈表”表格。
' 作者博客:http://www.qyabc.com/u/qin/Default.aspx
'=========================================================
%>
<!--#include file="inc/config.asp" -->
<!--#include file="Connections/master.asp" -->
<%
Dim class_list
Dim class_list_numRows
Set class_list = Server.CreateObject("ADODB.Recordset")
class_list.ActiveConnection = MM_master_STRING
class_list.Source = "SELECT DISTINCT MasterClass FROM userinfo ORDER BY MasterClass"
class_list.CursorType = 0
class_list.CursorLocation = 2
class_list.LockType = 1
class_list.Open()
class_list_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
class_list_numRows = class_list_numRows + Repeat1__numRows
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户网站列表-<%=WebName%></title>
<link rel="SHORTCUT ICON" href="favicon.ico"/>
<link href="<%= SysCss %>" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" class="bei">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="17%" valign="top"><table width="97%" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><a href="user_search.asp">查找用户</a><a href="sms_index.asp"></a><a href="admin_exercise_subject_add.asp"></a><a href="admin_news_index.asp"></a></td>
</tr>
<tr>
<td align="center"><a href="user_student_list.asp">学生列表</a><a href="sms_mysend_list.asp"></a><a href="admin_exercise_subject_mylist.asp"></a><a href="admin_news_index.asp"></a></td>
</tr>
<tr>
<td align="center"><a href="user_teacher_list.asp">教师列表</a><a href="sms_write.asp"></a><a href="admin_exercise_content_add.asp"></a><a href="admin_news_add.asp"></a></td>
</tr>
<tr>
<td align="center"><a href="user_sort_list.asp"><font color="#FF0000">按类列表</font></a></td>
</tr>
<tr>
<td align="center"><a href="admin_exercise_content_mylist.asp"></a><a href="user_our_class.asp" target="_self">查看本班同学信息</a><a href="admin_news_add.asp"></a></td>
</tr>
<tr>
<td align="center"><a href="user_all_list.asp" target="_self">查看系统全部用户</a></td>
</tr>
<tr>
<td align="center" valign="top"><a href="admin_news_add.asp"></a></td>
</tr>
</table>
<br></td>
<td width="83%" valign="top"><table width="97%" border="0" align="center" cellpadding="5" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#99ccff">
<tr>
<td colspan="2"><div align="left">用户按班级列表
<a href="index.asp"></a></div></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT class_list.EOF))
%>
<tr>
<td width=104 valign="top" bgcolor="#C1E0FF"><%=(class_list.Fields.Item("MasterClass").Value)%></td>
<% dim asan_class
asan_class=class_list.Fields.Item("MasterClass").Value %>
<%
Dim name_list__MMColParam
name_list__MMColParam = asan_class
%>
<%
Dim name_list
Dim name_list_numRows
Set name_list = Server.CreateObject("ADODB.Recordset")
name_list.ActiveConnection = MM_master_STRING
name_list.Source = "SELECT studentname, studentsex, MasterClass,userid, Specia FROM userinfo WHERE MasterClass ='" + Replace(name_list__MMColParam, "'", "''") + "' ORDER BY MasterClass ASC"
name_list.CursorType = 0
name_list.CursorLocation = 2
name_list.LockType = 1
name_list.Open()
name_list_numRows = 0
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index
Repeat2__numRows = -1
Repeat2__index = 0
name_list_numRows = name_list_numRows + Repeat2__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim name_list_total
Dim name_list_first
Dim name_list_last
' set the record count
name_list_total = name_list.RecordCount
' set the number of rows displayed on this page
If (name_list_numRows < 0) Then
name_list_numRows = name_list_total
Elseif (name_list_numRows = 0) Then
name_list_numRows = 1
End If
' set the first and last displayed record
name_list_first = 1
name_list_last = name_list_first + name_list_numRows - 1
' if we have the correct record count, check the other stats
If (name_list_total <> -1) Then
If (name_list_first > name_list_total) Then
name_list_first = name_list_total
End If
If (name_list_last > name_list_total) Then
name_list_last = name_list_total
End If
If (name_list_numRows > name_list_total) Then
name_list_numRows = name_list_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (name_list_total = -1) Then
' count the total records by iterating through the recordset
name_list_total=0
While (Not name_list.EOF)
name_list_total = name_list_total + 1
name_list.MoveNext
Wend
' reset the cursor to the beginning
If (name_list.CursorType > 0) Then
name_list.MoveFirst
Else
name_list.Requery
End If
' set the number of rows displayed on this page
If (name_list_numRows < 0 Or name_list_numRows > name_list_total) Then
name_list_numRows = name_list_total
End If
' set the first and last displayed record
name_list_first = 1
name_list_last = name_list_first + name_list_numRows - 1
If (name_list_first > name_list_total) Then
name_list_first = name_list_total
End If
If (name_list_last > name_list_total) Then
name_list_last = name_list_total
End If
End If
%>
<td width=653 align="left" bgcolor="#FFFFFF">共<font color="#FF0000"><%=(name_list_total)%></font>个同学</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" valign="top"><%
While ((Repeat2__numRows <> 0) AND (NOT name_list.EOF))
%>
<a href="user_info_show.asp?userid=<%=(name_list.Fields.Item("userid").Value)%>" target="_blank" title="点击查看详细资料!"><%=(name_list.Fields.Item("studentname").Value)%>(<%=(name_list.Fields.Item("studentsex").Value)%>)</a>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
name_list.MoveNext()
Wend
%>
<%
name_list.Close()
Set name_list = Nothing
%></td>
</tr>
<tr>
<td colspan="2" valign="top" bgcolor="#FFFFFF"></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
class_list.MoveNext()
Wend
%>
</table></td>
</tr>
</table>
<br>
<!--#include file="inc/bot.asp" -->
</body>
</html>
<%
class_list.Close()
Set class_list = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -