changhw_ok.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:2k
- <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
- <%
- if session("admin_name")="" then response.end
- %>
- <!--#include file="conn.asp"-->
- <%
- if request("action")="save" then
- dim hw_id,hw_name,hw_content,hw_cash,hw_pic,chubsh,zhuang,yeshu,isbn,sort_id,pifa,daili,hw_sn,data,kaiben
- hw_id=request("hw_id")
- hw_name=request.form("hw_name")
- hw_content=request.form("hw_content")
- hw_cash=request.form("hw_cash")
- hw_pic=request.form("hw_pic")
- chubsh=request.form("chubsh")
- zhuang=request.form("zhuang")
- yeshu=request.form("yeshu")
- isbn=request.form("isbn")
- sort_id=request.form("sort_id")
- Nsort_id=request.form("Nsort_id")
- pifa=request.form("pifa")
- daili=request.form("daili")
- hw_sn=request.form("hw_sn")
- data=request.form("data")
- kaiben=request.form("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
- dim rs,sql
- set rs=Server.CreateObject("Adodb.Recordset")
- sql="select * from hw where hw_id='"&hw_id&"'"
- rs.open sql,conn,1,3
- 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("daili")=daili
- rs("pifa")=pifa
- rs("hw_sn")=hw_sn
- 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
- conn.close
- set conn=nothing
- rs.close
- set rs=noting
- response.redirect "delhw.asp"
- %>