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

📄 bbs.asp

📁 这是ASP的OA
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!-- #include file="const.asp" -->
<!-- #include file="power_func.asp" -->
<%
dim CID,ID,FID,sql,rs
dim ftitle,ctitle,fadmin,fprofile,authent,authentlist,rid,rootid
dim topic,color,name,ulevel,right1,level,listpage
dim rscount,page,totalcount,totalpages,psize,i,sexstr
dim admin,clicked,uploadfile,filepath,viewsign,fileext,signature
ID=nrequest("id")
if ID="" then
	response.Redirect("error.asp?id=3")
	response.End()
end if
	call opendb()
	sql="select rootid,click,FID,topic from m3_bbs where id="&id&" and valid=1"
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,3
	if rs.eof and rs.bof then
		rs.close
		set rs=nothing
		call closedb()
		response.Redirect("error.asp?id=2")
		response.End()
	else
		topic=rs("topic")
		rootid=rs("rootid")
		FID=rs("FID")
		clicked=request.Cookies("matrix3_login")("clickedstr")
		if len(clicked)>300 then
			response.Cookies("matrix3_login")("clickedstr")=""
		end if
		if instr(clicked,id&space(8-len(id)))=0 then
			rs("click")=cint(rs("click"))+1
			rs.update
			response.Cookies("matrix3_login")("clickedstr")=clicked&id&space(8-len(id))
		end if
	end if
	rs.close
	set rs=nothing
	sql="select forum.FTitle,forum.FAdmin,forum.FProfile,forum.authent,forum.authentlist,category.CID,category.CTitle from m3_forum as forum,m3_category as category where forum.FID="&FID&" and category.CID=forum.CID"
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		ftitle="未知论坛"
		fadmin=""
		CID=0
		ctitle="未知分区"
	else
		ftitle=rs("FTitle")
		fadmin=rs("FAdmin")
		fprofile=rs("FProfile")
		CID=rs("CID")
		ctitle=rs("CTitle")
		authent=cint(rs("authent"))
		authentlist=rs("authentlist")
	end if
	rs.close
	set rs=nothing
	ulevel=userlevel()
	if cint(ulevel)>1 then
		admin=1
	else
		if havepower(FID)=1 then
			admin=1
		else
			admin=0
			if authent=1 then
				if inlist(authentlist)=0 then
					response.Redirect("error.asp?id=13")
					response.End()
				end if
			elseif authent=2 then
				if cint(ulevel)<1 then
					response.Redirect("error.asp?id=14")
					response.End()
				end if
			end if
		end if
	end if
position "阅读帖子:"&topic&"",0
response.Cookies("matrix3")("list")=""
listpage=request.QueryString("listpage")
totalpages=1
totalcount=1
psize=10
page=trim(request("page"))
if page="" then
	page=1
else page=cint(page)
	if page<=0 then
		page=1
	end if
end if
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/skin.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function alertwin(url)
{
	if(confirm("警告:确定要删除吗?"))
	{
		location.href=url;
	}
}
function popWin(loadurl)
{
	  wintop=(screen.availHeight-480)/2;
	  winleft=(screen.availWidth-650)/2;
	  window.open(loadurl,"","scrollbars=yes,resizable=yes,width=550,height=420,top="+wintop+",left="+winleft+"");
}
function printwin(url) {
	window.open(url,'','width=460,height=525,scrollbars=yes,toolbars=yes,menubar=yes,resizable=yes')
}
function runit(obj)
{
var winname=window.open("","test","");
winname.document.open("text/html", "replace");
winname.document.write(obj.value);
winname.document.close();
}
function copyit(obj){
	obj.select();
	js=obj.createTextRange();
	js.execCommand("Copy");
}
function saveAs(obj){
	var winname=window.open('','test','top=10000');
	winname.document.open("text/html", "replace");
	winname.document.write(obj.value);
	winname.document.execCommand('saveas','','code.html');
	winname.close();
}
</script>
<script language="JavaScript" src="images/effect.js"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="mainbg">
  <tr> 
    <td height="10" align="center" valign="top"><a name=top></a> <!-- #include file="topbar.asp" --> </td>
  </tr>
  <tr> 
    <td align="center" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="12" class="left_main">&nbsp;</td>
          <td width="1" class="left_sp_min"></td>
          <td width="10">&nbsp;</td>
          <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3">
              <tr> 
                <td height="26" colspan="2"><span class="v8"><img src="images/btn_face.gif" width="10" height="7"> 
                  <a href="index.asp"><%=sitename%></a> <FONT face=Webdings color="#660000">8</FONT> 
                  <a href="category.asp?cid=<%=CID%>"><%=ctitle%></a> <FONT face=Webdings color="#660000">8</FONT> 
                  <a href="list.asp?forumid=<%=FID%>&page=<%=listpage%>"><%=ftitle%></a> 
                  <FONT face=Webdings color="#660000">8</FONT> <font color="#990000"><%=Strleft(topic,70)%></font></span></td>
              </tr>
              <tr> 
                <td colspan="2" height="1" bgcolor="#ECE9D9"></td>
              </tr>
              <tr> 
                <td width="58%" height="30" class="v8"><a href="javascript:history.back()">&nbsp;&nbsp;<img src='images/btn_back.gif' border="0" align='absmiddle'> 
                  回上一页</a></td>
                <td width="42%" align="right" nowrap class="v8"> <a href="reply.asp?id=<%=ID%>&rootid=<%=rid%>&page=<%=page%>"> 
                  <img src='images/btn_reply.gif' border="0" align='absmiddle'> 
                  回复主题</a>&nbsp;&nbsp; <a href="post.asp?forumid=<%=FID%>"> <img src='images/btn_new.gif' border="0" align='absmiddle'> 
                  发新帖子</a>&nbsp;&nbsp; <a href="treelist.asp?id=<%=ID%>&listpage=<%=listpage%>"><img src='images/btn_tree.gif' border="0" align='absmiddle'> 
                  树形列表</a>&nbsp;&nbsp;<a href="javascript:printwin('print.asp?id=<%=ID%>')"><img src='images/btn_print.gif' border="0" align='absmiddle'> 
                  简洁打印</a>&nbsp;&nbsp;<a href="javascript:location.reload()"><img src='images/btn_refresh.gif' border="0" align='absmiddle'> 
                  刷新</a>&nbsp;&nbsp;</td>
              </tr>
            </table>
            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" style="word-break:break-all;WORD-WRAP: break-word;" class="bbs_tb_border">
                    <tr> 
                      <td width="120" height="18" nowrap class="list_bar_2"><span class="v8b"><img src="images/fang-1.gif" align="absmiddle"></span> 
                        <font color="#FFFFFF">发帖人</font></td>
                      <td height="18" class="list_head">内容</td>
                    </tr>
                    <%
sql="select bbs.uploadfile,bbs.viewsign,bbs.filepath,bbs.ID,bbs.topic,bbs.addtime,bbs.FID,bbs.face,bbs.ip as bip,bbs.istop,bbs.isbest,bbs.content,bbs.html,bbs.click,users.* from m3_bbs as bbs,m3_users as users where (bbs.RootID="&ID&" or bbs.id="&id&") and bbs.valid=1 and users.name=bbs.name order by bbs.rootid asc,bbs.addtime asc"
set rs=server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
if not (rs.bof and rs.eof) then
	rs.pagesize=psize
	rs.cachesize=psize
	totalpages=rs.pagecount
	if page>totalpages then page=totalpages
	rs.absolutepage=page
	totalcount=int(rs.recordcount)
	i=0
	rscount=totalcount-(page-1)*psize
	if psize>rscount then psize=rscount
	do while i<psize
		i=i+1
		if (i mod 2)=0 then
			color="#FBF8F2"
		else
			color="#FFFFFF"
		end if
		rid=rs("ID")
		name=rs("name")
		topic=rs("topic")
		signature=rs("signature")
		level=rs("level1")
		right1=rs("power")
		signature=rs("signature")
		viewsign=rs("viewsign")
		uploadfile=trim1(rs("uploadfile"))
		filepath=trim1(rs("filepath"))
		if rs("sex")=0 then
			sexstr="Male"
		else
			sexstr="FeMale"
		end if
%>
                    <tr> 
                      <td height="8" colspan="2" class="mainbg"></td>
                    </tr>
                    <tr> 
                      <td valign="top" nowrap bgcolor="<%=color%>"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr valign="middle"> 
                            <td width="61%" height="30" nowrap style="filter:glow(color=#9898BA,strength=2);font-size:14px;">&nbsp;<a href='profile.asp?name=<%=name%>' target="_blank" title="查看个人简介"><%=name%></a> 
                            </td>
                            <td width="39%" align="center" nowrap><img src="images/<%=sexstr%>.gif"></td>
                          </tr>
                        </table>
                        <table width="120" border="0" cellspacing="0" cellpadding="2" style="table-layout: fixed;WORD-WRAP: break-word;">
                          <tr> 
                            <td> 
                              <%
							  if trim1(rs("touxiang"))<>"" then response.write("<img id=usertx src="""&trim1(rs("touxiang"))&""" border=0 alt=""用户自定义头像"" onload=""pic_width(this,110)""><br><br>") 
                              response.write("<img src=""images/level"&userlevelimg(rs("credit"),right1)&".gif"">") 
							  if trim1(rs("nickname"))<>"" then response.Write("<br>昵称:<strong>"&trim1(rs("nickname"))&"</strong>")
                              if trim1(rs("shuxing"))=1 then response.Write("<br>属性:<font color=#FF0000><strong>VIP会员</strong></font>")
							  response.Write("<br>级别:"&usergrade(rs("credit"),right1)&"")
                              if trim1(rs("menpai"))<>"" then response.write("<br>门派:"&trim1(rs("menpai"))&"")
                              response.Write("<br>积分:<font color=#FF0000><strong>+"&rs("credit")&"</strong></font>")
                              'response.write("<br>威望:<strong><font color=#0000FF>+"&rs("weiwang")&"</font></strong>")
                             ' response.write("<br>魅力:"&rs("meili")&"")
                              response.write("<br>经验:"&rs("jingyan")&"")
                             ' response.write("<br>现金:"&rs("money")&"")
                              response.write("<br>文章:"&rs("post")&"")
                              response.write("<br><br>登陆:<strong>"&rs("logintimes")&"</strong> 次")
                              response.write("<br>注册:"&datevalue(rs("regtime"))&"")
							  %>
                            </td>
                          </tr>
                        </table></td>
                      <td valign="top" bgcolor="<%=color%>"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td width="77%" nowrap><a onclick="javascript:popWin('msgnew.asp?name=<%=name%>')" style="cursor:hand"><img title="给<%=name%>发短消息" src="images/message.gif" align="absmiddle"></a>&nbsp; 
                              <img src="images/friend.gif" align="absmiddle" title="把<%=name%>加入我的好友名单!"> 
                              &nbsp;<a href='profile.asp?name=<%=name%>' target="_blank" title="查看个人资料"><img title="查看<%=name%>的个人料" src="images/profile.gif" border="0" align="absmiddle"></a> 
                              &nbsp;<a href="search.asp?type=2&keyword=<%=name%>" target="_blank"><img src="images/find.gif" border="0" align="absmiddle" title="搜索<%=name%>的所有帖子"></a> 
                              <%if trim1(rs("Email"))<>"" then%>
                              &nbsp; <a href="mailto:<%=trim1(rs("Email"))%>"><img src="images/email.gif" border="0" align="absmiddle" title="给<%=name%>[<%=trim1(rs("Email"))%>]发邮件"></a> 
                              <%end if%>
                              <%if trim1(rs("qq"))<>"" then%>
                              &nbsp; <a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=trim1(rs("qq"))%>" target="_blank"><img src="images/oicq.gif" border="0" align="absmiddle" title="查看<%=name%>[<%=trim1(rs("qq"))%>]的QICQ资料"></a> 
                              <%end if%>
                              <%if trim1(rs("website"))<>"" then%>
                              &nbsp;<a href="<%=trim1(rs("website"))%>" target="_blank"><img src="images/homepage.gif" border="0" align="absmiddle" title="打开<%=name%>的主页[<%=trim1(rs("website"))%>]"></a> 
                              <%end if%>
                              <%if rs("html")=0 then %>
                              &nbsp; <a href="reply.asp?id=<%=rid%>&rootid=<%=rootid%>&page=<%=page%>&quote=true"><img src="images/reply.gif" border="0" align="absmiddle" title="引用本帖进行回复"></a> 
                              <%end if%>
                              &nbsp; <a href="reply.asp?id=<%=rid%>&rootid=<%=rootid%>&page=<%=page%>"> 
                              <img src="images/reply_a.gif" border="0" align="absmiddle" title="回复此帖"></a> 
                            </td>
                            <td width="23%" align="right" nowrap><strong> 
                              <%if i=1 then%>
                              楼主 
                              <%else%>
                              第<font color="#FF0000"><%=i%></font>楼 
                              <%end if%>
                              </strong></td>
                          </tr>
                          <tr> 
                            <td colspan="2"><hr width="100%" size="1" color="#DCD7BA"></td>
                          </tr>
                        </table>
                        <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td><img src='images/f<%=trim1(rs("face"))%>.gif' align='absmiddle'> 
                              <b><a href="treelist.asp?id=<%=rid%>&listpage=<%=listpage%>"><%=topic%></a></b><b><br>

⌨️ 快捷键说明

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