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

📄 newbook.asp

📁 借阅系统,可以很方便的管理书籍
💻 ASP
字号:
<%response.buffer=true%>
<html>
<body bgcolor=lightskyblue>
<% bookkind=trim(request.form("select3"))
indate=trim(request.form("select4"))
select case indate
case "本日刚到书":
date1=date()
case "本星期刚到书":
date1=date()-7
case "本月刚到书":
date1=date()-30
end select
set cn=Server.CreateObject("ADODB.Connection")
set rst=server.createobject("adodb.recordset")
strcnn="select * from book where bookkind='"& bookkind &"'and indate>=# "& date1 &" #"
strcon= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("wsm.mdb")
rst.open strcnn,strcon,1,3,adcmdtext

with response
 if rst.recordcount<=0 then 
response.write"<p align=center><font size=5 color=red>对不起!"& indate &"中还没有该类书入库</font></p>"
else
response.write"共有<font color=red>"& rst.recordcount &"</font>本刚到的书<hr>"

.write"<table  border cellspacing=0 cellpadding=0><tr height=20><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><td width=80 align=center>出版日期</td></tr>"

do until rst.eof
.write "<tr height=20><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("count") &"</td><td width=80 align=center>"& rst("indate")&"</td><td width=80 align=center>"&rst("bookdate") &"</td></tr>"
rst.movenext
loop
.write"</table>"
end if
end with


%>
</body>
</html>

⌨️ 快捷键说明

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