<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% ' Edit: Sin.CS ' Date: ' Memo: (去掉charset,改成utf-8?这个过程在加载过程里。而不是这里) ' Memo: (参数) rem query :关键字 rem space :搜索范围,标题和索引(内容) rem rn :每页显示 rem classid :搜索类别,即论坛/或文章 dim king,query'outhtm的简写,全局变量 query=trim(request("query")) set king=new kingcms king.head 0,0 select case IIII1("keyword",clskeyword(query),1)'query case "","()" king_def() case else king_search() end select king_outhtm set king=nothing 'def *** *** www.KingCMS.com *** *** sub king_def()'需要加入标题,访问级别 dim classid,rs,i,selected dim space space=l1ll("space",2) classid=l1ll("classid",2) kingtitle=king.lang("common/search") kingguide=king.guide(0)&kingtitle ol=ol&"
" ol=ol&"
"&kingtitle&"
" ol=ol&"" ol=ol&"" '搜索范围 ol=ol&"" '每页显示 ol=ol&"" '栏目 ol=ol&"" ol=ol&"
"&king.lang("stage/keyword")&"" ol=ol&"" ol=ol&"
搜索范围" ol=ol&"" ol=ol&"
每页显示" ol=ol&"" ol=ol&"
搜索对象" ol=ol&"" ol=ol&"
" ol=ol&"
" ol=ol&"" ol=ol&" " ol=ol&"" ol=ol&"
" end sub 'search *** *** www.KingCMS.com *** *** sub king_search() kingtitle=king.lang("common/search")&" - "&query kingguide=king.guide(0)&""&king.lang("common/search")&" >> "&query dim sql,insql,selected,formatquery formatquery=clskeyword(query) dim data,rs,i,j dim space,classid space=l1ll("space",2) classid=l1ll("classid",2) ol="
" ol=ol&" " ol=ol&" " ol=ol&" " ol=ol&" " ol=ol&"" ol=ol&" 高级搜索" ol=ol&"
" ol=ol&"
" dim outdt,outdd1,outdd2,menuname,menupath,querycount,datamenu,bbstype '参数处理并显示 sql填写规则:第一个必须为menuid!!! select case cstr(classid) case"2" sql=" menuid,arttitle,artdescription,artauthor,artdate,artpath,artgrade,artid "'7 if cstr(space)="0" then'只查询标题 insql=IIII1("arttitle",killjapan(formatquery),1) elseif cstr(space)="1" then insql=IIII1("artcontent",killjapan(formatquery),1) else insql=IIII1("artauthor",killjapan(formatquery),1) end if if len(insql)>2 then insql=" and "&insql else insql="" sql="select top 1000 "&sql&" from kingart where artshow=1 and menuid<>0 "&insql&" order by artorder desc,artid desc;" king.open sql,king.page&"?pid=$&rn="&king.rn&"&query="&server.urlencode(query)&"&classid="&classid&"&space="&space,1 querycount=conn.execute("select count(artid) from kingart where artshow=1 and menuid<>0 "&insql&";")(0) case"10" sql=" menuid,bbstitle,bbscontent,username,bbsdate,topicid,lastdate,sysdate "'7 if cstr(space)="0" then'只查询标题 insql=IIII1("bbstitle",killjapan(formatquery),1) elseif cstr(space)="1" then insql=IIII1("bbscontent",killjapan(formatquery),1) else insql=IIII1("username",killjapan(formatquery),1) end if if len(insql)>2 then insql=" and "&insql else insql="" sql="select top 1000 "&sql&",menuid from kingtopic where topicdel=0 "&insql&" order by lastdate desc,topicid desc;" king.open sql,king.page&"?pid=$&rn="&king.rn&"&query="&server.urlencode(query)&"&classid="&classid&"&space="&space,1 querycount=conn.execute("select count(topicid) from kingtopic where topicdel=0 "&insql&";")(0) case else king.error("system/error/search/classid") end select '搜索数量 if king.length>=0 then ol=ol&"

约有"&formatnumber(querycount,0,true)&"项符合 "&query&" 的查询结果,以下是第"&cstr((king.pid-1)*king.rn+1)&"-"&cstr(king.count-(king.pid-1)*king.rn)&"项。 (搜索用时 "&formatnumber(timer()-king.tDiff,2,true)&" 秒)

" else ol=ol&"

找不到和您的查询 "&query&" 相符的网页。

" end if set rs=conn.execute("select menuid,menuname,menupath,bbstype from kingmenu;") if not rs.eof and not rs.bof then datamenu=rs.getrows() end if set rs=nothing '循环输出 for i=0 to king.length'循环一遍 for j=0 to ubound(datamenu,2) if cstr(datamenu(0,j))=cstr(king.data(0,i)) then menuname=datamenu(1,j) menupath=datamenu(2,j) bbstype=datamenu(3,j) exit for end if next select case cstr(classid) case"2" if ll11("0",king.data(6,i)) then'静态 if cstr(king.named)="1" then outdt=""&king.keywordlight(htmlencode(king.data(1,i)),formatquery)&"" else outdt=""&king.keywordlight(htmlencode(king.data(1,i)),formatquery)&"" end if else outdt=""&king.keywordlight(htmlencode(king.data(1,i)),formatquery)&"" end if outdd1=king.keywordlight(htmlencode(king.data(2,i)),formatquery) outdd2=""&king.data(4,i)&" - "&king.keywordlight(htmlencode(king.data(3,i)),formatquery)&" - "&htmlencode(menuname)&" - 类似网页" case"10" '" menuid,bbstitle,bbscontent,username,bbsdate,topicid,lastdate,sysdate "'7 if ll11("0,1",bbstype) then outdt=""&king.keywordlight(htmlencode(king.data(1,i)),formatquery)&"" else outdt=""&king.keywordlight(htmlencode(king.data(1,i)),formatquery)&"" end if outdd1=king.keywordlight(htmlencode(king.lefte(king.cls(llIIl(king.data(2,i))),180)),formatquery) outdd2=""&king.data(4,i)&" - "&king.keywordlight(htmlencode(king.data(3,i)),formatquery)&" - "&htmlencode(menuname)&" - 类似网页" end select '每页显示数 ol=ol&"
"&outdt&"
" ol=ol&"
"&outdd1&"
" ol=ol&"
"&outdd2&"
" next if cstr(king.length)="-1" then ol=ol&"
"&king.lang("system/error/search")&"
" ol=ol&"
" ol=ol&king.plist ol=ol&"
" end sub 'outhtm *** *** www.KingCMS.com *** *** sub king_outhtm() %> <%=kingtitle%>
动画创作家园  动画人最专业的动画理论网站。
<%=ol%>
动画创作家园QQ群①:2444514(满) QQ群②:15363563(满) QQ群③:48533909(满) QQ群④:44832229 (满) QQ群⑤:43100861 (满) QQ群⑥: 48773990 最佳分辨率 1024×768
维爱迪动画创作家园 京ICP备05049867号
如果您感觉动画创作家园不错,别忘了告诉您的朋友哦,朋友会感谢您的^_^
<%end sub%>