<table width="760" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="7"></td>
  </tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF0000" style=" margin-left: 5px" >
  <tr>
    <td height="2"></td>
  </tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="7"></td>
  </tr>
</table>
<table width="760"  border="0" cellpadding="0" cellspacing="0"style=" margin-left: 5px" >
  <tr>
    <td></td>
  </tr>
  <tr>
    <td height="22" align="center" style=" text-align: center"><a href="/about/index.html">关于网胜</a> | <a href="/about/contact.html">联系我们</a> | <a href="/about/sitemap.html">广告服务</a> | <a href="/webgo.asp">网站地图</a> | <a href="/about/job.html">诚聘英才</a> | <a href="/feedback/">意见投诉</a> | <a href="/help/bin">帮助中心</a> | <a href="/about/link.html">友情链接</a> <br>
  客服咨询热线：0351-5697662 5697663 5697661 传真：0351-5697662
  <br>
  版权所有 网胜科技有限公司 晋ICP备05004115号 <br>
Copyright 2000-2008 websen.net. All Rights Reserved</td>
  </tr>
</table>
<%'最近搜索处理
   pptha=request.ServerVariables("PATH_INFO")
		na=instrrev(pptha,"/")+1
		pptha=mid(pptha,na)
		on error resume next
 filekey=pptha'不同的搜索连接不同的页面
 if filekey="" then 
  filekey="searchall.asp"
  end if
 if keywords<>"" then
  if request.Cookies("zhuyongjian")<>"" then
		arrall=split(request.Cookies("zhuyongjian"),",")
		ishav=false
		for j=0 to ubound(arrall)-1
		if cstr(trim("<a href="&HOPE_InstallDir&"search/"&filekey&"?keywords="&left(keywords,5)&"><font color='#ffffff'>"&left(keywords,5)&"</font></a>"))=cstr(trim(arrall(j))) then 
		ishav=true
		exit for
		end if
		next
  if ishav=false then
		  response.Cookies("zhuyongjian").expires=DateAdd("m",10,Now())
		  ss=request.Cookies("zhuyongjian")&"<a href="&HOPE_InstallDir&"search/"&filekey&"?keywords="&left(keywords,5)&"><font color='#ffffff'>"&left(keywords,5)&"</font></a>,"
  		  arr=split(ss,",")
		  no=ubound(arr)-1
		  nostart=0
		  if no >=7 then'只显示8条
		  nostart=no-7
		  end if
		  for i=nostart to no   
		  result=result&arr(i)&","
		  next
    response.Cookies("zhuyongjian")=result
   end if
   else
    response.Cookies("zhuyongjian").expires=DateAdd("m",10,Now())
    response.Cookies("zhuyongjian")="<a href="&HOPE_InstallDir&"search/"&filekey&"?keywords="&left(keywords,5)&"><font color='#ffffff'>"&left(keywords,5)&"</font></a>,"
 end if
end if
 '^^+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 '热门关键字处理
 
   If keywords<>"" Then
     isupdate=false
     ishas=false
    
	
	Set krso=server.CreateObject("adodb.recordSet")
	 ksqlo="select keywords from  Websen_keyhots  where keywords like '"&keywords&"'    " 
	 krso.open ksqlo,conn,1,1
	 If krso.eof Then 
	 End If
	 If not krso.eof Then
	  isupdate=true
	  ishas=true 
	 	 Set krso=Nothing
	 End If
	 if ishas=false then 
	
   	'处理关键字添加与累计搜索次数^^^^^^^^^^^^^^^^^^^^^^^^^start^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
	 If isupdate=false then
 	 Set krs=server.CreateObject("adodb.recordSet")
	 ksql="select keywords from  Websen_productshow  where Xxsm like '%"&keywords&"%'   or  Cpmc like '%"&keywords&"%'   or  keywords like '%"&keywords&"%'  " 
	 krs.open ksql,conn,1,1
	 If krs.eof Then 
	 End If
	 If not krs.eof Then
	  isupdate=true
	 	 Set krs=Nothing
	 End If
	 end if
	 '-----------------------
	 If isupdate=false then
	 Set krs1=server.CreateObject("adodb.recordSet")
	 ksql1="select keywords from  Websen_Info  where showname like '%"&keywords&"%'   or  keywords like '%"&keywords&"%'   or  content like '%"&keywords&"%'  " 
	 krs1.open ksql1,conn,1,1
	 If krs1.eof Then 
	 End If
	 If not krs1.eof Then
	  isupdate=true
	 	 Set krs1=Nothing
	 End If
	 '-----------------------------
	 end if
	 If isupdate=false then
	  Set krs2=server.CreateObject("adodb.recordSet")
	 ksql2="select SortID from  Websen_Class_1  where Sort like '%"&keywords&"%'    " 
	 krs2.open ksql2,conn,1,1
	 If krs2.eof Then 
	 End If
	 If not krs2.eof Then
	  isupdate=true
	 	 Set krs2=Nothing
	 End If
	 end if
	 '------------------------------
	 
	   '-----------------------------
	 If isupdate=false then
	  Set krs3=server.CreateObject("adodb.recordSet")
	 ksql3="select Typeid from  Websen_Class_2  where Typename like '%"&keywords&"%'    " 
	 krs3.open ksql3,conn,1,1
	 If krs3.eof Then 
	 End If
	 If not krs3.eof Then
	  isupdate=true
	 	 Set krs3=Nothing
	 End If
	 end if
	 '------------------------------
	  '-----------------------------
	 If isupdate=false then
	  Set krs4=server.CreateObject("adodb.recordSet")
	 ksql4="select typeid_2 from  Websen_Class_3  where typename_2 like '%"&keywords&"%'    " 
	 krs4.open ksql4,conn,1,1
	 If krs4.eof Then 
	 End If
	 If not krs4.eof Then
	  isupdate=true
	 	 Set krs4=Nothing
	 End If
	 end if
	 '------------------------------
	  If isupdate=false then
	  Set krs4=server.CreateObject("adodb.recordSet")
	 ksql4="select id from  Websen_corporation  where Qymc like '%"&keywords&"%'  or Qyjj  like '%"&keywords&"%' or Zycp  like '%"&keywords&"%' " 
	 krs4.open ksql4,conn,1,1
	 If krs4.eof Then 
	 End If
	 If not krs4.eof Then
	  isupdate=true
	 	 Set krs4=Nothing
	 End If
	 end if
	 end if
	 If isupdate=true then 
	    '-----搜索率处理-- start -------------------------------------------------------------
  		'再查关键字记录表中是否存在
		Set krs2=server.CreateObject("adodb.recordSet")
		ksql2="select top 1  keywords,hits,filekey,startdate from Websen_keyhots where keywords  like  '"&keywords&"'"
		krs2.open ksql2,conn,1,3
		'添加
		If krs2.eof Then
		 krs2.addnew()
		 krs2("keywords")=keywords
		 krs2("filekey")=filekey'保存文件的连接提交的处理页面 
		 krs2("hits")=1
		 krs2("startdate")=date()
		 krs2.update()
	   	End If
		'累加
		If not krs2.eof Then
		krs2("hits")=krs2("hits")+1
		krs2("startdate")=date()
		krs2.update()
		set krs2=Nothing
		End If
		 '^^^^^^^^^^^^^^^^^^^^^^^^^ 
	   '--------搜索率处理-- end ----------------------------------------------------------------------
	 end if	 
		 
		 

	'处理关键字添加与累计搜索次数^^^^^^^^^^^^^^^^^^^^^^^^^end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

    '更新关键字表数据以防数据过多的处理^^^^^^^^^^^^^^^^^^start^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
 	if search="" then '由网站的配置表控制最多的保留的记录数
     search=5000
	 else
	 if not isnumeric(search) then
      search=cint(search)
	end if
  	end if
     Set rsdelk=server.CreateObject("adodb.recordSet")
	 sqldelk="select id from Websen_keyhots where id not in (select top "&search&" id from Websen_keyhots order by hits desc)"
      rsdelk.open sqldelk,conn,1,3
	  If rsdelk.eof Then 
	  End If
	  If not rsdelk.eof Then
      do while not rsdelk.eof 
      rsdelk.delete()	  
      rsdelk.movenext
	  loop
	 Set rsdelk=nothing
	 End If
'response.Write(search)    
    '更新关键字表数据以防数据过多的处理^^^^^^^^^^^^^^^^^^end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
   End If

'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 %>

