📄 view_book.asp
字号:
<!-- #include file="conn.asp" -->
<!--#include file="inc/config.asp"-->
<!--#include file="hitcount.asp"-->
<%
dim id
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 rsx=server.CreateObject("ADODB.recordset")
sqlx="select view_get,view_id from [list_view] where id="&id
rsx.open sqlx,conn,1,1
if rsx.eof then
Response.Write ("<script>alert(' 访问错误!\n\n 已经到达首页或尾页或访问的文件不存在!\n\n 点击确定返回 ');history.back();</script>")
Response.end
end if
if rsx("view_get")=8 then
view_id=rsx("view_id")
set rsbclass=server.createobject("adodb.recordset")
sqlbclass="select id,list_class,list_lei from [list_book] where id="&view_id&""
rsbclass.open sqlbclass,conn,1,1
viewRootFolder="HTML/" 'HTML存放目录
view_localpath0 = left(rsbclass("id"),2) '一级分类目录
view_localpath1 = left(rsbclass("id"),4) '二级分类目录
view_localpath2 = left(rsbclass("id"),6) '作品分类目录
view_localpath3 = rsbclass("id") '作品目录
view_localpath = view_localpath0&"/"&view_localpath1&"/"&view_localpath2&"/"&view_localpath3&"/"
viewFolder = viewRootFolder&""&view_localpath
rsbclass.close
set rsbclass=nothing
Response.redirect(""&viewFolder&""&id&".htm")
Response.end
end if
bookid=rsx("view_id")
bookcount(bookid)
rsx.close
set rsx=nothing
set rs=server.CreateObject("ADODB.recordset")
sql="select * from [list_view] where id="&id
rs.open sql,conn,1,1
'文章设置开始
dim list_cookid,list_bookid,list_class
list_cookid=rs("list_cookid")
set rs2=server.createobject("adodb.recordset")
sql2="select * from list_cook where list_cookid="&list_cookid
rs2.open sql2,conn,1,1
list_bookid=rs2("list_bookid")
set rs3=server.createobject("adodb.recordset")
sql3="select * from list_book where id="&list_bookid
rs3.open sql3,conn,1,1
if not(rs3.bof and rs3.eof) then
else
response.write "<script language=javascript>alert(' 对不起,您要查看的作品不存在或已经被删除! \n\n 可能该作品不存在或包含国家或者本站禁止的内容. \n\n 您如果是该作品的管理员或作者,请联系站长!');history.back(-1);</script>"
response.end
end if
if rs3("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 rs3("Lock_book") = 1 then
response.write "<script language=javascript>alert(' 对不起,您要查看的作品已经被锁定! \n\n 可能该作品包含国家或者本站所禁止的内容. \n\n 您如果是该作品的管理员或作者,请联系站长!');history.back(-1);</script>"
response.end
end if
list_class=rs3("list_class")
set rs4=server.createobject("adodb.recordset")
sql4="select * from list_type where typeid="&list_class
rs4.open sql4,conn,1,1
Stats0=rs("view_type")
Stats1=rs3("list_name")
Stats2=rs3("list_user")
Stats3=rs2("list_cookname")%>
<!--#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=<%=rs3("id")%>"><%=rs3("list_name")%></a>》-><%=rs2("list_cookname")%></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=<%=rs3("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="useralbbox.asp?action=add&bookid=<%=rs3("id")%>&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=<%=rs3("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=<%=rs3("id")%>&us=<%=rs3("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=<%=rs3("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"><iframe src=adlist.asp width=100% height=40 border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" scrolling="no"></iframe></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgColor="#333333">
<td height="1" align="center">
</td>
</tr>
<tr>
<td align="center"><br><span class="max"><%=rs("view_type")%></span>
<br><span class="min">( 本章字数:<%=rs("view_size")%> 更新时间:<%=rs("view_date")%> )</span>
<br><br></td>
</tr></table>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%if rs("view_lock")=1 then
response.write "对不起,您要查看的作品已经被锁定! 可能该作品包含国家或者本站所禁止的内容.您如果是该作品的管理员或作者,请联系站长!"
else%>
<div align="left" id="content">
<font face="<%=fontface%>" color="<%=fontcolor%>">
<span style="font-size:<%=fontsize%>pt;line-height:150%;"><%if rs("view_get")<>0 and rs("view_ok2")<>"" then
if rs("view_SaveToTXT")=0 then%><%=rs("view_ok2")%><%else
viewRootFolder="HTML/" 'HTML存放目录
view_localpath0 = left(rs3("id"),2) '一级分类目录
view_localpath1 = left(rs3("id"),4) '二级分类目录
view_localpath2 = left(rs3("id"),6) '作品分类目录
view_localpath3 = rs3("id") '作品目录
view_localpath = view_localpath0&"/"&view_localpath1&"/"&view_localpath2&"/"&view_localpath3&"/"
viewFolder = viewRootFolder&""&view_localpath
%> <script src='<%=viewFolder%>TXT/<%=rs("id")%>.txt'></script><%end if%><%else
if rs("view_ok")<>"" then%><script src='<%=rs("view_ok")%>'></script><%else response.write "内容暫缺"
end if%>
<%end if%></span></font><br>
<br>
</div>
<%end if%> </td>
</tr>
</table><table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0" style="font-family: 宋体; font-size: 10pt" id="table3">
<tr bgColor="#333333">
<td height="1" align="center">
</td>
</tr>
<tr>
<td colSpan="2" height="8"></td>
</tr>
<tr>
<td>
<div align="center">
<%
dim c_idpage,idpage,rspage3,rspage4,ppage,b_idpage
c_idpage=rs("list_cookid")
idpage=rs("id")
set rspage=server.CreateObject("ADODB.recordset")
sqlpage="select id from [list_view] where list_cookid="&c_idpage&" and id<"&idpage&" order by id desc"
rspage.open sqlpage,conn,1,1
if rspage.recordcount>0 then
ppage=rspage("id")
else
b_idpage=rs("view_id")
set rsbpage=server.CreateObject("ADODB.recordset")
sqlbpage="select id from [list_view] where view_id="&b_idpage&" and list_cookid<"&c_idpage&" order by id desc"
rsbpage.open sqlbpage,conn,1,1
if rsbpage.recordcount>0 then
ppage=rsbpage("id")
else
ppage=0
end if
rsbpage.close
set rsbpage=nothing
end if
rspage.close
set rspage=nothing
%><%
dim npage
set rspage1=server.CreateObject("ADODB.recordset")
sqlpage1="select id from [list_view] where list_cookid="&c_idpage&" and id>"&idpage&" order by id"
rspage1.open sqlpage1,conn,1,1
if rspage1.recordcount>0 then
npage=rspage1("id")
else
b_idpage=rs("view_id")
set rsbpage1=server.CreateObject("ADODB.recordset")
sqlbpage1="select id from [list_view] where view_id="&b_idpage&" and list_cookid>"&c_idpage&" order by id"
rsbpage1.open sqlbpage1,conn,1,1
if rsbpage1.recordcount>0 then
npage=rsbpage1("id")
else
npage=0
end if
rsbpage1.close
set rsbpage1=nothing
end if
rspage1.close
set rspage1=nothing
%><script language="javascript">
document.onkeydown=nextpage
var prevpage="view_book.asp?id=<%=ppage%>"
var nextpage="view_book.asp?id=<%=npage%>"
var bookpage="read_book.asp?id=<%=rs("view_id")%>"
function nextpage() {
if (event.keyCode==13) location=bookpage
if (event.keyCode==37) location=prevpage
if (event.keyCode==39) location=nextpage
}
</script> <a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="javascript:document.location=prevpage" target="_top">上一页</a>
<a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="javascript:document.location=bookpage" target="_top">
返回书目</a>
<a style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; color: #666666; text-decoration: none" href="javascript:document.location=nextpage" target="_top">下一页</a></td>
</tr>
</table>
<%
rs.close
set rs=nothing
%><%
rs3.close
set rs3=nothing
%> <%
rs2.close
set rs2=nothing
%><%
rs4.close
set rs4=nothing
%><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colSpan="2" height="6"></td>
</tr>
<tr bgColor="#333333">
<td height="1" align="center">
</td>
</tr>
<tr>
<td align="center"><%=adsfoot%></td>
</tr>
<tr bgColor="#333333">
<td height="1" align="center">
</td>
</tr>
</table>
<!-- #include file="foot.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -