duasmscontent.asp

来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 163 行

ASP
163
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<%
Dim Recordset1__varid
Recordset1__varid = "20"
If (request.querystring("id")  <> "") Then 
  Recordset1__varid = request.querystring("id") 
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM infoall  WHERE id=" + Replace(Recordset1__varid, "'", "''") + "  ORDER BY ID DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Recordset2__varuser
Recordset2__varuser = "yp"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset2__varuser = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset2__varid
Recordset2__varid = "116"
If (request.querystring("id")  <> "") Then 
  Recordset2__varid = request.querystring("id") 
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT 文件信息info.文件名,文件信息info.文件名,文件路径,文件大小,文件上传时间,邮件编号,infoall.id  FROM 文件信息info inner join  infoall on 文件信息info.邮件编号=infoall.id  WHERE 接收人帐号='" + Replace(Recordset2__varuser, "'", "''") + "'  and infoall.id=" + Replace(Recordset2__varid, "'", "''") + ""
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
<%if not Recordset1.eof or not Recordset1.bof then
 session("jieshouhufuzhanghao")=Recordset1("发送人帐号")
  session("jieshouhufnames")=Recordset1("发送人姓名")
 %>

<%end if%>
<%
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
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {font-size: 12px}
-->
</style>
</head>

<body>
<form name="form1" method="post" action="">
  <table width="446" height="50" border="0" cellpadding="2" cellspacing="1" bgcolor="#006699">
    <tr>
      <td><div align="center"><span class="style1">短消息内容</span></div></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><p><%=(Recordset1.Fields.Item("内容").Value)%> &nbsp; </p>
      <p><%=(Recordset1.Fields.Item("短消息回复").Value)%><br>
        <br>
        <br><% if not Recordset2.eof or not Recordset2.bof then %>
        <A HREF="downfujianfiless.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & Recordset2.Fields.Item("id").Value %>">下载附件</A>
<%else%>本邮件无附件..<%end if%>
		</p></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><A HREF="huifuwritesms.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "ID=" & Recordset1.Fields.Item("ID").Value %>">回复</A><span class="style2">
      </span></td>
    </tr>
  </table>
</form>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>

⌨️ 快捷键说明

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