booklist.asp
资源名称:图书管理系统.rar [点击查看]
上传用户:llrg7406
上传日期:2007-03-02
资源大小:654k
文件大小:3k
源码类别:
教育系统应用
开发平台:
Delphi
- <%@ Language=VBScript %>
- <!--#include file ="identify.asp"-->
- <%
- Response.Expires = 0
- b_type = Request.QueryString("b_type")
- %>
- <html>
- <head>
- <meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
- <link rel="stylesheet" type="text/css" href="xcss.css">
- <script LANGUAGE="javascript">
- <!--
- function add_bm(bookid)
- {
- window.open("add_bookmark.asp?bookid=" + bookid,"_blank","height=430,width=300,status=no,toolbar=no,menubar=no,location=no");
- }
- function add_introduce(bookid)
- {
- window.open("add_introduce.asp?bookid=" + bookid,"_blank","height=430,width=300,status=no,toolbar=no,menubar=no,location=no");
- }
- function add_new(bookid)
- {
- window.open("add_new.asp?bookid=" + bookid,"_blank","height=430,width=300,status=no,toolbar=no,menubar=no,location=no");
- }
- function add_comment(bookid)
- {
- window.open("add_comment2.asp?bookid=" + bookid,"_blank","height=550,width=550,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,top=0,left=0");
- }
- //-->
- </script></head>
- <body background=images/zapsmbknd.gif>
- <div id=div1>(正在查询库,请稍候.....)</div>
- <b>书名列表</b><br><hr>
- <%
- if len(b_type)=0 then
- Response.End
- end if
- strPage = Request.queryString("page")
- if len(strPage) = 0 then
- strPage = "1"
- end if
- set conn = server.CreateObject("adodb.connection")
- conn.Open application("dsn")
- sql = "select bookid,name,Author,times from BookDetail where type=" & b_type
- set rs = server.CreateObject("adodb.recordset")
- rs.CursorLocation = 3 '客户端处理游标
- rs.Open sql,conn
- if rs.EOF then
- rs.Close
- set rs = nothing
- conn.Close
- set conn = nothing
- Response.Write "没有符合条件的记录。"
- %>
- <script language=javascript>
- div1.style.display = "none";
- </script>
- </body>
- </html>
- <%
- Response.End
- end if
- rs.PageSize = 20
- rs.absolutepage=cint(strPage)
- select_count = rs.RecordCount
- select_PageCount = rs.PageCount
- Response.Write "共<b>" & select_PageCount & "</b>页<b>" & select_count & "</b>条记录,本页是第<b>" & strPage & "</b>页。"
- if int(strPage) > 1 then
- Response.Write " <a href='booklist.asp?b_type=" & b_type & "&page=" & cstr(cint(strPage) - 1) & "'>上一页</a>"
- end if
- if int(strPage) < select_PageCount then
- Response.Write " <a href='booklist.asp?b_type=" & b_type & "&page=" & cstr(cint(strPage) + 1) & "'>下一页</a>"
- end if
- Response.Write "<br><br>"
- for i = 1 to rs.PageSize
- if rs.EOF then
- exit for
- end if
- %>
- <nobr>
- <a href="readbook.asp?bookid=<%=rs("bookid")%>" title="作者:<%=rs("Author")%>" target="xbody"><img SRC="images/plus.gif" border="0" WIDTH="18" HEIGHT="19"><%=rs("name")%> (点击<%=rs("times")%>次)</a> <%=rs("Author")%> <a href="#" onclick="add_bm(<%=rs("bookid")%>);">加书签</a> <a href="#" onclick="add_comment(<%=rs("bookid")%>);">写书评</a> <a href="bookcomment1.asp?bookid=<%=rs("bookid")%>">看书评</a>
- <%
- if session("usertype")<=1 then
- %>
- <a href="#" onclick="add_introduce(<%=rs("bookid")%>)">推荐</a>
- <%
- end if
- %>
- <%
- if session("usertype")<=1 then
- %>
- <a href="#" onclick="add_new(<%=rs("bookid")%>)">加入新书列表</a>
- <%
- end if
- %>
- </nobr><br>
- <%
- rs.MoveNext
- next
- rs.Close
- set rs = nothing
- conn.Close
- set conn = nothing
- %>
- <script language=javascript>
- div1.style.display = "none";
- </script>
- </body>
- </html>