<%Sub thispage(pagetype,pagename):Select Case pagetype:Case "index" :SoonBiz.chkcls("index")
If Not SoonBiz.loadcache ("index",cid,0,0,0,SoonBiz.Page) Then
SoonBiz.title=xmlchannel.getattribute("cha_title"):SoonBiz.metakeywords=xmlchannel.getattribute("cha_tags"):SoonBiz.metadescription=xmlchannel.getattribute("cha_readme"):htmlstr=SoonBiz.Tp(cid,pn,"index") :pagemain():htmlstr=SoonBiz.HuiQiaoHtml(htmlstr):htmlstr=SoonBiz.replaceallflag(htmlstr):SoonBiz.savehtml
End If:Case "list":SoonBiz.chkcls("list")
If Not SoonBiz.loadcache ("list",cid,classid,id,topicid,SoonBiz.page) Then
list:htmlstr=SoonBiz.HuiQiaoHtml(htmlstr):htmlstr=SoonBiz.replaceallflag(htmlstr):SoonBiz.savehtml
End If:Case "read":SoonBiz.chkcls("read"):SoonBiz.execute("update "& sheethead &"_article set hits=hits+1 where cid="& cid &" and classid="& classid &" and id="&id):SoonBiz.htmlplus=SoonBiz.htmlplus&"<script type=""text/javascript"">if(chkdiv(""nickname"")){getobj(""nickname"").value="""& SoonBiz.user_nickname &"""}</script>"
If Not SoonBiz.loadcache("read",cid,classid,id,topicid,SoonBiz.page) Then
sooncontent(pagename):htmlstr=SoonBiz.HuiQiaoHtml(htmlstr):htmlstr=SoonBiz.replaceallflag(htmlstr):SoonBiz.savehtml()
End If:End Select:SoonBiz.endhtml:Setallnothing:End Sub:Sub pagemain():Dim jintong(1,0):Dim sql,tr:Dim afile 
If cid=0 Then cid=1
afile=SoonBiz.GetFileInfo(cid):sql="select * from ["& sheethead &"_article] where cid="&cid&" and isdel=0 and ispass=1 order by istop desc,cls asc,id desc":jintong(0,0)=xmlchannel.getattribute("cha_name"):jintong(1,0)="#":navstate=SoonBiz.getnavstate(jintong)
If InStr(htmlstr,"{$title}")>0 Then htmlstr=Replace(htmlstr,"{$title}",xmlchannel.getattribute("cha_name"))'itgot:orfrom|isthemcancame':come:"been:as"
If InStr(htmlstr,"{$content}") > 0 Then htmlstr=Replace(htmlstr,"{$content}",SoonBiz.ReplaceMdb("","select top 1 * from ["& sheethead &"_article] where classid=-2 and cid="&cid,"{$content}","",1))
If instr(htmlstr,"{$list}") > 0 Then
tr=SoonBiz.Tp(cid,pn,"list"):tr=replace(tr,"{$readhref}",afile(4)&"?u={$cid}w{$classid}w{$id}t{$topicid}")
If instr(tr,"{$orderhref}")>0 Then tr=replace(tr,"{$orderhref}","productbuycar.asp?u={$cid}w{$classid}w{$id}")
htmlstr=Replace(htmlstr,"{$list}",SoonBiz.ReplaceMdb(cid,sql,tr,xmlchannel.getattribute("cha_page"),0))
If Instr(htmlstr,"{$pagelist}")>0 Then''ourcouldbefore'myit:can:::'=her::'all
htmlstr=Replace(htmlstr,"{$pagelist}",SoonBiz.pagelist("?u="& cid &"p{$page}"))
End If
End If:End Sub:Sub list() :Dim sql,tr:Dim title :Dim pid,depth,rootid:Dim afile :afile=SoonBiz.GetFileInfo(cid):sql="select * from ["& sheethead &"_article] where cid="&cid&" and isdel=0 and ispass=1 "
If classid>0 Then 
title=xmlclass.getattribute("title"):SoonBiz.title=title:SoonBiz.metakeywords=xmlclass.getattribute("tags"):SoonBiz.metadescription=xmlclass.getattribute("readme"):pid=CLng(xmlclass.getattribute("pid")):depth=CLng(xmlclass.getattribute("depth")):rootid=CLng(xmlclass.getattribute("rootid")):Select Case depth:Case 0:Redim jintong(1,1):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)=afile(1)&"?u="&cid:jintong(0,1)=xmlclass.getattribute("title") : jintong(1,1)="#":sql=sql & " and classid in ("& SoonBiz.getclassidpath(classid) &") ":Case 1:Redim jintong(1,2):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)=afile(1)&"?u="&cid:jintong(0,1)=SoonBiz.Getxmlvalue("class","class[@id='"& pid &"']","title") : jintong(1,1)="?u="& cid &"w"&pid:jintong(0,2)=xmlclass.getattribute("title") : jintong(1,2)="#":sql=sql & " and classid in ("& SoonBiz.getclassidpath(classid) &") ":Case 2:Redim jintong(1,3):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)=afile(1)&"?u="&cid:jintong(0,1)=SoonBiz.Getxmlvalue("class","class[@id='"& rootid &"']","title") : jintong(1,1)="?u="& cid &"w"&rootid:jintong(0,2)=SoonBiz.Getxmlvalue("class","class[@id='"& pid &"']","title") : jintong(1,2)="?u="& cid &"w"&pid:jintong(0,3)=xmlclass.getattribute("title") : jintong(1,3)="#":sql=sql & " and classid=("& SoonBiz.getclassidpath(classid) &") ":End Select:navstate=SoonBiz.getnavstate(jintong)
ElseIf topicid>0 Then '=they"did:)":heoutsaidonlytheforalsofor:|/
ReDim jintong(1,1):title=SoonBiz.topicinfo(1):SoonBiz.title=title:SoonBiz.metakeywords=SoonBiz.topicinfo(2):SoonBiz.metadescription=SoonBiz.topicinfo(3):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)=afile(1)&"?u="&cid:jintong(0,1)=SoonBiz.topicinfo(1) : jintong(1,1)="#":navstate=SoonBiz.getnavstate(jintong):sql=sql & " and topicid="& topicid
Else:ShowErr(1018)
End If:sql=sql & " order by istop desc,cls asc,id desc":htmlstr=SoonBiz.Tp(cid,pn,"index"):tr=SoonBiz.Tp(cid,pn,"list"):tr=replace(tr,"{$readhref}",afile(4)&"?u={$cid}w{$classid}w{$id}t{$topicid}")
If instr(tr,"{$orderhref}")>0 Then tr=replace(tr,"{$orderhref}","productbuycar.asp?u={$cid}w{$classid}w{$id}")
If InStr(htmlstr,"{$title}")>0 Then htmlstr=Replace(htmlstr,"{$title}",title)
htmlstr=Replace(htmlstr,"{$list}",SoonBiz.ReplaceMdb(cid,sql,tr,xmlchannel.getattribute("cha_page"),0))'mightothersomeinto:an&:hismake:himmuch:"gotthanhas`
If Instr(HtmlStr,"{$content}") > 0 Then
If classid>0 Then
HtmlStr=Replace(HtmlStr,"{$content}",xmlclass.getattribute("content"))
End If
End If
If Instr(htmlstr,"{$pagelist}")>0 and classid>0 Then'the''seeanotheroutbothhad:hasshouldme::allthat+::
htmlstr=Replace(htmlstr,"{$pagelist}",SoonBiz.pagelist("?u="& cid &"w"&classid&"p{$page}"))
Elseif Instr(htmlstr,"{$pagelist}")>0 and topicid>0 Then
htmlstr=Replace(htmlstr,"{$pagelist}",SoonBiz.pagelist("?u="& cid &"t"&topicid&"p{$page}"))
End If:End Sub:Sub sooncontent(pagename) :Dim sql:Dim pid,depth,rootid:Dim afile:afile=SoonBiz.GetFileInfo(cid) :pid=CLng(xmlclass.getattribute("pid")):depth=CLng(xmlclass.getattribute("depth")):rootid=CLng(xmlclass.getattribute("rootid")):Select Case depth:Case 0:Redim jintong(1,2):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)=afile(1)&"?u="&cid:jintong(0,1)=xmlclass.getattribute("title") : jintong(1,1)=afile(2)&"?u="&cid&"w"&classid:jintong(0,2)="正文" : jintong(1,2)="#":Case 1:Redim jintong(1,3):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)=afile(1)&"?u="&cid:jintong(0,1)=SoonBiz.Getxmlvalue("class","class[@id='"& pid &"']","title") : jintong(1,1)=afile(2)&"?u="& cid &"w"&pid:jintong(0,2)=xmlclass.getattribute("title") : jintong(1,2)=afile(2)&"?u="& cid &"w"&classid:jintong(0,3)="正文" : jintong(1,3)="#":Case 2:Redim jintong(1,4):jintong(0,0)=xmlchannel.getattribute("cha_name") : jintong(1,0)=afile(1)&"?u="&cid:jintong(0,1)=SoonBiz.Getxmlvalue("class","class[@id='"& rootid &"']","title") : jintong(1,1)=afile(2)&"?u="& cid &"w"&rootid:jintong(0,2)=SoonBiz.Getxmlvalue("class","class[@id='"& pid &"']","title") : jintong(1,2)=afile(2)&"?u="& cid &"w"&pid:jintong(0,3)=xmlclass.getattribute("title") : jintong(1,3)=afile(2)&"?u="& cid &"w"&classid:jintong(0,4)="正文" : jintong(1,4)="#":End Select:navstate=SoonBiz.Getnavstate(jintong):sql="select * from ["& sheethead &"_article] where isdel=0 and ispass=1 and id="&id:htmlstr=SoonBiz.Tp(cid,pn,"index")
If instr(htmlstr,"{$orderhref}")>0 Then htmlstr=replace(htmlstr,"{$orderhref}","productbuycar.asp?u={$cid}w{$classid}w{$id}")
If instr(htmlstr,"{$comman}")>0 Then htmlstr=Replace(htmlstr,"{$comman}",comman)'_how%]:'nowhow"'them';but_$:::
If InStr(htmlstr,"{$downhref}") > 0 Then htmlstr=replace(htmlstr,"{$downhref}","down.asp?u="& cid &"w"& classid &"w"&id)
htmlstr=SoonBiz.ReplaceMdb(cid,sql,htmlstr,1,2) :End Sub:Function comman() :Dim table,tr:Dim sql:table=SoonBiz.Tp(0,"main","comman"):tr=SoonBiz.Tp(0,"main","commanli"):table=replace(table,"{$action}","operate.asp?act=savecomman&amp;u="&u):sql="select * from ["& sheethead &"_comman] where cid="& cid &" and ispass=1 and isdel=0 and bid=" & id:comman=Replace(table,"{$trhtml}",SoonBiz.ReplaceMdb("readcomman-comman",sql,tr,"",1)):End Function
%>