📄 add_class_1_ok.txt
字号:
<%@ language="vbscript"%>
<%response.Expires = 0%>
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from Class_1 where Class_1_name='" & request.form("class_name") & "'"
rs.open sqltext,conn,1,1
'查找数据库,检查商品大类是否已经存在
if rs.recordcount >= 1 then
if rs("Class_1_name")=request.form("class_name") then
Response.Redirect "messagebox.asp?msg=此商品大类已经存在,请选用其它名称!"
response.end
rs.close
end if
end if
set rs=server.createobject("adodb.recordset")
sqltext="select * from Class_1"
rs.open sqltext,conn,3,3
'添加一个商品大类到数据库
rs.addnew
rs("Class_1_name")=request.form("class_name")
rs.update
%>
<%
set rs_detail=server.createobject("adodb.recordset")
sqltext2="select * from Class_1 where Class_1_name='" & request.form("class_name") & "'"
rs_detail.open sqltext2,conn,1,1
%>
<html>
<head>
<title>商品大类添加成功</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>.main {
FONT-SIZE: 12px
}
.main1 {
FONT-SIZE: 14px
}
.main2 {
FONT-SIZE: 16px
}
.main3 {
FONT-SIZE: 7px
}
.main4 {
FONT-SIZE: 10px
}
A:link {
COLOR: #ffffff; TEXT-DECORATION: none
}
A:visited {
COLOR: #ffffff; TEXT-DECORATION: none
}
A:active {
COLOR: #ff0000; TEXT-DECORATION: none
}
A:hover {
COLOR: #aa0000; TEXT-DECORATION: underline
}
</STYLE>
</head>
<body text="#000000">
<!--#include file="index_top.asp" -->
<p align="center">
<p align="center"> <TABLE cellSpacing=1 cellPadding=4 width=258 bgColor=#416327 height="144">
<TBODY>
<TR vAlign=top bgColor=#e6e4c4>
<TD class=main1 colSpan=2 width="244" height="10" bgcolor="#6D8E4D"></TD></TR>
<TR vAlign=top bgColor=#e6e4c4>
<TD class=main1 colSpan=2 width="244" height="32"><font color="#FF0000">商品大类添加成功--</font></TD></TR>
<TR bgColor=#e6e4c4>
<TD class=main1 width=102 bgColor=#6d8e4d height=25><SPAN
class=main1><font color="#FFFFFF">商品大类名称:</font></SPAN></TD>
<TD class=main1 width=130 height=25><%=rs_detail("Class_1_name")%> </TD></TR>
<TR vAlign=top bgColor=#e6e4c4>
<TD class=main1 colSpan=2 width="244" height="15"></TD></TR>
<TR bgColor=#e6e4c4>
<TD class=main1 colSpan=2 width="244" height="27">
<p align="center"><input type="button" value="添加下一个" name="B4" onclick="window.location.href='add_class_1.asp';">
</TD></TR>
<TR bgColor=#e6e4c4>
<TD class=main1 colSpan=2 width="244" height="4" bgcolor="#6D8E4D"></TD></TR></TBODY></TABLE>
</body>
</html>
<%
rs.close
rs_detail.close
conn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -