JspShop网络购物系统即凡人网上购物系统jsp版(jsp+mysql/jsp+access)的架构是基于Jsp/JavaBean的模式

源代码在线查看: savehw.jsp

软件大小: 823 K
上传用户: zjqkpgz
关键词: jsp JavaBean JspShop access
下载地址: 免注册下载 普通下载 VIP

相关代码

								if session("admin_name")="" then response.end
				dim count
				set rs=server.createobject("adodb.recordset")
				
				%>
				
				
				
				
				
								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=""+"价格应该为数字"
				        founderr=true
				    end if
				    if hw_name="" then
				        errmsg=errmsg+""+"名称不能为空"
				        founderr=true
				    end if
				    if hw_content="" then
				        errmsg=errmsg+""+"介绍不能为空"
				        founderr=true
				    end if
				    if sort_id="" then
				        errmsg=errmsg+""+"类别不能为空"
				        founderr=true
				    end if
				   if nsort_id="" then
				        errmsg=errmsg+""+"类别不能为空"
				        founderr=true
				    end if
				    if nsort_id="" then
				     errmsg=errmsg+""+"类别不能为空"
				        founderr=true
				    end if
				    if hw_pic="" then hw_pic="img/noimage.gif"
				    
				    if founderr=true then
				        response.write errmsg
				        response.write ""
				        response.write "返回"
				        response.end
				    else
				        hw_name=server.htmlencode(hw_name)
				        hw_name=replace(hw_name," "," ")
				        hw_name=replace(hw_name,chr(13)&chr(10),"")
				        
				        
				        hw_content=server.htmlencode(hw_content)
				        hw_content=replace(hw_content," "," ")
				        hw_content=replace(hw_content,chr(13)&chr(10),"")        
				        
				        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 ""
				    response.write "返回"
				    rs.close
							

相关资源