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

📄 admin_uploadengine.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
字号:
<%
'#############################################################
'#      中国在线--极酷论坛 ver.2001 3.0
'#
'#  版权所有: 中国在线 (ChinaXP.Net)
'#
'#  制作人  : 周周 (SeeYa!)
'#
'#
'#  主页地址: http://www.ChinaXP.net/    中国在线
'#	      http://www.ChinaXP.Net/bbs/    中国在线--极酷论坛
'#
'#############################################################
%>
<!--#include file="config.asp"-->
<!--#include file="inc_functions.asp"-->
<!-- #include file="Include/clsUpload.inc" -->

<%
   '--- Object to parse the input ---
   Dim objUpload

   Dim strFolder
   Dim MaxFileSize
   Dim boolAllowedType
   Dim strAllowedExtensions
   Dim strResult
   Dim faname
   Dim boolSuccess
   Dim UploadDir


   strResult = "Finished..."

   If Request.TotalBytes > 0 Then
     Set objUpload = new clsUpload
     objUpload.ParseRequest
     If (objUpload.Files.Count = 1) Then
        strFolder = objUpload.Form.Item("Folder")
		TopicID = objUpload.Form.Item("TOPIC_ID")
		ReplyID = objUpload.Form.Item("REPLY_ID")
		UploadDir = objUpload.Form.Item("uploaddir")
		if ReplyId = "" then
		ReplyID = -1
		end if
		MemberID = objUpload.Form.Item("MEMBER_ID")
		faname = objUpload.Files.Item(0).FileName

		boolSuccess = saveDoc()
       	if boolSuccess then
			strResult = "文件 " & objUpload.Files.Item(0).FileName & " 已上传到服务器"
		end if
     Else
       strResult = "没有文件怎么上传啊??"
     End If
   End If

'---------------------------------------------------------------------------
'- Function    : saveDoc
'---------------------------------------------------------------------------
private function saveDoc()
	Dim strRoot
	Dim strFile
	Dim fso
	strRoot = strCookieURL
	if UploadDir <> "" then
	 	strRoot = Server.MapPath(strCookieURL) & "\Mods\" & UploadDir
	else
		strRoot = Server.MapPath(strRoot) & "\Mods\" & strFolder
	end if
	strFile = strRoot & "\"  & objUpload.Files.Item(0).FileName
	Set fso = Server.CreateObject("Scripting.FileSystemObject")
	If not fso.FolderExists(strRoot) then
		fso.createFolder(strRoot)
	end if
	if (fso.FileExists(strFile)) then
		fso.deleteFile(strFile)
	end if
	objUpload.Files.Item(0).Save strRoot
	saveDoc = (fso.FileExists(strFile))
End Function
%>

<table width="100%" height="100%">
  <tr>
    <td align=center valign=center>
    <div align=center><center>
    <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">

<p>	<%=strResult%></p><br><br>

    <p><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">返回上一页</A></font></p>
    </font>

    </font>
	
    </center></div>
    </td>
  </tr>
</table>

⌨️ 快捷键说明

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