tzcontentdrfgwdfgrtforzuozhe.asp
来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 409 行
ASP
409 行
<%@LANGUAGE="VBSCRIPT"%>
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<!--#include file="../../Connections/ifr/ifrasp.asp" -->
<%
MM_authorizedUsers=""
MM_authFailedURL="../../index.asp"
MM_grantAccess=false
If Session("userssdfgfhtrh") <> "" Then
If (true 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 yidu__MMColParam
yidu__MMColParam = "1"
If (Request("ID") <> "") Then
yidu__MMColParam = Request("ID")
End If
%>
<%
Dim yidu
Dim yidu_numRows
Set yidu = Server.CreateObject("ADODB.Recordset")
yidu.ActiveConnection = MM_oavbsconn_STRING
yidu.Source = "SELECT count(id) as yidutzid FROM 信息已读记录 WHERE 信息编号 = " + Replace(yidu__MMColParam, "'", "''") + ""
yidu.CursorType = 0
yidu.CursorLocation = 2
yidu.LockType = 1
yidu.Open()
yidu_numRows = 0
%>
<%if not yidu.eof or not yidu.bof then
dim counts
counts=yidu("yidutzid")
end if%>
<%
Dim Recordset1__varid
Recordset1__varid = "525"
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 infoall.通知点击,infoall.通知阅读人次,infoall.id,infoall.标题,infoall.内容,infoall.发送人姓名,infoall.入库时间,阅读次数,最后更新日期,最后更新时间 FROM infoall WHERE (infoall.id=" + Replace(Recordset1__varid, "'", "''") + " and infoall.信息属性='通知')"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1("通知点击")=counts
Recordset1("通知阅读人次")=Recordset1("通知阅读人次")+1
Recordset1.update
Recordset1_numRows = 0
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Request("ID") <> "") Then
Recordset2__MMColParam = Request("ID")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT * FROM 信息已读记录 WHERE 信息编号 = " + Replace(Recordset2__MMColParam, "'", "''") + " and 信息属性='通知'"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 3
Recordset2.LockType = 3
Recordset2.Open()
if Recordset2.eof then
Recordset2.addnew
Recordset2("信息编号")=request.querystring("ID")
Recordset2("信息已读人帐号")=Session("userssdfgfhtrh")
Recordset2("信息已读人姓名")=Session("names")
Recordset2("信息属性")="通知"
Recordset2.update
Recordset2_numRows = 0
end if
%>
<%
Dim Recordset3__varid
Recordset3__varid = "1"
If (request("id") <> "") Then
Recordset3__varid = request("id")
End If
%>
<%
Dim Recordset3
Dim Recordset3_numRows
Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_oavbsconn_STRING
Recordset3.Source = "SELECT 通知附件db.文件名,通知附件db.文件路径,通知附件db.文件大小,通知附件db.通知编号,通知附件db.id FROM 通知附件db inner join infoall on 通知附件db.通知编号=infoall.id WHERE infoall.id=" + Replace(Recordset3__varid, "'", "''") + ""
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()
Recordset3_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset3_numRows = Recordset3_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index
Repeat2__numRows = -1
Repeat2__index = 0
Recordset2_numRows = Recordset2_numRows + Repeat2__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset3_total
Dim Recordset3_first
Dim Recordset3_last
' set the record count
Recordset3_total = Recordset3.RecordCount
' set the number of rows displayed on this page
If (Recordset3_numRows < 0) Then
Recordset3_numRows = Recordset3_total
Elseif (Recordset3_numRows = 0) Then
Recordset3_numRows = 1
End If
' set the first and last displayed record
Recordset3_first = 1
Recordset3_last = Recordset3_first + Recordset3_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset3_total <> -1) Then
If (Recordset3_first > Recordset3_total) Then
Recordset3_first = Recordset3_total
End If
If (Recordset3_last > Recordset3_total) Then
Recordset3_last = Recordset3_total
End If
If (Recordset3_numRows > Recordset3_total) Then
Recordset3_numRows = Recordset3_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (Recordset3_total = -1) Then
' count the total records by iterating through the recordset
Recordset3_total=0
While (Not Recordset3.EOF)
Recordset3_total = Recordset3_total + 1
Recordset3.MoveNext
Wend
' reset the cursor to the beginning
If (Recordset3.CursorType > 0) Then
Recordset3.MoveFirst
Else
Recordset3.Requery
End If
' set the number of rows displayed on this page
If (Recordset3_numRows < 0 Or Recordset3_numRows > Recordset3_total) Then
Recordset3_numRows = Recordset3_total
End If
' set the first and last displayed record
Recordset3_first = 1
Recordset3_last = Recordset3_first + Recordset3_numRows - 1
If (Recordset3_first > Recordset3_total) Then
Recordset3_first = Recordset3_total
End If
If (Recordset3_last > Recordset3_total) Then
Recordset3_last = Recordset3_total
End If
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">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="/css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style35 {
color: #FFFFFF;
font-weight: bold;
}
.style36 {font-size: 12px}
.style7 {color: #FFFFFF}
.style37 {color: #999999}
-->
</style>
</head>
<body>
<div align="center">
<table width="200" height="10" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table width="96%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="6" height="21"><img src="../../img/bbs/leftlin1.gif" width="6" height="21"></td>
<td width="936" bgcolor="#5AAE18"><div align="center"><span class="style7"><span class="style35">通 知</span></span></div></td>
<td width="6" height="21"><img src="../../img/bbs/rightlin1.gif" width="6" height="21"></td>
</tr>
</table>
</div>
<div align="center">
<table width="96%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="1" style="word-break:break-all;Width:fixed">
<tr bgcolor="#FFFFFF">
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" style="word-break:break-all;Width:fixed">
<tr>
<td height="6"></td>
</tr>
<tr>
<td><div align="center"><%=(Recordset1.Fields.Item("标题").Value)%><br>
<span class="style36">
<%if Recordset1("最后更新日期")="2006-10-1" then%>
发布时间:<%=(Recordset1.Fields.Item("入库时间").Value)%>
<%else%>
最后更新:<%=(Recordset1.Fields.Item("最后更新时间").Value)%>
<%end if%>
点击:<%=(yidu.Fields.Item("yidutzid").Value)%>人 阅读:<%=(Recordset1.Fields.Item("通知阅读人次").Value)%>次</span></div></td>
</tr>
<tr>
<td><hr width="96%" size="1" color="#5AAE18"></td>
</tr>
</table>
<p align="left"><%= (Recordset1.Fields.Item("内容").Value)%></p>
<p align="right"> </p>
<p align="left"> </p>
<% If Not Recordset3.EOF Or Not Recordset3.BOF Then %>
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset3.EOF))
%><%n=Recordset3("文件名")%><%fpath=Recordset3("文件路径")%>
<tr>
<td><a href="redirect.asp?id=<%=(Recordset3.Fields.Item("id").Value)%>&fname=<%=n%>" target="_blank"><%=n%> </a><span class="style37"> <%=(Recordset3.Fields.Item("文件大小").Value)%></span> <a href="download.asp?id=<%=(Recordset3.Fields.Item("id").Value)%>&n=<%=n%>">下载</a> <a href="shoucang.asp?id=<%=(Recordset3.Fields.Item("id").Value)%>&gwid=<%=(Recordset3.Fields.Item("通知编号").Value)%>&fpath=<%=p%>&fname=<%=n%>">收藏</a> <a href="zhuanfa.asp?id=<%=(Recordset3.Fields.Item("id").Value)%>&fname=<%=n%>">转发<br>
</a></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset3.MoveNext()
Wend
%>
<tr>
<td> <img src="../../img/common.gif" width="16" height="16"><span class="style37">(共 <%=(Recordset3_total)%> 个附件) </span></td>
</tr>
</table>
<% End If ' end Not Recordset3.EOF Or NOT Recordset3.BOF %>
<p align="left"><br>
<span class="style36">发布人:<%=(Recordset1.Fields.Item("发送人姓名").Value)%> </span><br>
<span class="style36"><%=(Recordset1.Fields.Item("入库时间").Value)%></span></p>
<p align="left">阅读:<%
While ((Repeat2__numRows <> 0) AND (NOT Recordset2.EOF))
dim yuduren
'yuduren=Recordset2("信息已读人姓名")&"("&Recordset2.Fields.Item("信息已读时间").Value&")
'yuduren=mid(yuduren,1,(len(yuduren)-1))
%>
<%=Recordset2("信息已读人姓名")%>(<%=Recordset2.Fields.Item("信息已读时间")%>),
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
Recordset2.MoveNext()
Wend
%></p></td>
</tr>
</table></td>
</tr>
</table>
<p><a href="javascript:history.go(-1)">返回
</a></p>
<p> </p>
</div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>
<%
yidu.Close()
Set yidu = Nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?