📄 jieyuelog.asp
字号:
<!--#include file="conn.asp"-->
<style>
BODY{
font-family:verdana,arial,helvetica;
margin:0;
}
td {
font-family:Tahoma,Verdana, Arial;
font-size:11px;
border: 1px solid #CCCCCC;
}
A:link, A:active,A:visited
{
color: #CCCCCC;
text-decoration: none;
padding-left:6px;
padding-right:6px;
}
A:hover
{
color: #FF3300;
text-decoration: none;
padding-left:6px;
padding-right:6px;
}
.STYLE1 {color: #FFFFFF}
</style>
<body onLoad="tiaoxingma();">
<form id="form1" name="form1" method="post" action="?action=zhao">
<table width="680" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="center" bgcolor="#003366"><span class="STYLE1">借阅查询管理</span></td>
</tr>
<tr>
<td align="center">关键字查找:
<input name="keyword" type="text" id="keyword" />
<input type="submit" name="Submit" value="姓名或条形码" onClick="return checktxm();" /></td>
</tr>
</table>
</form>
<table width="680" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="53" height="18" bgcolor="#003366"><div align="center" class="STYLE1">编号</div></td>
<td width="130" bgcolor="#003366"><div align="center" class="STYLE1">条形码</div></td>
<td width="197" bgcolor="#003366"><div align="center" class="STYLE1">书籍名称</div></td>
<td width="82" bgcolor="#003366"><div align="center" class="STYLE1">借阅者</div></td>
<td width="54" bgcolor="#003366"><div align="center" class="STYLE1">是否归还</div></td>
<td width="69" bgcolor="#003366"><div align="center" class="STYLE1">借阅时间</div></td>
<td width="79" bgcolor="#003366"><div align="center" class="STYLE1">归还时间</div></td>
</tr>
<%
action=trim(request.querystring("action"))
if action="zhao" then
keyword=request.form("keyword")
rs.open "select * from booklog where tiaoxingma='"&keyword&"' or xingming='"&keyword&"' or caozuoren='"&keyword&"' or beizhu='"&keyword&"'",conn,3,2
else
rs.open "select * from booklog",conn,3,2
end if
if not rs.eof then
const maxperpage=25
dim currentpage
rs.pagesize=maxperpage
currentpage=request("page")
if currentpage="" or not Isnumeric(currentpage) then
currentpage=1
elseif currentpage<1 then
c1urrentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not rs.eof
i=i+1
%>
<tr>
<td align="center"> <%=rs("id")%></td>
<td align="center"> <%=rs("tiaoxingma")%></td>
<td align="center"> <%
Set rs1=conn.execute("select * from ebook where tiaoxingma='"&rs("tiaoxingma")&"'")
response.write "<a href=bookinfo.asp?bookid="&rs("bookid")&" target=_blank>"&rs1("shuming")&"</a>"%></td>
<td align="center"> <%=rs("xingming")%></td>
<td align="center"> <%
if rs("leixing")=true then
response.Write "未归还"
else
response.Write "已归还"
end if
%></td>
<td align="center"> <%=rs("jcsj")%></td>
<td align="center">
<%=rs("jcsj")%></td>
</tr>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<tr>
<td colspan="7" align="right">
页数 <font color="red"><%=currentpage%></font>/<% =n%>
<% k=currentpage
if k>1 then%>
[<a class="link" href="jieyuelog.asp?page=1">首页</a>]
[<a class="link" href="jieyuelog.asp?page=<%=k-1%>">上一</a>]
<%else%>
[首页] [上一页]
<%end if%>
<%if k<>n then%>
[<a class="link" href="jieyuelog.asp?page=<%=k+1%>">下一</a>]
[<a class="link" href="jieyuelog.asp?page=<%=n%>">尾页</a>]
<%else%>
[下一页] [尾页]
<%end if%>
共有<font color="red"><%=totalput%></font>条记录 <font color="red"><%=maxperpage%></font>个/页
共有<font color="red"><%=n%></font>页 </td>
</tr>
</table>
</body>
<script language="JavaScript" type="text/javascript">
function tiaoxingma(){
document.form1.tiaoxingma.focus();
document.form1.tiaoxingma.select();
}
function checktxm(){
if (document.form1.tiaoxingma.value==""){
alert('请输入关键字!');
document.form1.tiaoxingma.focus();
document.form1.tiaoxingma.select();
return false;
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -