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

📄 listtxlfiles.asp

📁 本oa系统内部短信.手机短信.文件传输.公文收发.邮件服务.共享下载.内部论坛等功能
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<%  
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
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
%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM txlupfilessdfgdsffvdf  WHERE 开关='是'  ORDER BY 时间 desc"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim r__MMColParam
r__MMColParam = "1"
If (request("id") <> "") Then 
  r__MMColParam = request("id")
End If
%>
<%dim ip
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR") '获得真实IP这样的话在本地,在服务器测试都没有问题了

Dim r
Dim r_numRows
Set r = Server.CreateObject("ADODB.Recordset")
r.ActiveConnection = MM_oavbsconn_STRING
r.Source = "SELECT *,相片地址  FROM 通讯录 inner join usertertggbng  on usertertggbng.usersdsfg56=通讯录.个人帐号  WHERE 通讯录.id = " + Replace(r__MMColParam, "'", "''") + " and 用户临时提交否='否'"
r.CursorType = 0
r.CursorLocation = 2
r.LockType = 3
r.Open()

r_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset1_total
Dim Recordset1_first
Dim Recordset1_last
' set the record count
Recordset1_total = Recordset1.RecordCount
' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
  Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
  Recordset1_numRows = 1
End If

' set the first and last displayed record
Recordset1_first = 1
Recordset1_last  = Recordset1_first + Recordset1_numRows - 1

' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
  If (Recordset1_first > Recordset1_total) Then
    Recordset1_first = Recordset1_total
  End If
  If (Recordset1_last > Recordset1_total) Then
    Recordset1_last = Recordset1_total
  End If
  If (Recordset1_numRows > Recordset1_total) Then
    Recordset1_numRows = Recordset1_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (Recordset1_total = -1) Then

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

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

  ' set the number of rows displayed on this page
  If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
    Recordset1_numRows = Recordset1_total
  End If

  ' set the first and last displayed record
  Recordset1_first = 1
  Recordset1_last = Recordset1_first + Recordset1_numRows - 1
  
  If (Recordset1_first > Recordset1_total) Then
    Recordset1_first = Recordset1_total
  End If
  If (Recordset1_last > Recordset1_total) Then
    Recordset1_last = Recordset1_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">
<!--
.tx {height: 16px; width: 30px; border-color: black black #000000; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 9pt; background-color: #eeeeee; color: #0000FF}
.tx1 {height: 20px; width: 30px; font-size: 9pt; border: 1px solid; border-color: black black #000000; color: #0000FF}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
<link href="../../css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {font-size: 12px}
.style3 {color: #FFFFFF}
.style5 {color: #000000; font-size: 12px; }
.style6 {font-weight: bold}
.style8 {font-size: 12px; font-weight: bold; }
.style9 {color: #999999}
body {
	margin-top: 0px;
}
-->
</style>
</head>
<body>
<table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="24%"><div align="right"></div></td>
    <td width="3%"><img src="../../img/txl/12.gif" width="16" height="16"></td>
    <td width="8%"><a href="listtxlfiles.asp">公共通讯录</a></td>
    <td width="3%"><div align="center"><img src="../../img/txl/29.gif" width="16" height="16"></div></td>
    <td width="9%"><a href="writexunlu.asp">单位通讯录</a></td>
    <td width="2%"><img src="../../img/txl/28.gif" width="16" height="16"></td>
    <td width="9%"><div align="center"><a href="mytongxunlu.asp">我的通讯录</a></div></td>
    <td width="2%"><div align="center"><img src="../../img/txl/15.gif" width="16" height="16"></div></td>
    <td width="8%"><div align="center"><a href="addselfinfo.asp">添加联系人</a></div></td>
    <td width="3%"><div align="center"><img src="../../img/txl/26.gif" width="16" height="16"></div></td>
    <td width="6%"><div align="center"><a href="addgroup.asp">组别管理</a></div></td>
    <td width="2%"><div align="right"><img src="../../img/txl/From.gif" width="16" height="16"></div></td>
    <td width="13%"><div align="center">
        <%if  r.eof and r.bof then%>
        <a href="addentertongxunlu.asp">提交办公通讯录</a>
        <%else%>
        <a href="adminmyselfforen.asp">管理办公通讯录</a>
        <%end if%>
    </div></td>
    <td width="2%"><div align="right"><img src="../../img/txl/hn2_sunny.gif" width="19" height="19"></div></td>
    <td width="6%"><div align="center"><a href="../bbs/updatimgpath.asp">上传头像</a></div></td>
  </tr>
</table>
    <% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
    <div align="center">
      <table width="760" height="21" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td background="../../img/bw/line.gif"><div align="center"><span class="style1 style3">通 讯 录 文 件 </span></div></td>
        </tr>
      </table>
      <table width="760" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#AFDBFF">
              <tr bgcolor="#FFFFFF">
                <td width="25">&nbsp;</td>
                <td width="464"><div align="center" class="style2 style6">
                    <div align="left">文件名</div>
                </div></td>
                <td width="54"><div align="center"><span class="style8">下 载</span></div></td>
                <td width="55"><div align="center" class="style8">
                    <div align="center">大 小</div>
                </div></td>
              </tr>
              <% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) 
%>
              <tr bgcolor="#FFFFFF" onMouseOver = "this.style.backgroundColor = '#EEEEEE'" onMouseOut = "this.style.backgroundColor = ''">
                <td><div align="center"><span class="style2"><img src="../tz/img/icon1.gif" width="8" height="10"></span></div></td>
                <td><div align="left" class="style5">
                    <%
gbstr=Recordset1.Fields.Item("文件路径").Value
unstr=""
for i=1 to len(gbstr)
    if asc(mid(gbstr,i,1))<0 then
        unstr=unstr & "%" & mid(hex(asc(mid(gbstr,i,1))),1,2) & "%" & mid(hex(asc(mid(gbstr,i,1))),3,2)
    else
        unstr=unstr & mid(gbstr,i,1)
    end if
next
response.write "<a href=" & chr(34) & unstr & chr(34) & " target='_blank'>" & Recordset1.Fields.Item("文件名").Value & "</a>"
%>
                   
                  <input name="文件路径" type="hidden" id="文件路径" value="<%=(Recordset1.Fields.Item("文件路径").Value)%>">
                  <span class="style9"><%=(Recordset1.Fields.Item("时间").Value)%></span> </div></td>
                <td><div align="center"><A HREF="downfile.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "ID=" & Recordset1.Fields.Item("ID").Value %>" class="style5">下载</A></div></td>
                <td><div align="center" class="style5">
                    <div align="center"><%=(Recordset1.Fields.Item("文件大小").Value)%></div>
                </div></td>
              </tr>
              <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%>
          </table></td>
        </tr>
      </table>
    </div>

  <p align="center">&nbsp;<span class="style2"> 记录 <%=(Recordset1_first)%> 到 <%=(Recordset1_last)%> (总共 <%=(Recordset1_total)%> 个文件) </span></p>
  <div align="center">
    <table width="30%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="16%"><div align="center"><a href="javascript:history.go(-1)"><img src="../../toall/gw/img/gif/back.gif" width="37" height="45" border="0"></a></div></td>
      </tr>
    </table>
    <% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
    <% If Recordset1.EOF And Recordset1.BOF Then %>
  <p align="center" class="style2">暂无通讯录文件..</p>
  <div align="center">
    <% End If ' end Recordset1.EOF And Recordset1.BOF %>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
r.Close()
Set r = Nothing
%>

⌨️ 快捷键说明

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