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

📄 uplogofile.asp

📁 功能特点:1、在wap1.0的基础上添加了铃声栏目; 2、修改了后台程序中的一些错误; 3、优化了上传文件中的冗余; 4、
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="admin/cook.asp"-->
<%
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
response.write "<tr><td style=font:9pt Verdana>"
response.write "<center>你提交的路径有误,禁止从站点外部提交数据!</center>"
response.write "</td></tr></table></center>"
response.end
end if
%>
<!--#include file="upload.inc"-->
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
<%
set upload=new upload_file
if upload.form("act")="uploadfile" then
	filepath=trim(upload.form("filepath"))
	filelx=trim(upload.form("filelx"))
	
	i=0
	for each formName in upload.File
		set file=upload.File(formName)
 
 fileExt=lcase(file.FileExt)	'得到的文件扩展名不含有.
 if file.filesize<100 then
 	response.write "<span style=""font-family: 宋体; font-size: 9pt"">请先选择你要上传的文件! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
	response.end
 end if
 if fileext<>"gif" and fileext<>"jpg" and fileext<>"bmp" then
	response.write "<span style=""font-family: 宋体; font-size: 9pt"">只能上传jpg、gif、bmp格式的图片! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
	response.end
 end if
 if file.filesize>(100*1024) then
	response.write "<span style=""font-family: 宋体; font-size: 9pt"">最大只能上传 100K 的图片文件! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
	response.end
 end if

 randomize
 name=upload.form("EditName")
 filename=filepath&name&"."&fileExt
%>
<%
 if file.FileSize>0 then         ''如果 FileSize > 0 说明有文件数据
  file.SaveToFile Server.mappath(FileName)
  response.write "<script>window.opener.document."&upload.form("FormName")&"."&upload.form("EditName")&".value='"&FileName&"'</script>"
%>
<%
 end if
 set file=nothing
	next
	set upload=nothing
end if
%>
<script language="javascript">
window.alert("文件上传成功!请不要修改生成的链接地址!");
window.close();
</script>

⌨️ 快捷键说明

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