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

📄 save_edit.asp

📁 北京商务网
💻 ASP
字号:
<%@ codepage ="936" %>
<!--#include FILE="upload_5xsoft.inc"-->
<!--#include file="../../inc/config.asp"-->
<!--#include file="../../conn/dbconn2.asp"-->
<%
if session("Flag")<>1 then 
response.write "<SCRIPT language=JavaScript>alert('对不起,你没有权限打开此页!');"
response.write"this.location.href='../zxjf/money.asp';</SCRIPT>" 
response.end
END IF
%>
<%
dim upload,file,formName,formPath,iCount,gsid,filename,rs,sql,id,zsbz,filepath,fs
dim cpbh,cpmc,cpsb,cpcd,cpjg,cpgg,bighy,lithy,jysm,xxsm,sf,city,sccj,lxr,address,postcode,phone,fax,email,web
set upload=new upload_5xSoft
if upload.form("cimg")=2 then
filepath=newspic&upload.form("img")
set fs=server.CreateObject("scripting.filesystemobject")
filepath=server.MapPath(filepath)
if fs.FileExists(filepath) then
fs.DeleteFile filepath,true
end if
end if
formPath=upload.form("filepath")
function MakedownName()
dim fname
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","") 
fname = replace(fname,":","")
fname = replace(fname,"PM","")
fname = replace(fname,"AM","")
fname = replace(fname,"上午","")
fname = replace(fname,"下午","")
fname = int(fname) + int((10-1+1)*Rnd + 1)
MakedownName=fname
end function
if right(formPath,1)<>"/" then formPath=formPath&"/" 
id=upload.form("id")
cpbh=upload.form("cpbh")
cpmc=upload.form("cpmc")
cpsb=upload.form("cpsb")
cpcd=upload.form("cpcd")
cpjg=upload.form("cpjg")
cpgg=upload.form("cpgg")
bighy=upload.form("bighy")
lithy=upload.form("lithy")
jysm=upload.form("jysm")
xxsm=upload.form("xxsm")
sccj=upload.form("sccj")
lxr=upload.form("lxr")
address=upload.form("address")
postcode=upload.form("postcode")
sf=upload.form("sf")
city=upload.form("city")
phone=upload.form("phone")
fax=upload.form("fax")
email=upload.form("email")
web=upload.form("web")
gsid=upload.form("gsid")
If upload.form("zsbz")="" Then
zsbz=0
else
zsbz=1
end if
iCount=0
for each formName in upload.file
set file=upload.file(formName)
if file.FileSize>0 then
if file.filesize>200000 then
response.write"<SCRIPT language=JavaScript>alert('您上传的文件大于规定大小(200K),请改变文件大小后再进行上传。');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
if trim(right(file.FileName,3))<>"jpg" and trim(right(file.FileName,3))<>"gif" and trim(right(file.FileName,3))<>"JPG" and trim(right(file.FileName,3))<>"GIF" then
response.write"<SCRIPT language=JavaScript>alert('您上传的文件GIF或JPG图象文件,请将你上传的文件转换此格式后再进行上传。');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
FileName=gsid&MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)
file.SaveAs Server.mappath(formPath&FileName)
picture=FileName
iCount=iCount+1
end if
end if
end if
set file=nothing
next
set rs=server.createobject("adodb.recordset")
sql="select * from spzs where id="&id
rs.open sql,conn,1,3
rs("cpbh")=cpbh
rs("cpmc")=cpmc
rs("cpsb")=cpsb
rs("cpcd")=cpcd
rs("cpjg")=cpjg
rs("cpgg")=cpgg
if picture<>"" and upload.form("cimg")<>0 then
rs("picture")=picture
end if
rs("sortid")=bighy
rs("typeid")=lithy
rs("jysm")=jysm
rs("xxsm")=xxsm
rs("sccj")=sccj
rs("lxr")=lxr
rs("address")=address
rs("postcode")=postcode
rs("sf")=sf
rs("city")=city
rs("phone")=phone
rs("fax")=fax
rs("email")=email
rs("web")=web
rs("zsbz")=zsbz
rs("idate")=date()
rs.update
rs.close
set rs=noting
conn.close
set conn=nothing
set upload=nothing 
%><head>
<STYLE type=text/css>
TD {
COLOR: #000; FONT-FAMILY: 宋体; FONT-SIZE: 12px
}
.GR {
COLOR: #666666
}
</STYLE>
</head>

<meta HTTP-EQUIV=refresh Content='1;url=showing.asp#a'>
<BODY text=#000000 leftMargin=0 topMargin=0 
marginheight="0" marginwidth="0">
<table border="0" cellspacing="0" width="100%" cellpadding="0" height="418" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="100%" height="418" valign="middle" align="center">
<IMG src="../../pict/success.gif"><br><br>
<br>
<font color="#000000" class=f12 style="font-size: 10.5pt"><b>恭喜您,您的产品已经修改成功!<a href="showing.asp#a"><font color="#FF6600">返回</font></a></b></font><p> </td>
</tr>
</table>

⌨️ 快捷键说明

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