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

📄 addallowpost.asp

📁 绿叶办公自动化系统
💻 ASP
字号:
<%  
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="../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/systemconn.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.Form("f") <> "") Then 
  Recordset1__MMColParam = Request.Form("f")
End If
%>
<% dim littype
littype=request("f")
%>
<% if littype="" then %>
<script language="javascript">
{
alert("请输入文件类型,谢谢!");history.go(-1)
}
</script>
<%response.end
end if%>

<%if left(littype,1)<>"." then %>
<script language="javascript">
{
alert("文件类型需以.为开头");history.go(-1)
}
</script>
<%response.end
end if%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_systemconn_STRING
Recordset1.Source = "SELECT *  FROM 限制文件类型允许  WHERE 允许文件类型 = '" + Replace(Recordset1__MMColParam, "'", "''") + "'  ORDER BY 添加时间 DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 3
Recordset1.LockType = 3
Recordset1.Open()
if  Recordset1.eof  and  Recordset1.bof then 
Recordset1.addnew
Recordset1("允许文件类型")=littype
Recordset1.update
Recordset1_numRows = 0
%>
<%
Dim xianzhi
Dim xianzhi_numRows
Set xianzhi = Server.CreateObject("ADODB.Recordset")
xianzhi.ActiveConnection = MM_systemconn_STRING
xianzhi.Source = "SELECT *  FROM xzfilesuploadasfdgsdgrwt  WHERE 类别 = 'allow'"
xianzhi.CursorType = 0
xianzhi.CursorLocation = 2
xianzhi.LockType = 3
xianzhi.Open()
xianzhi_numRows = 0
%>
<%if not xianzhi.eof or not xianzhi.bof then
xianzhi("xzfupload")=xianzhi("xzfupload")&littype&"|"
xianzhi.update
end if
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
xianzhi.Close()
Set xianzhi = Nothing
%>
<% response.Redirect("filetype.asp")%>
<%else%>
<%response.write"<script>alert('很抱歉,"&littype&"文件类型已存在。');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>"
response.end
end if%>


⌨️ 快捷键说明

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