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

📄 b_show.asp

📁 此文件为一个电子同学录
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/ubbcode.asp" -->
<%
'=========================================================
' File: b_show.asp
 ' Date: 2006-04-06
' Script Written by Leibo
'=========================================================
' Copyright (C) 2002,2008 Mathren.com. All rights reserved.
' Web: http://www.hrbyydz.com
' Email: qa_90@hotmail.com
'=========================================================

dim topicid,bbsid,title,isti
dim currentPage,totalrec,Pcount,page_count,endpage
dim istop,isbest,islock,hits
dim abgcolor,bgcolor

stats="浏览帖子"
if Cint(GroupSetting(9))=1 then
	Errmsg=Errmsg+"<br>"+"<li>您没有浏览帖子主题的权限,请<a href=login.asp>登陆</a>或者同管理员联系。"
	founderr=true
end if
if request("id")="" then
	Errmsg=Errmsg+"<br>"+"<li>请指定相关贴子。"
	founderr=true
elseif not isInteger(request("id")) then
	Errmsg=Errmsg+"<br>"+"<li>非法的贴子参数。"
	founderr=true
else
	bbsid=request("id")
end if

if founderr then
	call head()
	call head_var("错误信息",Request.ServerVariables("HTTP_REFERER"))
	call txl_error()
else
	conn.execute("update topic set hits=hits+1 where topicid="&bbsid)
	sql="select title,istop,isbest,islock,hits from topic where topicID="&bbsid
	set rs=conn.execute(sql)
	if not(rs.bof and rs.eof) then
		title=rs(0)
		istop=rs(1)
		isbest=rs(2)
		islock=rs(3)
		hits=rs(4)
	else
		ErrMsg=ErrMsg+"<br>"+"<li>您指定的贴子不存在</li>"
		founderr=true
	end if
	set rs=nothing
	call head()
	call head_var("班级论坛","b_index.asp")
	if founderr then
		call txl_error()
	else
		call main()
		if founderr then call txl_error()
	end if
end if
call foot()

sub main()

if bgcolor="tablebody1" then
	bgcolor="tablebody2"
	abgcolor="tablebody1"
else
	bgcolor="tablebody1"
	abgcolor="tablebody2"
end if
'=======start=================
	currentPage=request("page")
	if currentpage="" or not isInteger(currentpage) then
		currentpage=1
	else
		currentpage=clng(currentpage)
		if err then
			currentpage=1
			err.clear
		end if
	end if
	set rs=server.createobject("adodb.recordset")
	sql="select B.bbsid,B.rootid,B.postuser,B.postuserid,B.titleimg,B.title,B.content,B.addtime,B.isbest,B.signflag,B.emailflag,"
	sql= sql & " U.userid,U.realname,U.oicq,U.email,U.userface,U.homepage,U.sign,U.bbscount,U.usermoney,U.usergroup,U.titlepic"
	sql= sql & " from bbs B inner join [user] U on U.UserID=B.postUserID and u.realname=B.postuser where B.rootid="&bbsid&" order by B.bbsid"
	rs.open sql,conn,1
	if rs.eof and rs.bof then
		response.write "<tr><td align=center height=25 class=tablebody1>  还没有任何用户数据。</font></td></tr>"
	else
	totalrec=rs.recordcount
  	if totalrec mod txl_Set(11)=0 then
     		Pcount= totalrec \ txl_Set(11)
  	else
     		Pcount= totalrec \ txl_Set(11)+1
  	end if
	RS.MoveFirst
	if currentpage > Pcount then currentpage = Pcount
   	if currentpage<1 then currentpage=1
	RS.Move (currentpage-1) * txl_Set(11)
	page_count=0
%>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">  
<tr> 
<td bgcolor=<%=txl_body(10)%> valign=top><br>
<table cellpadding=0 cellspacing=0 border=0 align=center width=<%=txl_body(19)%>>
<tr>
<td height=25 align=left><a href=b_post.asp><img src="<%=txl_info(6)&txl_skinpic(6)%>"  height="25" border=0></a>

⌨️ 快捷键说明

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