📄 admintxlfiles.asp
字号:
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="../../myw/adminlogin666.asp"
MM_grantAccess=false
If Session("MM_Usernamesyslogin") <> "" 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" -->
<!--#include file="../../Connections/ifr/ifrasp.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT * FROM txlupfilessdfgdsffvdf ORDER BY 时间 desc"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_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;
font-size: 12px;
}
-->
</style>
<link href="../../css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style6 {font-size: 12px}
.style7 {color: #000000}
.style9 {font-size: 12px; color: #000000; }
-->
</style>
</head>
<body>
<div align="center">
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<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 class="style1">通 讯 录 文 件 管 理</span></span></div></td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
<tr>
<td bgcolor="#FFFFFF"><div align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#399CA0">
<tr bgcolor="#FFFFFF">
<td width="20" height="21"> </td>
<td width="339"><div align="left"><strong>文件名</strong></div></td>
<td width="71"><div align="center"><strong>下 载</strong></div></td>
<td width="93"><div align="center"><strong>大 小</strong></div></td>
<td width="172"><div align="center"><strong>时 间</strong></div></td>
<td width="63"><div align="center"><strong>删 除</strong></div></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<%
dim n,p
n=Recordset1("文件名")
p=Recordset1("文件路径")
%>
<tr bgcolor="#FFFFFF" onMouseOver = "this.style.backgroundColor = '#EEEEEE'" onMouseOut = "this.style.backgroundColor = ''">
<td width="20"><div align="center"><img src="../tz/img/icon1.gif" width="8" height="10"></div></td>
<td width="339">
<div align="left" class="style6">
<%
gbstr=p
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'>" & n & "</a>"
%>
</div></td>
<td width="71"><div align="center" class="style6"><A HREF="downfileforadmin.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "ID=" & Recordset1.Fields.Item("ID").Value %>" class="style7">下载</A></div></td>
<td><div align="center" class="style9"><%=(Recordset1.Fields.Item("文件大小").Value)%></div></td>
<td><div align="center" class="style9"><%=(Recordset1.Fields.Item("时间").Value)%></div></td>
<td><div align="center" class="style6"><A HREF="deltxlfiles.asp?id=<%=(Recordset1.Fields.Item("ID").Value)%>&p=<%=p%>" onClick="return confirm('您确定要删除 <%=n%> 吗?')">删除</A></div></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
</div></td>
</tr>
</table>
<br>
<span class="style6">记录 <%=(Recordset1_first)%> 到 <%=(Recordset1_last)%> (总共 <%=(Recordset1_total)%>个文件)</span> <a href="javascript:history.go(-1)"><img src="../../toall/gw/img/gif/back.gif" width="37" height="45" border="0"></a>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
</div>
<p> </p>
<% If Recordset1.EOF And Recordset1.BOF Then %>
<p><img src="../../toall/jfoanet/img/45.gif" width="28" height="24"><span class="style6">您暂时尚未上传共享文件或已经删除..</span><br>
</p>
<% End If ' end Recordset1.EOF And Recordset1.BOF %>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -