wy_upload2.asp
资源名称:lyxxgl.rar [点击查看]
上传用户:hnxqingdao
上传日期:2013-05-22
资源大小:1283k
文件大小:2k
源码类别:
其他行业
开发平台:
ASP/ASPX
- <!--#include FILE="wy_upload_inc.asp"-->
- <html>
- <head>
- </head>
- <style>
- body { font-size:9pt }
- </style>
- <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
- <script>
- if (top.location==self.location){
- top.location="upload.asp"
- }
- </script>
- <%
- set upload=new upload_5xsoft
- set file=upload.file("sf_upfile")
- if file.fileSize<1 then
- response.write"<script language=javascript>alert('您没有选择图片。~~~nn-----请点击浏览按钮,从弹出的窗口中选择要上传的图片。nn-----然后点击上传按钮就可以把图片上传了...nn-----不过要注意图片的格式哦~~~');history.back()</script>"
- response.end
- end if
- if file.fileSize<10 or file.fileSize>1000*1024 then
- response.write "错误:上传的图片大小超过了限制! <a href='javascript:history.go(-1)'>退回上一步</a>"
- response.end
- end if
- upfilename = split(file.FileName,".")
- upfileext = upfilename(ubound(upfilename))
- if upfileext<>"jpg" and upfileext<>"jpeg" and upfileext<>"gif" and upfileext<>"JPG" and upfileext<>"JPEG" and upfileext<>"GIF"then
- response.write "错误:上传的文件格式不对! <a href='javascript:history.go(-1)'>退回上一步</a>"
- response.end
- end if
- if request.QueryString("up") = "logo" then
- ufp="GG_logo_"&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&"."&upfilename(ubound(upfilename))
- else
- ufp="news_"&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&"."&upfilename(ubound(upfilename))
- end if
- ' file path
- file.saveas Server.mappath("../../wy_trip_images/"&ufp)
- %>
- <script >
- parent.frmadd.news_content.value+='wy_trip_images/<%=ufp%>'
- //location.replace('../wy_trip_admin.asp')
- </script>
- <%
- tsolname=request.QueryString("tsolname")
- tablename=request.QueryString("tablename")
- solpic=request.QueryString("solpic")
- solkind=request.QueryString("solkind")
- pp="wy_updata.asp?name="&ufp
- pp=pp&"&tablename="&tablename
- pp=pp&"&tsolname="&tsolname
- pp=pp&"&solpic="&solpic
- pp=pp&"&solkind="&solkind
- response.redirect(pp)
- set file=nothing
- set upload=nothing
- 'set my_conn = nothing
- 'set rs = nothing
- 'www.0416e.com/fc
- %>
- </body></html>