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

📄 jieyuelog.asp

📁 asp图书管理系统 刚刚做的 希望帮助到人
💻 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="tiaoxingma" type="text" id="tiaoxingma" />
      <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
  tiaoxingma=request.form("tiaoxingma")
  Set rs=conn.execute("select * from booklog where tiaoxingma='"&tiaoxingma&"'")
  else
  set rs=conn.execute("select * from booklog ")
  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
'如果变量c1urrentpage的数据类型不是数值型
'就1赋给变量c1urrentpage
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">&nbsp;<%=rs("id")%></td>
    <td align="center">&nbsp;<%=rs("tiaoxingma")%></td>
    <td align="center">&nbsp;<%
	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">&nbsp;<%=rs("xingming")%></td>
    <td align="center">&nbsp;<%
	if rs("leixing")=true then
	response.write "未归还"
	else
	response.Write "已归还"
	end if
	%></td>
    <td align="center">&nbsp;<%=rs("jcsj")%></td>
    <td align="center">
	  &nbsp;<%=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%>
   	[首页]&nbsp;[上一页]                    
   	<%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%>
   	[下一页]&nbsp;[尾页]                    
   	<%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 + -