📄 2fly_bookread_save.asp
字号:
<!--#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -