changhw_ok.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:2k
源码类别:

Applet

开发平台:

Java

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