📄 list_book.asp
字号:
<!--开始-->
<%
id=CheckSql(request("id"))
CheckSqlnum(id)
if id="" then
response.Redirect "index.asp"
response.End
end if
id=int(id)
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
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"> <font size="4">□</font>
<font color="red"><%=rsclass("list_tpye")%></font> <%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
%><%else
%>本类全部<%end if%></span> 按<%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
%>
</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="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,page1
classid=rsclass("typeid")
page1=clng(request("page"))
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=100
if page1=0 then page1=1
pages=rsbclass.pagecount
if page1 > pages then page=pages
rsbclass.AbsolutePage=page1
for j=1 to rsbclass.pagesize
%>
<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 target="_blank" href="look_book.asp?id=<%=rsbclass("id")%>">
<%=rsbclass("list_name")%></a></td>
<td class="xt" vAlign="top" align="left"><a target="_blank" 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>
<%
rsbclass.movenext
if rsbclass.eof then exit for
next
%>
<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"><%if Page1<2 then
response.write "首页 上一页 "
else
response.write "<a href=list_book.asp?id="&id&"&booktype1="&booktype1&"&booktype2="&booktype2&"&page=1>首页</a> "
response.write "<a href=list_book.asp?id="&id&"&booktype1="&booktype1&"&booktype2="&booktype2&"&page=" & (page1-1) & ">上一页</a> "
end if
if rsbclass.pagecount-page1<1 then
response.write "下一页 尾页"
else
response.write "<a href=list_book.asp?id="&id&"&booktype1="&booktype1&"&booktype2="&booktype2&"&page=" & (page1+1) & ">"
response.write "下一页</a> <a href=list_book.asp?id="&id&"&booktype1="&booktype1&"&booktype2="&booktype2&"&page="&rsbclass.pagecount&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&page1&"</font>/"&rsbclass.pagecount&"</strong>页 "
response.write " 共<b><font color='#FF0000'>"&rsbclass.recordcount&"</font></b>条记录 <b>"&rsbclass.pagesize&"</b>条记录/页"
%></td>
</tr>
</table>
<% end if %><%
rsbclass.close
set rsbclass=nothing
%><%
rsclass.close
set rsclass=nothing
%></td>
</tr>
</table>
</td>
</tr>
</table>
<!--结束-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -