📄 view.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<!--#include file="conn.asp"-->
<!--#include file="ubb.asp"-->
<wml>
<head>
<meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
<meta http-equiv="Expires" content="0" forua="true"/>
<meta http-equiv="Pragma" content="no-cache" forua="true"/>
</head>
<%
dim id,lid,rs1,sql1,sql
id=TRim(Request("id"))
lid=TRim(Request("lid"))
aid=TRim(Request("aid"))
bid=TRim(Request("bid"))
if not isnumeric(aid) then aid="1"
if not isnumeric(id) then id=""
if not isnumeric(bid) then bid=""
if not isnumeric(lid) then lid=""
if aid="1" then
aaa="desc"
else
aaa="asc"
end if
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "SELECT * FROM btitle where id="&id
Rs.Open Sql,conn,1,3
if not (rs.bof and rs.eof) then
rs("kid")=rs("kid")+1
rs.update()
else%>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<wml>
<head>
<meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
<meta http-equiv="Expires" content="0" forua="true"/>
<meta http-equiv="Pragma" content="no-cache" forua="true"/>
</head>
<card id="index" title="出错啦"><p>
暂无文章!<br/>
<anchor>返回上一页<prev/></anchor>
</p>
</card></wml>
<%end if
Rs.close
set rs=nothing
%>
<%
dim page,PageCount
Const pagesize=500
page = Request("Page")
IF Not IsEmpty(Page) Then
IF Not IsNumeric(Page) Then
Page=1
Else
Page=Cint(Page)
End IF
Else
Page = 1
End IF
if id<>"" and lid<>"" and bid<>"" then
Set Rs2 = Server.CreateObject("Adodb.Recordset")
Sql2 = "SELECT * FROM config "
Rs2.Open Sql2,conn,1,1
if not (rs2.bof and rs2.eof) then
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "SELECT * FROM btitle WHERE id=" & id
Rs.Open Sql,conn,1,1
if not (rs.bof and rs.eof) then
URLName=rs("name")
%>
<card id="index" title="<%=utf8(rs("name"))%>">
<p align="<%=utf8(rs2("const"))%>">
<%=outstr(rs("title"),page)%><br/>
阅读数:<%=outHTM(rs("kid"))%>
<%
Set Rs1 = Server.CreateObject("Adodb.Recordset")
Sql1 = "SELECT * FROM wap_mycol WHERE name='" & rs("name")&"'"
Rs1.Open Sql1,conn,1,1
Response.Write ("收藏数:")&rs1.RecordCount&"<br/>"
Rs1.close
set rs1=nothing
Set Rs1 = Server.CreateObject("Adodb.Recordset")
Sql1 = "SELECT * FROM wap_bbs WHERE bid=" &bid&" and lid=" & lid&" and pid=" &id&" and n=0 order by id desc"
Rs1.Open Sql1,conn,1,1
aaa=rs1.RecordCount
Rs1.close
set rs1=nothing
if page>=PageCount then
'Response.Write ("[下一页]")
else
Response.Write("[<a href='view.asp?lid="&rs("lid")&"&aid="&aid&"&id="&rs("id")&"&bid=" & rs("bid") & "&page=" & (page+1) & "'>下一页</a>]")
end if
if page<=1 then
'Response.Write ("[上一页]")
else
Response.Write("[<a href='view.asp?lid="&rs("lid")&"&aid="&aid&"&id="&rs("id")&"&bid=" & rs("bid") & "&page=" & (page-1) & "'>上一页</a>]")
end if%><br/><%
if cint(aid)<>1 then
Set Rs1 = Server.CreateObject("Adodb.Recordset")
Sql1 = "SELECT * FROM btitle WHERE bid='" & bid&"' and lid='"&lid&"' and id>"&id&" order by pid asc"
Rs1.Open Sql1,conn,1,1
if not (rs1.bof and rs1.eof) then
Response.Write("[<a href='view.asp?lid="&rs1("lid")&"&aid="&aid&"&id="&rs1("id")&"&bid=" & rs1("bid") & "'>下一章>>"&rs1("name")&"</a>]<br/>")
end if
Rs1.close
set rs1=nothing
Set Rs1 = Server.CreateObject("Adodb.Recordset")
Sql1 = "SELECT * FROM btitle WHERE bid='" & bid&"' and lid='"&lid&"' and id<"&id&" order by pid desc"
Rs1.Open Sql1,conn,1,1
if not (rs1.bof and rs1.eof) then
Response.Write("[<a href='view.asp?lid="&rs1("lid")&"&aid="&aid&"&id="&rs1("id")&"&bid=" & rs1("bid") & "'>上一章>>"&rs1("name")&"</a>]<br/>")
end if
Rs1.close
set rs1=nothing
else
Set Rs1 = Server.CreateObject("Adodb.Recordset")
Sql1 = "SELECT * FROM btitle WHERE bid='" & bid&"' and lid='"&lid&"' and id<"&id&" order by pid desc"
Rs1.Open Sql1,conn,1,1
if not (rs1.bof and rs1.eof) then
Response.Write("[<a href='view.asp?lid="&rs1("lid")&"&aid="&aid&"&id="&rs1("id")&"&bid=" & rs1("bid") & "'>下一章>>"&rs1("name")&"</a>]<br/>")
end if
Rs1.close
set rs1=nothing
Set Rs1 = Server.CreateObject("Adodb.Recordset")
Sql1 = "SELECT * FROM btitle WHERE bid='" & bid&"' and lid='"&lid&"' and id>"&id&" order by pid asc"
Rs1.Open Sql1,conn,1,1
if not (rs1.bof and rs1.eof) then
Response.Write("[<a href='view.asp?lid="&rs1("lid")&"&aid="&aid&"&id="&rs1("id")&"&bid=" & rs1("bid") & "'>上一章>>"&rs1("name")&"</a>]<br/>")
end if
Rs1.close
set rs1=nothing
end if
if PageCount>2 then%>
<br/><input name="Page" format="*N" maxlength="5"/>
<anchor>跳页
<go href="view.asp?lid=<%=lid%>&aid=<%=aid%>&id=<%=id%>" method="post">
<postfield name="page" value="$(Page:n)" />
</go>
</anchor><br/>
<%end if%>
<a href='bbs_add.asp?aid=<%=aid%>&id=<%=id%>&lid=<%=lid%>&bid=<%=bid%>&n=0&page=<%=page%>'>发表评论</a>|<a href='bbs_view.asp?aid=<%=aid%>&id=<%=id%>&lid=<%=lid%>&bid=<%=bid%>&n=0&page=<%=page%>'>查看评论(<%=aaa%>)</a>
<br/>共(<%=page%>/<%=PageCount%>)页<br/>
<anchor>加入收藏夹
<go method='post' href='mycol_do.asp'>
<postfield name='name' value='<%=URLName%>'/>
<postfield name='url' value='view.asp?id=<%=id%>&lid=<%=lid%>&bid=<%=bid%>&aid=<%=aid%>&page=<%=page%>'/>
</go>
</anchor><br/>
<%else%>
暂无文章!<br/>
<%end if
Rs.close
set rs=nothing
else
%><card id="index" title="出错啦"><p>出错啦!系统资料没配置.<br/><%
end if
Rs2.close
set rs2=nothing
else
%>
<card id="index" title="出错啦"><p>出错啦!请不要非法提交参数.<br/>
<%end if
%>
<a href="title.asp?Action=list&aid=<%=aid%>&id=<%=bid%>&lid=<%=lid%>">返回上一级</a><br/>
<a href="index.asp">返回首页</a><br/>
</p>
</card>
</wml>
<%
Function outstr(str,page)
if len(str)>pagesize then
PageCount=len(str)\pagesize+1
str=mid(str,(page-1)*pagesize+1,pagesize)
else
PageCount=1
end if
outstr=outhtm(str)
end Function%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -