⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 findbook.asp

📁 借阅系统,可以很方便的管理书籍
💻 ASP
字号:
<%response.buffer=true%>
<% bookkind=trim(request.form("select2"))
findkind=trim(request.form("select1"))
bookname=trim(request.form("bookname"))
select case findkind
 case "按索书号查询":
 
 strcnn="select * from book where  bookkind ='"& bookkind &"' and bookid like '%"& bookname & "%'"
case "按图书名称查询":
  strcnn="select * from book where  bookkind ='"& bookkind &"' and bookname like '%"& bookname & "%'"

  case "按图书类型查询":
 strcnn="select * from book where bookkind='"& bookkind & "' "
 case "按出版社查询":
 strcnn="select * from book where bookpublish like '%"& bookname &"%'"
 end select
 set cn=Server.CreateObject("ADODB.Connection")
set rst=server.createobject("adodb.recordset")
strcon= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("wsm.mdb")
rst.open strcnn,strcon,3,3,adcmdtext

with response
 if rst.recordcount<=0 then 
response.write"<p align=center><font size=5 color=red>对不起!您要查询的信息不存在</font></p>"
else
response.write"共有<font color=red>"& rst.recordcount &"</font>本您要查找的书,请点击前面单选框,再执行下一步<hr>"
.write"<form method=post action='borrowbook.asp' name=frm5>"
.write"<table  border cellspacing=0 cellpadding=0><tr style='BACKGROUND-COLOR: red ' height=20><td width=40>借阅</td><td width=60>索书号</td><td align=center width=108>书的类型</td><td align=center width=220>书的名称</td><td align=center width=80>作者</td>"&_
"<td width=160 align=center>出版社</td><td width=50 align=center>单价</td><td width=50 align=center>剩余</td><td width=80 align=center>出版日期</td></tr>"

do until rst.eof
.write "<tr height=20><td width=40><input type=radio name=borrow value="& rst("bookid")&"></td><td width=60 align=center>"& rst("bookid") &"</td><td width=108 align=center>"& rst("bookkind")  &"</td><td width=220 align=center>"& rst("bookname")&"</td><td width=80 align=center>"& rst("editer") &"</td>"&_
"<td width=160 align=center>"& rst("bookpublish") & "</td><td width=50 align=center>"& rst("cost") &"</td><td width=50 align=center>"&rst("havecount") &"</td><td width=80 align=center>"&rst("bookdate") &"</td></tr>"
rst.movenext
loop
.write"</table><input type=submit value=借阅 >&nbsp;&nbsp;&nbsp;<input type=button value=返回 onclick=javascript:document.location='显示页面.asp'></form>"
end if
end with


  %> 

<head>
<title></title>
</head>

<body bgcolor="#99CCFF">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -