📄 update_pro_sav.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<html>
<%
dim conn
dim connstr
Set conn=Server.CreateObject("ADODB.Recordset")
connstr="Driver={Microsoft ODBC for Oracle};server=mylink;uid=system;pwd=system;"
%>
<head>
<title>修改产品信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
dim rs,sql,kindnum1,kind1,name1 ,burn_ability1,media1,temp1,price1,repairtime1,picpath1,remark1
set rs=server.CreateObject("adodb.recordset")
if trim(request("Num"))="" then
errmsg=errmsg+"<br>"+"<li>产品型号不能为空"
founderr=true
else
kindnum1=trim(request("Num"))
end if
sql="select product_kindnum from GSCOTT.product_info_table where product_id='"&request("id")&"'"
rs.open sql,connstr
oldnum=rs("product_kindnum")
rs.close
sql="select * from GSCOTT.product_info_table where product_kindnum<>'"&oldnum&"' and product_kindnum='"&kindnum1&"'"
rs.open sql,connstr
if not rs.eof then
errmsg=errmsg+"<br>"+"<li>已经有这个产品的信息了"
founderr=true
end if
rs.close
if trim(request("kind"))="" then
errmsg=errmsg+"<br>"+"<li>产品品牌不能为空"
founderr=true
else
kind1=trim(request("kind"))
end if
if trim(request("name1"))="" then
errmsg=errmsg+"<br>"+"<li>产品系列不能为空"
founderr=true
else
name1=trim(request("name1"))
end if
if trim(request("burn_ability"))="" then
errmsg=errmsg+"<br>"+"<li>产品CPU不能为空"
founderr=true
else
burn_ability1=trim(request("burn_ability"))
end if
if trim(request("media"))="" then
errmsg=errmsg+"<br>"+"<li>产品主板不能为空"
founderr=true
else
media1=trim(request("media"))
end if
if trim(request("temp"))="" then
errmsg=errmsg+"<br>"+"<li>产品内存不能为空"
founderr=true
else
temp1=trim(request("temp"))
end if
if trim(request("Price"))="" then
errmsg=errmsg+"<br>"+"<li>产品价格不能为空"
founderr=true
else
price1=trim(request("Price"))
end if
if trim(request("RepairTime"))="" then
errmsg=errmsg+"<br>"+"<li>产品保修期不能为空"
founderr=true
else
repairtime1=trim(request("RepairTime"))
end if
if trim(request("PicPath"))="" then
picpath1="propic/nopic.gif"
else
picpath1=trim(request("PicPath"))
end if
remark1=trim(request("Remark"))
%>
<div align="center">
<center>
<table width="567" border="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<%
if founderr=false then
sql="select * from GSCOTT.product_info_table where product_id='"&request("id")&"'"
rs.open sql,connstr,3,3
rs("product_kindnum")=kindnum1
rs("product_kind")=kind1
rs("product_name")=name1
rs("product_burn_ability")=burn_ability1
rs("product_media_inuse")=media1
rs("product_temp_inuse")=temp1
rs("product_price")=price1
rs("product_repairtime")=repairtime1
rs("product_picpath")=picpath1
rs("product_remark")=remark1
ptime=rs("product_time")
salenum=rs("product_salenum")
rs.update
rs.close
set rs=nothing
%>
<tr align="center">
<td height="30" colspan="2" valign="top">产品<%=kindnum%>信息修改成功</td>
</tr>
<tr>
<td height="138" colspan="2" align="center" valign="middle"><img src="<%=picpath%>"></td>
</tr>
<tr>
<td width="212" height="27" align="right" valign="middle">产品型号:</td>
<td width="355" align="center" valign="middle"><%=kindnum1%></td>
</tr>
<tr>
<td height="27" align="right" valign="middle">产品类别:</td>
<td align="center" valign="top"><%=kind1%></td>
</tr>
<tr>
<td height="27" align="right" valign="middle">产品名称:</td>
<td align="center" valign="top"><%=name1%></td>
</tr>
<tr>
<td height="27" align="right" valign="middle">产品燃烧能力:</td>
<td align="center" valign="top"><%=burn_ability1%></td>
</tr>
<tr>
<td height="27" align="right" valign="middle">产品适用风温:</td>
<td align="center" valign="top"><%=temp1%> </td>
</tr>
<tr>
<td height="27" align="right" valign="middle">产品适用介质:</td>
<td align="center" valign="top"><%=media1%> </td>
</tr>
<tr>
<td height="27" valign="middle"><div align="right">价格: </div></td>
<td align="center" valign="top"><%=price1%> </td>
</tr>
<tr>
<td height="27" valign="middle"><div align="right">保修期: </div></td>
<td align="center" valign="top"><%=repairtime1%> </td>
</tr>
<tr>
<td height="27" align="right" valign="middle">添加时间:</td>
<td align="center" valign="top"><%=ptime%></td>
</tr>
<tr>
<td height="27" align="right" valign="middle">销售数量:</td>
<td align="center" valign="top"><%=salenum%></td>
</tr>
<tr>
<td height="50" valign="top"><div align="right">备注:</div></td>
<td align="center" valign="top"><%=remark%></td>
</tr>
<tr align="center" valign="middle">
<td height="30" colspan="2">
<a href="update_pro.asp">修改删除信息</a>
<a href="sj.asp">浏览上架商品</a>
<a href="../index.asp">返回首页</a> </td>
</tr>
<tr>
<td height="27" align="right" valign="top">输入信息有错误:</td>
<td align="center" valign="top"><%=errmsg%></td>
</tr>
<tr>
<td height="27" colspan="2" align="center" valign="top"><a href='javascript:history.go(-1)'><font size="-1">三秒钟后自动返回到上一页,如果您的浏览器没有返回,请单击此处</font></a></td>
</tr>
<tr>
<td height="104"> </td>
<td> </td>
</tr>
<%else%>
<meta http-equiv="refresh" content="3;url=javascript:history.go(-1)">
<%end if%>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -