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

📄 add_product_ok.asp

📁 123基于web的网络购物系统附毕业设计论文
💻 ASP
字号:
<%@ language="vbscript"%>
<%response.Expires = 0%>

<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from Product where  Product_name='" & request.form("p_name") & "'"
rs.open sqltext,conn,1,1

'查找数据库,检查商品是否已经存在
if rs.recordcount >= 1 then 
   if rs("Product_name")=request.form("p_name") then
      Response.Redirect "messagebox.asp?msg=此商品已经存在,请添加其他商品!"
      response.end
      rs.close
   end if
end if


set rs=server.createobject("adodb.recordset")
sqltext="select * from Product"
rs.open sqltext,conn,3,3

'添加一个商品到数据库
rs.addnew
rs("Class_2")=request.form("class_2_name")
rs("Class_1")=request.form("class_1_name")
rs("Product_name")=request.form("p_name")
rs("Product_intro")=request.form("p_intro")
rs("Product_show")=request.form("p_show")
rs("P_newprice")=request.form("newprice")
rs("P_oldprice")=request.form("oldprice")
rs("P_pic")=request.form("p_pic")
rs("P_Full_pic")=request.form("p_full_pic")
rs.update
%>
<%
set rs_detail=server.createobject("adodb.recordset")
sqltext2="select * from Product where  Product_name='" & request.form("p_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"><br>
<br>
</p>
      <div align="center">
        <center>
            <TABLE cellSpacing=1 cellPadding=4 width=429 bgColor=#416327 height="144">
              <TBODY>
              <TR vAlign=top bgColor=#e6e4c4>
                <TD class=main1 colSpan=2 width="415" height="10" bgcolor="#6D8E4D"></TD></TR>
              <TR vAlign=top bgColor=#e6e4c4>
                <TD class=main1 colSpan=2 width="415" height="32"><font color="#FF0000">商品添加成功--</font></TD></TR>
              <TR bgColor=#e6e4c4>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">所属大类:</font></SPAN></TD>
                <TD class=main1 width=301 height=25><%=rs_detail("class_1")%></TD></TR>
              <tr>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">所属小类:</font></SPAN></TD>
                <TD class=main1 width=301 height=25 bgcolor="#E6E4C4"><%=rs_detail("class_2")%></TD>
              </tr>
              <tr>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">产品名称:</font></SPAN></TD>
                <TD class=main1 width=301 height=25 bgcolor="#E6E4C4"><%=rs_detail("product_name")%></TD>
              </tr>
              <tr>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">会员价:</font></SPAN></TD>
                <TD class=main1 width=301 height=25 bgcolor="#E6E4C4"><%=rs_detail("p_newprice")%> (元)</TD>
              </tr>
              <tr>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">市场价:</font></SPAN></TD>
                <TD class=main1 width=301 height=25 bgcolor="#E6E4C4"><%=rs_detail("p_oldprice")%> (元)</TD>
              </tr>
              <tr>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">产品简介:</font></SPAN></TD>
                <TD class=main1 width=301 height=25 bgcolor="#E6E4C4"><%=rs_detail("product_intro")%></TD>
              </tr>
              <tr>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">产品说明:</font></SPAN></TD>
                <TD class=main1 width=301 height=25 bgcolor="#E6E4C4"><%=rs_detail("product_show")%></TD>
              </tr>
              <tr>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">产品缩微图片:</font></SPAN></TD>
                <TD class=main1 width=301 height=25 bgcolor="#E6E4C4"><%=rs_detail("p_pic")%></TD>
              </tr>
              <tr>
                <TD class=main1 width=102 bgColor=#6d8e4d height=25 align="right"><SPAN 
                  class=main1><font color="#FFFFFF">产品全景图片:</font></SPAN></TD>
                <TD class=main1 width=301 height=25 bgcolor="#E6E4C4"><%=rs_detail("p_full_pic")%></TD>
              </tr>
              <TR vAlign=top bgColor=#e6e4c4>
                <TD class=main1 colSpan=2 width="415" height="15"></TD></TR>
              <TR bgColor=#e6e4c4>
                <TD class=main1 colSpan=2 width="415" height="27">
                  <p align="center">&nbsp; 
<INPUT type="button" class=main  size=3 value='添加下一个' name=Submit2 onclick="window.location.href='add_product.asp';"> 
                </TD></TR>
              <TR bgColor=#e6e4c4>
                <TD class=main1 colSpan=2 width="415" height="4" bgcolor="#6D8E4D"></TD></TR></TBODY></TABLE>
        </center>
      </div>
</body>
</html>
<%
rs.close
rs_detail.close
conn.close
%>

⌨️ 快捷键说明

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