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

📄 savehw.jsp

📁 是网上购物系统:javabean + jsp + db的结构,
💻 JSP
字号:
<%
if session("admin_name")="" then response.end
dim count
set rs=server.createobject("adodb.recordset")

%>
<!--#include file="conn.asp"--><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=../css.css rel=STYLESHEET type=text/css>

</head>
<%
if request("action")="save" then
    hw_name=request("hw_name")
    hw_content=request("hw_content")
    hw_cash=request("hw_cash")
    hw_pic=request("hw_pic")
	chubsh=request("chubsh")
	zhuang=request("zhuang")
	yeshu=request("yeshu")
	isbn=request("isbn")
    sort_id=request("sort_id")
    Nsort_id=request("Nsort_id")
    company=request("company")
   pifa=request("pifa")
daili=request("daili")
hwsn=request("hwsn")
data=request("data")
kaiben=request("kaiben")
    if not(isnumeric(hw_cash)) then
        errmsg="<br>"+"<li>价格应该为数字"
        founderr=true
    end if
    if hw_name="" then
        errmsg=errmsg+"<br>"+"<li>名称不能为空"
        founderr=true
    end if
    if hw_content="" then
        errmsg=errmsg+"<Br>"+"<li>介绍不能为空"
        founderr=true
    end if
    if sort_id="" then
        errmsg=errmsg+"<br>"+"<li>类别不能为空"
        founderr=true
    end if
   if nsort_id="" then
        errmsg=errmsg+"<br>"+"<li>类别不能为空"
        founderr=true
    end if
    if nsort_id="" then
     errmsg=errmsg+"<br>"+"<li>类别不能为空"
        founderr=true
    end if
    if hw_pic="" then hw_pic="img/noimage.gif"
    
    if founderr=true then
        response.write errmsg
        response.write "<br>"
        response.write "<a href=addhw.asp>返回</a>"
        response.end
    else
        hw_name=server.htmlencode(hw_name)
        hw_name=replace(hw_name," ","&nbsp;")
        hw_name=replace(hw_name,chr(13)&chr(10),"<Br>")
        
        
        hw_content=server.htmlencode(hw_content)
        hw_content=replace(hw_content," ","&nbsp;")
        hw_content=replace(hw_content,chr(13)&chr(10),"<Br>")        
        
        hw_pic=server.htmlencode(hw_pic)    
        
        sql="select * from hw"
        rs.open sql,conn,3,3
        rs.addnew
        rs("hw_name")=hw_name
        rs("hw_content")=hw_content
        rs("hw_cash")=hw_cash
        rs("sort_id")=sort_id
rs("Nsort_id")=Nsort_id
       rs("company")=company
       rs("daili")=daili
       rs("pifa")=pifa
       rs("hw_sn")=hwsn
	   rs("chubsh")=chubsh
	   rs("kaiben")=kaiben
	   rs("yeshu")=yeshu
	   rs("data")=data
	   rs("isbn")=isbn
	   rs("zhuang")=zhuang
        rs("hw_pic")=hw_pic
        rs.update
    end if
    response.write "货物添加成功"
    response.write "<br>"
    response.write "<a href=addhw.asp>返回</a>"
    rs.close

⌨️ 快捷键说明

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