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

📄 upload.asp

📁 . 缓存处理技术
💻 ASP
字号:
<!--#include FILE="Conn.asp"-->
<!--#include FILE="../Inc/sys_config.asp"-->
<!--#include FILE="../Inc/Function.asp"-->
<!--#include FILE="iXs_clsUp_cnbbr.asp"-->
<%






Server.ScriptTimeOut=5000
Cnbbr_CheckPost(0)
Dim AucID,UserID
AucID=Session("AucID")
UserID=Request.Cookies(super_user)("uid")
if Not isNum(AucID) then Call AlertInfo("图片上传超时,请返回!","../BBR_Sell_Auction.asp",1)
if Not isNum(UserID) then Call AlertInfo("你的登录状态异常,请重新登录!","../Login.asp",1)
sql="select * from auctions where aucid="& AucID &" and aucitemowner="&UserID
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs.eof then
   response.write"<script language='javascript'>alert('出错了,此商品不属于你或者不能再上传商品图片!');this.location.href='../Sell.asp';</script>"
   response.end
else
   if cLng(rs("aucimageurl"))>=cLng(UPFILE_TOTALNUM) then
      response.write"<script language='javascript'>alert('出错了,此商品的图片数量已经超过限制!');this.location.href='../Sell.asp';</script>"
      response.end
   end if
	dim request2


	set request2=New iXs_ClsUp


	request2.TotalSize=UPFILE_MAXSIZE*1024

	request2.MaxSize=UPFILE_MAXSIZE*1024

	request2.FileType="jpg/gif"

	request2.SavePath="images/"
	request2.open()
	if request2.Form("strPhoto")="" then
	   response.write"<script language='javascript'>alert('出错了,图片上传失败,请重新尝试!');this.location.href='../sellauc_success.asp?aucid="& session("aucid") &"';</script>"
	   response.end
	end if
	Dim SavePath_Url
	SavePath_Url=Replace(request2.SavePath&request2.Form("strPhoto"),"\","/")


   rs("aucimageurl")=rs("aucimageurl")+1
   rs.update
   Rs.Close
   Set Rs=nothing

   Dim aucimgcount,Rs2
   sql="select max(img_order) as c from aucimages where aucid="&AucID
   set rs2=conn.execute(sql)
   if Not rs2.eof then aucimgcount=rs2("c")+1
   Rs2.close
   Set Rs2=nothing
   if aucimgcount="" then aucimgcount=1
   if Not isNum(aucimgcount) then aucimgcount=1
   Dim Rs3
   sql="select * from aucimages where imgid is null"
   set rs3=server.createobject("adodb.recordset")
   rs3.open sql,conn,1,3
   rs3.addnew
   rs3("aucid")=AucID
   rs3("img_url")="upfile/"&SavePath_Url
   rs3("img_order")=aucimgcount
   rs3.update
   Rs3.Close
   Set Rs3=nothing


   set request2=nothing

   response.write"<script language='javascript'>alert('图片上传成功!');this.location.href='../Sellauc_Success.asp?aucid="& AucID &"';</script>"
   response.end
end if
%>

⌨️ 快捷键说明

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