📄 bbs_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.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<!--#include file="conn.inc"-->
<!--#include file="ydzq1.asp"-->
<head>
<meta http-equiv="Cache-Control" content="no-Cache"/>
<meta http-equiv="Cache-Control" content="max-age=0"/>
<meta http-equiv="Expires" content="Mon, 1 Jan 1990 00:00:00 GMT"/>
</head>
<%dim rs,tsstr,id,page
tid=usb(request.QueryString("tid"))
if tid="" then tid="0"
set rs=Server.CreateObject("ADODB.Recordset")
rsstr="select * from bbstz where id=" & tid
rs.open rsstr,conn,1,2 %>
<card id="card1" title="<%=ubb(rs("topic"))%><%=ubb(rs("name"))%>">
<p>
<%
page=request.QueryString("page")
if page="" or page<1 then page=1
ppage=request.QueryString("ppage")
if ppage="" or ppage<1 then ppage=1
set mtrs=Server.CreateObject("ADODB.Recordset")
mtrsql="select mid,tid from mtjl where mid=" & myid & " and tid="&tid
mtrs.open mtrsql,conn,1,2
if mtrs.recordcount=0 then
mmid="0"
else
mmid="1"
end if
mtrs.close
set mtrs=nothing
cw=request.QueryString("cw")
if cw="2" then
response.write("错误:该贴子已经发表!<br/>")
end if
if cw="3" then
response.write("错误:重复操作!<br/>")
end if
if cw="4" then
response.write("错误:重复操作!<br/>")
end if
if cw="5" then
response.write("错误:重复购买!<br/>")
end if
if cw="12" then
response.write("您被禁止回复!有疑问请联系管理员!<br/>")
end if
sql="update bbstz set rc=rc+1 Where id=" & tid & ""
conn.Execute(sql)
if rs.recordcount=0 then
response.write("没有这个贴子呀!<br/><a href='bbs_list.asp?hk="&hk&"&bbsid="&bbsid&"'>回到论坛</a><br/><br/></p></card></wml>")
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
else
bbsid=rs("bbsid")
set rsn=Server.CreateObject("ADODB.Recordset")
rsstrn="select name,bbsid,id,dgtm from [bbstz] where yc=0 and id<>"&tid&" and bbsid="&bbsid&" and cstr(dgtm)<'"&rs("dgtm")&"' order by dgtm desc"
rsn.open rsstrn,conn,1,2
set rspr=Server.CreateObject("ADODB.Recordset")
rsstrpr="select name,bbsid,id,dgtm from [bbstz] where yc=0 and id<>"&tid&" and bbsid="&bbsid&" and cstr(dgtm)>'"&rs("dgtm")&"' order by dgtm asc"
rspr.open rsstrpr,conn,1,2
dim pageWordNum,StartWord,Content,Length,PageAll,i
pageWordNum=ssbb
StartWord = 1
Content=rs("txt")
Length=len(Content)
PageAll=(Length+PageWordNum-1)\PageWordNum
i=request("i")
if isnull(i) or i="" then i=0
Content = mid(Content,StartWord+i*PageWordNum,PageWordNum)
if rs("st")="0" then
%>
<%if myid<>0 then%>
<!--#include file="xxts.asp"-->
<%else
response.write"您尚未<a href='login.asp?url="&Replace(Replace(R_url(),"hk=","o="),"hk=","o=")&"'>登陆/注册</a><br/>"
end if%>
<a href='hf_view.asp?tid=<%=tid%>&hk=<%=hk%>&bbsid=<%=bbsid%>&ppage=<%=ppage%>'>查看回复</a> <a href='bbs_list.asp?hk=<%=hk%>&bbsid=<%=bbsid%>&page=<%=ppage%>'>返回论坛</a> <br/>
<b><%=rs("topic")%><%=ubb(rs("name"))%></b><br/>
作者:<a href='face.asp?id=<%=ubb(rs("fid"))%>&hk=<%=hk%>'><%=ubb(rs("fname"))%></a><br/>
人气:(<%=ubb(rs("rc"))%>)
<%response.write("<a href='like.asp?sid=" & myid & "&hk="&hk&"&tid="&tid&"&bbsid="&bbsid&"'>支持</a>("&ubb(rs("x"))&") <a href='fand.asp?hk="&hk&"&tid="&tid&"&bbsid="&bbsid&"'>反对</a>("&ubb(rs("d"))&")")%>
<br/><%=ubb(rs("tm"))%>
<br/>----------<br/>
<% if PageAll>1 and request.querystring("w")<>1 then
response.write("<a href='bbs_view.asp?tid=" & tid & "&hk=" & hk & "&bbsid=" & bbsid & "&w=1'>[查看全文]</a><br/>")
end if
%>
<%if rs("touu")<>0 then%><img src="face/<%=rs("touu")%>.gif" alt=""/><%end if%>
<%set rsq=Server.CreateObject("ADODB.Recordset")
rspl="select * from [mtjl] where [tid]="&tid&" and mid="&myid
rsq.open rspl,conn,1,1
dim sidd
sidd=rsq.recordcount
rsq.close
set rsq=nothing
%>
<%if rs("mtjg")="0" or mmid="1" or rs("fid")=myid or sidd<>0 then%>
<%if request.querystring("w")<>1 then%>
<%=ubb2(content)%> <br/>
<%else%>
<%=ubb2(rs("txt"))%>
<%end if
set rsxl=Server.CreateObject("ADODB.Recordset")
rsstr="select content,wjsm,filesize,id from upfile where tid=" & tid & " order by time desc"
rsxl.open rsstr,conn,1,1
if not rsxl.eof then
response.write("==贴子附件==<br/>")
dim ii
ii=1
do while ((not rsxl.EOF) and ii <=cint(2))
dim ggss
content=rsxl("content")
IF InStrRev(content,".") > 0 THEN
ggss = mid(content,InStrRev(content,".")+1)
end if
if ggss="gif" or ggss="jpg" or ggss="jpeg" or ggss="bmp" or ggss="png" then
response.write("<img src='"&content&"' alt=''/><br/>")
end if
response.write("<a href='down.asp?id="&rsxl("id")&"&hk="&hk&"&tid="&tid&"'>下载附件</a><br/>")
response.write("[格式:"&ggss&"/大小:"&rsxl("filesize")&"]<br/>")
if rsxl("wjsm")<>"" then
response.write("[说明:"&rsxl("wjsm")&"]<br/>")
end if
response.write("------------<br/>")
rsxl.Movenext
ii=ii+1
loop
'================================================
%>
<a href='qbfile.asp?tid=<%=tid%>&hk=<%=hk%>&bbsid=<%=rs("bbsid")%>'>查看全部附件(<%=rsxl.recordcount%>)个</a><br/>
<%end if
rsxl.close
set rsxl=nothing%>
<%else%>
查看本贴需支付<%=rs("mtjg")%>个金币<br/>
<a href='pay.asp?hk=<%=hk%>&tid=<%=tid%>&ppage=<%=ppage%>'>我要购买</a>
<%end if%>
<%if rs("vote")<>"" then
if rs("vote")<>"" then vote=split(utf8(rs("vote")),",")
if rs("addvote")<>"" then addvote=split(utf8(rs("addvote")),",")
if rs("voteid")<>"" then voteid=split(utf8(rs("voteid")),",")
if rs("voteid")<>"" then
for iii=0 to ubound(voteid)
if voteid(iii)<>"" then
if cint(voteid(i))=session("myid") then votesa="true"
end if
next
end if
for iii=0 to ubound(addvote)
if addvote(iii)<>"" then
votecoun=votecoun+cint(addvote(iii))
end if
next
if votesa<>"true" then%>
<select name="voteid" value="0"><%
for iii=0 to ubound(vote)
if vote(iii)<>"" then %>
<option value="<%=iii%>"><%=vote(iii)%></option>
<%end if
next%>
</select><br/>
<anchor>投他一票
<go href="vote.asp?tid=<%=tid%>&bbsid=<%=bbsid%>&hk=<%=hk%>&ppage=<%=ppage%>" method="post">
<postfield name="voteid" value="$(voteid)" />
</go>
</anchor><br/>
<%end if
votesa=""%>
投票结果:<%=votecoun%>票<br/>
<%for iii=0 to ubound(vote)
if vote(iii)<>"" then
if votecoun<>0 then%>
<%=vote(iii)%>:<%=addvote(iii)%>票<%=round(cint(addvote(iii))*100/votecoun,0)%>%<br/>
<%end if
end if
next%>
<%end if%>
<%if request.querystring("w")<>1 then%>
<%
if 0<=i<PageAll then
Response.Write "<br/>"
if cint(i)<cint(PageAll)-1 then
Response.Write "<a href='bbs_view.asp?hk="&hk&"&tid="&tid&"&bbsid="&bbsid&"&i=" & i+1 & "&page=" & page & "'>下一页</a>"
End if
if cint(i)>0 then
Response.Write " " & "<a href='bbs_view.asp?hk="&hk&"&tid="&tid&"&bbsid="&bbsid&"&i=" & i-1 & "&page=" & page & "'>上一页</a><br/>"
End if
End if
if PageAll>1 then
response.write "(" & i+1 & "/" & PageAll & ")"
%>
<br/>
跳到第<input name="i<%=minute(now)%><%=second(now)%>" title="页码" type="text" format="*N" emptyok="true" size="3" value="<%response.write(i+1)%>" maxlength="3"/>页
<anchor>[GO]
<go href="bbs_view.asp?hk=<%=hk%>&tid=<%=tid%>&bbsid=<%=bbsid%>&id=<%=id%>&page=<%=page%>" accept-charset='utf-8'>
<postfield name="i" value="$(i<%=minute(now)%><%=second(now)%>)"/>
</go>
</anchor><br/>
<%
End if
ELSE
response.write("<br/><a href='bbs_view.asp?tid=" & tid & "&hk=" & hk & "&bbsid=" & bbsid & "'>[分页查看]</a><br/>")
end if
if rs("gtm")<>rs("tm") then
response.write("最后修改时间:" & rs("gtm") & "<br/>")
end if
set rsxl=Server.CreateObject("ADODB.Recordset")
rspl="select * from lthf where tid="&tid&" order by htm desc"
rsxl.open rspl,conn,1,1
if rsxl.eof then
Response.write "---------<br/>暂时没有回复,快抢沙发吧<br/>"
Else
response.write("<br/>--最新回复--<br/>")
y=Month(rsxl("htm"))&""
r=Day(rsxl("htm"))&""
if len(r)=1 then r="0"&r
h=hour(rsxl("htm"))&""
if len(h)=1 then h="0"&h
m=minute(rsxl("htm"))&""
if len(m)=1 then m="0"&m
tt="" & y & "-" & r &" " & h &":" & m &""
k=rsxl.recordcount
i=1
do while ((not rsxl.EOF) and i <=cint(hfxs))
hfid=rsxl("fid")
hfname=ubb(rsxl("fni"))
tzbt=rsxl("nr")
%>[<%=k%>楼].
<%if rsxl("biao")<>0 then%>
<img src='face/<%=rsxl("biao")%>.gif' alt=''/>
<%end if%>
<%if rsxl("wjsm")<>"" then%>
<%=ubb2(rsxl("wjsm"))%><br/>
<%end if%>
<%=ubb2(tzbt)%>[<%=tt%>]<%if ltmybz=rs("bbsid") or mycjbz="1" or myxcy="1" then%>
<a href="hfsc.asp?id=<%=rsxl("id")%>&hk=<%=hk%>&tid=<%=tid%>&bbsid=<%=bbsid%>">删除</a>
<%end if%><br/>
<a href='face.asp?hk=<%=hk%>&id=<%=ubb(rsxl("fid"))%>'><%=hfname%>(ID:<%=hfid%>)</a>
<br/>
<%
rsxl.Movenext
k=k-1
i=i+1
loop
end if
%>
<%if rs("hfs")>3 then%>
<a href='hf_view.asp?tid=<%=tid%>&hk=<%=hk%>&bbsid=<%=bbsid%>&ppage=<%=ppage%>'>更多回复(<%=rs("hfs")%>)条</a><br/>
<%end if
%>
<select title="表情" name="face" value="0">
<option title="表情" value="0">表情</option>
<option title="微笑" value="1">微笑</option>
<option title="哭泣" value="2">哭泣</option>
<option title="调皮" value="3">调皮</option>
<option title="脸红" value="4">脸红</option>
<option title="害羞" value="5">害羞</option>
<option title="生气" value="6">生气</option>
<option title="偷笑" value="7">偷笑</option>
<option title="流汗" value="8">流汗</option>
<option title="我倒" value="9">我倒</option>
<option title="得意" value="10">得意</option>
<option title="眦牙" value="11">眦牙</option>
<option title="疑问" value="12">疑问</option>
<option title="睡觉" value="13">睡觉</option>
<option title="好色" value="14">好色</option>
<option title="口水" value="15">口水</option>
<option title="敲头" value="16">敲头</option>
<option title="可爱" value="17">可爱</option>
<option title="猪头" value="18">猪头</option>
<option title="YEAH" value="19">YEAH</option>
<option title="玫瑰" value="20">玫瑰</option>
</select>
<input type="text" name="dgly<%=minute(now)%><%=second(now)%>" title="输入内容" value="不错,顶!" maxlength="300"/><br/>
<anchor title="确定">快速回复
<go method="post" href="post.asp?tid=<%=tid%>&ppage=<%=ppage%>&hk=<%=hk%>&bbsid=<%=bbsid%>">
<postfield name="dgly" value="$(dgly<%=minute(now)%><%=second(now)%>)"/>
<postfield name="face" value="$(face)"/>
</go></anchor><anchor title="TXT文本">TXT文本<go sendreferer="true" href="tzxz.asp?hk=<%=hk%>&tid=<%=tid%>"/></anchor>
<br/><a href='upload2.asp?tid=<%=tid%>&up=2&hk=<%=hk%>&bbsid=<%=bbsid%>'>文件回复</a><br/>
<anchor title="复制贴子">复制贴子<go sendreferer="true" href="fztz.asp?hk=<%=hk%>&tid=<%=tid%>&bbsid=<%=bbsid%>"/></anchor>
<%if myid=rs("fid") or ltmybz=rs("bbsid") or mycjbz="1" or myxcy="1" then%>
<br/><a href="tzgr.asp?hk=<%=hk%>&bbsid=<%=rs("bbsid")%>&tid=<%=rs("id")%>&ppage=<%=ppage%>">管理贴子</a>
<%end if%>
<br/>---------<br/>
<%if rsn.recordcount>0 then%>
下贴:<a href='bbs_view.asp?tid=<%=rsn("ID")%>&ppage=<%=ppage%>&hk=<%=hk%>&bbsid=<%=rs("bbsid")%>'><%=ubb(left(rsn("name"),12))%></a><br/>
<%end if%>
<%if rspr.recordcount>0 then%>
上贴:<a href='bbs_view.asp?tid=<%=rspr("ID")%>&ppage=<%=ppage%>&hk=<%=hk%>&bbsid=<%=rs("bbsid")%>'><%=ubb(left(rspr("name"),12))%></a><br/>
<%end if%>
<%
rsxl.close
set rsxl=nothing
else
response.write "本贴已被锁定"%>
<%if myid=rs("fid") or ltmybz=rs("bbsid") or mycjbz="1" or myxcy="1" then%>
<br/><a href="tzgr.asp?hk=<%=hk%>&bbsid=<%=rs("bbsid")%>&tid=<%=rs("id")%>&ppage=<%=ppage%>">管理贴子</a><br/>
<%end if
end if
end if
%>
<br/>
<a href="hy.asp?hk=<%=hk%>">我的地盘</a>-<a href='getsc.asp?tid=<%=tid%>&ppage=<%=ppage%>&hk=<%=hk%>'>加入收藏</a><br/>
<a href='bbs_list.asp?hk=<%=hk%>&bbsid=<%=bbsid%>&page=<%=ppage%>'>返回论坛</a>-<a href="index.asp?hk=<%=hk%>">返回社区</a>
</p>
</card>
</wml>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -