📄 read_book.asp
字号:
<!-- #include file="conn.asp" -->
<!--#include file="inc/config.asp"-->
<!--#include file="hitcount.asp"--><%
dim UserID,UserName
UserID=session("UserID")
UserName=session("UserName")
id=CheckSql(request("id"))
CheckSqlnum(id)
if id="" then
response.Redirect "index.asp"
response.End
end if
id=int(id)
set rs1=server.CreateObject("ADODB.recordset")
sql1="select * from list_cook where list_bookid="&id&" order by list_bookid"
rs1.open sql1,conn,1,1
set rs2=server.CreateObject("ADODB.recordset")
sql2="select * from list_book where id="&id
rs2.open sql2,conn,1,1
if not(rs2.bof and rs2.eof) then
else
response.write "<script language=javascript>alert(' 对不起,您要查看的作品不存在或已经被删除! \n\n 可能该作品不存在或包含国家或者本站禁止的内容. \n\n 您如果是该作品的管理员或作者,请联系站长!');history.back(-1);</script>"
response.end
end if
if rs2("isuserread")=1 then
If UserName="" or UserID="" or IsNull(WordID) Then
response.write "<script language=javascript>alert('对不起,您要查看的作品只允许注册会员阅读! \n\n 如果您是会员可能您还没有登陆或者登陆超时! \n\n 如果您没有成为会员请先进行会员注册! \n\n 如果您已经是注册会员请重新登陆!');history.back(-1);</script>"
response.end
end if
end if
if rs2("Lock_book") = 1 then
response.write "<script language=javascript>alert(' 对不起,您要查看的作品已经被锁定! \n\n 可能该作品包含国家或者本站所禁止的内容. \n\n 您如果是该作品的管理员或作者,请联系站长!');history.back(-1);</script>"
response.end
end if
viewRootFolder="HTML/" 'HTML存放目录
view_localpath0 = left(rs2("id"),2) '一级分类目录
view_localpath1 = left(rs2("id"),4) '二级分类目录
view_localpath2 = left(rs2("id"),6) '作品分类目录
view_localpath3 = rs2("id") '作品目录
view_localpath = view_localpath0&"/"&view_localpath1&"/"&view_localpath2&"/"&view_localpath3&"/"
viewFolder = viewRootFolder&""&view_localpath
file2=server.mappath( ""&viewFolder&"index.html" )
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file2) = 1 Then
response.Redirect ""&viewFolder&"index.html"
response.End
end if
bookcount(id)
classid=rs2("list_class")
set rs3=server.CreateObject("ADODB.recordset")
sql3="select * from list_type where typeid="&classid
rs3.open sql3,conn,1,1
%> <%
dim list_classid
list_classid=rs2("list_lei")
set rs9=server.CreateObject("ADODB.Recordset")
sql9="select * from list_class where list_classid="&list_classid&""
rs9.open sql9,conn,1,1
%>
<%Stats0="作品《"
Stats1=rs2("list_name")
Stats2="》的目录"%>
<!--#include file="top.asp"-->
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0" style="font-family: 宋体; font-size: 10pt" id="table2">
<tr bgcolor="#333333">
<td colspan="2" height="1"></td>
</tr>
<tr>
<td class="333" width="50%" height="25">
<a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="index.asp">
<%=SiteName%>首页</a>-><a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="listupdate.asp">原创书库</a>->《<a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="look_book.asp?id=<%=id%>"><%=rs2("list_name")%></a>》</td>
<td class="333" align="right" width="50%">『
<a target="_blank" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="viewall_book.asp?id=<%=id%>">
全文阅读</a>
<a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="albbox.asp?action=add&id=<%=id%>">
加入书签</a>
<a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="albbox.asp?action=add&id=<%=id%>">
加入书架</a>
<a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="jian_book.asp?id=<%=id%>&us=<%=rs2("list_userid")%>">
推荐本书</a>
<a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="look_book.asp?id=<%=id%>">
返回书页</a> 』</td>
</tr>
<tr bgcolor="#333333">
<td colspan="2" height="1"></td>
</tr>
<tr bgcolor="#cccccc">
<td colspan="2" height="2"></td>
</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0" style="font-family: 宋体; font-size: 10pt" id="table3">
<tr>
<td>
<div align="center">
<span class="max"><%=rs2("list_name")%></span><br>
</div>
</td>
</tr>
<tr>
<td height="25" align="center"><span class="min">作者: <%=rs2("list_user")%> 发表时间: <%=formatdatetime(rs2("list_date"),2)%>
所属类型:<%=rs9("list_classname")%></span></td>
</tr>
</table>
<table id="table14" cellspacing="0" cellpadding="10" width="100%" align="center" border="0">
<tr>
<td>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="white" bordercolorlight="cccccc" bordercolor="white">
<%do while not rs1.eof%>
<tr height="26">
<td colspan="4" align="center" bgcolor="#e3e3e3"><%=rs1("list_cookname")%>
[
<a target="_blank" href="view_readbook.asp?list_bookid=<%=rs1("list_bookid")%>&list_cookid=<%=rs1("list_cookid")%>">
分卷阅读</a> ]</td>
</tr>
<tr height="26">
<%
c_id=rs1("list_cookid")
set rs4=server.CreateObject("ADODB.recordset")
sql4="select id,view_size,view_date,view_type,view_get from [list_view] where list_cookid="&c_id&" order by id"
rs4.open sql4,conn,1,1
%> <%
i=1
do while not rs4.eof
%>
<td height="26" align="left" width="33%">
<a href="<%if rs4("view_get")<>8 then %>view_book.asp?id=<%=rs4("id")%><%else%><%=viewFolder%><%=rs4("id")%>.htm<%end if%>" title="本章字数:<%=rs4("view_size")%>
更新日期:<%=rs4("view_date")%>"><%=rs4("view_type")%></a></td>
<%
if i mod 3=0 then response.write "</tr><tr height=26>"
i=i+1
rs4.movenext
loop
rs4.close
set rs4=nothing
%>
</tr>
<%rs1.movenext
loop
rs1.close
set rs1=nothing
%><%
rs9.close
set rs9=nothing
%> <%
rs3.close
set rs3=nothing
%> <%
dim vipbookid
set rsvip=server.CreateObject("ADODB.Recordset")
sqlvip="select id from vip_book where list_id="&id&""
rsvip.open sqlvip,conn,1,1
%><%if not(rsvip.bof and rsvip.eof) then
vipbookid=rsvip("id")
set rsvip1=server.CreateObject("ADODB.Recordset")
sqlvip1="select * from vip_view where view_id="&vipbookid&""
rsvip1.open sqlvip1,conn,1,1
%>
<tr height="26">
<td colspan="4" align="center" bgcolor="#e3e3e3">[ VIP章节
<a target="_blank" href="look_VIPbook.asp?id=<%=id%>">查看VIP章节</a>
]</td>
</tr>
<tr height="26">
<%
i=1
do while not rsvip1.eof
%>
<td height="26" align="left" width="33%">
<a href="vip_view_book.asp?id=<%=rsvip1("id")%>" title="本章字数:<%=rsvip1("view_size")%>
更新日期:<%=rsvip1("view_date")%>
消费金额:<%=rsvip1("view_vips")%>
内容预览:
<%=left(rsvip1("view_ok2"),200)%>"><%=rsvip1("view_name")%></a> </td>
<%
if i mod 3=0 then response.write "</tr><tr height=26>"
i=i+1
rsvip1.movenext
loop
rsvip1.close
set rsvip1=nothing
%>
</tr>
<%else%> <%end if
rsvip.close
set rsvip=nothing%> <%
rs2.close
set rs2=nothing
%>
</table>
</td>
</tr>
</table>
<!-- #include file="foot.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -