Photo_save.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:2k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- <% Option Explicit %>
- <!--#include file="../FS_Inc/Const.asp" -->
- <!--#include file="../FS_Inc/Function.asp" -->
- <!--#include file="../FS_InterFace/MF_Function.asp" -->
- <!--#include file="lib/strlib.asp" -->
- <!--#include file="lib/UserCheck.asp" -->
- <%
- dim rs,str_tmppic,i_s,str_tmppicarr,p_FolderObj,p_FSO,p_FileObj
- Set p_FSO = Server.CreateObject(G_FS_FSO)
- if Request.Form("Action")="add" then
- str_tmppic=Replace(Request.Form("pic_1")&"|"&Request.Form("pic_2")&"|"&Request.Form("pic_3")," ","")
- str_tmppicarr =split(str_tmppic,"|")
- for i_s=0 to Ubound(str_tmppicarr)
- if str_tmppicarr(i_s)<>"" then
- p_FolderObj = p_FSO.GetFile(Server.MapPath(Replace(str_tmppicarr(i_s),"/",""))).size
- set rs= Server.CreateObject(G_FS_RS)
- rs.open "select * From FS_ME_Photo where 1=0",User_conn,1,3
- rs.addnew
- rs("title")=Request.Form("title")
- rs("PicSavePath")=str_tmppicarr(i_s)
- rs("Content")=NoHtmlHackInput(Request.Form("Content"))
- rs("Addtime")=now
- if Request.Form("ClassID")<>"" then
- rs("ClassID")=clng(Request.Form("ClassID"))
- else
- rs("ClassID")=0
- end if
- rs("PicSize")=p_FolderObj
- rs("Hits")=0
- rs("UserNumber")=Fs_User.UserNumber
- rs.update
- rs.close:set rs=nothing
- end if
- next
- strShowErr="<li>保存相册成功</li>"
- Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../PhotoManage.asp")
- Response.end
- elseif Request.Form("Action")="edit" then
- p_FolderObj = p_FSO.GetFile(Server.MapPath(Replace(Request.Form("pic_1"),"/",""))).size
- set rs= Server.CreateObject(G_FS_RS)
- rs.open "select * From FS_ME_Photo where id="&Clng(Request.Form("id")),User_conn,1,3
- rs("title")=Request.Form("title")
- rs("PicSavePath")=Request.Form("pic_1")
- rs("Content")=NoHtmlHackInput(Request.Form("Content"))
- if Request.Form("ClassID")<>"" then
- rs("ClassID")=clng(Request.Form("ClassID"))
- else
- rs("ClassID")=0
- end if
- rs("PicSize")=p_FolderObj
- rs.update
- rs.close:set rs=nothing
- strShowErr="<li>修改成功</li>"
- Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../PhotoManage.asp")
- Response.end
- end if
- set p_FSO=nothing
- set Fs_User=nothing
- %><!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->