📄 sel_book.asp
字号:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<!--对用户登录身份进行判断,非法用户返回登录页面-->
<%if not session("user_session_id")=Session.SessionID then%>
<SCRIPT LANGUAGE=javascript>
parent.window.location.href="../default.asp"
</SCRIPT>
<%end if%>
<HEAD>
<TITLE>图书馆管理系统</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="../css/scss.css" type=text/css rel=stylesheet>
<style TYPE="text/css">
<!--
.in
{
BORDER-RIGHT: rgb(127,127,127) 1px solid;
BORDER-TOP: rgb(127,127,127) 1px solid;
FONT-SIZE: 9pt;
BORDER-LEFT: rgb(127,127,127) 1px solid;
BORDER-BOTTOM: rgb(127,127,127) 1px solid;
BACKGROUND-COLOR: #ffffff
}
//-->
</STYLE>
<SCRIPT LANGUAGE=javascript>
<!--
function cli(book_id)
{
open("mod_book.asp?book_id="+book_id,"newwin","toolbar=no,width=400,height=500,status=no,location=no,resizable=1,scrollbars=1;menubar=no,left=80,top=25")
}
//-->
</SCRIPT>
<title>图书馆管理系统</title>
</head>
<body leftMargin=0 topMargin=0>
<!--#include file=../inc/top.asp-->
<br>
<table width="750" height="371" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td valign=top width=160 height="390">
<form name="form1" method="post" action="sel_book.asp">
<br> 输入要查找的条件<p>
<table border="0" cellpadding="0" bordercolor="#111111"
cellspacing="0" width="160" align="center">
<tr>
<td width="65">书籍编号:</td>
<td width="86">
<input class=in type="text" name="book_id"
size="12" maxlength="20" >
</td>
</tr>
<tr>
<td width="65">书籍名称:</td>
<td width="86">
<input class=in type="text" name="book_name"
size="12" maxlength="20" >
</td>
</tr>
<tr>
<td width="65">书籍作者:</td>
<td width="86">
<input class=in type="text" name="book_author"
size="12" maxlength="20" >
</td>
</tr>
<tr>
<td width="65">出版社名:</td>
<td width="86">
<input class=in type="text" name="book_concern"
size="12" maxlength="20" >
</td>
</tr>
<tr>
<td width="65">图书类别:</td>
<td width="86">
<select name=book_team style="width=80">
<% '取图书类别信息
sql="select * from library_team order by team_id desc"
set rs=session("cn").execute(sql)
do while not rs.eof
Response.Write "<option value="&rs("team_id")
Response.Write ">"&rs("book_team")&"</option>"
rs.movenext
loop
rs.close()
set rs=nothing%>
</select>
</td>
</tr>
<tr>
<td align="center" colspan="2" height=40>
<input type="hidden" name=hid value="ok">
<input type="submit" name="Submit"
value="查看" class=in>
</td>
</tr>
</table>
</form><p><br></p>
</td>
<td width="1" valign="top" bgcolor="#00CC00" height="390"> </td>
<td width="565" valign="top" height="390">
<%
if Request.Form("hid")<>"" then
'接收数据
book_id=Request.Form("book_id")
book_name=Request.Form("book_name")
book_author=Request.Form("book_author")
book_concern=Request.Form("book_concern")
team_id=Request.Form("book_team")
'根据接收的数据作为条件,查询图书信息
sql="select * from library_book where team_id="&team_id
if book_id<>"" then
sql=sql&" and book_id='"&book_id&"'"
end if
if book_name<>"" then
sql=sql&" and book_name='"&book_name&"'"
end if
if book_author<>"" then
sql=sql&" and book_author='"&book_author&"'"
end if
if book_concern<>"" then
sql=sql&" and book_concern='"&book_concern&"'"
end if
sql=sql&" order by book_name"
set rs=session("cn").execute(sql)
%>
<table cellpadding=0 align=right bordercolor="#006666" width=538>
<tr bgcolor=#cccccf>
<th width="79">书籍编号</th>
<th width="120">书籍名称</th>
<th width=60>书籍作者</th>
<th width="90">出版社名</th>
<th width="80">图书类别</th>
<th width="110">图书位置</th>
<th width="40">是否返还</th>
</tr>
<%
do while not rs.eof
'查找书籍的组
sql="select book_team from library_team where team_id="&rs("team_id")
set team=session("cn").execute(sql)
book_team=team(0)
set team=nothing
%>
<tr align=left bgcolor=#e4eaef>
<td>
<a href="javascript:cli('<%=rs("book_id")%>')">
<%=rs("book_id")%>
</td>
<td><%=rs("book_name")%></td>
<td><%=rs("book_author")%></td>
<td><%=rs("book_concern")%></td>
<td><%=book_team%></td>
<td><%=rs("stand")%>架<%=rs("floor")%>层</td>
<td>
<%if rs("sf_return")="" or rs("sf_return")="N" then%>
是
<%else%>
否
<%end if%>
</td>
</tr>
<%
rs.movenext
loop
rs.close()
set rs=nothing
%>
</table>
<%end if%>
</td>
</tr>
</table>
<hr width=700 color=green size=1>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -