2fly_bookread_save.asp
来自「功能简单的图书管理系统基本实现了图书管理借阅览等功能模块完成相关组件的实现」· ASP 代码 · 共 57 行
ASP
57 行
<!--#include file="conn.asp"-->
<%
bookname=trim(request("bookname"))
booktypeid=trim(request("booktypeid"))
bookbianhao=trim(request("bookbianhao"))
publishing=trim(request("publishing"))
writer=trim(request("writer"))
bookmoney=trim(request("bookmoney"))
booknumber=trim(request("booknumber"))
bookdate=trim(request("bookdate"))
onno=trim(request("onno"))
booktxt=trim(request("booktxt"))
id=trim(request("id"))
set rs=server.createobject("adodb.recordset")
if id="" then sql="select * from book where bookname='"&bookname&"' or bookbianhao='"&bookbianhao&"'"
if id<>"" then sql="select * from book where id="&id
rs.open sql,db,1,3
if not rs.eof or not rs.bof then
if id="" then response.write "<script language=javascript>alert('对不起已经有这本图书');history.back(-1)</script>"
if id<>"" then
rs("bookname")=bookname
rs("booktypeid")=booktypeid
rs("bookbianhao")=bookbianhao
rs("publishing")=publishing
rs("writer")=writer
rs("bookmoney")=bookmoney
rs("booknumber")=booknumber
rs("bookdate")=bookdate
rs("onno")=onno
rs("booktxt")=booktxt
rs.update
rs.close
set rs=nothing
response.redirect "2fly_book_read.asp?id="&id&"&mage2fly=修改成功"
end if
else
rs.addnew
rs("bookname")=bookname
rs("booktypeid")=booktypeid
rs("bookbianhao")=bookbianhao
rs("publishing")=publishing
rs("writer")=writer
rs("bookmoney")=bookmoney
rs("booknumber")=booknumber
rs("bookdate")=bookdate
rs("onno")=0
rs("booktxt")=booktxt
rs.update
id=rs("id")
rs.close
set rs=nothing
response.redirect "2fly_book_read.asp?id="&id&"&mage2fly=添加成功"
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?