<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
  <!--#include file="../inc/head.asp"-->
  <title><%=webname%>快捷搜索</title>
    
  <!--层--------------------------------start------------------------------------------------>
 
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v4.01
  //Copyright 1998 Macromedia, Inc. All rights reserved.
  var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
  var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
  retVal = true; if(IE && event) event.returnValue = true;
  if (MM_dragLayer.arguments.length > 1) {
    curDrag = MM_findObj(objName); if (!curDrag) return false;
    if (!document.allLayers) { document.allLayers = new Array();
      with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
        for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
          with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
      } else {
        if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div"); 
          for (i=0;i<spns.length;i++) if (spns[i].style&&spns[i].style.position) allLayers[allLayers.length]=spns[i];}
        for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i]; 
    } }
    curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
    curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
    curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
    curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
    curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
    curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex;
    curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft; 
    if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft;
    curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop; 
    if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop;
    curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU;
    curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD;
    curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
    document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
    if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  } else {
    var theEvent = ((NS)?objName.type:event.type);
    if (theEvent == 'mousedown') {
      var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
      var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
      var maxDragZ=null; document.MM_maxZ = 0;
      for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
        var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);
        if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
        var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
        if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
          var parentL=0; var parentT=0;
          if (NS6) { parentLayer = aLayer.parentNode;
            while (parentLayer != null && parentLayer.style.position) {             
              parentL += parseInt(parentLayer.offsetLeft); parentT += parseInt(parentLayer.offsetTop);
              parentLayer = parentLayer.parentNode;
          } } else if (IE) { parentLayer = aLayer.parentElement;       
            while (parentLayer != null && parentLayer.style.position) {
              parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
              parentLayer = parentLayer.parentElement; } }
          var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);
          var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop);
          if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0;
          var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth);
          var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight);
          if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
              || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
      if (curDrag) {
        document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE);
        curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
        curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
        if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0;
        MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
        document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
        if(curDrag.MM_toFront) {
          eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');
          if (!curDrag.MM_dropBack) document.MM_maxZ++; }
        retVal = false; if(!NS4&&!NS6) event.returnValue = false;
    } } else if (theEvent == 'mousemove') {
      if (document.MM_curDrag) with (document.MM_curDrag) {
        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
        newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
        if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
        if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
        if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
        if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
        MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
        if (NS4) {left = newLeft; top = newTop;}
        else if (NS6){style.left = newLeft; style.top = newTop;}
        else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
        if (MM_dragJS) eval(MM_dragJS);
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mouseup') {
      document.onmousemove = null;
      if (NS) document.releaseEvents(Event.MOUSEMOVE);
      if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
      if (document.MM_curDrag) with (document.MM_curDrag) {
        if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
            (Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+
             Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) {
          if (NS4) {left = MM_targL; top = MM_targT;}
          else if (NS6) {style.left = MM_targL; style.top = MM_targT;}
          else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
          MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
        if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
        if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
        retVal = false; if(!NS) event.returnValue = false; }
      document.MM_curDrag = null;
    }
    if (NS) document.routeEvent(objName);
  } return retVal;
}

function loadwin(obj){
	with(MM_findObj(obj))with(style){
		filters[0].apply();
		display='';
		filters[0].play();
	}
}
function cs(captionBG,bodyBG,tableBG){
oldBody=document.body;
	with(oldBody){
		var newBody=cloneNode();
		style.filter='blendtrans(duration=1)';
		filters[0].apply();
		with(document.styleSheets[0]){
			with(rules[0].style){backgroundColor=captionBG;}
			with(rules[1].style){backgroundColor=bodyBG;}
			with(rules[2].style){backgroundColor=tableBG}
		}
		filters[0].play();
		setTimeout(function(){
				if(oldBody!=null){
					oldBody.applyElement(newBody, "inside")
					oldBody.swapNode(newBody);
					oldBody.removeNode(true);
					}
				},1500);
	}
}
 function SendMsg(sUrl)
{
	try   //支持
	{
		var xmlhttp=new ActiveXObject("TimwpDll.TimwpCheck");
		this.location.href=sUrl;        
	}
	catch(e) //不支持
	{
alert("您没有安装QQ/TM，或者您的版本过旧，请到腾讯网站下载");
window.location="http://www.qq.com";
	}
	return false;
}

//-->
</script>
<style type="text/css">
<!--
.caption {
 
 
	background-color: #00CCFF;
	padding-left: 5px;
	cursor: default;
	font-family: "Verdana", "Arial";
	border: 1px inset;
}
 image{ border:none;}

body {
 
	border: 1px inset;
	 
}
table {
	 
}
td {
  
}
.win {
--	filter:BlendTrans(duration=1) DropShadow(Color=#cccccc, OffX=3, OffY=3) alpha(opacity=90)
}
a {
	text-decoration: none;
	color: #003399;
}
a:hover {
	color: #FF0000;
}
input {
  
	border-width: 1px;
}
.statusbar {
 	padding-left: 3px;
}
.button {
 
	text-align: center;
}
.navframe {
	padding: 5px;
}
-->
</style>
<SCRIPT language=JavaScript src="<%=HOPE_InstallDir%>mall.js"  type=text/JavaScript></SCRIPT>


 
     <!--层-----------------end--------------------------------------------------------------->
  
<%
 	keywords=replace_text(request("keywords"))
	moshi=replace_text(request("moshi"))
	kind=replace_text(request("kind"))
	country1=replace_text(request("country1"))
	province=replace_text(request("province"))
	city=replace_text(request("city"))
	searchtype=replace_text(request("searchtype"))
	
   if issession=0 then
 	gradeid=Replace_Text(request.Cookies("gradeid"))
	gsid=Replace_Text(request.Cookies("Yxmemberid"))
 	else
 	gradeid=session("gradeid")
	gsid=session("id")
 	end if 
	
%>
<body>
 <DIV id=popImageLayer 
style=" background-color:#F6F6F6;BORDER-RIGHT: orange 1pt none; BORDER-TOP: orange 1pt none; VISIBILITY: hidden; BORDER-LEFT: orange 1pt none; WIDTH: 180px; CURSOR: hand; BORDER-BOTTOM: orange 1pt none; POSITION: absolute; HEIGHT: 180px" 
align=center calss="" name="popImageLayer"></DIV>
<br>
 <!---层效果 start --->

<div id="mycolor" style="position:absolute; left:5px; top:0px; width:185px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('mycolor','',0,0,150,18,true,false,-1,-1,-1,-1,15,320,100,'',false,'')">
		<table width="100%" border="1"  bordercolor="#CDD8EB" cellpadding="0"  bgcolor="#F8FAFC" cellspacing="0">
		 	<tr><td>
			<table width="100%"   border="0" bordercolor="#CDD8EB" cellpadding="0" bgcolor="#CCCCCC" cellspacing="0">
 				<tr bgcolor="#FF7300"><td   height="25"    >&nbsp; <font color="#FFFFFF"><b>搜索范围</b></font>&nbsp;<font color="#000000"><b>↓</b></font></td>
						<td width="14"  bgcolor="#F5F5F5" align="center"><a href="#" onClick="with(MM_findObj('mycolorwin').style)display=display=='none'?'':'none'"><font color="#FF0000">—</font></a></td>
						<td width="14"  bgcolor="#F5F5F5" align="center"><a href="#" onClick="MM_showHideLayers('mycolor','','hide')"><font  color="#FF0000">×</font></a></td>
				</tr></table>
				</td></tr>
  <tr id="mycolorwin"><td>
		 		<br />
		 <table cellspacing="0" cellpadding="0" width="100%" align="center" bordercolor="#F6F6F6" border="1">
    <tr><td>
 	 <form name="myform" method="post" action="<%=HOPE_InstallDir%>search/searchSimple.asp">
   <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
 	 <tr><td width="20" ></td><td>
	 关键词：<br> <input type="text" value="<%=replace_text(request("keywords"))%>" name="keywords"  maxlength="20" onBlur="this.value=this.value.replace(/\s/igm,'')"> 
	 </td></tr>
	 <tr><td width="20" ></td><td height="60">
	 会员级别：<br>
 	 <select size="1"  name="kind">
	 <option value="all" >所有会员</option>
	 <%
	 set rsj=server.CreateObject("adodb.recordset")
	 sqlj="select * from yixiang_vipgrade order by roleid "
	 rsj.open sqlj,conn,1,1
	 if not rsj.eof then 
	 do while not rsj.eof 
	 %>
	 <option value="<%=rsj("roleid")%>" 
	 <%
	 if replace_text(request("kind"))<>"all" then
	  if   replace_text(request("kind"))=trim(rsj("roleid")) then 
	  response.Write("selected") 
	  end if 
	   end if
	   %>> 
	    <%=rsj("gradename")%>  </option>
	 <%
	 rsj.movenext
	 loop
	 rsj.close
	 end if
	 
	 %></select>
	 </td></tr>
	 <tr><td colspan="2" ><hr size="1" width="80%" color="#EEEEEE"></td></tr>
	 <tr><td width="20" ></td><td>
	  地  区:<br><select style="WIDTH: 90px"   onchange="javascript:changeCountry1(this);" name="country1">
              </select><br>
             <BR> 省份： <br><select style="WIDTH: 60px"  onchange="changeProvince(this);" name="province">
                <option value=""   selected="selected">省份</option>
              </select><br>
             <BR> 城市： <br><select name="city">
                <option value="" selected="selected">地 级</option>
              </select>
	 
	 </td></tr>
	 <tr><td colspan="2"  height="30"   ><hr size="1" width="80%"  color="#F0F0F0"></td></tr>
	 <tr><td></td><td>选择公司经营模式:</td></tr>
	 <tr><td></td><td>
	 <select size="1" name="moshi" >
     <option value="all" >不限</option>
	 <option value="生产型" <%if   replace_text(request("moshi"))="生产型" then response.Write("selected")	  end if %>>生产型</option>
     <option value="贸易型" <%if   replace_text(request("moshi"))="贸易型" then response.Write("selected")	  end if %>>贸易型</option>
     <option value="服务型" <%if   replace_text(request("moshi"))="服务型" then response.Write("selected")	  end if %>>服务型</option>
	 <option value="政府或其他机构" <%if   replace_text(request("moshi"))="政府或其他机构" then response.Write("selected")	  end if %>>政府或其他机构</option>
 	 </select><input type="hidden"  value="gongying" name="searchtype" maxlength="10">
	 </td></tr>
	 	 <tr><td colspan="2"   height="30" ><hr size="1" width="80%"  color="#F0F0F0"></td></tr>
 	 <tr><td height="50" colspan="2" align="center"><input type="submit" value=" 搜 索 " name="searchgo" > </td></tr>
	 </table></form>
	</td></tr></table>
   </td>
		  </tr>
  </table>
 		
</div>
<script>setTimeout("loadwin('mycolor')",1000)</script>

<!---层效果 end --->
<table cellspacing="0" cellpadding="0" width="<%=HOPE_PageWidth%>" align="center" border="0">
		 <tr>
		  <td width="23%"><img height="25" src="<%=HOPE_InstallDir%>search/images/so.gif" width="176" /></td>
		  <td width="77%"><b><font color="#0099CC">最近搜索词</font></b>: <%=Replace(Request.Cookies("zhuyongjian"),",","&nbsp;&nbsp;<font color=#E7E7E7>|</font>&nbsp;&nbsp;")%></td>
		</tr>
</table><br>
<table cellspacing="0" cellpadding="0" width="<%=HOPE_PageWidth%>" align="center" border="0">
     <tr>
	 
	
	<td width="<%=HOPE_PageWidth%>" height="300" valign="top">
	 <!--右边-->
	
	
	
	
	
	   <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
   <tr>
   <td width="350">【<a href="#" onClick="MM_showHideLayers('mycolor','','show')"><font color="#0099CC">搜索菜单</font></a>】&nbsp;<a href="<%=HOPE_InstallDir%>search/searchnear.asp">模糊搜索</a> &nbsp;<a href="<%=HOPE_InstallDir%>search/searchall.asp">高级搜索</a></td>
   <td width="90" height="20" align="center">
   <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
<tr><td  bgcolor="#FEE8D1"  height="2"></td></tr>  <tr><td bgcolor="#FFFFFF"  height="1"></td></tr><tr><td align="center" bgcolor="#FEE8D1" height="22"><a href="<%=HOPE_InstallDir%>search/searchSimple.asp?keywords=<%=replace_text(request("keywords"))%>&moshi=<%=replace_text(request("moshi"))%>&kind=<%=replace_text(request("kind"))%>&country1=<%=replace_text(request("country1"))%>&province=<%=replace_text(request("province"))%>&city=<%=replace_text(request("city"))%>&searchtype=gongying">供求信息</a></td></tr> </table>
     </td>
	 <td width="50"></td>
   <td width="77" align="center">
   <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
<tr><td  bgcolor="#FEE8D1"  height="2"></td></tr>  <tr><td bgcolor="#FFFFFF"  height="1"></td></tr><tr><td align="center" bgcolor="#FEE8D1" height="22"><a href="<%=HOPE_InstallDir%>search/searchSimple.asp?keywords=<%=replace_text(request("keywords"))%>&moshi=<%=replace_text(request("moshi"))%>&kind=<%=replace_text(request("kind"))%>&country1=<%=replace_text(request("country1"))%>&province=<%=replace_text(request("province"))%>&city=<%=replace_text(request("city"))%>&searchtype=pro">产品</a></td></tr> </table>
   </td>
	 <td width="78"></td>
    <td width="77" align="center"> <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
<tr><td  bgcolor="#FEE8D1"  height="2"></td></tr>  <tr><td bgcolor="#FFFFFF"  height="1"></td></tr><tr><td align="center" bgcolor="#FEE8D1" height="22"><a href="<%=HOPE_InstallDir%>search/searchSimple.asp?keywords=<%=replace_text(request("keywords"))%>&moshi=<%=replace_text(request("moshi"))%>&kind=<%=replace_text(request("kind"))%>&country1=<%=replace_text(request("country1"))%>&province=<%=replace_text(request("province"))%>&city=<%=replace_text(request("city"))%>&searchtype=com">公司库</a></td></tr> </table></td>
   <td width="313"></td>
   </tr>
   <tr><td colspan="7" bgcolor="#FF6600" height="2"></td	></tr>
   </table>
 <%
   set rs=server.CreateObject("adodb.recordset")
   sadddate=month(date())

    if searchtype="com" then
 	If Database_type=1 Then
     sql=" select  * from Yixiang_corporation  left join yixiang_history_price  on   Yixiang_corporation.id=yixiang_history_price.gsid  and yixiang_history_price.keywords = '"&keywords&"' and  month(yixiang_history_price.begintime)="&sadddate&"  where Yixiang_corporation.id<>0 and Yixiang_corporation.flag=1   "
 	else
		 sql=" select  * from Yixiang_corporation  where Yixiang_corporation.id<>0 and Yixiang_corporation.flag=1   "
    end if
	elseif searchtype="pro" then 
	If Database_type=1 Then

	 sql="select Yixiang_productshow.*,Yixiang_corporation.flag,Yixiang_corporation.qymc,Yixiang_corporation.tm,Yixiang_corporation.gradeid,Yixiang_corporation.[user],Yixiang_corporation.country,Yixiang_corporation.sf,Yixiang_corporation.msn,Yixiang_corporation.city,Yixiang_corporation.web,Yixiang_corporation.url,Yixiang_corporation.trust_score from Yixiang_productshow join Yixiang_corporation on Yixiang_corporation.flag=1 and  Yixiang_corporation.id=Yixiang_productshow.gsid and Yixiang_productshow.flag=1 "
else

	 sql="select Yixiang_productshow.*,Yixiang_corporation.flag,Yixiang_corporation.qymc,Yixiang_corporation.tm,Yixiang_corporation.gradeid,Yixiang_corporation.[user],Yixiang_corporation.country,Yixiang_corporation.sf,Yixiang_corporation.msn,Yixiang_corporation.city,Yixiang_corporation.web,Yixiang_corporation.url,Yixiang_corporation.trust_score from Yixiang_productshow,Yixiang_corporation where Yixiang_corporation.flag=1 and  Yixiang_corporation.id=Yixiang_productshow.gsid and Yixiang_productshow.flag=1"
	end if
	else
		If Database_type=1 Then

	 sql="select Yixiang_info.*,Yixiang_corporation.id,Yixiang_corporation.qymc,Yixiang_corporation.tm,Yixiang_corporation.[user],Yixiang_corporation.gradeid,Yixiang_corporation.country,Yixiang_corporation.tm,Yixiang_corporation.sf,Yixiang_corporation.msn,Yixiang_corporation.city,Yixiang_corporation.web,Yixiang_corporation.url,Yixiang_corporation.trust_score from Yixiang_Info join Yixiang_corporation  on Yixiang_corporation.flag=1   and Yixiang_corporation.id=Yixiang_info.gsid  and Yixiang_info.flag=1  "  

	else
	sql="select Yixiang_info.*,Yixiang_corporation.id,Yixiang_corporation.qymc,Yixiang_corporation.tm,Yixiang_corporation.[user],Yixiang_corporation.gradeid,Yixiang_corporation.country,Yixiang_corporation.tm,Yixiang_corporation.sf,Yixiang_corporation.msn,Yixiang_corporation.city,Yixiang_corporation.web,Yixiang_corporation.url,Yixiang_corporation.trust_score from Yixiang_Info,Yixiang_corporation  where Yixiang_corporation.flag=1   and Yixiang_corporation.id=Yixiang_info.gsid  and Yixiang_info.flag=1  "  
	end if
     end if
	 
	 
   '关键字--------------------------------------------
   if keywords<>"" then
if searchtype="com" then
  sql=sql&"  and ( Yixiang_corporation.Qymc like '%"&keywords&"%'  or  Yixiang_corporation.Qyjj  like '%"&keywords&"%') "
  elseif searchtype="pro" then 
   sql=sql&"   and Yixiang_productshow.cpmc like '%"&keywords&"%' "
else
   sql=sql&" and (   Yixiang_corporation.Qymc like '%"&keywords&"%'  or  Yixiang_corporation.Qyjj  like '%"&keywords&"%' or Yixiang_info.showname like '%"&keywords&"%' or Yixiang_info.content like '%"&keywords&"%' or Yixiang_info.keywords  like '%"&keywords&"%' )"
   end if
   end if
   '--------------------------------------------------
   '经营模式---------------------------------------
   if moshi<>"" then
   if moshi<>"all" then 
    sql=sql&"  and Yixiang_corporation.qylb like '%"&moshi&"%'"
   end if
    end if
   '-------------------------------------
   '会员等级------------------------------------
   if kind<>"" then 
   if kind<>"all" then 
   sql=sql&" and Yixiang_corporation.gradeid="&kind&""
   end if
   end if
   '----------------------------------
   
   '---区域--------------------------------------
   if country1<>"" then 
   sql=sql&"  and(   Yixiang_corporation.Country  like '%"&Country1&"%' or Yixiang_corporation.sf  like '%"&Country1&"%' or  Yixiang_corporation.city  like '%"&Country1&"%' )"
   end if
     if province<>"" then 
   sql=sql&" and (   Yixiang_corporation.Country  like '%"&province&"%' or Yixiang_corporation.sf  like '%"&province&"%' or  Yixiang_corporation.city  like '%"&province&"%') "
   end if
     if city<>"" then 
   sql=sql&" and (   Yixiang_corporation.Country  like '%"&city&"%' or Yixiang_corporation.sf  like '%"&city&"%' or  Yixiang_corporation.city  like '%"&city&"%' )"
   end if
    '-------------------------------------------
 	if searchtype="pro" then 
		If Database_type=1 Then

	    sql=sql&"    left join yixiang_history_price  on  Yixiang_corporation.id=yixiang_history_price.gsid  and yixiang_history_price.keywords = '"&keywords&"' and  month(yixiang_history_price.begintime)="&sadddate&" order by yixiang_history_price.price desc,Yixiang_corporation.trust_score desc  "
		end if
	elseif searchtype="com" then 
		If Database_type=1 Then

   sql=sql&"   order by yixiang_history_price.price desc,Yixiang_corporation.trust_score desc  "
   end if
    else
		If Database_type=1 Then

	 sql=sql&"    left join yixiang_history_price  on  Yixiang_corporation.id=yixiang_history_price.gsid  and yixiang_history_price.keywords = '"&keywords&"' and  month(yixiang_history_price.begintime)="&sadddate&" order by yixiang_history_price.price desc,Yixiang_corporation.trust_score desc  "
	 end if

	end if

   rs.open sql,conn,1,1
     msg_per_page=20 '定义每页显示记录条数
%>
 <!--#include file="../inc/headpage.asp"-->
 <%
 if rs.eof then
 %>
 <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
 <tr><td  width="40"></td><td   height="100"><br>
 <font color="red" style="font-size:16px"><b>×</b></font><font style="font-size:14px">抱歉，找不到和您查询条件相符的&nbsp;<font color="red"><b><%=keywords%></b></font>&nbsp;
 <%if searchtype="com" then
 response.Write("公司信息")
 elseif searchtype="pro" then
 
 response.Write("产品信息")
 elseif searchtype="gongying" then
 response.Write("供应信息")
 end if
  %>
 
 </font>。
<br><br><b>建议您</b><br><br>
●.您刚才使用的搜索条件如下，请更改或减少您的搜索条件，重新搜索！<br><br>
您刚才使用的搜索条件如下:
<br>
●.&nbsp;<font color="red"><%=keywords%></font><br><br>
●.点此<a href="<%=HOPE_InstallDir%>member/"><font color="red">发布求购信息</font></a>，让客户主动来找您。 
<br><br>
●.点此&nbsp;<font color="#0099CC">◇</font><a href="<%=HOPE_InstallDir%>member/">订阅商机</a>&nbsp;&nbsp;<font color="red">☆</font><a href="<%=HOPE_InstallDir%>member/">商务服务中心</a>
<br><br>
●.点此→<a href="<%=HOPE_InstallDir%>feedback/">意见反馈</a>
</td></tr></table>
 <%
 else
 %>   
	 <table cellspacing="0" cellpadding="0" width="100%" align="center"    border="0">
<tr bgcolor="#F1F1F1"> <td width="13%"  height="25"></td>
<td width="57%"></td>
<td colspan="3"><font color="red">☆</font><a href="<%=HOPE_InstallDir%>member/">商务服务中心</a></td>
</tr>
<tr><td colspan="5" height="1"  bgcolor="#E0E0E0"></td></tr>
 <tr bgcolor="#F1F1F1"> <td width="13%"  height="25"></td>
<td width="57%">供应信息/公司</td>
<td width="14%">类型</td>
<td width="6%">指数</td>
<td width="10%">联系</td>
</tr> 
<tr><td colspan="5" height="1"  bgcolor="#E3E3E3"></td></tr>

<%
do while not rs.eof and rowcount > 0
 
if searchtype="com" then

%>
 
<tr><td   height="50" style="word-break:break-all"  > 
<%
 Set rez = New RegExp
        rez.Pattern ="("&keywords&")"
         rez.IgnoreCase = True
        rez.Global=True
		
		if rs("zycp")<>"" then 
         resultz = rez.Replace(rs("zycp"), "<font color=red>$1</font>") 
		 else
		 resultz=""
		 end if
		 %>

 <font color="#999999">主营产品:</font><br><font color="#426F9F"><b><%=resultz%></b></font> </td>
		 <td valign="top"  style="word-break:break-all" >
		 
 <br>
					    <%
						
 	  Set re1 = New RegExp
        re1.Pattern ="("&keywords&")"
         re1.IgnoreCase = True
        re1.Global=True
         result1 = re1.Replace(rs("qymc"), "<font color=red>$1</font>") 
					
					vipgrade="不详"	
	'--是否使用的名片页------------------------------------------------------------
	   set rsmp=server.CreateObject("adodb.recordset")
	   sqlmp="select * from yixiang_vipgrade where roleid="&rs("gradeid")
	   rsmp.open sqlmp,conn,1,1
	   if not rsmp.eof  then 
        vipgrade=rsmp("gradename")
	   if instr(rsmp("rolelist"),"qw")>0 then							
        if is2weburl=1 then
		%>
                        <a href="http://<%=rs("user")%>.<%=weburl1%>"  target="_blank"><font color="#003366"><b><u><%=result1%></u></b></font></a>
                        <%else%>
                        <a href="<%=HOPE_InstallDir%>vipcom/<%=rs("user")%>/" target="_blank"><font color="#003366"><b><u><%=result1%></u></b></font></a>
                        <%
	  end if 
	  else
	  %>
                        <a href="<%=HOPE_InstallDir%>Ptcom/<%=rs("user")%>.html" target="_blank"><font color="#003366"><b><u><%=result1%></u></b></font></a>   
   <%
	  end if
 	  rsmp.close
	  end if
	  %>
	  					   <br>
					   
<font color="#666666"><%=left(nohtml(rs("qyjj")),100)%>...					   </font>
   	  <br>
	 <font color="#666666"> 经营模式：<%=rs("qylb")%></font>
 					     <br>
	  
		<font color="#E07B29">[<%
		if rs("country")<>"" then
		response.Write(rs("country"))
		end if
		if rs("sf")<>"" then
		response.Write("--"&rs("sf"))
		end if
		if rs("city")<>"" then
		response.Write("--"&rs("city"))
		end if
		
		
		%>]	</font>			
 	</td>
	<td><font color="#999999"><%=vipgrade%></font></td>
	<td><font  style="font-size:14px" color="red"><b><U><%=rs("trust_score")%></U></b></font></td>
	
	<td>
	<%
 if gsid<>""  and  gradeid<>"" then 
set rsu=server.CreateObject("adodb.recordset")
sqlu="select * from yixiang_vipgrade where roleid="&gradeid
rsu.open sqlu,conn,1,1
if not rsu.eof then 
if instr(rsu("rolelist"),"msg")>0 then
 
     IF rs("msn")<>"" Then 
	 response.Write("MSN:<a href='msnim:chat?contact="&rs("msn")&"'><img alt='点击这里发MSN消息' align='absMiddle' border='0' onerror=""this.onerror=null;this.src='http://osi.hshh.org/msnunknown.gif';"" src='http://osi.hshh.org:8888/msn/"&rs("msn")&"' /> <hr size=1 color=#F3F3F3>")
    End If
	 if rs("tm")<>"" then 
		response.Write("<script>document.write(""<a href=javascript:SendMsg('Tencent://Message/?Menu=YES&Exe=TM&Uin="&rs("tm")&"') class='s'>用TM留言</a>"");</SCRIPT>")
     end if
 end if
rsu.close
end if
end if
%>
	 </td>
	</tr>
	<tr><td colspan="5" bgcolor="#CCCCCC" height="1"></td></tr>
	<%
 elseif searchtype="pro" then
'--产品的显示-----------------------------------------------------------------------------
%>
 <tr><td  height="50" align="center" valign="middle" style="word-break:break-all" > 
 
 
 
 <%
 
if rs("picture")<>"../../UploadFile/nopicture.gif" then 

 	  response.write"<A class=M href='"&HOPE_InstallDir&"productshow/offerdetail/"&rs("SortID")&"-"&rs("TypeID")&"-"&rs("typeid_2")&"-"&rs("id")&".html' target=_blank>"
	  urlh=HOPE_InstallDir&"productshow/offerdetail/"&rs("SortID")&"-"&rs("TypeID")&"-"&rs("typeid_2")&"-"&rs("id")&".html"
%>

<IMG    onmouseover="popImage(this,'<%=HOPE_InstallDir%>Vipcom/<%=rs("user")%>/<%=rs("picture")%>','<%=urlh%>');"   src="<%=HOPE_InstallDir%>Vipcom/<%=rs("user")%>/<%=rs("picture")%>"  width="55" height="55"    border=0 >

  
 
 
  </A>
                          <%else%>
                          <font     color="#cecfce">无图</font>
                          <%end if%> </td>
		 <td valign="top" ><a class="M"   href="<%=HOPE_InstallDir%>productshow/offerdetail/<%=rs("sortid")%>-<%=rs("typeid")%>-<%=rs("typeid_2")%>-<%=rs("id")%>.html"  target="_blank"><span class="lh15">
                <%
 		 Set re = New RegExp
re.Pattern ="("&keywords&")"
re.IgnoreCase = True
re.Global=True
result = re.Replace(rs("cpmc"), "<font color=red>$1</font>")%>
               <b><u> <%=result%></u></b></span></a><br />
                <%=Left(noHtml(rs("xxsm")),100)%>... 
                   <br />
  <%
 	   vipgrade="不详"
		'--是否使用的名片页------------------------------------------------------------
	   set rsmp=server.CreateObject("adodb.recordset")
	   sqlmp="select * from yixiang_vipgrade where roleid="&rs("gradeid")
	   rsmp.open sqlmp,conn,1,1
	   if not rsmp.eof  then 
      vipgrade=rsmp("gradename")
	   if instr(rsmp("rolelist"),"qw")>0 then				
				
  	  if is2weburl=1 then
 	  %>
                <a href="http://<%=rs("user")%>.<%=weburl1%>"  target="_blank" style="text-decoration:underline"><font color="#666666"><%=rs("qymc")%></font></a>
                <%
	  else
	  %>
                <a href="<%=HOPE_InstallDir%>vipcom/<%=rs("user")%>" target="_blank" style="text-decoration:underline"><font color="#666666"><%=rs("qymc")%></font></a>
                <%
		end if 
		else
		%>
                <a href="<%=HOPE_InstallDir%>Ptcom/<%=rs("user")%>.html" target="_blank" style="text-decoration:underline"><font color="#666666"><%=rs("qymc")%></font></a>
                <%
				end if
 				rsmp.close
				end if
				
				%>		
 	</td>
	<td><font color="#999999"><%=vipgrade%></font></td>
	<td><font  style="font-size:14px; color:red" ><b><U><%=rs("trust_score")%></U></b></font></td>
	
	<td>
	<%
 if gsid<>""  and gradeid<>"" then 
set rsu=server.CreateObject("adodb.recordset")
sqlu="select * from yixiang_vipgrade where roleid="&gradeid
rsu.open sqlu,conn,1,1
if not rsu.eof then 
if instr(rsu("rolelist"),"msg")>0 then
 
     IF rs("msn")<>"" Then 
	 response.Write("MSN:<a href='msnim:chat?contact="&rs("msn")&"'><img alt='点击这里发MSN消息' align='absMiddle' border='0' onerror=""this.onerror=null;this.src='http://osi.hshh.org/msnunknown.gif';"" src='http://osi.hshh.org:8888/msn/"&rs("msn")&"' /> <hr size=1 color=#F3F3F3>")
    End If
	 if rs("tm")<>"" then 
		response.Write("<script>document.write(""<a href=javascript:SendMsg('Tencent://Message/?Menu=YES&Exe=TM&Uin="&rs("tm")&"') class='s'>用TM留言</a>"");</SCRIPT>")
     end if
 end if
rsu.close
end if
end if
%>
	 </td>
	</tr>
	<tr><td colspan="5" bgcolor="#CCCCCC" height="1"></td></tr>


<%
'-----------------------------------------------------------------------------
else

 
 
 %>
 <tr><td height="50" align="center" valign="middle"  > 
 <% 
		 if trim(rs("draw")&"ok")="ok" and trim(rs("draw1")&"ok")="ok"  and trim(rs("draw2")&"ok")="ok" then 
		   PTpic=HOPE_InstallDir&"UploadFile/nopicture.gif"
		   else
		      if trim(rs("draw1"))<>"" and  trim(rs("draw2"))<>""  and trim(rs("draw"))<>"" then 
		       PTpic=HOPE_InstallDir&"Vipcom/"&rs("User")&"/"&rs("draw")
			  elseif trim(rs("draw2"))="" and trim(rs("draw1"))="" then
			    PTpic=HOPE_InstallDir&"Vipcom/"&rs("User")&"/"&rs("draw")
			  elseif trim(rs("draw2"))="" and trim(rs("draw"))="" then
				 PTpic=HOPE_InstallDir&"Vipcom/"&rs("User")&"/"&rs("draw1")
			  else
			     PTpic=HOPE_InstallDir&"Vipcom/"&rs("User")&"/"&rs("draw2")
			  end if 
		   end if 
 if rs("type")="买" then
	  response.write"<A   href='"&HOPE_InstallDir&"seller/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html' target=_blank>"
	  
	  hurl=HOPE_InstallDir&"seller/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html"
	  elseif rs("type")="卖" then
	  response.write"<A  href='"&HOPE_InstallDir&"tradeinfo/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html' target=_blank>"
	  hurl=HOPE_InstallDir&"tradeinfo/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html"
	  
	  end if%>
                             
  <IMG    onmouseover="popImage(this,'<%=PTpic%>','<%=hurl%>');"   src="<%=PTpic%>"  width="55" height="55"    border=0 >				 
 							  </A> </td>
		 <td valign="top" style="word-break:break-all">
		 
		 
 <% if rs("type")="买" then
	  response.write"<a  href='"&HOPE_InstallDir&"seller/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html' target=_blank>"
	  elseif rs("type")="卖" then
	 response.write"<a  href='"&HOPE_InstallDir&"tradeinfo/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html' target=_blank>"
	  end if
 
	  Set re = New RegExp
        re.Pattern ="("&keywords&")"
         re.IgnoreCase = True
        re.Global=True
         result = re.Replace(rs("showname"), "<font color=red>$1</font>")%>
                       <b><font style="font-size:14px"><u><%=result%></u></font></b> </a>
 					     <br>
					 <font color="#666666"> <%=rs("dateandtime")%></font>
					   <br>
					   
<%=left(noHtml(rs("content")),100)%>...					   
					   
					 
					   <br>
					    <%
						
 	  Set re1 = New RegExp
        re1.Pattern ="("&keywords&")"
         re1.IgnoreCase = True
        re1.Global=True
         result1 = re1.Replace(rs("qymc"), "<font color=red>$1</font>") 
					
					vipgrade="不详"	
	'--是否使用的名片页------------------------------------------------------------
	   set rsmp=server.CreateObject("adodb.recordset")
	   sqlmp="select * from yixiang_vipgrade where roleid="&rs("gradeid")
	   rsmp.open sqlmp,conn,1,1
	   if not rsmp.eof  then 
        vipgrade=rsmp("gradename")
	   if instr(rsmp("rolelist"),"qw")>0 then							
        if is2weburl=1 then
		%>
                        <a href="http://<%=rs("user")%>.<%=weburl1%>"  target="_blank"><font color="#666666"><u><%=result1%></u></font></a>
                        <%else%>
                        <a href="<%=HOPE_InstallDir%>vipcom/<%=rs("user")%>/" target="_blank"><font color="#666666"><u><%=result1%></u></font></a>
                        <%
	  end if 
	  else
	  %>
                        <a href="<%=HOPE_InstallDir%>Ptcom/<%=rs("user")%>.html" target="_blank"><font color="#666666"><u><%=result1%></u></font></a>   
   <%
	  end if
 	  rsmp.close
	  end if
	  %><br>
		<font color="#666666">[<%
		if rs("country")<>"" then
		response.Write(rs("country"))
		end if
		if rs("sf")<>"" then
		response.Write("--"&rs("sf"))
		end if
		if rs("city")<>"" then
		response.Write("--"&rs("city"))
		end if
		
		
		%>]	</font>			
 	</td>
	<td><font color="#999999"><%=vipgrade%></font></td>
	<td><font  style="font-size:14px; color:red"><b><U><%=rs("trust_score")%></U></b></font></td>
	
	<td>
	<%
 if gsid<>""  and gradeid<>"" then 
set rsu=server.CreateObject("adodb.recordset")
sqlu="select * from yixiang_vipgrade where roleid="&gradeid
rsu.open sqlu,conn,1,1
if not rsu.eof then 
if instr(rsu("rolelist"),"msg")>0 then
 
     IF rs("msn")<>"" Then 
	 response.Write("MSN:<a href='msnim:chat?contact="&rs("msn")&"'><img alt='点击这里发MSN消息' align='absMiddle' border='0' onerror=""this.onerror=null;this.src='http://osi.hshh.org/msnunknown.gif';"" src='http://osi.hshh.org:8888/msn/"&rs("msn")&"' /> <hr size=1 color=#F3F3F3>")
    End If
	 if rs("tm")<>"" then 
		response.Write("<script>document.write(""<a href=javascript:SendMsg('Tencent://Message/?Menu=YES&Exe=TM&Uin="&rs("tm")&"') class='s'>用TM留言</a>"");</SCRIPT>")
     end if
 end if
rsu.close
end if
end if
%>
	 </td>
	</tr>
	<tr><td colspan="5"   bgcolor="#CCCCCC" height="1"></td></tr>
	
<%
end if

icolor=icolor+1
if icolor>1 then icolor=0
rowcount=rowcount-1
rs.movenext
loop
%>

 <!---右边-->

	<tr><td colspan="3" align="center"><%=listPages(HOPE_InstallDir&"search/searchSimple.asp?keywords="&replace_text(request("keywords"))&"&moshi="&replace_text(request("moshi"))&"&kind="&replace_text(request("kind"))&"&country1="&replace_text(request("country1"))&"&province="&replace_text(request("province"))&"&city="&replace_text(request("city"))&"&searchtype="&replace_text(request("searchtype"))&"")%></td></tr>
	</table>
	<%
	end if
 	%>
</td></tr></table>
	<br><br>
<!--------地区js--------------------------------------------------------------------------------> 
  
 <SCRIPT language=javascript src="<%=HOPE_InstallDir%>js/area.js" purpose="INITIALIZER"></SCRIPT>
 <SCRIPT language=javascript>
 <!--
     for (var i=0;i<5;i++){
	    if (country1Form1.options[i].value == '<%=country%>'){
		    country1Form1.options[i].selected=true;
		}
	}
     for (var i=0;i<catArr1.length;i++) {
		catForm1.options[i+1]=new Option(catArr1[i].title,catArr1[i].id);

 		if(catForm1.options[i+1].value == '<%if country="中国" then response.write""&sf&""%>'){
	        	catForm1.options[i+1].selected=true;
	        }
	}
	changeProvince(catForm1);
	var len = boardForm1.options.length;
	for (var i=0;i<len;i++) {
 		if(boardForm1.options[i].value == '<%if country="中国" then response.write""&city&""%>') {
		    boardForm1.options[i].selected=true;
		}
	}
     if (country1Form1.options[country1Form1.selectedIndex].value!='中国') {
	    catForm1.style.display = 'none';
	    boardForm1.style.display = 'none';
		}
//     for (var i=0;i<9;i++){
//       if (document.form.DateTime[i].value =='<%=datetime%>'){
//            document.form.DateTime[i].selected = true;
//        }
//    }
-->
</SCRIPT> 
 
  <!--#include file="../inc/end.asp"-->
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>