📄 user_index.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" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="4,5,1,6,7"
MM_authFailedURL="login.asp?error=3"
MM_grantAccess=false
If session("QYABC_userid") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim theacherinfo__MMColParam
theacherinfo__MMColParam = "1"
If (session("QYABC_userid") <> "") Then
theacherinfo__MMColParam = session("QYABC_userid")
End If
%>
<%
Dim theacherinfo
Dim theacherinfo_numRows
Set theacherinfo = Server.CreateObject("ADODB.Recordset")
theacherinfo.ActiveConnection = MM_master_STRING
theacherinfo.Source = "SELECT * FROM userinfo WHERE userid = " + Replace(theacherinfo__MMColParam, "'", "''") + ""
theacherinfo.CursorType = 0
theacherinfo.CursorLocation = 2
theacherinfo.LockType = 1
theacherinfo.Open()
theacherinfo_numRows = 0
%>
<%
Dim totalsms__MMColParam
totalsms__MMColParam = "1"
If (session("QYABC_userid") <> "") Then
totalsms__MMColParam = session("QYABC_userid")
End If
%>
<%
Dim totalsms
Dim totalsms_numRows
Set totalsms = Server.CreateObject("ADODB.Recordset")
totalsms.ActiveConnection = MM_master_STRING
totalsms.Source = "SELECT mailIsRead, mailId, mailSubject FROM sms WHERE toUserId = '" + Replace(totalsms__MMColParam, "'", "''") + "' AND mailIsRead=False"
totalsms.CursorType = 0
totalsms.CursorLocation = 2
totalsms.LockType = 1
totalsms.Open()
totalsms_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
totalsms_numRows = totalsms_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim totalsms_total
Dim totalsms_first
Dim totalsms_last
' set the record count
totalsms_total = totalsms.RecordCount
' set the number of rows displayed on this page
If (totalsms_numRows < 0) Then
totalsms_numRows = totalsms_total
Elseif (totalsms_numRows = 0) Then
totalsms_numRows = 1
End If
' set the first and last displayed record
totalsms_first = 1
totalsms_last = totalsms_first + totalsms_numRows - 1
' if we have the correct record count, check the other stats
If (totalsms_total <> -1) Then
If (totalsms_first > totalsms_total) Then
totalsms_first = totalsms_total
End If
If (totalsms_last > totalsms_total) Then
totalsms_last = totalsms_total
End If
If (totalsms_numRows > totalsms_total) Then
totalsms_numRows = totalsms_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (totalsms_total = -1) Then
' count the total records by iterating through the recordset
totalsms_total=0
While (Not totalsms.EOF)
totalsms_total = totalsms_total + 1
totalsms.MoveNext
Wend
' reset the cursor to the beginning
If (totalsms.CursorType > 0) Then
totalsms.MoveFirst
Else
totalsms.Requery
End If
' set the number of rows displayed on this page
If (totalsms_numRows < 0 Or totalsms_numRows > totalsms_total) Then
totalsms_numRows = totalsms_total
End If
' set the first and last displayed record
totalsms_first = 1
totalsms_last = totalsms_first + totalsms_numRows - 1
If (totalsms_first > totalsms_total) Then
totalsms_first = totalsms_total
End If
If (totalsms_last > totalsms_total) Then
totalsms_last = totalsms_total
End If
End If
%>
<link href="<%= SysCss %>" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16%" 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"><a href="admin_news_add.asp"></a></td>
</tr>
</table></td>
<td width="84%" align="center" valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td>欢迎编号为<%=(theacherinfo.Fields.Item("studentnum").Value)%>|<%=(theacherinfo.Fields.Item("Specia").Value)%>的<%=(theacherinfo.Fields.Item("studentname").Value)%>,登录<%= PlugVersion %>! <font color="#FF0000">你的用户等级为:<% select case theacherinfo.Fields.Item("Authority").Value'判断用户等级
case "0"
Response.Write("还没审核")
case "1"
Response.Write("学生")
case "2"
Response.Write("锁定")
case "5"
Response.Write("教师")
case "6"
Response.Write("管理员")
case "7"
Response.Write("系统员")
end select %>!</font></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><img src="icon/<%=(theacherinfo.Fields.Item("HeadTopic").Value)%>.gif" />
<div align="left"> </div>
<div></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFEC93"><a href="user_info_modi.asp" target="_self"><font color="#FF0000">点击这里修改个人信息 </font> </a></td>
</tr>
</table></td>
</tr>
<tr>
<td><p> </p>
<% If Not totalsms.EOF Or Not totalsms.BOF Then %>
<p><a href="sms_index.asp" target="_self"><img src="images/newmail.gif" width="28" height="11" border="0" />你有<%=(totalsms_total)%>条新信息,请查看!</a></p>
<%
While ((Repeat1__numRows <> 0) AND (NOT totalsms.EOF))
%>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><% =Repeat1__index+1 %>
.<a href="sms_read.asp?mailId=<%=(totalsms.Fields.Item("mailId").Value)%>"><%=(totalsms.Fields.Item("mailSubject").Value)%></a></td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
totalsms.MoveNext()
Wend
%>
<% End If ' end Not totalsms.EOF Or NOT totalsms.BOF %>
<% If totalsms.EOF And totalsms.BOF Then %>
<p><a href="sms_write.asp" target="_self">现在你没有新的短信,你可以发送短信给别人。</a></p>
<% End If ' end totalsms.EOF And totalsms.BOF %></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="inc/bot.asp" -->
<%
theacherinfo.Close()
Set theacherinfo = Nothing
%>
<%
totalsms.Close()
Set totalsms = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -