<% Server.ScriptTimeOut=90 ON ERROR RESUME NEXT dim page,Tname,dhname,keyword '--------- fwfh=fwwzjc("/inc/fwpbip1.txt","") if fwfh="ER_0" then response.end end if '---------- khdfs=0 if isMobile()=true then khdfs=1 end if '---------- page=request("page") if page="" then page=1 end if 'keyword=request("keyword") keyword=request("wd") if keyword<>"" then dim sqlzs dim CurrentPage,MaxPerPage,totalPut,totalnumber,Pcount,tempPcount 'keyword=replacestr(request("keyword")) keyword=replacestr(request("wd")) QueryWords= Split( keyword ) if Request("stype")="" then stype=1 else stype=Request("stype") end if if Request("fs")="" then fs="1" else fs=Request("fs") end if if Request("fl")="" then fl=1 else fl=Request("fl") end if if not isempty(request("page")) then CurrentPage=cint(request("page")) else CurrentPage=1 end if if keyword<>"" then MaxPerPage =100 else MaxPerPage =300 end if if not isnumeric(request("page")) and request("page")<>"" then page=1 end if sql="" dim tempJoinWord tempJoinWord="" dim flzdmc Select case fl case 1 flzdmc="hanzi" case 2 flzdmc="pysy" fs=1 case 3 flzdmc="zongbh" case 4 flzdmc="fenjcz" fs=1 case 5 flzdmc="bishunbh" case 6 flzdmc="sjhm" case 7 flzdmc="wb86" case 8 flzdmc="wb98" case 9 flzdmc="cangjie" case 10 flzdmc="undm" end select dhname=" > 搜索“"&keyword&"”" if keyword<>"" then Tname=keyword&"_" end if %> <%=Tname%>康熙字典_在线康熙字典 <% if khdfs=0 then %> <% else %> <% end if %> <% if khdfs=0 then %> <% else %> <% end if %>
<% Select case stype case 1 if fs=1 then For i = 0 To UBound( QueryWords ) sql = SQL & tempJoinWord & "(" &flzdmc &_ " like '%"&QueryWords(i)&"%')" tempJoinWord = " and " Next else For i = 0 To UBound( QueryWords ) sql = SQL & tempJoinWord & "(" &flzdmc &_ "='"&QueryWords(i)&"' )" tempJoinWord = " and " Next end if case 2 if fs=1 then For i = 0 To UBound( QueryWords ) sql = SQL & tempJoinWord & "(" & flzdmc & _ " like '%"&QueryWords(i)&"%')" tempJoinWord = " and " Next else For i = 0 To UBound( QueryWords ) sql = SQL & tempJoinWord & "(" & flzdmc &_ "='"&QueryWords(i)&"')" tempJoinWord = " and " Next end if case 3 if fs=1 then For i = 0 To UBound( QueryWords ) sql = SQL & tempJoinWord & "(" & flzdmc&_ " like '%"&QueryWords(i)&"%')" tempJoinWord = " and " Next else For i = 0 To UBound( QueryWords ) sql = SQL & tempJoinWord & "(" & flzdmc &_ "='"&QueryWords(i)&"')" tempJoinWord = " and " Next end if End Select if sql="" then sql="id=99999999999 " end if sqlzs = "SELECT id FROM [kxzdk] WHERE " &sql 'response.write sqlzs 'response.end %> <% set rs = server.CreateObject ("adodb.recordset") rs.open sqlzs,conn,1,1 if rs.bof and rs.eof then else totalPut=rs.recordcount '计算出符合条件总数 totalnumber=rs.recordcount '计算出符合条件总数 end if rs.close if CurrentPage=1 then sql="SELECT top "&MaxPerPage&" id,hanzi FROM [kxzdk] WHERE "&sql '总页码为1取当前页 else sqlzs="(select top "&((CurrentPage-1)*MaxPerPage)&" id FROM [kxzdk] WHERE "&sql '使用组合查询方式 sql="SELECT top "&MaxPerPage&" id,hanzi FROM [kxzdk] WHERE id>(select max(id) from "&sqlzs&" order by id ) AS T ) and "&sql&" order by id " end if dim ares rs.open sql ,conn,1,1 if rs.bof and rs.eof then redim ares(-1,-1,-1) else ares = rs.GetRows end if rs.close set rs=nothing Conn.Close Set Conn = Nothing dim ls_jlzs ls_jlzs=UBound(ares,2) 'response.write ls_jlzs 'response.end if (ls_jlzs<0 or ls_jlzs="" ) then if keyword="" then response.write "" else response.write "" end if else if ls_jlzs=0 then Response.Redirect("kxzdshow.asp?id="&stoies(right("0000000"&ares(0,0),7))) end if if (totalPut mod MaxPerPage)=0 then tempPcount= totalPut \ MaxPerPage else tempPcount= totalPut \ MaxPerPage + 1 end if if (totalPut mod MaxPerPage)=0 then Pcount= totalPut \ MaxPerPage else Pcount= totalPut \ MaxPerPage + 1 end if if currentpage > Pcount then currentpage = Pcount if currentpage<1 then currentpage=1 dim bookmark,iia j=(currentpage-1)*MaxPerPage+1 ii=0 response.write "
" showpage() response.write "
" if keyword<>"" then end if response.write "" For iia =1 To ls_jlzs+1 if keyword<>"" then if iia mod 5=0 and iia<>ls_jlzs+1 then response.write "" else response.write "" end if else response.write "" end if j=j+1 next end if erase ares response.write "
  您没有输入关键字!
  抱歉,没有找到与 "&keyword&" 相关的任何内容!
"&ares(1, iia-1)&"
"&ares(1, iia-1)&"
您没有输入关键字!
" showpage() response.write "
" else response.write "  抱歉,您没有输入任何查询数据 !" end if sub showpage() dim filename,ii,n filename="kxzdso.asp" if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if response.write "
"& vbCrLf if CurrentPage<2 then response.write " 共有词目 "&totalnumber&" 个  首 页  上一页   " else response.write "共有词目 "&totalnumber&" 个  首 页  " response.write "上一页   " end if if n-currentpage<1 then response.write "下一页  尾 页 "& vbCrLf else response.write "下一页" response.write "  尾 页"& vbCrLf end if response.write " 页次:"&CurrentPage&"/"&n&"页 " response.write " "&maxperpage&"个/页 "& vbCrLf ' response.write "转到:" &vbCrLf ' response.write " 转到: " ' response.write "  " & vbCrLf ' response.write "
"& vbCrLf end sub Function stoies(str) dim mz,t, a,a1,a2,a3,b,x mz="e,b,d,c,e,8,9,7,6,5,4,3,2,1,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z" t="" b=split(mz,",") for x=0 to len(str)-1 a=AscW(mid(str,x+1,1)) a1=a Mod 41 a=(a-a1)/41 a2=a Mod 41 a=(a-a2)/41 a3=a mod 41 t=t&b(a3)&b(a2)&b(a1) next a="z" for x=0 to len(t)-1 step 3 if AscW(x)<>"A" then stoies=t Exit Function end if a=a+mid(t,x+1,2) next stoies=a end function function ekstos(str) dim b b="ebdce897654321fghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXYZ" dim a1,a2,a3,d,a dim t() d=1 if Mid(str,1,1)="z" then redim t(fix(len(str)-1)/2) a= UBound(t) dim x for x=0 to a-1 step 1 d=d+1 a2=instr(b,mid(str,d,1)) d=d+1 a3=instr(b,mid(str,d,1)) t(x)=a2*41+a3 next else redim t(fix(len(str)/3)) a= UBound(t) for x=0 to a-1 step 1 a1=instr(1,b,mid(str,d,1)) d=d+1 a2=instr(b,mid(str,d,1)) d=d+1 a3=instr(b,mid(str,d,1)) d=d+1 t(x)=(a1-1)*1681+(a2-1)*41+(a3-1) next end if dim ra ra="" for x=0 to a-1 step 1 ra=ra&chrw(t(x)) next ekstos=ra end function %>
<% response.write gg_sccl1(5,300,300,1,1) response.write gg_sccl1(5,300,300,2,1) response.write gg_sccl1(5,300,300,3,1) %>