1、 查询图书记录
按照查询条件不同,生成不同SQL语句,查询相应图书记录。代码如下:
bo_Class=request("Class")
bo_name=request("name")
set rs=server.createobject("adodb.recordset")
sqltext="select * from borecorder "
if bo_class="按图书名称" then
sqltext=sqltext &" where bo_name like '%"& request("name") &"%' and bo_flag=0 order by bo_retime asc"
elseif bo_class="按借阅人" then
sqltext=sqltext &" where bo_owner like '%"& request("name") &"%' and bo_flag=0 order by bo_retime asc"
elseif bo_class="按借阅种类" then
sqltext=sqltext &" where bo_dep like '%"& request("name") &"%' and bo_flag=0 order by bo_retime asc"
elseif bo_class="按借阅数量" then
sqltext=sqltext &" where bo_total ="& request("name") &" and bo_flag=0 order by bo_retime asc"
elseif bo_class="按过期天数" then
sqltext=sqltext &" where datediff('d', bo_retime, date()) >= "& request("name") &" and bo_flag=0 order by bo_retime asc"
elseif bo_class="按借阅时间前" then
sqltext=sqltext &" where datediff('d', bo_time, # "&request("name")& "#) >0 and bo_flag=0 order by bo_retime asc"
elseif bo_class="按借阅时间后" then
sqltext=sqltext &" where datediff('d',# "&request("name")& "#, bo_time ) >0 and bo_flag=0 order by bo_retime asc"
elseif bo_class="按归还时间前" then
sqltext=sqltext &" where datediff('d', bo_retime, # "&request("name")& "#) >0 and bo_flag=0 order by bo_retime asc" 毕业论文http://www.751com.cn/
elseif bo_class="按归还时间后" then
sqltext=sqltext &" where datediff('d', bo_retime, # "&request("name")& "#) <0 and bo_flag=0 order by bo_retime asc"
end if
2、页面html语言
页面html语言,勾画页画。代码如下:
<html>
<head>
<title>借阅图书信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>.main {
FONT-SIZE: 12px
}…
3、查询未归还图书
查询所有尚未归还的图书信息,并分页显示查询未归还图书记录。代码如下:
<%
dim MaxPerPage
MaxPerPage=20
'假如没有数据时
If rs.eof and rs.bof then
call showpages
response.write "<p align='center'><font color='#ff0000'>没有检索到相关的借阅信息</font></p>"
response.end
End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
4、判断跳转页面是否正确
判断跳转页面是否正确,如果正确显示相应记录,不正确显示当前页面。代码与系统首页类似,在此不再重复。5.3管理登录页面
管理登录页面(Login.htm)提供管理登录入口,输入正确的用户及密码名,单击“进入管理区”按钮,进入借阅图书管理页面。如图1.11所示。
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页