changhw_ok.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:2k
源码类别:

百货/超市行业

开发平台:

Java

  1. <%
  2. if session("admin_name")="" then response.end
  3. %>
  4. <!--#include file="conn.asp"-->
  5. <%
  6. if request("action")="save" then
  7. dim hw_id,hw_name,hw_content,hw_cash,hw_pic,chubsh,zhuang,yeshu,isbn,sort_id,pifa,daili,hw_sn,data,kaiben
  8. hw_id=request("hw_id")
  9. hw_name=request.form("hw_name")
  10.     hw_content=request.form("hw_content")
  11.     hw_cash=request.form("hw_cash")
  12.     hw_pic=request.form("hw_pic")
  13. chubsh=request.form("chubsh")
  14. zhuang=request.form("zhuang")
  15. yeshu=request.form("yeshu")
  16. isbn=request.form("isbn")
  17.     sort_id=request.form("sort_id")
  18. Nsort_id=request.form("Nsort_id")
  19.    pifa=request.form("pifa")
  20. daili=request.form("daili")
  21. hw_sn=request.form("hw_sn")
  22. data=request.form("data")
  23. kaiben=request.form("kaiben")
  24.  if not(isnumeric(hw_cash)) then
  25.         errmsg="<br>"+"<li>图书的价格应该为数字"
  26.         founderr=true
  27.     end if
  28.     if hw_name="" then
  29.         errmsg=errmsg+"<br>"+"<li>图书名称不能为空"
  30.         founderr=true
  31.     end if
  32.     if hw_content="" then
  33.         errmsg=errmsg+"<Br>"+"<li>图书介绍不能为空"
  34.         founderr=true
  35.     end if
  36.     if sort_id="" then
  37.         errmsg=errmsg+"<br>"+"<li>图书类别不能为空"
  38.         founderr=true
  39.     end if
  40.    dim rs,sql
  41. set rs=Server.CreateObject("Adodb.Recordset")
  42. sql="select * from hw where hw_id='"&hw_id&"'"
  43. rs.open sql,conn,1,3
  44.  rs("hw_name")=hw_name
  45.         rs("hw_content")=hw_content
  46.         rs("hw_cash")=hw_cash
  47.         rs("sort_id")=sort_id
  48. rs("Nsort_id")=Nsort_id
  49.        rs("daili")=daili
  50.        rs("pifa")=pifa
  51.        rs("hw_sn")=hw_sn
  52.    rs("chubsh")=chubsh
  53.    rs("kaiben")=kaiben
  54.    rs("yeshu")=yeshu
  55.    rs("data")=data
  56.    rs("isbn")=isbn
  57.    rs("zhuang")=zhuang
  58.         rs("hw_pic")=hw_pic
  59. rs.Update
  60. end if
  61. conn.close
  62. set conn=nothing
  63. rs.close
  64. set rs=noting
  65. response.redirect "delhw.asp"
  66. %>