<% Dim Temp,Show,KeyWord,Key,Page,ClassId,smallerWeight,biggerWeight,standardId,Standard KeyWord=Trim(Request.QueryString()) KeyWord=Split(Keyword,"/") IF Ubound(KeyWord)<=1 Then Key="" Else ClassId=FilterHtml(URLDecode(Re(KeyWord(0),"?",""))) Key=FilterHtml(URLDecode(Re(KeyWord(1),"?",""))) smallerWeight=FilterHtml(URLDecode(Re(KeyWord(2),"?",""))) biggerWeight=FilterHtml(URLDecode(Re(KeyWord(3),"?",""))) standardId=FilterHtml(URLDecode(Re(KeyWord(4),"?",""))) Page=IsNum(KeyWord(Ubound(KeyWord)),1) End IF 'IF Len(key)<2 Then ErrMsg:Died Set Temp=New Templates DbOpen Dim Rs_t,classname,allclassid,classkey,classdesc,ClassUrl,ClassDir,ClassTemp,ClassFollowid,ShuoMing,PiaoTi,sortCondition Set Rs_t=Conn.Execute("Select title,allclassid,keyword,class_desc,pagenum,ClassUrl,list_temp,followid,ShuoMing,PiaoTi from Sd_Class where id in("&ClassId&")") IF Rs_t.Eof Then Echo "参数错误" Rs_t.Close:Set Rs_t=Nothing Died End IF classname=Rs_t(0) allclassid=Rs_t(1) ClassKey=Rs_t(2) ClassDesc=Gottopic(Rs_t(3),150) ClassPage=Rs_t(4) ClassUrl=Rs_t(5) ClassDir=ClassUrl ClassTemp=Rs_t(6) ClassFollowid=Rs_t(7) ShuoMing=Rs_t(8) PiaoTi=Rs_t(9) Standard = GetStandardInfo(standardId) Temp.Label "{sdcms:keyword}",Key Temp.Label "{sdcms:smallerWeight}",smallerWeight Temp.Label "{sdcms:biggerWeight}",biggerWeight Temp.Label "{sdcms:standard_Id}",standardId Temp.Label "{sdcms:standard_name}",standard Temp.Label "{sdcms:class_id}",ClassId Temp.Label "{sdcms:class_title}",ClassName Temp.Label "{sdcms:class_key}",ClassKey Temp.Label "{sdcms:class_desc}",ClassDesc Temp.Label "{sdcms:class_allclassid}",allclassid Temp.Label "{sdcms:class_classurl}",ClassUrl Temp.Label "{sdcms:class_url}",ClassUrl Temp.Label "{sdcms:class_followid}",ClassFollowid Temp.Label "{sdcms:class_ShuoMing}",ShuoMing Temp.Label "{sdcms:class_PiaoTi}",PiaoTi sortCondition="" if ClassId <> "" Then sortCondition = sortCondition & ""& ClassName &"" End If if Key <> "" Then sortCondition = sortCondition & ""& Key &"" End If if standardId <> "" Then sortCondition = sortCondition & ""& Standard &"" End If Temp.Label "{sdcms:sort_condition}",sortCondition Show=Temp.Sdcms_Load(Load_temp_dir&sdcms_skins_sort) Temp.TemplateContent=Show Temp.Analysis_Static() Temp.Analysis_IIF() Show=Temp.Display Temp.Page_Mark(Show) Dim PageField,PageTable,PageWhere,PagePageSize,PageOrder,PageEof,PageLoop,PageHtml PageHtml=Temp.Page_Html PageField=Temp.Page_Field PageTable=Temp.Page_Table PageWhere=Temp.Page_Where PageOrder=Temp.Page_Order PagePageSize=Temp.Page_PageSize PageEof=Temp.Page_Eof PageLoop=Temp.Page_Loop IF Len(PagePageSize)=0 Then Echo "请正确使用搜索模板":Died End IF Dim P,I Set P=New Sdcms_Page With P .Conn=Conn .Pagesize=PagePageSize .PageNum=Page .Table=PageTable .Field=PageField .Where=PageWhere .Key="ID" .Order=PageOrder .PageStart="?"&Server.URLEncode(ClassId)&"/"&Server.URLEncode(key)&"/"&Server.URLEncode(smallerWeight)&"/"&Server.URLEncode(biggerWeight)&"/"&Server.URLEncode(standardId)&"/" End With Set Rs=P.Show IF Err Then Show=Replace(Show,PageHtml,PageEof) Temp.Label "{sdcms:listpage}","" Err.Clear Else 'IF Page=1 Then Add_key(key) Dim Get_Loop,t1 Get_Loop="" t1="" For I=1 To P.PageSize IF Rs.Eof Or Rs.Bof Then Exit For t1=PageLoop t1=t1&Temp.Get_Page(t1,PageTable,I) Get_Loop=Get_Loop&t1 Rs.MoveNext Next Get_Loop=Replace(Get_Loop,PageLoop,"") Show=Replace(Show,PageHtml,Get_Loop) Temp.Label "{sdcms:listpage}",P.PageList End IF Temp.TemplateContent=Show Temp.Analysis_Static() Temp.Analysis_Loop() Temp.Analysis_IIF() Show=Temp.Display Echo Show Set P=Nothing Set Temp=Nothing Sub Add_key(t0) IF Conn.execute("Select Count(id) From Sd_Search Where title='"&t0&"'")(0)=0 Then Conn.execute("Insert Into Sd_Search (title,ispass,adddate) values('"&t0&"',1,'"&Dateadd("h",Sdcms_TimeZone,Now())&"')") Else Conn.execute("Update Sd_Search Set hits=hits+1 Where title='"&t0&"'") End If End Sub Sub ErrMsg Echo "" Echo "关键字(" & KeyWord(0) &")不能为空,且不能小于2个字符

5 秒后返回首页" Echo "" End Sub %>