毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

asp+sql图书管理系统(论文+源码) 第7页

更新时间:2010-6-16:  来源:毕业论文
asp+sql图书管理系统(论文+源码) 第7页
5.2  图书查询页面
单击系统页页(Default.asp)中的“查询”按钮进入图书查询页(Search.asp)。图书查询页面的主要功能为显示按照条件查询的图书借阅信息。图书查询页面如图3.10所示。
页面属性代码如下:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp" -->

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.youerw.com/
    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] 下一页

asp+sql图书管理系统(论文+源码) 第7页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。