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

📄 addsave.asp

📁 网络商城系统
💻 ASP
字号:
<!--#include file="session.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加新商品</title>
<link rel="stylesheet" type="text/css" href="img/admin_style.css">
</head>
<body>
<div align="center">
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="mainmiddle">
        <tr> 
          <td width="29" height="32"> <div align="left"> 
              <p class="maindaohang">&nbsp;</p>
            </div></td>
          <td width="709"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="5"></td>
              </tr>
            </table>
            <b><font color="#000000"><b> <span class="bigNavi">添加新商品</span>              </b></font></b></td>
          <td width="8" class="mainrights"></td>
        </tr>
      </table>	   
    <table width="95%" height="148" border="0" align="center" cellpadding="3" cellspacing="1" class="tabbgcolor">
      <tr class="tabbgcolorli"> 
        <td height="20"><div align="center">
		<%if request.form("sp_name")="" then
	notice="<br><div align=center>商品名称必须填写</div>"
	cw=true
	end if
	if not isnumeric(request.form("marprice")) or not isnumeric(request.form("memprice")) then
	notice=notice+"<br><div align=center>商品价格请采用数字</div>"
	cw=true
	end if
	if request.form("sp_intr")="" then
	notice=notice+"<br><div align=center>商品说明必须填写</div>"
	cw=true
	end if
	if request.form("sp_desc")="" then
	notice=notice+"<br><div align=center>商品描述必须填写</div>"
	cw=true
	end if
	if cw=true then
	response.write notice
	response.write"<br><a href=javascript:history.go(-1)>返回修改</a>"
	else
	function html(constring)
        constring=replace(constring,CHR(13),"")
		constring=replace(constring,CHR(10),"<br>")
		constring=replace(constring,CHR(10)&CHR(10),"</p><p>")
		html=constring
    end function
	bclassid=request("bcid")
	sclassid=request("scid")
    sp_name=request("sp_name")
	marprice=request("marprice")
	memprice=request("memprice")
	choice1=request("choice1")
	choice2=request("choice2")
	choice3=request("choice3")
	choice4=request("choice4")
	choice5=request("choice5")
	choice6=request("choice6")
	spsm=html(trim(request("sp_intr")))
	spms=html(trim(request("sp_desc")))
	sp_pic=request("sp_pic")
	if sp_pic="" then 
	sp_pic="images/noimage.gif"
	end if
	tj=request("tj")
	tejia=request("tejia")
	set rs=server.createobject("adodb.recordset")
	sql="select * from goods"
	rs.open sql,conn,3,3
	rs.addnew
	rs("bclassid")=bclassid
	rs("sclassid")=sclassid
	rs("sp_name")=sp_name
	rs("marprice")=marprice
	rs("memprice")=memprice
	rs("choice1")=choice1
	rs("choice2")=choice2
	rs("choice3")=choice3
	rs("choice4")=choice4
	rs("choice5")=choice5
	rs("choice6")=choice6
	rs("spsm")=spsm
	rs("spms")=spms
	rs("sp_pic")=sp_pic
	rs("tj")=tj
	rs("tejia")=tejia
	rs("date")=now()
	rs.update
	rs.close
	set rs=nothing
	response.write"新商品添加成功!<br><br>"
	response.write"返回继续添加?&nbsp;&nbsp;<a href=add.asp>是</a>&nbsp;&nbsp;<a href=begin.htm>否</a>"
	end if
		%></div></td>
      </tr>
    </table>
	  
    </div>
</body>
</html>

⌨️ 快捷键说明

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