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

📄 bbs_view.asp

📁 非常好的源码 非常好的源码 非常好的源码
💻 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>
<%
n=TRim(Request("n"))
lid=TRim(Request("lid"))
bid=TRim(Request("bid"))
pid=TRim(Request("id"))
aid=TRim(Request("aid"))
page=TRim(Request("page"))
if not isnumeric(aid) then aid=1
if not isnumeric(page) then page=1
if not isnumeric(pid) then pid=""
if not isnumeric(bid) then bid=""
if not isnumeric(lid) then lid=""
if not isnumeric(n) then n=0


	call main
Function main
if lid<>"" and bid<>"" and pid<>"" then%>
	<card id="index" title="查看评论"><p>
<%	Set Rs = Server.CreateObject("Adodb.Recordset")
	Sql = "SELECT * FROM wap_bbs WHERE bid=" & bid&" and lid=" & lid&" and pid=" & pid&" and n=" & n&"  order by id desc"
	Rs.Open Sql,conn,1,1
	pageID = Request("pageID")
	Rs.PageSize = 10
	if not (rs.bof and rs.eof)  then 
	IF Not IsEmpty(pageID) Then
		IF Not IsNumeric(pageID) Then		
			pageID=1
		Else
			pageID=Cint(pageID)
		End IF
		IF pageID > Rs.PageCount Then
			Rs.AbsolutePage = Rs.PageCount
		ElseIF pageID <= 0 Then
			Rs.AbsolutePage = 1
		Else
			Rs.AbsolutePage = pageID
		End IF
	Else
		Rs.AbsolutePage = 1
	End IF
	pageID = Rs.AbsolutePage

	For i=1 to Rs.PageSize
		If Rs.Eof Then
			exit For
		End If
				set rs1=server.CreateObject("adodb.recordset")
				sql1="select * from wap_user where id="&rs("nid")
				rs1.open sql1,conn,1,3
				if not (rs1.bof and rs1.eof)  then 
				name=rs1("name")
				end if
			Rs1.close
			set rs1=nothing%>

				<%=i+(page-1)*10%>.<%=utf8(rs("title"))%><br/>
				发表者:<%=name%>&nbsp;&nbsp;<%=utf8(rs("time"))%><br/>
				-----------------<br/>
			<%
		Rs.MoveNext
	Next
    	if pageID>=Rs.PageCount then
        	'Response.Write ("[下一页]")        
    	else
        	Response.Write("[<a href='bbs_view.asp?lid="&lid&"&amp;aid="&utf8(aid)&"&amp;bid="&bid&"&amp;page="&page&"&amp;id="&utf8(pid)&"&amp;n="&utf8(n)&"&amp;PageID=" & (PageID+1) & "'>下一页</a>]")
    	end if

    	if pageID<=1 then
        	'Response.Write ("[上一页]")
    	else        
		Response.Write("[<a href='bbs_view.asp?lid="&lid&"&amp;aid="&utf8(aid)&"&amp;bid="&bid&"&amp;page="&page&"&amp;id="&utf8(pid)&"&amp;n="&utf8(n)&"&amp;PageID=" & (PageID-1) & "'>上一页</a>]")
    	end if
	if Rs.PageCount>2 then%>
		<br/><input name="Page" format="*N" maxlength="5"/>
		<anchor>跳页
			<go href="bbs_view.asp?lid=<%=lid%>&amp;aid=<%=aid%>&amp;id=<%=pid%>&amp;bid=<%=bid%>&amp;page=<%=page%>" method="post">
				<postfield name="pageID" value="$(pageID:n)" />
			</go>
		</anchor>
	<%end if%>
	<%else%>
		暂无评论!<br/>
	<%end if
		Rs.close
		set rs=nothing
else
%>
<card id="index" title="出错啦"><p>出错啦!请不要非法提交参数.<br/>
<%end if
end Function%>
		<br/><%if n=0 then%>
		<a href="view.asp?lid=<%=lid%>&amp;aid=<%=aid%>&amp;id=<%=pid%>&amp;bid=<%=bid%>&amp;page=<%=page%>">返回来源页</a><br/>
		<%else%>
		<a href="down.asp?did=<%=pid%>&amp;lid=<%=lid%>&amp;id=<%=bid%>">返回来源页</a><br/>		
		<%end if%>
<br/><a href="index.asp">返回首页</a><br/>
		</p>
</card>
</wml>

⌨️ 快捷键说明

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