<% '取值--------------------------------------------------- IF StayNub(request("page"))="" Then curpage=1 Else curpage=Cint(StayNub(request("page"))) End IF tag=StayNub(request("tag")) IF tag="" Then tag=0 '==========獲取參數變量==== skey=Replace_Text(replace(replace(request("key"),"'",""),",","")) '關鍵詞 '==========獲取真實模板名字==== lKindName2="搜索漫畫" lKindName="搜索漫畫" tlistTemplate="search.html" Arr_L_KindName2=lKindName2 Arr_L_KindName=lKindName Arr_L_Kid=tag Arr_L_TypeUrl=GetUrl_("list",Arr_L_Kid&"{,}"&Arr_L_KindName) '==========模板處理========= oDir="" qtBc.Dir=oDir qtBc.Moban=G_moban qtBc.Html=G_moban_html qtBc.Main=tlistTemplate Allcontent=qtBc.Heads() Allcontent=MakeHTML_CMS_Self(Allcontent) '==========基本處理========= Allcontent=replace(Allcontent,"{qt:listname {qt:m_type1}}",Arr_L_KindName2) Allcontent=replace(Allcontent,"{qt:ListUrl {qt:m_type1}}",Arr_L_TypeUrl) Allcontent=replace(Allcontent,"{qt:listname}",Arr_L_KindName2) Allcontent=replace(Allcontent,"{qt:ListUrl}",Arr_L_TypeUrl) Allcontent=replace(Allcontent,"{qt:m_type1}",tag) Allcontent=replace(Allcontent,"{qt:indexurl}",oDir) Allcontent=replace(Allcontent,"{當前頁}",curpage) Allcontent=replace(Allcontent,"{qt:kword}",skey) '==========替換基本參數===== Get_sql_str=GetContent(Allcontent,"{qt_Loop:mhLoopList","}",0) Get_sql_str_2=GetContent(Allcontent,"{qt_Loop:mhLoopList","}",1) s_v1=GetContent(Allcontent,"{qt_Loop:mhLoopList","{/qt_Loop}",0) s_v2=GetContent(Allcontent,"{qt_Loop:mhLoopList","{/qt_Loop}",1) s_v3=Replace(replace(s_v2,Get_sql_str_2,""),"{/qt_Loop}","") Set re_list = New RegExp re_list.IgnoreCase = True re_list.Global=True re_list.Pattern ="{qt_Loop:mhLoopList\s+([^\,]+),([^\,]+),([^\,]+),([^\,]+),([^\,]+),([^\,]*)}" Get_sql_str=re_list.Replace(Get_sql_str_2, "$1,$2,$3,$4,"&l_k&","&skey&","&star&","&w2&","&w5) sql_list=Get_sql_1(Get_sql_str,curpage) IF instr(sql_list,"|")>0 Then sql_list_1=split(sql_list,"|") sql_list_sql=sql_list_1(0) sql_list_numb=sql_list_1(1) sql_list_tnumb=sql_list_1(2) End IF IF Instr(Get_sql_str,",")>0 Then Get_sql_str_a=split(Get_sql_str,",") Get_sql_str_a_3=Get_sql_str_a(3) '表示顯示的數目 End IF Set oRstotal=Conn.Execute(sql_list_tnumb) IF Not oRstotal.Eof Then totalrecordcount=oRstotal(0) if totalrecordcount mod sql_list_numb=0 then '計算總頁數,recordcount:數據的總記錄數 totalpage=totalrecordcount\sql_list_numb'n:總頁數 else totalpage=totalrecordcount\sql_list_numb+1 end if Else totalrecordcount=0 totalpage=1 End IF set rs_l1=server.createobject(G_RS) rs_l1.open sql_list_sql,conn,1,1 l_k=curpage pageurl="" pageurl=pageurl&"&tag="&tag'頁數 pageurl=pageurl&"&key="&server.URLEncode(skey) '關鍵詞,名字 pageurl=pageurl&"#ysearchs"'搜索標志 qt_kword=skey IF Trim(qt_kword)="" Then IF q="" Then response.Redirect GetUrl_("all","") End IF End iF Allcontent_t=Allcontent Get_sql_str_3=Get_sql_n1_list_html(sql_list_sql,s_v3,curpage,"",sql_list_numb) Allcontent_t=replace(Allcontent_t,s_v2,Get_sql_str_3) '++++++++++++++分頁++++++++++++++++++++++++++ Allcontent_t_str=Allcontent_t '獲取內至循環標簽///////////////////////////////// Set soojs = New Regexp soojs.IgnoreCase = True soojs.Global = True soojs.Pattern ="{qt_page}(\n|.)*?{/qt_page}" Set Matches =soojs.Execute(Allcontent_t_str) set soojs=nothing temp_arr4="" For Each Match in Matches temp_arr4=temp_arr4&Match.Value&"{$$$}" '循環匹配 Next IF instr(temp_arr4,"{$$$}")>0 Then temp_arr4=left(temp_arr4,instrrev(temp_arr4,"{$$$}")-1) temp_arr_b=split(temp_arr4,"{$$$}") For i=Lbound(temp_arr_b) To Ubound(temp_arr_b) temp_arr4_1=temp_arr_b(i) p1_r=GetContent(temp_arr4_1,"{qt_page}","{/qt_page}",1) p1_r2=replace(replace(p1_r,"{qt_page}",""),"{/qt_page}","") str_page_1=Get_page_cms(p1_r2,l_k,Get_sql_str_a_3,totalrecordcount,totalpage,pageurl) Allcontent_t=replace(Allcontent_t,p1_r,str_page_1) Next End IF '--------------分頁------------------------- ' p1_r=GetContent(Allcontent_t,"{qt_page}","{/qt_page}",1) ' p1_r2=replace(replace(p1_r,"{qt_page}",""),"{/qt_page}","") ' str_page_1=Get_page_cms(p1_r2,l_k,Get_sql_str_a_3,totalrecordcount,totalpage,pageurl) ' Allcontent_t=replace(replace(Allcontent_t,p1_r,str_page_1),"{$qt_page$}",str_page_1) Allcontent_t=MakeHTML_CMS(Allcontent_t) response.Write Allcontent_t %> 广东快乐十分出号走势图