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

📄 index.asp

📁 一个简易论坛自己手动写成的代码一个简易论坛自己手动写成的代码一个简易论坛自己手动写成的代码
💻 ASP
📖 第 1 页 / 共 5 页
字号:
Select Case jd_sty
	Case ""
	Case 0
'''''''''''''''''''''''''''''''
	dim cx,dx
if pagestyle<>0 or jd_sty=0 then
	cx="topics"
	dx="member"
	sql="select "&cx&".id,"&cx&".jd_userid,"&cx&".jd_name,"&cx&".jd_reid,"&cx&".jd_sex,"&cx&".jd_head,"&cx&".jd_web,"
	sql=sql&""&cx&".jd_email,"&cx&".jd_title,"&cx&".jd_words,"&cx&".jd_date,"&cx&".jd_editdate,"&cx&".jd_reply,"
	sql=sql&""&cx&".jd_ip,"&cx&".jd_come,"&cx&".jd_view,"&cx&".jd_qq,"&cx&".jd_cls,"&cx&".jd_rep, " '$$主题/会员
	sql=sql&""&dx&".jd_user,"&dx&".jd_cls,"&dx&".jd_sex,"&dx&".jd_web,"&dx&".jd_email,"&dx&".jd_date,"&dx&".jd_ip,"
	sql=sql&""&dx&".jd_come,"&dx&".jd_qq,"&dx&".jd_head,"&dx&".jd_qm,"&dx&".jd_topic,"&dx&".jd_view,"&cx&".jd_top "
	sql=sql&","&dx&".jd_jf "
	sql=sql&" From "&cx&" left join "&dx&" on "&cx&".jd_userid="&dx&".id  where  "&cx&".jd_forumid="&forumid 
	sql=sql&" and "&cx&".id in ("& SqlId &") "&jd100_order
	''''''''''''''''''''''''''''''''''''''''
	Set Rs=Conn.Execute(sql,0,1)
	sql=""
end if

dim lou,words,reply,email,qq,web,come
dim viewadmin,view,jd_cls,user_xx,view_rep
dim msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7

if page<2 then
lou=jd100_page_count
else
lou=jd100_page_count-((page-1)*jd100_page_n)
end if 


ki=0
do while not rs.eof and ki<jd100_page_n
ki=ki+1

msg0=""
msg1=""
msg2=""
msg3=""
msg4=""
msg5=""
msg6=""
msg7=""
titlead=""
reply=""
words=""  
words=rs(9)
words= Ubb(words)
titlead="主题:&nbsp;<b>"&unHtml(rs(8))&"</b>"
if rs("jd_editdate")<>"" then words=words & "<br><br><div align='right'><font color='#009900'>[留言于:"&rs("jd_editdate")&"被编辑过]</font></div >"
  reply=rs("jd_reply")
  if reply<>"" then
  reply="<hr size='1'> <span class='style1'>版主回复:</span><br><font color='#990000'> "&Ubb(reply)&" </font>" 
  end if
  words=words & reply
  view=rs(15)
if webyn=1 and Sessionwebname <> "Login"  and view<>1 and jd_membercls<5 and jd_username<>rs(2) then
  words=splyb("留言需要审批才能查看")
	titlead=""
  reply=""
  view_rep=1
end if  
if webyn=1 and view=0  and (Sessionwebname = "Login" or jd_membercls=9 or jd_username=rs(2)) then
  words= "<div align='right'><font color='#009900'><strong>[未审批]</strong></font></div ><br>" & words 
end if
if view=2 and Sessionwebname <> "Login" and jd_membercls<5 and jd_username<>rs(2) then
  words=splyb("这是给版主的留言")
  titlead=""
  reply=""
  view_rep=1
end if  
if view=2 and (Sessionwebname = "Login" or jd_membercls=9 or jd_username=rs(2)) then
  words= "<div align='right'><font color='#009900'><strong>[秘密]</strong></font></div ><br>" & words 
end if  

if Sessionwebname ="Login" or jd_membercls=9 or jd_membercls=5 then
viewadmin="<a href=http://www.11987.com/ip/showip.asp?ip="&rs(13)& " target='_blank'><img src="&indeximg&"ip.gif border=0 alt=查询IP来源地></a> " &rs(13)	
end if

user_xx="发表于:"&rs(10)
dim msgtemp
msgtemp="-"&rs(19)

 if  int(rs(1))=0 or msgtemp="-" then
		 msg0=rs(2)
         if jd_membercls=9 or Sessionwebname = "Login" then
		 msg1=msg1 &"<a href='"&rs(6)&"' target='_blank'><img src="&indeximg&"homepage.gif alt='浏览我的主页:"&rs(6)&"'  border='0'></a>" 
         msg1=msg1 &"<a href='mailto:"&rs(7)&"'><img src="&indeximg&"email.gif alt='发EMAIL给我:"&rs(7)&"'  border='0'></a>"
         msg1=msg1 &"<img src='"&indeximg&"oicq.gif' alt='QQ号:"&rs(16)&"'  border='0'>"
         msg1=msg1 &"<img src='"&indeximg&"come.gif' alt='我来自:"&rs(14)&"' border='0'>"
         end if
msg1=msg1 & "<a href=?action=View_topics&quote=topics&id="&rs(0)&"&forumid="&forumid&"#quote><img src="&indeximg&"quote.gif alt='引用'  border='0'></a>"

		 msg1=msg1 & "<a href=?action=edit_my&myaction=topics&cid="&rs(0)&"&id="&rs(0)&"&forumid="&forumid&"#quote><img src="&indeximg&"reply.gif alt='编辑'  border='0'></a>"' & "|||"
		 msg2=rs(4) '性别
		 msg3=rs(5) '头像
		 msg4=rs(13) 'IP
		 msg5="" '发贴数
		 msg6="" '签名
	
else
          msg0=rs(19)
         msg1=msg1 &"<a href='"&rs(22)&"' target='_blank'><img src="&indeximg&"homepage.gif alt='浏览我的主页:"&unHtml(rs(22))&"'  border='0'></a>" 
         if rs(31)=1 or jd_membercls=9 or Sessionwebname = "Login" then
		 msg1=msg1 &"<a href='mailto:"&rs(23)&"'><img src="&indeximg&"email.gif alt='发EMAIL给我:"&rs(23)&"'  border='0'></a>"
         msg1=msg1 &"<img src='"&indeximg&"oicq.gif' alt='QQ号:"&rs(27)&"'  border='0'>"
         msg1=msg1 &"<img src='"&indeximg&"come.gif' alt='我来自:"&rs(26)&"' border='0'>" 
         end if
        msg1=msg1 & "<a href=?action=View_topics&quote=topics&id="&rs(0)&"&forumid="&forumid&"#quote><img src="&indeximg&"quote.gif alt='引用'  border='0'></a>"

        msg1=msg1 & "<a href=?action=edit_my&myaction=topics&cid="&rs(0)&"&id="&rs(0)&"&forumid="&forumid&"#quote><img src="&indeximg&"reply.gif alt='编辑'  border='0'></a>" '& "|||"
		msg2=rs(21)
		msg3=rs(28)
		msg4=rs(25)
		msg5=rs(30)
		msg6=rs(29)
		msg7=rs(33)

	   '会员等级显示
	   jd_cls=jd_usercls(rs(20),msg5)

       ' 增加签名
          if (rs(29)<>"" or rs(29)<>null) and view_rep=0 then
		  words=words & "<br><br><table width='100%' border='0' cellpadding='3' class=unnamed2 style='table-layout:fixed;word-break:break-all;word-wrap:break-word;'><tr><td width='' style='word-break:break-all'><img src='' width='5%' height='1' style='background-color: #999999'>&nbsp<font color='#999999'><span class='unnamed1'>"&webname&" 版权所有</span></font>&nbsp<img src='' width='40%' height='1' style='background-color: #999999'></td></tr><tr><td width='' style='word-break:break-all'><span class='unnamed1'><font color='#666666'>"
		      if jd_qmpic=1 then 
				 dim swfsss
				swfsss=Replace(rs(29),"swf]","{$swf}")
				swfsss=Replace(swfsss,"flash]","{$swf}")
				swfsss=ubb(unHtml(swfsss))
				swfsss=Replace(swfsss,"{$swf}","swf]")
		        words=words & swfsss
		      else
                  words=words & unHtml(rs(29))
		      end if
		          words=words & "</font></span></td></tr></table>"
         end if

            if rs(20)=-2 then words= splyb("该会员贴子已经被禁止")
            if rs(20)=-3 then msg0="会员已删除":msg1="":msg5="":msg6=""':msg2="":msg3="":msg4=""

end if

edit_list=admin_ls(rs(0),rs(32),rs(17))
.write(img_top)
.Write("<TABLE width='"&jd_table_w&"' height=51 border=1 align=center cellPadding=0 cellSpacing=0 class='jd_tab' style='border-collapse:collapse' ><TBODY> <TR > <TD colSpan=2 height=25 class='jd_tab' ><table width='100%'  border='0' class='unnamed1'><tr> <td width='28%' height='21' class='unnamed1'>&nbsp;<b>")
.Write(unHtml(msg0))
.Write("</b></td><td width='60%'> <div align='right'>"&user_xx&"&nbsp;"&msg1)   
                If Sessionwebname = "Login" Then
.Write("<a href='?action=Delete&id="&rs(0)&"&forumid="&forumid&"' onClick=""return confirm('确定要删除吗?\n\n该操作不可恢复!')""><img src='"&indeximg&"del.gif' alt='删除留言' width='15' height='15' border='0'></a></font>")
                
                end if 
.write "&nbsp;<a href='#'><img src="&indeximg&"backtop.gif alt='反回顶部' width=15 height=15 border='0'></a>"
.Write("</div></td> <td width='12%'><div align='right'>第 <font color='#ff0000'>"&lou &"</font> 楼</div></td> </tr></table></TD></TR><TR>  <TD width='120' height='21' align=middle valign='top' class='jd_tab' ><table width='100%' border='0' align='center'  class='unnamed1'><tr> <td width='94' > <div align='center'>")
                 
				  if indeximg<>"" then call headpic(msg2,msg3)
                  if rs(1)<>0 then
                  .write "<font color=#666666>"&jd_cls
				  .write "&nbsp 发贴:" & msg5 &"<br>"
				  .write "&nbsp 精点币:" & msg7 &"</font><br>"
				  end if
                  .write viewadmin
				  
.Write("</div></td></tr></table></TD><TD width='' height='21' valign='top' class=unnamed2  style='word-break:break-all'> <table width='100%' height='20' border='0' cellpadding='0' cellspacing='0'  style='table-layout:fixed;word-break:break-all;word-wrap:break-word;'><tr> <td width='' style='word-break:break-all' class=jd_title>")
.Write(topic_best(rs(32),rs(17)))

.Write("&nbsp;<a href='?action=View_topics&id="&rs(0)&"&forumid="&forumid&"'>"&titlead&"</a> &nbsp;<font color='#999999'>(有"&rs(18)&"个回复)</font>&nbsp;"&edit_list&"</td></tr></table><table width='100%' border='0' cellpadding='3' class=unnamed2 style='table-layout:fixed;word-break:break-all;word-wrap:break-word;'><tr> <td width='' style='word-break:break-all'> "&words&" </td></tr></table></TD></TR></TBODY></TABLE>")

.write(img_foot)
		lou=lou-1	 
		rs.movenext
    	loop
call RsClose()
Case 1
.write(img_top)

if pagestyle=0 then
		 set Rs=server.createobject("adodb.recordset")
		 Rs.Open "select id,jd_userid,jd_reid,jd_title,jd_name,jd_date,jd_rdate,jd_hit,jd_rep,jd_top,jd_cls,jd_view  From "&jd100_biao&" where jd_forumid="&forumid&" "&jd100_order,Conn,1,1,&H0001
         Rs.AbsolutePosition=Rs.AbsolutePosition+((Abs(Page)-1)*jd100_page_n)
else
		Set Rs=Conn.Execute("select id,jd_userid,jd_reid,jd_title,jd_name,jd_date,jd_rdate,jd_hit,jd_rep,jd_top,jd_cls,jd_view  From "&jd100_biao&" where jd_forumid="&forumid&" and id in("& SqlId &") "&jd100_order,0,1)
end if

.Write("<TABLE width='"&jd_table_w&"' height=51 border=1 align=center cellPadding=3 cellSpacing=0 class='jd_tab' style='border-collapse:collapse;word-wrap:break-word;'> <TBODY> <TR class=jd_title> <TD width='6%' class='jd_tab' > <div align='center'>人气</div></TD><TD width='6%' class='jd_tab' > <div align='center'>回复</div></TD><TD width='53%' class='jd_tab' >  <div align='center'>标题</div></TD><TD width='20%' class='jd_tab' > <div align='center'>作者|回复</div></TD> <TD width='14%' class='jd_tab' ><div align='center'>时间</div></TD>")
		if Sessionwebname ="Login" then
.Write("<TD class='jd_tab' ><div align='center'>管</div></TD>")
		end if
.Write("</TR>")

ki=0
titlepic=""
dim titletime,retime
	do while not rs.eof and ki<jd100_page_n
ki=ki+1
edit_list=admin_ls(rs(0),rs(9),rs(10))
if Sessionwebname ="Login" or jd_membercls=9 then viewadmin="<input name='id' type=checkbox id=delall value="&rs("id")&"> "

titlepic=topic_best(rs("jd_top"),rs("jd_cls"))
titletime=""
titletime=rs("jd_date")

if titletime<>"" and DATEDIFF("d",titletime,date()) <=1  then
	titletime=" <img src="&indeximg&"new.gif border=0 alt='最新贴子'>"
else
  if rs("jd_hit")>200 or rs("jd_rep")>20 then
	titletime=" <img src="&indeximg&"hot.gif border=0 alt='热门贴子'>"
  else
	titletime=""
  end if
end if
titlead=""

titlead="<a href='?action=View_topics&id="&rs("id")&"&forumid="&forumid&" ' title='主题:"&unHtml(rs("jd_title"))&"&#13作者:"&unHtml(rs("jd_name"))&"&#13回复:"&replace(unHtml(rs("jd_reid")),"0","")&"&#13发表时间:"&rs("jd_date")&"&#13回复时间:"&rs("jd_rdate")&"'> "&titlepic&"&nbsp;"&unHtml(rs("jd_title"))&"</a>"

if webyn=1 and Sessionwebname <> "Login" and rs("jd_view")<>1 and (jd_membercls<5 or jd_membercls="")  and jd_username<>rs(4) then
	titlead="<a href='?action=View_topics&id="&rs("id")&"&forumid="&forumid&" '><font coloe=#cccccc>这是版主的留言</font></a>"
end if 

.Write("<TR class=unnamed1> <TD width='6%' height='25' align=middle valign='top' class='jd_tab' >"&rs("jd_hit")&"</TD><TD width='6%' height='25' align=middle valign='top' class='jd_tab' >"&rs("jd_rep")&"</TD><TD width='53%' height='25' align=left valign='top' class='jd_tab' >"&titlead&titletime)

		 if rs("jd_rep")>jd_repn then call list_page(rs("jd_rep"),jd_repn,rs("id"))
.Write("&nbsp;"&edit_list&" </TD><TD width='20%' height='25' align=middle valign='top' class='jd_tab' ><font color=#666666> ")

⌨️ 快捷键说明

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