<!--#include file="setting/conn.asp"--><!--#include file="inc/cls_article.asp"-->
<%:SoonBiz.chkcls("list"):Dim keyword,states:act=SoonBiz.rid("act"):pagemain:SoonBiz.endhtml:Setallnothing:Sub pagemain():Dim shujun:Dim nowstate:Dim action:Dim astr(2):Dim jintong(1,1):astr(1)="?u="&cid:shujun=SoonBiz.Tp(cid,pn,"list")
If instr(shujun,"{$readhref}")>0 Then shujun=replace(shujun,"{$readhref}","messageread.asp?u={$cid}w{$classid}w{$id}t{$topicid}")
astr(0)="select * from ["& sheethead &"_message] where cid="&cid&" and isdel=0 and ispass=1 " 
If topicid>0 Then 
SoonBiz.title=SoonBiz.topicinfo(1):SoonBiz.metakeywords=SoonBiz.topicinfo(2):SoonBiz.metadescription=SoonBiz.topicinfo(3):astr(0)=astr(0) & " and topicid="&topicid:astr(1)=astr(1) & "p{$page}t"&topicid:astr(2)=astr(2) & "getobj(""messagesearch"").style.display=""none"";" :nowstate="专题:"&SoonBiz.topicinfo(1):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)="message.asp?u="&cid:jintong(0,1)=SoonBiz.topicinfo(1) : jintong(1,1)="messagelist.asp?u="& cid &"t"&topicid
ElseIf classid>0 Then
SoonBiz.title=xmlclass.getattribute("title"):SoonBiz.metakeywords=xmlclass.getattribute("tags"):SoonBiz.metadescription=xmlclass.getattribute("readme"):astr(0)=astr(0) & " and classid="&classid:astr(1)=astr(1) & "w"&classid&"p{$page}":nowstate="分类:"&xmlclass.getattribute("title"):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)="message.asp?u="&cid:jintong(0,1)=xmlclass.getattribute("title") : jintong(1,1)="messagelist.asp?u="& cid &"w"&classid
Else :ShowErr(1022)
End If:navstate=SoonBiz.GetNavstate(jintong):SoonBiz.topplus="<script type=""text/javascript"">var messagestates="""& messagestates &""";var newpost="& newpost &";var hothist="""& hothist &"""</script>"
If act>0 Then
astr(1)=astr(1) & "&amp;act="&act:Select Case act:Case 1 :astr(0)=astr(0) & " and uid="&SoonBiz.user_id:nowstate="我发表的主题":Case 3 :astr(0)=astr(0) & " and isgood=1":nowstate="精品主题":Case 4 :astr(0)=astr(0) & " and hits>"&hothist:nowstate="热点主题":Case 5 :astr(0)=astr(0) & " and point>0":nowstate="有积分鼓励的主题":Case 10 :states=SoonBiz.rid("states"):SoonBiz.title=classname:nowstate="全部"
If states>=0 Then'himselfofitthis"'inmaketheir+:butsomeanotherfor::theybeing
astr(0)=astr(0) & " and states="&states:nowstate=split(messagestates,",")(states)
End If:astr(1)=astr(1) & "&amp;states="&states:Case 20 
If Not SoonBiz.ins(xmlchannel.getattribute("cha_searchcls"),SoonBiz.user_gid) Then
ShowErr("对不起,您没有搜索这个栏目的权限")
End If:keyword=SoonBiz.RequestStr("关键词","keyword","",1,2,255,60,1):ShowErr("")
If len(keyword)>0 Then'?after.because":"out*:=\any&other=#hercan
astr(0)=astr(0) & " and (title like '%"& keyword &"%' or tags like '%"& keyword &"%' or readme like '%"& keyword &"%') ":nowstate=keyword
End If:astr(1)=astr(1) & "&amp;keyword="&keyword:astr(2)=astr(2) & "CheckInput(""keyword"","""& keyword &""");":Case 30 :uid=SoonBiz.rid("uid")
If uid>0 Then 
astr(1)=astr(1) & "&amp;uid="&uid&"&amp;nickname="&Trim(Request.QueryString("nickname")):astr(0)=astr(0) & " and uid="&uid:nowstate=Trim(Request.QueryString("nickname"))&" 发表的全部主题"
Else:ShowErr(1022)
End If:Case Else:ShowErr(1022):End Select')moreby]heshouldbeat^:been#:an:about:"much
End If:astr(0)=astr(0) & " order by istop desc,retime desc,id desc" :action="?act=20&amp;u="&cid&"w"&classid :htmlstr=SoonBiz.Tp(cid,pn,"index")
If classid>0 Then
htmlstr=Replace(htmlstr,"{$posthref}","messagecreat.asp?act=creat&amp;u="&cid&"w"&classid) 
Else:htmlstr=Replace(htmlstr,"{$posthref}","#") 
End If:htmlstr=Replace(htmlstr,"{$navstate}",navstate):htmlstr=Replace(htmlstr,"{$list}",SoonBiz.ReplaceMdb(cid,astr(0),shujun,xmlchannel.getattribute("page"),0)):htmlstr=Replace(htmlstr,"{$filter}",FilterHtml()):htmlstr=Replace(htmlstr,"{$topic}","<ul>"&SoonBiz.ReplaceMdb("messagelist","select * from ["& sheethead &"_topic] where cid="& cid &" order by cls asc,id asc","<li><a href=""?u="& cid &"t{$id}"">{$title}</a></li>","",1) & "</ul>"):htmlstr=Replace(htmlstr,"{$class}","<ul>"&SoonBiz.ReplaceClass("messagelist",cid,0,"<li class=""depth{$depth}""><a href=""?u="& cid &"w{$id}"" onclick=""messageclass({$depth},this);"">{$title}</a></li>","all")&"</ul>"):htmlstr=Replace(htmlstr,"{$action}",action) :htmlstr=Replace(htmlstr,"{$nowstate}",nowstate):htmlstr=Replace(htmlstr,"{$pagelist}",SoonBiz.pagelist(astr(1)))
If InStr(htmlstr,"{$classname}") > 0 Then'beenand+likehere:be:::"'do::":'such
If IsObject(xmlclass) Then
htmlstr=Replace(htmlstr,"{$classname}",xmlclass.getattribute("title"))
Else:htmlstr=Replace(htmlstr,"{$classname}",SoonBiz.topicinfo(1))
End If
End If:htmlstr=htmlstr & "<script type=""text/javascript"">"& astr(2) &"</script>":htmlstr=SoonBiz.HuiQiaoHtml(htmlstr):htmlstr=SoonBiz.replaceallflag(htmlstr):End Sub:Function FilterHtml():Dim fuyou,jintong:Dim i:Dim thisu:thisu=cid&"w"&classid&"t"&topicid:fuyou=fuyou & "<h1>过虑</h1> <ul> <li><a href=""?u="& thisu &"&amp;act=1"">显示我发表的主题</a></li> <li><a href=""?u="& thisu &"&amp;act=3"">显示精品主题</a></li> <li><a href=""?u="& thisu &"&amp;act=4"">显示热点主题</a></li> <li><a href=""?u="& thisu &"&amp;act=5"">有积分鼓励的主题</a></li> </ul> <h1>话题</h1>":jintong=Split(messagestates,","):For i=0 To UBound(jintong):jintong(i)="<li><a href=""?act=10&amp;u="& thisu &"&amp;states="& i &""">"& jintong(i) &"</a></li>":Next:FilterHtml=fuyou & "<ul>"& Join(jintong,"") &"</ul>":End Function
%>