?? booklist.asp
字號:
<%@ 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>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -