sys_logo_deal.asp
上传用户:stone001
上传日期:2016-10-28
资源大小:685k
文件大小:3k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
ASP/ASPX
- <!--插入html头部分以及数据库接口-->
- <!--#include file="in_conn.asp"-->
- <!--#include file="UpLoadClass.asp"-->
- <body>
- <!--插入网站置顶-->
- <%
- Server.ScriptTimeOut=5000
- if u_name="" then
- Response.Redirect "log_err.asp"
- else
- %>
- <!--#include file="in_topmb.asp"-->
- <% end if %>
- <%
- if u_power<2 OR u_name<>DEF_sysadm then
- Response.Redirect "resp.asp?cmd=adm_bigpower"
- end if
- %>
- <%
- dim request2
- '建立上传对象
- set request2=New UpLoadClass
- '使用手动方式保存
- request2.AutoSave=2
- request2.SavePath="img/logo/"
- request2.FileType="gif/jpg"
- '打开对象
- request2.Open()
- %>
- <table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="0" class="rdbar"><tr>
- <td width="100%" height="100%">
- <a href="index.asp">[首页]</a>-<a href="sys.asp">后台维护</a>-<font class="ft1">上传班级LOGO</font>
- </td>
- </tr></table>
- <table align="center" width="700" height="101" border="0" cellspacing="0" cellpadding="6" class="rdd">
- <tr>
- <td width="150" valign="top" class="rdk2">
- <!--插入左部分-->
- <!--#include file="in_sys_left.asp"-->
- </td>
- <td valign="top"><br>
- <%
- '保存文件
- request2.MaxSize=102400
- viiii=request2.Save("strLogo",0)
- select case request2.Form("strLogo_Err")
- case -1:
- response.write "没有文件上传<br>"&"<a href='javascript:history.go(-1);'>[点击这里<Font color=red>返回修改</Font>]</a>"
- case 0:
- vlogofile=Request2.SavePath&Request2.Form("strLogo")
- sqlstr="SELECT logofile FROM tblsys"
- rs.open sqlstr,conn,1,2
- if Left(rs("logofile"),9)="img/logo/" then
- dim fpath
- dim fso1
- fpath=server.MapPath(rs("logofile"))
- set fso1=Server.CreateObject("Scripting.FileSystemObject")
- if fso1.FileExists(fpath) then
- fso1.DeleteFile fpath,True
- end if
- set fso1=nothing
- end if
- rs("logofile")=vlogofile
- rs.update
- rs.close
- set request2=Nothing
- Response.Redirect "rego.asp?cmd=skin_ok"
- case 1:
- response.write "文件太大,拒绝上传<br>"&"<a href='javascript:history.go(-1);'>[点击这里<Font color=red>返回修改</Font>]</a>"
- case 2:
- response.write "文件格式不对,拒绝上传<br>"&"<a href='javascript:history.go(-1);'>[点击这里<Font color=red>返回修改</Font>]</a>"
- case 3:
- response.write "文件太大且格式不对,拒绝上传<br>"&"<a href='javascript:history.go(-1);'>[点击这里<Font color=red>返回修改</Font>]</a>"
- end select
- set request2=Nothing
- %>
- </td>
- </tr>
- </table>
- <!--插入在线统计-->
- <!--#include file="in_online.asp"-->
- <!--插入网站置底-->
- <!--#include file="in_bottom.asp"-->
- </body>
- </html>