==================================================
功能名称:replacesaveremotefile
角色:替换和保存远程图片
参数:建设----字符串替换
参数:savetf -----是否保存文件,假不救,真正的拯救
参数:tisturl ------当前网页地址
==================================================
功能replacesaveremotefile(建设,strinstalldir,strchanneldir,SaveTf,TistUrl)
如果建设=假美元$ 或或建筑= = 然后strchanneldir
replacesaveremotefile =约束
退出功能
最后如果
昏暗的tempstr,tempstr2,tempstr3,Re,比赛,比赛,Tempi,TempArray,temparray2

集重=新的正则表达式
re.ignorecase =真
重复全局=真的
RE
集比赛= re.execute(建设)
每场比赛的每场比赛
如果TempStr <> 然后
tempstr = tempstr数组$ $ 匹配。值
其他的
tempstr = match.value
最后如果
下一个
如果TempStr <> 然后
temparray =分裂(tempstr,数组$ $ )
tempstr =
拍子= 0 UBound(temparray)
RE。(GIF JPG BMP | | | JPEG | PSD | PNG | SVG | DXF | WMF | TIFF)
集比赛= re.execute(TempArray(Tempi))
每场比赛的每场比赛
如果TempStr <> 然后
tempstr = tempstr数组$ $ 匹配。值
其他的
tempstr = match.value
最后如果
下一个
下一个
最后如果
如果TempStr <> 然后
includepic = 1'picture新闻
模式
tempstr = re.replace(tempstr,)
最后如果
设置匹配=无
设置否
如果tempstr = 或IsNull(tempstr)=真
replacesaveremotefile =约束
退出功能
最后如果
tempstr =取代(tempstr,
tempstr =取代(tempstr,、)
tempstr =取代(tempstr,

昏暗的remotefileurl,SavePath,PathTemp,DtNow,strfilename,strfiletype,arrsavefilename,RanNum,arr_path
dtnow =现在()
如果SaveTf真的那么
***********************************
保存路径= strchanneldir年(DtNow)右(0 月(dtnow),2) /
response.write链接路径:保存路径
arr_path =分裂(SavePath, / )
pathtemp =
拍子= 0 UBound(arr_path)
如果时间= 0
pathtemp = arr_path(0) /
拍子= UBound(arr_path)然后
退出
其他的
pathtemp = pathtemp arr_path(拍子) /
最后如果
如果CheckDir(pathtemp)= false
如果MakeNewsDir(pathtemp)= false
savetf = false
退出
最后如果
最后如果
下一个
最后如果

摆脱画面的重复。
temparray =分裂(tempstr,数组$ $ )
tempstr =
拍子= 0 UBound(temparray)
如果仪器(1例(tempstr),1例(temparray(Tempi)))<1
tempstr = tempstr数组$ $ temparray(拍子)
最后如果
下一个
tempstr =右(tempstr,Len(TempStr)- 7)
temparray =分裂(tempstr,数组$ $ )
摆脱画面的重复。

转换相对图片地址开始
tempstr =
拍子= 0 UBound(temparray)
tempstr = tempstr数组$ $ definiteurl(TempArray(拍子),TistUrl)
下一个
tempstr =右(tempstr,Len(TempStr)- 7)
tempstr =取代(tempstr,CHR(0),)
temparray2 =分裂(tempstr,数组$ $ )
tempstr =
转换相对图片地址的结尾。
图片替换/保存
集重=新的正则表达式
re.ignorecase =真
重复全局=真的
拍子= 0 UBound(temparray2)
remotefileurl = temparray2(拍子)
如果RemoteFileUrl <>假美元$ 和savetf =真正的then'save图片
arrsavefilename =分裂(remotefileurl,,)
strfiletype = 1例(arrsavefilename(UBound(arrsavefilename)))的文件类型
如果strfiletype =,ASP,或strfiletype =,ASA,或strfiletype =,ASPX,或者,strfiletype =,ASPX。
uploadfiles =
replacesaveremotefile =约束
退出功能
最后如果

随机化
rannum = int(900 * Rnd)+ 100
strfilename =年(DtNow)右(0 月(dtnow),2)右(0 的日子(DtNow),2)右(0小时(dtnow),2),(0)
再次,模式= temparray(拍子)

如果SaveRemoteFile(SavePath strFileName,remotefileurl)=真
********************************
pathtemp =保存路径strfilename
建筑= re.replace(建设、PathTemp)
再strinstalldir strchanneldir模式=。
uploadfiles = uploadfiles| (保存路径重新更换strfilename,)
响应(同花顺)
response.write图片保存地址:pathtemp
如果thumb_watermark = 1然后打电话给skthumb.addwatermark(pathtemp)的水印
其他的
pathtemp = remotefileurl
建筑= re.replace(建设、PathTemp)
uploadfiles = uploadfiles|remotefileurl
最后如果
ElseIf RemoteFileurl的< >假美元$ 和savetf =假then'do不保存图片
再次,模式= temparray(拍子)
建筑= re.replace(建设、RemoteFileUrl)
uploadfiles = uploadfiles|remotefileurl
最后如果
下一个
设置否
如果UploadFiles <> 然后
uploadfiles =右(uploadfiles,Len(uploadfiles)- 1)
最后如果
replacesaveremotefile =约束
端功能