?? readbook.asp
字號:
<%@ Language=VBScript %>
<!--#include file ="identify.asp"-->
<%
'b_name = Request.querystring("name")
'b_author = Request.QueryString("author")
b_bookid = Request.QueryString("bookid")
if len(b_bookid)=0 then
Response.Write "找不到您要的文件!"
Response.End
end if
set conn = server.CreateObject("adodb.connection")
conn.Open Application("dsn")
sql = "select bookid,dir,identify_num from BookDetail where bookid=" & b_bookid
set rs = server.CreateObject("adodb.recordset")
rs.Open sql,conn
if rs.EOF then
rs.Close
set rs = nothing
conn.Close
set conn = nothing
Response.Write "找不到您要的文件!"
Response.End
end if
dir = rs("dir")
identify_num = rs("identify_num")
rs.Close
set rs = nothing
if cint(identify_num)<cint(session("usertype")) then
conn.Close
set conn = nothing
Response.Write "您的權限不夠"
Response.End
end if
session("bookid") = b_bookid
sql = "update BookDetail set Times = Times + 1 where bookid=" & b_bookid
conn.Execute sql
conn.Close
set conn = nothing
dir = replace(dir,"\","/")
'Response.Write dir
Response.Redirect dir
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -