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

📄 modimage.asp

📁 Flash电子相册 v1.2 Build 1108完整版本下载
💻 ASP
字号:
<%
'----------------------------------------------------------
'***************** 风声无组件上传类 2.0 *****************
'用法举例:快速应用[添加产品一]
'该例主要说明默认模式下的运用
'以常见的产品更新为例
'下面是上传程序(upload.asp)的代码和注释
'http://www.99net.net/study/page/1025101521.htm 用ADODB.Stream代替FSO读取文本文件
'**********************************************************
'---------------------------------------------------------- 
Server.ScriptTimeOut=5000
%>
<!--#include FILE="UpLoadClass.asp"-->
<%
if session("flag")=2 then
%>
<%
dim request2

'建立上传对象
set request2=New UpLoadClass

	'以默认设置打开上传对象
	'建议直接修改类的63,64,65,66行为自己需要的默认设置
	'类的初始默认值分别为
	'p_MaxSize  = 153600 单文件最大150K
	'p_FileType = "jpg/gif" 允许上传jpg/gif格式文件
	'p_SavePath = "" 在当前目录保存文件,这里是相对路径,如:“UpLoadFile/”
	'p_AutoSave = 0 自动生成无重复文件名保存目标文件
	'这样每次就不要设置同样的参数了
	request2.MaxSize = 1536000 '单文件最大1500K
	'request2.SavePath = "bilder/"&request2.Form("mapfl")&"/"
	request2.AutoSave=2
	request2.open()
	
			cc = LoadFile("bilder/"&request2.Form("mapfl")&"/bilder.txt")
			dd = LoadFile("bilder/"&request2.Form("mapfl")&"/info.txt")

					ccEND = InStr(cc,"&fotos=")
					imglist = mid(cc,ccEND+7)
					Dim MyString, MyString2, MyString3, MyString4, rowscount,imgxhtmp,modiedimgname
					
					imgxhtmp=""
					MyString = Split(imglist, "|", -1, 1)
					LenOfArray=UBound(MyString)-Lbound(MyString) 		
					imgxh=CInt(request2.Form("mapxh"))
					thisimg=MyString(imgxh)
					MyString2 = Split(thisimg, "`", -1, 1)
					modiedimgname = MyString2(1)
					MyString(imgxh)=request2.Form("mapname")&"`"&MyString2(1)
							
					for i=0 to LenOfArray
					  if i=LenOfArray then
						imgxhtmp=imgxhtmp&trim(MyString(i))
					  else
						imgxhtmp=imgxhtmp&trim(MyString(i))&"|"					  
					  end if
					next
					
					imgxhtmp=mid(cc,1,ccEND+6)&imgxhtmp
					call SaveToFile(imgxhtmp,"bilder/"&request2.Form("mapfl")&"/bilder.txt")	
					





					ccEND = InStr(dd,"&info=")
					imglist = mid(dd,ccEND+6)					
					imgxhtmp=""
					MyString3 = Split(imglist, "|", -1, 1)
					LenOfArray=UBound(MyString3)-Lbound(MyString3) 		
					imgxh=CInt(request2.Form("mapxh"))
					MyString3(imgxh)=request2.Form("shuoming")
							
					for i=0 to LenOfArray
					  if i=LenOfArray then
						imgxhtmp=imgxhtmp&trim(MyString3(i))
					  else
						imgxhtmp=imgxhtmp&trim(MyString3(i))&"|"					  
					  end if
					next
					
					imgxhtmp=mid(dd,1,ccEND+5)&imgxhtmp
					call SaveToFile(imgxhtmp,"bilder/"&request2.Form("mapfl")&"/info.txt")
					
									
	if request2.form("map_Err")=-1 then
	'Response.write "没有文件上传"
	'Response.end


						
	else
	'Response.write "有文件上传"
	'Response.end	
		if CStr(request2.Form("map_imagestype"))<>"1" then
			response.write"<script>alert('非法图片格式。');history.back()</script>"
			response.end
		end if
					'request2.SavePath = "bilder/"&request2.Form("mapfl")&"/"
						if len(request2.Form("mapfl"))>2 then
					response.write"<script>alert('非法上传路径。');history.back()</script>"
					response.end
					end if

					dirsaved=replace(request2.Form("mapfl"),".asp",".htm")

					request2.SavePath = "bilder/"&dirsaved&"/"

					
					if request2.Save("map",modiedimgname) then
					end if
					
	end if

	
%>


	<%
'释放上传对象




	set request2=nothing
response.write"<script>window.opener.location.reload();alert('修改成功');window.close();</script>"

	'Response.end
Response.end
%>

<%else%>

<%
response.write"<script>alert('请重新登录!');history.back();</script>"
response.end

 end if
%> 

⌨️ 快捷键说明

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