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

📄 upfile2.asp

📁 网站的后台管理代码......内容比较全面....新手比较适合
💻 ASP
字号:
<%
'=========================================================
' 『动感在线』版权所有(C) Donggan.Net
' 您可以自由应用本程序于合法的个人或商业行为。
' 您必须保留版权信息。
'=========================================================
' Version:1.3
' Date: 2003-01-10
' Script Written by xubin
'=========================================================
' Copyright (C) 1999-2002 Donggan.Net. All rights reserved.
' Web: http://www.Donggan.net
' Email: webmaster@Donggan.net,webmaster@mail.Donggan.net
'=========================================================
%>
<!--#Include File="conn.asp" -->
<!--#Include File="images/upload_5xsoft.inc" -->
<!--#Include File="procedure.asp" -->
<!--#Include File="Language.asp" -->
<% 
	Call loaderror()
	Call showwebdata()
	Call Language_var(Language,"upfile")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charSet=<%=Language_charSet%>">
<link rel="stylesheet" href="images/styles.css" type="text/css">
</head>
<body leftmargin="0" Topmargin="0" marginwidth="0" marginheight="0" background="images/greystrip.gIf">
<!--#Include File="head.asp" -->
  <br><br>
<center>
  <FORM method="post" action="send.asp">
    <table border="1" cellspacing="0" cellpadding="0" width="477" bordercolor="#7C96B8" bordercolordark="#FFFFFF" height="95" >
      <tr> 
<td height="20" colspan="2" bgcolor="#336699" background="images/mmTo.gIf">
  <DIV style="FILTER: dropshadow(color=#FFFFFF, offx=1, offy=1, positive=1); WIDTH: 100%; CURSOR: hAND; POSITION: relative">
      <p align="center"><font color="#336699"><%=webname%><%=Language_upfile(0)%></font></div>     
</td>
      </tr>
      <tr> 
<td height="65" colspan="2"> 
  <div align="center"> 
<%
	Dim upload,file,FormName,iCount
	Set upload=new upload_5xSoft ''建立上传对象

	UpFilePath = FilePath
	 ''在目录后加(/)
	If right(UpFilePath,1)<>"\" Then UpFilePath=UpFilePath&"\" 

	iCount=0
	For Each FormName in upload.file ''列出所有上传了的文件
		Set file=upload.file(FormName)  ''生成一个文件对象
		If file.FileSize>0 Then ''如果 FileSize > 0 说明有文件数据
			TypeFlag = 1			'没有限制上传文件类型
			If TypeFlag = 1 Then 
				fname = file.FileName
				file.SaveAs Server.mappath(UpFilePath&fname)   ''保存文件
				Response.Write Language_upfile(2)&file.FilePath&file.FileName&" ("&Language_upfile(3)&file.FileSize&Language_upfile(4)&"<br>"
				iCount=iCount+1
				FileNameStr = UpFilePath&fname
				FileSize = file.FileSize
				fileuppath = Server.mappath(FileNameStr)
			End If
 		Else
 			Response.Write Language_upfile(5)
 			Exit For
 		End If
		Set file=nothing
	Next
Set upload=nothing

If iCount>0 Then
	Response.Write "<br><font color=#7C96B8>"&Language_upfile(6)&iCount&Language_upfile(7)&"</font>"
Else
	Response.Write "<br><font color=#7C96B8>"&Language_upfile(8)&"</font>"
 Response.Write "<br><center> [<a href=""javascript:history.back();""><<"&Language_upfile(9)&"</a>]"
End If
%>
    <p>
      <input maxlength=20 name=filecount size=12 type=hidden value=<%=iCount%>>
      <input maxlength=20 name=filename size=12 type=hidden value=<%=fname%>>
      <input maxlength=20 name=filesize size=12 type=hidden value=<%=FileSize%>>
      <input maxlength=20 name=filpath size=12 type=hidden value=<%=fileuppath%>>
    </p>
  </div>
</td>
      </tr>
      <tr> 
<td colspan="2" align="center" bgcolor="#336699" background="images/mmTo.gIf" height="20"> <input name="uploadfile" type="Submit" class="Tips_bo" id="denglu" value="<%=Language_upfile(1)%>"> 
</td>
      </tr>
    </table>
  </FORM>
</center>
</body>
</html>
<%
	'关闭销毁对象
	Set rs=nothing
	conn.close
	Set conn=nothing
%>

⌨️ 快捷键说明

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