📄 products_updatesave.asp
字号:
<!--#include file="check_login.asp"-->
<!--#include file="conn.asp"-->
<%
'如果编辑的内容很多,上传速度太慢,请设置以下的时间,单位秒
Server.ScriptTimeout = 1000
Dim sContent1, i
sContent1=""
For i = 1 To Request.Form("content1").Count
sContent1 = sContent1 & Request.Form("content1")(i)
Next
LName=trim(request.Form("LName"))
LSort=trim(request.Form("LSort"))
idd=trim(request.QueryString("idd"))
'添加产品目录表
V=Split(LSort,"-")
For i = 0 To UBound(V)
set rs2=server.createobject("adodb.recordset")
sql2="select id,content from deeptree where id="&V(i)
rs2.open sql2,conn,1,3
if not rs2.eof then
ClassName2=ClassName2+"->"+rs2("content")
end if
rs2.Close
set r2=nothing
next
ClassName1=ClassName2
'完成添加产品目录表的取值
LSortname=ClassName1
LPrice=trim(request.Form("LPrice"))
LPH=trim(request.Form("LPH"))
'查编号
set rs3=server.createobject("adodb.recordset")
sql3="select id,LPH from Products where LPH='"&LPH&"'order by id desc "
rs3.open sql3,conn,1,3
if not rs3.eof then
if rs3("id")<>CInt(idd) then
response.write "<script language=javascript> alert('编号重复,返回重新点添加生成编号!');history.back(-1);</script>"
response.end
end if
end if
rs3.Close
set rs3=nothing
'查编号完
GroupID=trim(request.Form("GroupID"))
Exclusive=trim(request.Form("Exclusive"))
LManufacturce=trim(request.Form("LManufacturer"))
LSellManufacturer=trim(request.Form("LSellManufacturer"))
LKeyWord=trim(request.Form("LKeyWord"))
LPattern=trim(request.Form("LPattern"))
LPutout=trim(request.Form("LPutout"))
LCommend=trim(request.Form("LCommend"))
LNewProduct=trim(request.Form("LNewProduct"))
LHot=trim(request.Form("LHot"))
LParticular=sContent1
LAddtime=date()
'===================================
if len(LName)=0 or isempty(LName) then
response.write "<script language=javascript> alert('产品的名称必填!');history.back(-1);</script>"
response.end
end if
if len(LSort)=0 or isempty(LSort) then
response.write "<script language=javascript> alert('产品所在的类别必选!');history.back(-1);</script>"
response.end
end if
'===================================
set rs=server.createobject("adodb.recordset")
sql="select * from Products where id="&idd&""
rs.open sql,conn,1,3
rs("LName")=LName
rs("LSort")=LSort
rs("LSortname")=LSortname
rs("LPrice")=LPrice
rs("LPH")=LPH
rs("GroupID")=GroupID
rs("Exclusive")= Exclusive
rs("LManufacturer")=LManufacturce
rs("LSellManufacturer")=LSellManufacturer
rs("LKeyWord")=LKeyWord
if LPattern="" then
LPattern=rs("LPattern")
else
LPattern=LPattern
end if
rs("LPattern")=LPattern
rs("LPutout")=LPutout
rs("LCommend")=LCommend
rs("LNewProduct")=LNewProduct
rs("LHot")=LHot
rs("LParticular")=LParticular
rs("LAddtime")=LAddtime
rs.update
rs.Close
set rs=nothing
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="text.css" rel="stylesheet" type="text/css">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" <%=kkk%>>
<!--#include file="top/Ltop02.asp"-->
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#CCCCCC">
<tr valign="top" bgcolor="#EBEBEB">
<td width="100%" height="73" align="center"><br>
产品修改成功!<br>
<br>
<a href="ProductsAll.asp">产品列表</a> || <a href="ProductsAdd.asp">添加产品</a></td>
</tr>
<tr align="center" valign="top" bgcolor="#CBD50D">
<td bgcolor="#C6BEC6"> </td>
</tr>
</table>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -