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

📄 printpage.asp

📁 一个不错的论坛原代码
💻 ASP
字号:
<!--#include file="Connections.asp" -->
<!--#include file="top.asp" -->
<!--#include file="checkuser.asp" -->
<!--#include file="ubb.asp" -->
<%
 dim l_id,t_id,r_id,viewtopic
l_id=chktopic(trim(request.querystring("l_id")))
t_id=chktopic(trim(request.querystring("t_id")))
r_id=chktopic(trim(request.querystring("r_id")))

if r_id="" then r_id=-1
viewtopic=trim(request.querystring("viewtopic"))

 if h_viewcpb=1 and isuser=false then response.redirect("login.asp")
if request.querystring("l_id")="" then 
errornum=1
errormsg="<li>很抱歉,您没有选择论坛,请从论坛首页正确登陆</li>"
 end if
 
 if errornum<> 1 then
 
isbanzhu=false

	sql="select l_password,l_access,l_banzhu from lanmu where l_id="&l_id&""
	set rs=conn.execute(sql)
	if not rs.eof then
	l_banzhu=rs("l_banzhu")
	
	if issupermaster=false and ismaster=false then
	
	if not isnull(l_banzhu) and l_banzhu<>"" and isuser and isbordermaster then
    if instr(l_banzhu,cpbusername)>0 then
 isbanzhu=true'获得斑竹的身份
  end if
  end if
	'此段检查是否为加密区
	if isbanzhu=false then
	if rs("l_password")<>""  and session("fy_lpassword")<>rs("l_password") then response.redirect"login.asp?action=password&l_id="&l_id&""
if rs("l_access")=2 and  isbordermaster=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有版主和总版主才可以进入!</li>"
elseif rs("l_access")=1 and isuser=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有注册用户才可以进入!</Li>"

elseif rs("l_access")=4 and isvipuser=false and isbordermaster=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有认证用户才可以进入!</Li>"
end if

end if

end if

else
errornum=1
errormsg="<Li>很抱歉,无此论坛!</Li>"
end if
set rs=nothing


  if t_id="" then 
errornum=1
errormsg=errormsg&"<li>很抱歉,您没有选择主题帖,请从论坛首页正确登陆</li>"
 end if

 
  if errornum<> 1 then

sqllanmu="select l_access,l_title,l_id,l_lockuser from lanmu where l_id="&l_id&""
set rslanmu=conn.execute(sqllanmu) 
sql_topic= "select t_buysend,t_lock,t_title,t_content,t_time,t_lastedit,t_username,t_autourl,t_lockubb from topic where t_id="&trim(t_id)&""
set rs_topic=conn.Execute (sql_topic) 
if  rs_topic.eof then
errornum=1
errormsg=errormsg&"<li>很抱歉,此帖已经不存在,可能已经被删除,如果有什么问题,请跟管理员联系</li>"
elseif rs_topic("t_lock")=2 and issupermaster=false and ismaster=false then
errornum=1
errormsg=errormsg&"<li>很抱歉,此帖已经移到回收站,只有管理员和总版主才可以查看</li>"
end if
end if
end if

if errornum=1 then
call toptitle(l_title,cpbtitle)
call error(errormsg)
call login()
call bq()
response.end
end if

checklockubb=0
checklockubbreply=1
rcount=-1
if rs_topic("t_autourl")=1 then checkurl=1
if rs_topic("t_lockubb")=1 then checklockubb=1
t_buysend=rs_topic("t_buysend")
 l_lockuser=rslanmu("l_lockuser")
cpbtitle="浏览主题:"&HTMLEncode(rs_topic("t_title"))
 ltitle=rslanmu("l_title")
 response.write("<title>"&l_title&"-"&cpbtitle&"</title>")

  response.write("<span class=tdc><B>文本方式查看主题,此为可打印文本<BR>-- "&l_title&"</b>(<a href="&l_urlf&">"&l_urlf&"</a>)<Br>&nbsp;<B>-- "&ltitle&"</b>(<a href="&l_urlf&"/list.asp?&l_id="&l_id&">"&l_urlf&"/list.asp?&l_id="&l_id&"</a>)<Br>&nbsp;&nbsp;<B>-- "&cpbtitle&"</b>(<a href="&l_urlf&"/top.asp?&l_id="&l_id&"&t_id="&t_id&">"&l_urlf&"/top.asp?&l_id="&l_id&"&t_id="&t_id&"</a>)</span>")
 

'开始读取用户资料
sql_user= "select username,locktopic from user where username='"&rs_topic("t_username")&"'"
set rs_user=conn.Execute (sql_user)
if not rs_user.eof then
fyusername=rs_user("username")
fylocktopic=rs_user("locktopic")
end if
set rs_user=nothing
response.write("<hr><span class=tdc>--- <B>作者</b>:"&fyusername&"<BR>--- <B>发布时间</B>:"&rs_topic("t_time")&"<p>--- <B>标题</B>:"&rs_topic("t_title")&"<p></span>")
      
response.write("<span style=""table-layout:fixed;word-break:break-all"" class=tdc>")
      erroruser=0
       if l_lockuser<>"" then
      l_lockuser1=split(l_lockuser, "|")
      for i=0 to ubound(l_lockuser1)
      if fyusername=l_lockuser1(i) then
      erroruser=1
      exit for
      end if
      next
    end if
     if fylocktopic<>1 and erroruser<>1 then
    
 response.write(ubbcode(rs_topic("t_content"))&"<BR>"&_
rs_topic("t_lastedit")&"<br><br>")
'如果发言被屏蔽则显示下面的信息
else
response.write("<br><br><center>================================================<BR>"&_
"此用户发言已经被屏蔽<BR>"&_
"======================================================</center><br><br>")
end if
 response.write("</span><hr>") 
 checkurl=0
  

sql = "select r_title,r_content,r_time,t_autourl,t_lastedit,t_lockubb,r_username from reply where t_id="&trim(t_id)&" order by r_time asc"
set rs_reply=conn.execute(sql)
rcount=0
do while not rs_reply.eof 
checklockubb=1
checkurlreply=0
if rs_reply("t_autourl")=1 then checkurlreply=1
checklockubbreply=0
checklocksign=0
if rs_reply("t_lockubb")=1 then checklockubbreply=1
sql_user= "select locktopic,username from user where username='"&rs_reply("r_username")&"'"
set rs_user=conn.Execute (sql_user)
if not rs_user.eof then
fyusername=rs_user("username")
fylocktopic=rs_user("locktopic")
else
fyusernam=""
end if

response.write("<span class=tdc>--<B>作者</B>:"&fyusername&"<BR>--<B>发表时间</B>:"&rs_reply("r_time")&"<p>--<B>标题</B>:"&rs_reply("r_title")&"<p></span>")
response.write("<span style=""table-layout:fixed;word-break:break-all"" class=tdc>")
     erroruser=0
        if l_lockuser<>"" then
      l_lockuser1=split(l_lockuser, "|")
      for i=0 to ubound(l_lockuser1)
      if fyusername=l_lockuser1(i) then
      erroruser=1
      exit for
      end if
      next
    end if
if fylocktopic<>1 and erroruser<>1 then
 response.write(ubbcode(rs_reply("r_content"))&"<BR>"&_
rs_reply("t_lastedit")&"<br><br>")
'如果发言被屏蔽则显示下面的信息
else
response.write("<br><br><center>================================================<BR>"&_
"此用户发言已经被屏蔽<BR>"&_
"======================================================</center><br><br>")
end if
 response.write("</span><hr>")   
rs_reply.MoveNext 
rcount=rcount+1
loop 
rs_reply.close 
set rs_reply=nothing 


    set rs_topic=nothing
    set rslanmu=nothing
    set rs=nothing
    set rs_user=nothing%><!--#include file="bq.asp" -->

⌨️ 快捷键说明

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