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

📄 type.asp

📁 obbs完全基于Dreamweaver 和EmEditor 下面完成.采用最好的可视结构,非常用利于修改,结构很明确.代码效少.管理非常简单
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="mymem.asp" -->
<!--#include file="ubbcode.asp" -->
<%
'=========================================================
' File: index.asp
' Version:1.0.1
' Date: 2003-8-23
' Script Written by cheng
'=========================================================
' Copyright (C) 2002-2003 mtvok.com. All rights reserved.
' Web: http://www.mtvok.com,http://www.dvking.cn,http://www.dvonlin.cn
' Email: zcl22@21cn.com
'=========================================================
dim bbsskin '确定帖子显示方式,树行,平板
if request.QueryString("skin")<>"" then
 if request.QueryString("skin")=1 then
 response.Cookies("skinx")="tree"
 else
 response.Cookies("skinx")="nottree"
 end if
end if
if request.Cookies("skinx")="tree" then
bbsskin=1
else
bbsskin=0
end if
if request.Form("Submit")<>"" then
call adduserlttp()
end if
dim lb,id,rs,sqltext,name
id=request.QueryString("id")
conn.execute("update borecorder set click=click+1 where id="&id)
set rs=conn.execute("select * from borecorder where id="&id)
name=dvHTMLEncode(rs("name"))
lb=rs("lb")
id=rs("id")
%>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="770"> <table width="100%" border="0">
        <tr> 
          <td width="55%"><a href="AddIn.asp?lb=<%=lb%>&czlb=addtz"><img src="pic/postnew.gif" width="72" height="21" border="0"></a> 
            <a href="tpaddIn.asp?lb=<%=lb%>"><img src="PIC/votenew.gif" width="72" height="21" border="0"></a> 
            <a href="AddIn.asp?id=<%=id%>&lb=<%=lb%>&czlb=retz"><img src="PIC/replybbs.gif" width="72" height="21" border="0"></a></td>
          <td width="24%">您是本帖的第 <b><%=rs("click")%></b> 个阅读者</td>
          <td><%call chanagego(id,lb)%></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td> <%call tabletop(true,"top")%> <TABLE width=100% border=0 align="center" 
cellPadding=0 cellSpacing=0 borderColor=#92b9fb style="BORDER-COLLAPSE: collapse">
        <TBODY>
          <TR> 
            <TD width="91%" height=28 background="backimg/bg1.gif">&nbsp;<b><font color="#FFFFFF">* 
              <%=name%></font></b></TD>
            <TD width="9%" background="backimg/bg1.gif"><a href="foruser.asp?czlb=addf&id=<%=id%>"><img src="PIC/fav_add.gif" alt="加入我的收藏" width="16" height="16" border="0"></a> 
              &nbsp; <a href=# onClick="window.external.AddFavorite('http://<%=Request.ServerVariables("HTTP_HOST")&request.ServerVariables("SCRIPT_NAME")&"?id="&id%>', '<%=name%>')"><IMG SRC="pic/fav_add1.gif" BORDER=0 width=15 height=15 alt=把本贴加入IE收藏夹></a> 
            </TD>
          </TR>
        </TBODY>
      </TABLE>
      <%
	  if rs("istp")<>0 then 
	  call typeusertp(rs("istp"))
	  end if
	  %> 
      <table width="100%" border="0"  align="center" cellpadding="0" cellspacing="1" bgcolor="#92b9fb"  class=tableborder1 style="table-layout; word-break:break-all"#92b9fb>
        <tr> 
          <td width="149" align="center" valign="top" bgcolor="#FFFFFF"><br>
            <%call userms(rs("user"),"mess")%> </td>
          <td width="616" valign="top" bgcolor="#FFFFFF"> <table width="100%" cellpadding="0" cellspacing="0">
              <tr bgcolor="#FFFFFF"> 
                <td width="91%" height="28" bgcolor="#E6E6E6"> <a href="#"> <img src="PIC/message.gif" width="60" height="18" border="0" onClick="MM_openBrWindow('sendmess.asp?user=<%=rs("user")%>','a','resizable=yes,width=500,height=450')"></a> 
                  <a href="usermanager.asp?p=addfriend&fd=<%=rs("user")%>"><img src="PIC/friend.gif" width="48" height="18" border="0"></a> 
                  <a href="usertype.asp?user=<%=rs("user")%>"><img src="PIC/profile.gif" width="45" height="18" border="0"></a> 
                  <a href="mailto:<%call userms(rs("user"),"email")%>"><img src="PIC/email.gif" width="45" height="18" border="0"></a> 
                  <a href="AddIn.asp?id=<%=id%>&lb=<%=lb%>&czlb=vote"><img src="PIC/reply.gif" width="45" height="18" border="0"></a> 
                  <img src="PIC/find.gif" width="45" height="18"> <a href="AddIn.asp?id=<%=id%>&lb=<%=lb%>&czlb=retz"><img src="PIC/reply_a.gif" width="45" height="18" border="0"></a></td>
                <td width="9%" align="center" bgcolor="#E6E6E6"><strong>顶楼</strong></td>
              </tr>
              <tr> 
                <td colspan="2" bgcolor="#FFFFFF"><br> <TABLE cellSpacing=0 cellPadding=0 border=0>
                    <TBODY>
                      <TR> 
                        <TD width=14><IMG height=8 src="PIC/top_l.gif" 
            width=14></TD>
                        <TD background=PIC/top_c.gif></TD>
                        <TD width=16><IMG height=8 src="PIC/top_r.gif" 
            width=16></TD>
                      </TR>
                      <TR> 
                        <TD vAlign=top width=14 background=PIC/center_l.gif></TD>
                        <TD style="FONT-SIZE: 9pt; LINE-HEIGHT: 12pt" bgColor=#f1f2f4> 
                          <%
response.Write("<b><img src="&rs("heat")&" alt=发贴心情> "&name&"</b>")
if rs("lock")="locked" then
response.write("  <img src=""pic/locked.gif"" alt=""此帖子已被锁定!不接受回复和引用!""> (<font color=#FF0000>此帖不接受回复</font>)")
end if
response.Write("<br>")
if rs("kill")=1 then
response.write"<br>&nbsp;[ <font color=#FF0000>此帖被管理员封闭!</font> ]"
else
response.write ubbcode(rs("ly"))
end if
%> </TD>
                        <TD vAlign=top width=16 background=PIC/center_r.gif>&nbsp;</TD>
                      </TR>
                      <TR> 
                        <TD vAlign=top width=14><IMG height=42 
              src="PIC/foot_l1.gif" width=14></TD>
                        <TD background=PIC/foot_c.gif><IMG height=42 
              src="PIC/foot_l3.gif" width=36></TD>
                        <TD align=right width=16><IMG height=42 
              src="PIC/foot_r.gif" width=16></TD>
                      </TR>
                    </TBODY>
                  </TABLE>
                  <br> <table width="98%" border="0">
                    <tr> 
                      <td width="14%" align="right" valign="top">&nbsp;</td>
                      <td width="86%"> <%call userms(rs("user"),"uqm")%> </td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td height="24" align="center" valign="middle" bgcolor="#FFFFFF">
		  <% if master then 
		  response.Write("<a href=look-ip.asp?id="&id&"&czlb=lookip><img src=PIC/ip.gif width=13 height=15 border=0 alt='查看用户IP来源及管理<br>IP: "&rs("ip")&"'></a>")
		  else
		  response.Write("<a href=look-ip.asp?id="&id&"&czlb=lookip><img src=PIC/ip.gif width=13 height=15 border=0 alt='查看用户IP来源及管理<br>IP: *.*.*.*'></a>")
		  end if
		  response.Write("&nbsp;"&rs("time"))
		  %></td>
          <td bgcolor="#FFFFFF">
<table width="100%" border="0" cellpadding="0">
              <tr>
                <td width="68%" height="17">&nbsp;</td>
                <td width="32%" align="right">
				<%
				if userislogin  and (loginuser=rs("user")) then
				response.Write("<a href=""AddIn.asp?id="&id&"&lb="&lb&"&czlb=edittz""><img src=PIC/edit.gif width=45 height=18 border=0></a>")
				end if
                 if master then %>
                  <a href="caozuo.asp?lb=<%=lb%>&id=<%=id%>&czlb=锁定"><img src="PIC/lockedadmin.gif" alt="锁定或解除" width="18" height="18" border="0"></a> 
                  <a href="caozuo.asp?lb=<%=lb%>&id=<%=id%>&czlb=置顶"><img src="PIC/topadmin.gif" alt="置顶或去顶" width="18" height="18" border="0"></a> 
                  <a href="caozuo.asp?id=<%=id%>&lb=<%=lb%>&czlb=删除"><img src="PIC/delete.gif" alt="删除帖子" width="18" height="18" border="0"></a> 
                  <a href="caozuo.asp?id=<%=id%>&lb=<%=lb%>&czlb=精华"><img src="PIC/jing.gif" alt="精华帖子" width="18" height="18" border="0"></a> 
                  <a href="caozuo.asp?id=<%=id%>&lb=<%=lb%>&czlb=移帖"><img src="PIC/copy.gif" alt="移动帖子" width="18" height="18" border="0"></a> 
                  <a href="caozuo.asp?id=<%=id%>&lb=<%=lb%>&czlb=封帖"><img src="PIC/fong.gif" alt="封闭或解除封闭" width="18" height="18" border="0"></a> 
                  <%end if%>
				  </td>
              	  </tr>
            </table> </td>
        </tr>
<%
sub listtreerely()
dim rs,i,bgcolor
i=0
set rs=conn.execute("select * from rely where rid='"&id&"' order by id")
if rs.eof then
exit sub
end if
response.Write("<tr><td colspan=2 height=28 background=backimg/bg1.gif>&nbsp;&nbsp;<font color=#FFFFFF><b>*&nbsp;树型目录结构</b></font></td></tr>")
do while ((not rs.eof) and (not rs.bof))
if (i mod 2)=0 then
bgcolor="#FFFFFF"
else
bgcolor="#EEEEEE"
end if
if rs("kill")=1 then
response.write"<tr><td colspan=2 bgcolor="&bgcolor&" height=24>&nbsp;&nbsp;回复:&nbsp;<img src="&rs("heat")&">&nbsp;[ <font color=#FF0000>此帖被管理员封闭!</font> ]  <i>--<a href=usertype.asp?user="&rs("user")&">"&rs("user")&"</a>,"&rs("time")&"</i></td></tr>"
else
response.write"<tr><td colspan=2 bgcolor="&bgcolor&" height=24>&nbsp;&nbsp;回复:&nbsp;<img src="&rs("heat")&">&nbsp;<a href=type.asp?id="&id&"&rlyid="&rs("id")&">"&ChkBadWords(left(rs("ly"),40))&"</a> <i>("&Len(rs("ly"))&"字)-- <a href=usertype.asp?user="&rs("user")&">"&rs("user")&"</a>,"&rs("time")&"</i></td></tr>"
end if
i=i+1
rs.movenext
loop
end sub
%>		
<%
if rs("rely")>0 then 
call listrely(id)
end if
sub listrely(cid)
dim rs,sql,ps,rlyid
ps=1
rlyid=request.QueryString("rlyid")
set rs=server.createobject("adodb.recordset")
if rlyid<>"" then
sqltext="select * from rely where id="&rlyid&" order by id"
else
if bbsskin=1 then
exit sub
else
sqltext="select * from rely where rid='"&cid&"' order by id"
end if
end if
rs.open sqltext,conn,1,1

dim MaxPerPage,text,checkpage,URLparameter,page,CurrentPage,i
MaxPerPage=10
URLparameter="&id="&id
if request("page")<>0 then
page=request("page")
else 
page=1
end if
text="0123456789"
 Rs.PageSize=MaxPerPage
for i=1 to len(page)
   checkpage=instr(1,text,mid(page,i,1))
   if checkpage=0 then
      exit for 
   end if
next

If checkpage<>0 then
      If NOT IsEmpty(page) Then
        CurrentPage=Cint(page)
        If CurrentPage < 1 Then CurrentPage = 1
        If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
      Else
        CurrentPage= 1
      End If
      If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
   CurrentPage=1
End if
do while not rs.eof 
%>
        <tr> 
          <td align="center" valign="top" bgcolor="#FFFFFF"><br>
            <%call userms(rs("user"),"mess")%> </td>
          <td valign="top" bgcolor="#FFFFFF"> <table width="100%" cellpadding="0" cellspacing="0">
              <tr bgcolor="#FFFFFF"> 
                <td width="89%" height="31" valign="middle" bgcolor="#E6E6E6"> <a href="#"> 
                  <img src="PIC/message.gif" width="60" height="18" border="0" onClick="MM_openBrWindow('sendmess.asp?user=<%=rs("user")%>','a','resizable=yes,width=500,height=450')"></a> 
                  <a href="usermanager.asp?p=addfriend&fd=<%=rs("user")%>"><img src="PIC/friend.gif" width="48" height="18" border="0"></a> 
                  <a href="usertype.asp?user=<%=rs("user")%>"><img src="PIC/profile.gif" width="45" height="18" border="0"></a> 
                  <a href="mailto:<%call userms(rs("user"),"email")%>"><img src="PIC/email.gif" width="45" height="18" border="0"></a> 
                  <a href="AddIn.asp?id=<%=id%>&rid=<%=rs("id")%>&lb=<%=lb%>&czlb=revote"><img src="PIC/reply.gif" width="45" height="18" border="0"></a> 
                  <img src="PIC/find.gif" width="45" height="18"> <a href="AddIn.asp?id=<%=id%>&lb=<%=lb%>&czlb=retz"><img src="PIC/reply_a.gif" width="45" height="18" border="0"></a></td>
                <td width="11%" align="center" valign="middle" bgcolor="#E6E6E6">
<%response.Write("<b> "&page&"</b> 栋<b> "&(MaxPerPage-ps+1)&"</b> 楼")%>
                </td>
              </tr>
              <tr> 
                <td colspan="2" bgcolor="#FFFFFF"><br> <TABLE cellSpacing=0 cellPadding=0 border=0>
                    <TBODY>
                      <TR> 
                        <TD><IMG height=8 src="PIC/top_l.gif" 
            width=14></TD>
                        <TD background=PIC/top_c.gif></TD>
                        <TD><IMG height=8 src="PIC/top_r.gif" 
            width=16></TD>
                      </TR>
                      <TR> 
                        <TD vAlign=top background=PIC/center_l.gif></TD>
                        <TD style="FONT-SIZE: 9pt; LINE-HEIGHT: 12pt" bgColor=#f1f2f4> 
                          <%
response.Write("<img src="&rs("heat")&" alt=发贴心情>")
if rs("kill")=1 then
response.write"<br>&nbsp;[ <font color=#FF0000>此回复帖已被管理员封闭!</font> ]"
else
response.write ubbcode(rs("ly"))
end if
%> </TD>
                        <TD vAlign=top background=PIC/center_r.gif>&nbsp;</TD>
                      </TR>
                      <TR> 
                        <TD vAlign=top><IMG height=42 
              src="PIC/foot_l1.gif" width=14></TD>
                        <TD background=PIC/foot_c.gif><IMG height=42 
              src="PIC/foot_l3.gif" width=36></TD>
                        <TD align=right><IMG height=42 
              src="PIC/foot_r.gif" width=16></TD>
                      </TR>
                    </TBODY>
                  </TABLE>
                  <table width="98%" border="0">
                    <tr> 
                      <td width="14%" align="right" valign="top">&nbsp;</td>
                      <td width="86%"> <%call userms(rs("user"),"uqm")%> </td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td height="24" align="center" valign="middle" bgcolor="#FFFFFF"> 
		  <% if master then 
		  response.Write("<a href=look-ip.asp?id="&id&"&rid="&rs("id")&"&czlb=lookip><img src=PIC/ip.gif width=13 height=15 border=0 alt='查看用户IP来源及管理<br>IP: "&rs("ip")&"'></a>")
		  else
		  response.Write("<a href=look-ip.asp?id="&id&"&rid="&rs("id")&"&czlb=lookip><img src=PIC/ip.gif width=13 height=15 border=0 alt='查看用户IP来源及管理<br>IP: *.*.*.*'></a>")
		  end if
		  response.Write("&nbsp;"&rs("time"))
		  %></td>
          <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0">
              <tr> 
                <td width="79%" height="17">&nbsp;</td>
			
                <td width="21%" align="right">
				
				 <% 
				if userislogin and (loginuser=rs("user")) then
				response.Write("<a href=""AddIn.asp?rid="&rs("id")&"&id="&id&"&lb="&lb&"&czlb=editretz""><img src=PIC/edit.gif width=45 height=18 border=0></a>")
				end if
				 if master then 
				 %>
                  <a href="caozuo.asp?id=<%=id%>&lb=<%=lb%>&rid=<%=rs("id")%>&czlb=删回"> 
                  <img src="PIC/delete.gif" width="18" height="18" border="0"></a> 
                  <a href="caozuo.asp?id=<%=id%>&lb=<%=lb%>&rid=<%=rs("id")%>&czlb=封回"> 
                  <img src="PIC/fong.gif" alt="封闭或解除封闭" width="18" height="18" border="0"></a> 
                  <%end if%></td>
              </tr>
            </table> </td>
        </tr>
        <%
rs.movenext
if ps=>MaxPerPage then exit do
ps=ps+1
loop
'标准分页子程序URLparameter为URL所带数

⌨️ 快捷键说明

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