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

📄 booklist.asp

📁 网络办公系统源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<!--#include file="../../inc/navigate.asp"-->
<%
dim sPageNavigate  '分页表格 
dim iRecordCount,iMaxPageCount,iPageCount,iCurrentPageIndex,i,sTMP  '分页
iMaxPageCount=20 '一页多少行记录

Submit=trim(request.Form("Submit"))
blogid=replace(trim(request.Form("blogid"))," ","")
if Submit="删除信息" then
	if  ChkAdmin("oa_book")=False then
  		call message("您没有删除图书的权限","back")
   		call endexit()
	end if

	if blogid="" then
		call message("请至少选择一项删除","back")
		call EndExit()
	end if
	bid=split(blogid,",")
	for i=0 to ubound(bid)
		delsql="delete from oa_book where id="&bid(i)&""
		conn.execute(delsql)
	next
	call message("删除成功","booklist.asp")
	call EndExit()
elseif Submit="借阅历史记录" then
 	if blogid="" then
		call message("请选择一项记录","back")
		call EndExit()
	end if
 	if instr(blogid,",")>0 then
		call message("请选择一项记录","back")
		call EndExit()
	end if
	response.Redirect("book_outlist.asp?bookid="&blogid&"")
	
elseif Submit="返还登记" then
 	if blogid="" then
		call message("请选择一项记录","back")
		call EndExit()
	end if
 	if instr(blogid,",")>0 then
		call message("请选择一项记录","back")
		call EndExit()
	end if
	response.Redirect("book_outlist.asp?bookid="&blogid&"")

end if
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
body,td,th {
	font-size: 12px;
}
.style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>
<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
 var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
 if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>

</head>
<body>
<form name="form1" method="post" action="booklist.asp">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="right">
    <td height="25" colspan="6" bgcolor="#CC0000"><span class="style1"></span>
      <input name="Submit4" type="button" class="bon" id="Submit2" onClick="window.location.href='book_input.asp'" value="图书登记">
      <input name="Submit" type="submit" class="bon" id="Submit4"  value="返还登记">
      <input name="Submit" type="submit" class="bon" id="Submit23" value="借阅历史记录">
      <input name="Submit" type="submit" class="bon" id="Submit" value="删除信息">
      <input name="Submit3" type="button" class="tabel1" value="返回" onClick="window.history.go(-1)"></td>
    </tr>
    <tr align="left" bgcolor="#F9F9F9">
      <td height="25" colspan="6" bgcolor="#F2F2F2">选择类别:
        <select name="classid" id="classid" onchange="FP_jumpMenu(this,'window',false)">
          <option value="booklist.asp?classid=""">选择类别</option>
          <%
	  	sql="select id, classname from oa_bookclass where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
          <option value="booklist.asp?classid=<%=rs("id")%>"><%=rs("classname")%></option>
          <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
        </select> </td>
    </tr>
  <tr bgcolor="#CC6633">
    <td width="22%" height="25" align="center"><span class="style3"> 书名</span></td>
    <td width="13%" height="25" align="center"><span class="style3"> 作者 </span></td>
    <td width="27%" align="center"><span class="style1"><strong>出版社</strong></span></td>
    <td width="17%" height="25" align="center"><span class="style3">所属类别 </span></td>
    <td width="13%" height="25" align="center"><span class="style3">借阅状态</span></td>
    <td width="8%" align="center"><span class="style3">操作</span><input type=checkbox onclick=sel('blogid')></td>
  </tr>
  <%
  classid=request("classid")
  if classid="" then
		sql="select a.*,b.classname from oa_book as a inner join oa_bookclass as b on a.classid=b.id where a.companyid="&session("companyid")&" order by a.classid asc"
 else
		sql="select a.*,b.classname from oa_book as a inner join oa_bookclass as b on a.classid=b.id where a.companyid="&session("companyid")&"  and a.classid="&classid&" order by a.classid asc"
 end if		 		
				Call GetCurrentPageIndex()  '取得当前页码
				set my_rs=server.CreateObject("adodb.recordset")
				my_rs.open Sql,conn,1,3
				my_rs.PageSize=iMaxPageCount
				my_rs.CacheSize =iMaxPageCount
				if my_rs.recordCount <>   0   then   my_rs.Absolutepage=iCurrentPageIndex
				iRecordCount=my_rs.RecordCount  '所有查询出来的记录数
				iPageCount=my_rs.PageCount  '最终多少页
				if iCurrentPageIndex>iPageCount then iCurrentPageIndex=iPageCount  '控制当前页不得超出范围
				sPageNavigate=GetNavigate("booklist.asp?classid="&classid&"",iRecordCount,iMaxPageCount,iCurrentPageIndex,true,true,"项")  '取得分页表格
				if Not my_rs.Eof then
				For i = 1 to iMaxPageCount '利用for next 循环依次读出当前页的记录 
			  if my_rs.EOF then  Exit For
					bgColor="#F8F8F8"
				if i mod 2=0 then bgColor="#DFEFFF"
	%>
  <tr bgcolor="<%=bgColor%>">
    <td height="25" align="center"><a href="" title="图书介绍:<%=my_rs("txt")%>"><%=my_rs("bookname")%></a></td>
    <td height="25" align="center"><%=my_rs("anthor")%></td>
    <td height="25" align="center"><%=my_rs("bookout")%></td>
    <td height="25" align="center"><%=my_rs("classname")%></td>
    <td height="25" align="center"><%=my_rs("bookflag")%></td>
    <td height="25" align="center"><a href="book_input.asp?act=edits&id=<%=my_rs("id")%>">修改</a>
      <input name="blogid" type="checkbox" id="blogid" value="<%=my_rs("id")%>"></td>
  </tr>
              <%
						my_rs.MoveNext()
				       Next
                     End if
                  my_rs.close
                 set my_rs=nothing
				%>
	<tr align="left" bgcolor="#F9F9F9">
      <td height="25" colspan="6" bgcolor="#F2F2F2"><%=sPageNavigate%> </td>
    </tr>

</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -