📄 view_readbook.asp
字号:
<!-- #include file="conn.asp" --><%Response.buffer=False %>
<!--#include file="inc/config.asp"-->
<%UserID=CheckSql(request.cookies("CnEndWeb_User")("log_UserID"))
UserName=CheckSql(request.cookies("CnEndWeb_User")("log_UserName"))
list_bookid=CheckSql(request("list_bookid"))
CheckSqlnum(list_bookid)
list_bookid=int(list_bookid)
list_cookid=CheckSql(request("list_cookid"))
CheckSqlnum(list_cookid)
list_cookid=int(list_cookid)
if list_cookid=0 then
response.write "<script language=javascript>alert(' 访问错误!\n\n 已经到达首页或尾页或访问的文件不存在!\n\n 点击确定返回');history.back(-1);</script>"
response.end
end if
if makehtml=1 then
if htmlphem=1 then
htmlphe="htm"
elseif htmlphem=2 then
htmlphe="html"
elseif htmlphem=3 then
htmlphe="shtml"
elseif htmlphem=4 then
htmlphe="asp"
else
htmlphe="html"
end if
viewFolder = SiteSystemPath&"HTML/"&list_bookid&"/Z"
file2=server.mappath( ""&viewFolder&""&list_cookid&"."&htmlphe&"" )
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file2) = True Then
response.write "<meta http-equiv=Refresh content='0; URL="&viewFolder&""&list_cookid&"."&htmlphe&"'>"
Response.redirect(""&viewFolder&""&list_cookid&"."&htmlphe&"")
Response.end
end if
end if
set rs1=server.CreateObject("ADODB.recordset")
sql1="select * from [list_cook] where list_cookid="&list_cookid
rs1.open sql1,conn,1,1
if not(rs1.bof and rs1.eof) then
else
response.write "<script language=javascript>alert(' 对不起,您要查看的作品不存在或已经被删除! \n\n 可能该作品不存在或包含国家或者本站禁止的内容. \n\n 您如果是该作品的管理员或作者,请联系站长!');history.back(-1);</script>"
response.end
end if
set rs2=server.CreateObject("ADODB.recordset")
sql2="select * from [list_book] where id="&list_bookid
rs2.open sql2,conn,1,3
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
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=rs2("list_user")
Stats3=rs1("list_cookname")%>
<!--#include file="top.asp"--><script language="JavaScript" src="hitcount.asp?id=<%=list_bookid%>"></script>
<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" height="25">
<a class="view" href="index.asp">
首 页</a>-><a class="view" href="listupdate.asp">书 库</a>->《<a class="view" href="look_book.asp?id=<%=list_bookid%>"><%=rs2("list_name")%></a>》-><%=rs1("list_cookname")%></td>
<td class="333" align="right" width="500">『
<a target="_blank" class="view" href="viewall_book.asp?id=<%=list_bookid%>">
全文阅读</a>
<a class="view" href="user_save.asp?info=boxaddbook&id=<%=list_bookid%>">
加入书架</a>
<a class="view" href="user_index.asp?info=box">
打开书架</a>
<a class="view" href="user_save.asp?info=jianbook&id=<%=list_bookid%>&us=<%=rs2("list_userid")%>">
推荐本书</a>
<a class="view" href="look_book.asp?id=<%=list_bookid%>">
返回书页</a>
<a class="view" href="#" onclick="document.execCommand('saveas','true','<%=rs2("list_name")%>(分卷:<%=rs1("list_cookname")%>).txt')">
<font color="#800000">保存TXT</font></a>
<a name="StranLink">繁體中文</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"><%=rs2("list_name")%></span>
<br><span class="min">作者: <%=rs2("list_user")%> 发表时间:
<%=rs2("list_date")%> 所属类型:<%=rs9("list_classname")%></span>
<br><br>
<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">
<tr height=26>
<td colspan="4" align="center" bgcolor="#e3e3e3"><%=rs1("list_cookname")%></td>
</tr>
<tr height=26>
<%
c_id=rs1("list_cookid")
set rs4=server.CreateObject("ADODB.recordset")
sql4="select id,view_type from [list_view] where list_cookid="&c_id&" and view_IsVip=0 order by view_showid"
rs4.open sql4,conn,1,1
i=1
do while not rs4.eof
%>
<td align="left" width="25%"> <a href="#<%=rs4("id")%>"><%=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.close
set rs1=nothing
rs9.close
set rs9=nothing
%>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- 章节列表 --><%
Set bv_rs=server.CreateObject("adodb.recordset")
Best_Sql="select * from [list_view] where list_cookid="&c_id&" and view_IsVip=0 order by view_showid"
bv_rs.Open Best_Sql,Conn,1,1
do while not bv_rs.eof
%>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
<tr>
<td align="center" valign="middle" class="font"><br><font face="隶书">
<span style="font-size:18pt; font-weight:700"><a name=<%=bv_rs("ID")%>><%=bv_rs("view_type")%></a></span></font><br>(本章字数:<%=bv_rs("view_size")%> 更新时间:<%=bv_rs("view_date")%>)</td>
</tr>
</table><table align="center" border="0" cellpadding="0" cellspacing="0" width="96%">
<tr>
<td><br><%if bv_rs("view_lock")=0 then%>
<DIV align='left' id=content><font face="<%=fontface%>" color="<%=fontcolor%>"><span style="font-size:<%=fontsize%>pt;line-height:150%;">
<%if bv_rs("view_get")<>0 then
if bv_rs("view_SaveToTXT")=0 then%><%=bv_rs("view_ok2")%><%else
viewFolder = SiteSystemPath&"HTML/"&list_bookid&"/"
if TXTToJs=0 Then
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(server.mappath( viewFolder&bv_rs("id")&".TXT")) = True Then '判断文件是否存在
content=replace(replace(FSOFileRead(viewFolder&bv_rs("id")&".TXT"),"document.write('",""),"');","")
response.write Content
else
response.write"内容丢失,请联系管理员!"
end if
Set tfo = nothing
Else
%><script src='<%=viewFolder%><%=bv_rs("id")%>.txt'></script><%end if
end if
else
if bv_rs("view_ok")<>"" then
Set RsItem=server.CreateObject("adodb.recordset")
SqlItem="Select top 1 EquivType,readtype,readtype1,IsSaveFiles,CsType,CsString,CoType,CoString,CsType1,CsString1,CoType1,CoString1,ContType1,ContType2,CsType2,CsString2,CoType2,CoString2 from [Item] Where ItemID=" & bv_rs("ItemID")
RsItem.Open SqlItem,ConnItem,1,1
if not(RsItem.eof and RsItem.bof) then
EquivType=RsItem("EquivType")
readtype=RsItem("readtype")
readtype1=RsItem("readtype1")
CsType=RsItem("CsType")
CsString=RsItem("CsString")
CoType=RsItem("CoType")
CoString=RsItem("CoString")
ContType1=RsItem("ContType1")
CsType1=RsItem("CsType1")
CoType1=RsItem("CoType1")
CoString1=RsItem("CoString1")
ContType1=RsItem("ContType1")
ContType2=RsItem("ContType2")
CsType2=RsItem("CsType2")
CsString2=RsItem("CsString2")
CoType2=RsItem("CoType2")
CoString2=RsItem("CoString2")
if readtype=1 and readtype1=1 then
Content="章节内容丢失,无法恢复需要重新添加!"
Else
ViewUrl=bv_rs("view_ok")
If ContType2=2 Then
Content=""
Content="<script src='"&ViewUrl&"'></script>"
else
if CsType=1 then
CsType=true
elseif CsType=0 then
CsType=False
end if
if CoType=1 then
CoType=true
elseif CoType=0 then
CoType=False
end if
ContentCode=GetHttpPage(ViewUrl,EquivType)
If ContentCode<>"$False$" Then
Content=GetBody(ContentCode,CsString,CoString,CsType,CoType)
If ContType1=1 Then
if CsType1=1 then
CsType1=true
elseif CsType1=0 then
CsType1=False
end if
if CoType1=1 then
CoType1=true
elseif CoType1=0 then
CoType1=False
end if
Content=GetBody(Content,CsString1,CoString1,CsType1,CoType1)
End If
If Content="$False$" Then
Content="内容丢失,请联系管理员!"
else
If ContType2=3 Then
Content="<IMG src="&Content&">"
End If
End If
else
Content="内容丢失,请联系管理员!"
End If
End If
End If
else
Content="目标采集站丢失内容无法显示,请联系管理员!"
End If
response.write Content
else
response.write "内容暫缺"
end if
end if%></span></font></DIV><%else
response.write "对不起,您要查看的作品已经被锁定! 可能该作品包含国家或者本站所禁止的内容.您如果是该作品的管理员或作者,请联系站长!"
end if%><br></td>
</tr>
</table>
<br><br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr align="center">
<td height=20 align="right" bgcolor="dddddd" class="font">[ <a href=#top>置 顶 返回目录</a> ]
</td>
</tr>
</table>
<br> <%
bv_rs.movenext
loop
bv_rs.close
Set bv_rs=NOTHING
%><!-- 章节列表 结束 -->
<%
rs2.close
set rs2=nothing
%><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=list_cookid
set rspage=server.CreateObject("ADODB.recordset")
sqlpage="select list_cookid from [list_cook] where list_bookid="&list_bookid&" and list_cookid<"&c_idpage&" order by list_cookid desc"
rspage.open sqlpage,conn,1,1
if rspage.recordcount>0 then
ppage=rspage("list_cookid")
else
ppage=0
end if
rspage.close
set rspage=nothing
%><%
dim npage
set rspage1=server.CreateObject("ADODB.recordset")
sqlpage1="select list_cookid from [list_cook] where list_bookid="&list_bookid&" and list_cookid>"&c_idpage&" order by list_cookid"
rspage1.open sqlpage1,conn,1,1
if rspage1.recordcount>0 then
npage=rspage1("list_cookid")
else
npage=0
end if
rspage1.close
set rspage1=nothing
%><script language="javascript">
document.onkeydown=nextpage
var prevpage="view_readbook.asp?list_bookid=<%=list_bookid%>&list_cookid=<%=ppage%>"
var nextpage="view_readbook.asp?list_bookid=<%=list_bookid%>&list_cookid=<%=npage%>"
var bookpage="read_book.asp?id=<%=list_bookid%>"
function nextpage() {
if (event.keyCode==13) location=bookpage
if (event.keyCode==37) location=prevpage
if (event.keyCode==39) location=nextpage
}
</script> <a class="view" href="javascript:document.location=prevpage" target="_top">上一卷</a>
<a class="view" href="javascript:document.location=bookpage" target="_top">
返回书目</a>
<a class="view" href="javascript:document.location=nextpage" target="_top">下一卷</a></td>
</tr>
</table>
<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 + -