⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list_book.asp

📁 功能介绍: 一、会员功能模块 1、站内短信发布(设计中) 2、书架收藏夹 3、发表评论(功能不完善) 4、申请作家(与添书员整合) 5、申请添书员(与作家整合) 6、申请更新员
💻 ASP
字号:
<%
id=CheckSql(request("id"))
CheckSqlnum(id)
id=int(id)
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if
if trim(Request("booktype1"))="" then
booktype1=0
else
booktype1=replace(trim(Request("booktype1")),"'","")
CheckSqlnum(booktype1)
booktype1=int(booktype1)
end if
if trim(Request("booktype2"))="" then
booktype2=0
else
booktype2=replace(trim(Request("booktype2")),"'","")
CheckSqlnum(booktype2)
booktype2=int(booktype2)
if booktype2>6 then
	Response.Write ("<script>alert('   操作错误!\n\n 请联系管理员。');history.back();</script>")
	Response.end
End If
end if

if OpenInhtml=1 and booktype1=0 and booktype2=0 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/"

file2=server.mappath( ""&viewFolder&"listbook_"&id&"_"&CurrentPage&"."&htmlphe&"" )
set tfo=Server.CreateObject("Scripting.FileSystemObject")
if tfo.FileExists(file2) = True Then
response.write "<meta http-equiv=Refresh content='0; URL="&viewFolder&"listbook_"&id&"_"&CurrentPage&"."&htmlphe&"'>"
	Response.redirect(""&viewFolder&"listbook_"&id&"_"&CurrentPage&"."&htmlphe&"")
	Response.end
end if

end if
set rsclass=server.CreateObject("ADODB.recordset")
sqlclass="select * from list_type where typeid="&id
rsclass.open sqlclass,conn,1,1
if rsclass.eof and rsclass.bof then
	Response.Write ("<script>alert(' 操作错误 \n\n 该分类不存在~~请查询后访问,不要尝试注入操作,系统将跟踪你的操作并记录. ');location.href='index.asp';</script>")
	Response.End
end if
set rs=server.CreateObject("ADODB.recordset")
sql="select * from list_class where list_typeid="&rsclass("typeid")
rs.open sql,conn,1,1
%><table cellspacing="0" width="100%" align="center" border="0">
	<tr>
		<td align="middle">
		<table cellspacing="0" cellpadding="0" width="100%" border="0" valign="top">
			<form method="get" action="list_book.asp">
				<tr>
					<td class="xt"><span class="zt">&nbsp; <font size="4">□</font>
					<font color="red"><%=rsclass("list_tpye")%></font>&nbsp; <%if booktype1<>0 then%>
					<%set rs2=server.CreateObject("ADODB.recordset")
sql="select list_classname from list_class where list_classid="&booktype1
rs2.open sql,conn,1,1
if rs2.eof and rs2.bof then
	response.write "分类被删除"
else
%><%=rs2("list_classname")%><%end if
rs2.close
set rs2=nothing%><%else
%>本类全部<%end if%></span>&nbsp;&nbsp;&nbsp; 按<%if booktype2=0 then
response.write "更新时间"
elseif booktype2=1 then
response.write "总点击"
elseif booktype2=2 then
response.write "总推荐"
elseif booktype2=3 then
response.write "总收藏"
elseif booktype2=4 then
response.write "总字数"
elseif booktype2=5 then
response.write "字首拼音"
elseif booktype2=6 then
response.write "更新时间"
end if%>排序 </td>
					<td class="xt" align="right">
					<input type="hidden" name="id" id="id" value="<%=id%>">
					<select name="booktype1">
					<option value="0" selected>本类全部</option>
					<%Do while not rs.eof%>
					<option value="<%=rs("list_classid")%>"><%=rs("list_classname")%>
					</option>
					<%
	rs.MoveNext
	Loop
	rs.close
set rs=nothing
%></select><select name="booktype2">
					<option value="0" selected>排行方式</option>
					<option value="1">总点击</option>
					<option value="2">总推荐</option>
					<option value="3">总收藏</option>
					<option value="4">总字数</option>
					<option value="5">字首拼音</option>
					<option value="6">更新时间</option>
					</select> <input type="submit" value="提交"></td>
				</tr>
			</form>
		</table>
		</td>
	</tr>
</table>
<table cellspacing="0" width="100%" align="center" border="0">
	<tr>
		<td>
		<table cellSpacing="0" borderColorDark="white" width="95%" align="center" border="0" valign="top">
			<tr align="middle">
				<td><%if id<>"" or id<>null then
				set rs1=server.CreateObject("ADODB.recordset")
				sql="select classinfo from [list_type] where typeid="&id
				rs1.open sql,conn,1,1
				if not(rs1.eof and rs1.bof) then
					response.write rs1("classinfo")
				end if
				rs1.close
				set rs1=nothing
				end if%></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td>
		<table cellspacing="0" bordercolordark="white" width="99%" align="center" border="0" valign="top">
			<tr align="middle" height="24">
				<td class="xt" style="BORDER-LEFT-COLOR: rgb(204,204,204); BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)" valign="center" align="middle" width="12%">
				<b><font color="#003399">类别</font></b></td>
				<td class="xt" style="BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)" valign="center" align="middle" width="20%">
				<b><font color="#003399">书名</font></b></td>
				<td class="xt" style="BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)" valign="center" align="middle" width="35%">
				<b><font color="#003399">最新章节</font></b></td>
				<td class="xt" style="BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)" valign="center" align="middle" width="15%">
				<b><font color="#003399">更新时间</font></b></td>
				<td class="xt" style="BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204)" valign="center" align="middle" width="10%">
				<b><font color="#003399">作者</font></b></td>
				<td class="xt" style="BORDER-BOTTOM-COLOR: rgb(204,204,204); BORDER-TOP-COLOR: rgb(204,204,204); BORDER-RIGHT-COLOR: rgb(204,204,204)" valign="center" bordercolorlight="#666666" align="middle" width="8%">
				<b><font color="#003399">状态</font></b></td>
			</tr>
			<%
dim classid
classid=rsclass("typeid")
Const MaxPerPage=100
	set rsbclass=server.createobject("adodb.recordset")
if booktype1=0 then
	if booktype2=0 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and Lock_book = 0 order by list_gxdate desc"
	elseif booktype2=1 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and Lock_book = 0 order by list_hit desc"
	elseif booktype2=2 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and Lock_book = 0 order by list_jian desc"
	elseif booktype2=3 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and Lock_book = 0 order by list_cang desc"
	elseif booktype2=4 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and Lock_book = 0 order by list_size desc"
	elseif booktype2=5 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and Lock_book = 0 order by list_abc desc"
	elseif booktype2=6 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and Lock_book = 0 order by list_gxdate desc"
	end if
else
	if booktype2=0 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and list_lei="&booktype1&" and Lock_book = 0 order by list_gxdate desc"
	elseif booktype2=1 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and list_lei="&booktype1&" and Lock_book = 0 order by list_hit desc"
	elseif booktype2=2 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and list_lei="&booktype1&" and Lock_book = 0 order by list_jian desc"
	elseif booktype2=3 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and list_lei="&booktype1&" and Lock_book = 0 order by list_cang desc"
	elseif booktype2=4 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and list_lei="&booktype1&" and Lock_book = 0 order by list_size desc"
	elseif booktype2=5 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and list_lei="&booktype1&" and Lock_book = 0 order by list_abc desc"
	elseif booktype2=6 then
		sqlbclass="select id,list_lei,list_name,list_user,list_tai,newviewid,newviewname,newview,list_gxdate from [list_book] where list_class="&classid&" and list_lei="&booktype1&" and Lock_book = 0 order by list_gxdate desc"
	end if
end if
		rsbclass.open sqlbclass,conn,1,1
		if rsbclass.eof and rsbclass.bof then
			response.write "<tr bgColor=#ffffff height=24><td align=center>暂无任何作品</td></tr>"
		else
   Rsbclass.PageSize=MaxPerPage
   Allpage=Rsbclass.PageCount
   If Currentpage>Allpage Then Currentpage=1
   Num=Rsbclass.RecordCount
   Rsbclass.MoveFirst
   Rsbclass.AbsolutePage=CurrentPage
   i=0
	Do While Not Rsbclass.Eof%>
			<tr height="24">
				<td class="xt" valign="top" align="middle"><%set rs1=server.CreateObject("ADODB.recordset")
sql="select list_classname from list_class where list_classid="&rsbclass("list_lei")
rs1.open sql,conn,1,1
if rs1.eof and rs1.bof then
	response.write "被删除"
else
%><%=rs1("list_classname")%><%end if
rs1.close
set rs1=nothing
%></td>
				<td class="xt" valign="top" align="left">
				<a href="look_book.asp?id=<%=rsbclass("id")%>"><%=rsbclass("list_name")%></a></td>
				<td class="xt" valign="top" align="left">
				<a href="view_book.asp?id=<%=rsbclass("newviewid")%>">
				<font color="#5d5d5d"><%if rsbclass("newviewname")<>"" then%><%=rsbclass("newviewname")%><%else%>暂无更新<%end if%></font></a></td>
				<td class="xt" valign="top" align="middle"><%=formatdatetime(rsbclass("list_gxdate"),2)%></td>
				<td class="xt" valign="top" align="middle"><%=rsbclass("list_user")%></td>
				<td class="xt" valign="top" align="middle"><%if rsbclass("list_tai")="1" then response.write("转载中...") end if%>
				<%if rsbclass("list_tai")="2" then response.write("连载中...") end if%>
				<%if rsbclass("list_tai")="3" then response.write("出版中...") end if%>
				<%if rsbclass("list_tai")="4" then response.write("已暂停...") end if%>
				<%if rsbclass("list_tai")="5" then response.write("已停止...") end if%>
				<%if rsbclass("list_tai")="6" then response.write("已完成...") end if%></td>
			</tr>
			<%
      i=i+1
      If i>=MaxPerPage Then  Exit  Do
      Rsbclass.MoveNext
   Loop
End If
Rsbclass.Close
Set  Rsbclass=Nothing
rsclass.close
set rsclass=nothing
%>
			<tr>
				<td class="xt" align="center" colspan="6">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr>
						<td> </td>
					</tr>
					<tr>
						<td height="24" align="center"><%
Response.Write ShowPage("list_book.asp?id="&id&"&booktype1="&booktype1&"&booktype2="&booktype2&"",CurrentPage,Num,MaxPerPage,True,True," 条纪录")
%></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -