<%@ Control Language="VB" Inherits="WanerSoft.Provider.BaseControl" AutoEventWireup="false" EnableViewState="false"%>
<%@ Import Namespace="WanerSoft" %>
<%@ Import Namespace="WanerSoft.Provider" %>
<%@ Import Namespace="WanerSoft.Provider.Validate" %>
<%@ Import Namespace="WanerSoft.Model" %>
<%@ Import Namespace="WanerSoft.Data.Factory" %>
<%@ Import Namespace="System.Data" %>
<script runat="server">
Private B As New Ws_BookList
Private BookLink,VolumeLink,ReadAllLink As String
Private LastLine As Integer
Private Dtn As DataTable = New DataTable
Private Dtc As DataTable = New DataTable
Private Dtv As DataTable = New DataTable
Private Dv As DataView
Protected Overrides Sub CreateChildControls()
   B = Ws.Instance.WebBookSelect(WanerSoft.Common.Request.Sift("id", "int", 0))
   BookLink=ReUrl(B.id,InfoUrl.BookUrlR,InfoUrl.BookUrl)
   VolumeLink=VolumeUrl(B.bookhtml,B.id)
   ReadAllLink=ReadAllUrl(B.bookhtml,B.id)
   Dtn=Ws.Instance.BookVolumeSelectAll(B.id)
   Dtc=Ws.Instance.BookChapterAndVolumeListAll(B.id, False)
   Dtv=Ws.Instance.BookChapterAndVolumeListAll(B.id, True)
End Sub
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=B.booktitle%> - <%=InfoSys.HomeTitle%> - <%=InfoSys.HomePageText%></title>
<meta HTTP-EQUIV="Window-target" content="_top" />
<meta HTTP-EQUIV="pragma" content="no-cache" />
<meta HTTP-EQUIV="Cache-Control" content="no-cache, must-revalidate" />
<meta HTTP-EQUIV="expires" content="Wed, 26 Feb 1997 08:21:57 GMT" />
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312" />
<meta name="robots" content="all" />
<meta name="keywords" content="<%=B.booktitle%>,<%=InfoSys.HomeTitle%>" />
<meta name="keywords" content="<%=InfoSys.HomeKeyWords%>" />
<meta name="description" content="<%=InfoSys.HomeDescription%>" />
<link href="/Skin/Default/Css/Common.Css" rel="stylesheet" type="text/css" />
<link href="/Skin/Default/Css/Nclass.Css" rel="stylesheet" type="text/css" />
</head>

<body bgColor="#f1f1f1">
<script src="/js/Html/BookMenu.js"></script>
<script src="/js/Html/Footer.js"></script>
<center>
  <div id="Ws">
    <div id="Top">
      <div id="Menu"><script>ShowTopMenu(0,'<%=InfoSys.HomeTitle%>','<%=InfoSys.RootFolder%>','<%=ReadAllLink%>','<%=VolumeLink%>','<%=BookLink%>','<%=ReUrl(B.id,InfoUrl.UserBookReComUrlR,InfoUrl.UserBookReComUrl)%>','<%=ReUrl(B.id,InfoUrl.UserBookSaveUrlR,InfoUrl.UserBookSaveUrl)%>','0');</script></div>
      <div id="TextSelect">
         <div id="SelectInfo">&nbsp;<a href="<%=InfoSys.RootFolder%>"><%=InfoSys.HomeTitle%></a> -> <a href="<%=InfoSys.RootFolder%>Book/">连载首页</a> -> <a href="<%=BookLink%>"><%=B.booktitle%></a></div>
	     <div id="SelectRight"><a href="<%=ReUrl(B.id,InfoUrl.BookDownChmUrlR,InfoUrl.BookDownChmUrl)%>" target=_blank>下载CHM版全文电子书</a>&nbsp;|&nbsp;<a href="<%=ReUrl(B.id,InfoUrl.BookDownTxtUrlR,InfoUrl.BookDownTxtUrl)%>" target=_blank>下载TXT版全文电子书</a>&nbsp;</div>
      </div>
	  <div id="AdsT"><script src="/js/readadtop.js"></script></div>
	</div>
	<div id="Content">
      <div id="TextTitle"><span class="booktitle"><%=B.booktitle%></span></div>
	  <div id="TextInfo">作者：<a href="<%=ReUrl(B.id,InfoUrl.AuthorBookIDUrlR,InfoUrl.AuthorBookIDUrl)%>"><%=B.bookwriter%></a>，最后更新：<%=B.bookupdatetime%></div>
	  <div id="BookText"><br />
<%IF Dtn.Rows.Count>0 Then%>
<%For x As Integer = 0 To Dtn.Rows.Count-1%>
	<div id="NclassTitle"><%=Dtn.Rows(x).Item("booknclass")%>&nbsp;&nbsp;【<a href="<%=ReTUrl(B.id,Dtn.Rows(x).Item("id"),InfoUrl.ReadVolumeChapterUrlR,InfoUrl.ReadVolumeChapterUrl)%>">分卷阅读</a>】</div>
	      <ul>
<%
Dv = New DataView(Dtc)
Dv.RowFilter = "nclassid=" + Dtn.Rows(x).Item("id").ToString + ""
If Dv.Count > 0 Then
For i As Integer = 0 To Dv.Count-1%>
		    <li><a href="<%=Dv.Item(i)("id")%>.<%=InfoSys.UrlReWriteExtName%>" title="更新时间:<%=Dv.Item(i)("booktexttime")%>
更新字数:<%=Dv.Item(i)("booktextnum")%>"><%=Dv.Item(i)("booktexttitle")%></a></li>
 <%
 Next
LastLine = Dv.Count Mod InfoBook.BookVolumeRow
If LastLine > 0 Then
     For i As Integer = 0 To InfoBook.BookVolumeRow - 1 - LastLine
          Response.Write("<li>&nbsp;</li>")
     Next
End If
End If
Dv.Dispose()
 %>
          </ul>
  <div id="ListEnd"></div>
<%
Next
End IF%>
<%IF Dtv.Rows.Count>0 Then%>
<div id="NclassTitle">【<a href="<%=ReUrl(B.id,InfoUrl.BookVipUrlR,InfoUrl.BookVipUrl)%>"><font color=red>订阅Vip章节</font></a>】&nbsp;&nbsp;<font color=red>Vip章节目录</font></div>
	      <ul>
	<%For x As Integer = 0 To Dtv.Rows.Count -1%>
		   <li><a href="<%=ReTUrl(B.id,Dtv.Rows(x).Item("id"),InfoUrl.BookVipReadUrlR,InfoUrl.BookVipReadUrl)%>" title="更新时间:<%=Dtv.Rows(x).Item("booktexttitle")%>
更新字数:<%=Dtv.Rows(x).Item("booktextnum")%>"><%=Dtv.Rows(x).Item("booktexttitle")%></a></li>
     <%Next
	 LastLine = Dtv.Rows.Count Mod InfoBook.BookVolumeRow
If LastLine > 0 Then
     For i As Integer = 0 To InfoBook.BookVolumeRow - 1 - LastLine
          Response.Write("<li>&nbsp;</li>")
     Next
End If
	 %>
          </ul>
  <div id="ListEndVip"></div>
<%End IF%>
          <br /><br />
	  </div>
	  <div id="EndMenu"><script>ShowEndMenu(0,'<%=InfoSys.RootFolder%>','<%=ReadAllLink%>','<%=VolumeLink%>','<%=BookLink%>','<%=ReUrl(B.id,InfoUrl.UserBookReComUrlR,InfoUrl.UserBookReComUrl)%>','<%=ReUrl(B.id,InfoUrl.UserBookSaveUrlR,InfoUrl.UserBookSaveUrl)%>','0');</script></div>
	  <hr id="TopLine3" size="1" noshade />
	  <div id="LinkMenu">&nbsp;&nbsp;注：CHM版全文电子书适用于在PC电脑中阅读，TXT版全文电子书适用于在掌机、PDA、商务通、手机中阅读。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;章节阅读开通用“← →按键进行前后翻页阅读”的功能，“按回车[enter]键”可以直接返回作品首页。
	  </div>
	</div>
    <div id="End">
     <div id="EndType">
	    <div id="AdsE"><script src="/js/readadend.js"></script></div>
        <hr id="TopLine4" size="1" noshade />
	    <div id="Links"><script>ShowLinks();</script></div>
	    <hr id="TopLine5" size="1" noshade />
	    <div id="CopyRight"><script>ShowCopyRight();</script></div>
	 </div>
  </div>
  </div>
</center>
<script src="/js/BookText.js"></script>
<script src="/js/gb.js"></script>
</body>
</html>
<%
B=Nothing
Dtc.Clear()
Dtc.Dispose()
Dtn.Clear()
Dtn.Dispose()
%>