⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sms_mysend_list.asp

📁 《学校机房作业管理系统》采用ASP+Aceesss+ ServU构架
💻 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
'=========================================================
%>

<% 
  Response.Expires = -1
  Response.ExpiresAbsolute = Now() - 1
  Response.cachecontrol = "no-cache"
 %>
<!--#include file="inc/config.asp" -->
<!--#include file="Connections/master.asp" -->
<!--#include file="inc/checksqlIn.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 smslist__MMColParam
'smslist__MMColParam = "1"
'If Session(("MM_Usernum") <> "") Then 
  smslist__MMColParam = session("QYABC_userid")
'End If
%>
<%
Dim smslist
Dim smslist_numRows

Set smslist = Server.CreateObject("ADODB.Recordset")
smslist.ActiveConnection = MM_master_STRING
smslist.Source = "SELECT mailId, fromUserId, mailSubject, mailDateTime, mailIsRead, toUserId,toUsername  FROM sms  WHERE fromUserid = '" + Replace(smslist__MMColParam, "'", "''") + "'  ORDER BY mailDateTime DESC"
smslist.CursorType = 0
smslist.CursorLocation = 2
smslist.LockType = 1
smslist.Open()

smslist_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  FROM sms  WHERE fromUserid = '" + 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
smslist_numRows = smslist_numRows + Repeat1__numRows
%>
<%
Dim MM_paramName 
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>


<%

Dim smslist_total
Dim smslist_first
Dim smslist_last

' set the record count
smslist_total = smslist.RecordCount

' *** Recordset Stats: if we don't know the record count, manually count them

If (smslist_total = -1) Then

  ' count the total records by iterating through the recordset
  smslist_total=0
  While (Not smslist.EOF)
    smslist_total = smslist_total + 1
    smslist.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (smslist.CursorType > 0) Then
    smslist.MoveFirst
  Else
    smslist.Requery
  End If


End If
%>
<%

Dim totalsms_total
Dim totalsms_first
Dim totalsms_last

' set the record count
totalsms_total = totalsms.RecordCount

' *** 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


End If
%>

<!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>发件箱-<%=WebName%></title>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR>


<META content=TRUE name=MSSmartTagsPreventParsing>
<META content=Yes http-equiv=MSThemeCompatible>
<META content=no-cache http-equiv=html>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
}
-->
</style>
<link href="../inc/STYLE.CSS" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
-->
</style>
<link rel="SHORTCUT ICON" href="favicon.ico"/>
<link href="<%= SysCss %>" rel="stylesheet" type="text/css">
</head>

<body>
<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>&nbsp;</td>
      </tr>
      <tr>
        <td align="center"><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="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="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="admin_exercise_content_mylist.asp"></a><a href="admin_news_add.asp"></a></td>
      </tr>
      <tr>
        <td align="center"><a href="admin_news_add.asp"></a></td>
      </tr>
    </table></td>
    <td width="84%" valign="top">
	<div align="center">
  <% If Not smslist.EOF Or Not smslist.BOF Then %>
<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#99ccff">
    <tr bgcolor="#66B3FF"> 
      <td colspan="6"><div align="left"><strong><font color="#FF0000">温馨提示:</font></strong>你发出的短信共有<font color="#FF0000"><%=(smslist_total)%></font>条短信,其中有<font color="#FF0000"><%=(totalsms_total)%></font>条对方末读。 
      <br>
      <%
	  
	  if smslist_total>15 then
	  Response.Write("系统规定,每位用户只可保留十五条信息,你现在保留的信息超过了该数量,请你及时删除已读信息,否则你将不能发送信息。")
	  end if
	  
	   %>
	  </div></td>
    </tr>
    <tr> 
      <td width="31"><div align="center">删除</div></td>
      <td width="51"><div align="center">状态</div></td>
      <td width="105"><div align="center">接收方昵称</div></td>
      <td width="261"><div align="center">短信主题</div></td>
      <td width="192"><div align="center">短信日期</div></td>
      <td width="75"><div align="center">阅读</div></td>
    </tr>
    <% 
While ((Repeat1__numRows <> 0) AND (NOT smslist.EOF)) 
%>
    <tr width="60" bgcolor="#FFFFFF"  onmouseout="javascript:this.bgColor='#ffffff'" onmouseover="javascript:this.bgColor='#C1E0FF'"> 
      <td><div align="center"><a href="sms_del_mysms.asp?ID=<%=(smslist.Fields.Item("mailId").Value)%>" onclick="return confirm('温馨提示:删除后,将不能恢复。你确定删除此条信息吗?')"><img src="images/delete.gif" alt="删除信息" width="18" height="18" border="0"></a> 
        </div></td>
      <td> <div align="center"> 
          <%if (smslist.Fields.Item("mailIsRead").Value)=true then %>
          <img src="images/mailold.gif" alt="已读"> 
          <% else %>
          <img src="images/mailnew.gif" alt="未读"> 
          <% end if
	%>
        </div></td>
      <td><div align="center"><a href="user_info_show.asp?userid=<%=(smslist.Fields.Item("toUserId").Value)%>" target="_blank"><%=(smslist.Fields.Item("toUsername").Value)%></a></div></td>
      <td><div align="center"><a href="sms_modi.asp?mailId=<%=(smslist.Fields.Item("mailId").Value)%>"><%=(smslist.Fields.Item("mailSubject").Value)%></a></div></td>
      <td><div align="center"><%=(smslist.Fields.Item("mailDateTime").Value)%></div></td>
      <td><div align="center"><A HREF="sms_modi.asp?mailId=<%=(smslist.Fields.Item("mailId").Value)%>">打开信息</A></div></td>
    </tr>
    <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  smslist.MoveNext()
Wend
%>
    <tr> 
      <td colspan="6">&nbsp;</td>
    </tr>
  </table>
  <% End If ' end Not smslist.EOF Or NOT smslist.BOF %>
<% If smslist.EOF And smslist.BOF Then %>
<br>
  <br>
  <br>
  <br>
  <br>
  <br>
</div>
<p align="center" class="style1">你的发件箱还没有发出任何短信!</p>
<div align="center">
  <% End If ' end smslist.EOF And smslist.BOF %>
	</td>
  </tr>
</table>
<!--#include file="inc/bot.asp" -->
</div>
</body>
</html>
<%
smslist.Close()
Set smslist = Nothing
%>
<%
totalsms.Close()
Set totalsms = Nothing
%>

⌨️ 快捷键说明

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