<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
 <%
 
 	
   if issession=0 then
 	yxflag=Replace_Text(request.Cookies("yxflag"))
	gsid=Replace_Text(request.Cookies("Yxmemberid"))
 	else
 	yxflag=session("yxflag")
	gsid=session("id")
 	end if 
keywords=replace_text(request("keywords"))
viptype=Replace_Text(Request("viptype"))
sortid=Replace_Text(Request.form("topCatFormKey"))                                     '第一类
typeid=Replace_Text(Request.form("secondCatFormKey"))
city=replace_text(request("city"))
price=replace_text(request("price"))
sortidfrom=replace_text(request("topCatFormKey"))
'第二类
if typeid="" then
	typeid=0
end if
typeid_2=Replace_Text(Request.form("leafCatFormKey"))
if typeid_2="" then
	typeid_2=0
end if
  
sql="select * from Yixiang_vipinfo where vipinfo_id<>0 "
if city<>"" then
sql= sql&" and province like '%"&city&"%' " 
end if 
if keywords<>"" then 
sql=sql&"  and  (vipshowname like '%"&keywords&"%' or vipcontent like '%"&keywords&"%' or keywords like '%"&keywords&"%')"
end if
if sortid<>"" then 
sql=sql&" and sortid="&sortid
elseif sortidfrom<>"" then 
sql=sql&" and sortid="&sortidfrom
end if 
if typeid<>"" then
if typeid<>0 then
sql=sql&"  and typeid="&typeid
end if
end if
if viptype<>"" then
if viptype<>"all" then
sql=sql&" and viptype="&viptype
end if
end if

if price<>"" then
sql=sql&" and vippricetems like '%"&price&"%'"
end if
sql=sql&" order by vipinfo_id desc" 

Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1 

msg_per_page=15 '定义每页显示记录条数
%>
<!--#include file="../inc/headpage.asp"-->
<style type="text/css">
<!--
.searchbar1 {BORDER-TOP: #f1f1f1 3px solid;  FONT-WEIGHT: bold; BACKGROUND: #e7e7e7; BORDER-BOTTOM: #bebebe 3px solid; FONT-FAMILY: 宋体; padding-top:3px}
.companybar1 {background:url("<%=HOPE_InstallDir%>seller/images/search_bg.gif");border:#999999 solid;border-width:1 1 0 1;height:29px;border-bottom:#666666 3 solid;text-align:center;font:bold 14px;padding-top:4px;}
.orangeborder {border:#CC3300 2 solid;padding-left: 15px}
.cate {padding-left: 14px;font-size:12px;LINE-HEIGHT: 150%;}
.smalltoppad3 {padding-top:3px}
.STYLE1 {color: #FFFFFF}
 image{ border:none;}

-->
</style>
<script language="javascript">
	 function subcheck()
	 {
  	//var str=document.form.keywords.value;
//	if(str.replace(/\s+/g,"")==""||str=="请输入关键字")
//	{
//	alert("请输入关键字！");
//	document.form.keywords.focus();
//	return false;
//	}
	 }
	 </script>
	 <SCRIPT language=javascript> 
<!-- Hide 
function killErrors() { 
return true; 
} 
window.onerror = killErrors; 
 // --> 
</SCRIPT>
 <%
HOPE_className=7
HOPE_className_new=7
HOPE_searchName="searchvipinfo.asp"
keywords=Replace_Text(request("keywords"))
if keywords<>"" then
	HOPE_classKeywords=keywords
else
	HOPE_classKeywords="请输入你感兴趣的专项商机"
end if
%>
<!--#include file="../inc/head1.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%>专项商机搜索</title>
<SCRIPT language=JavaScript src="<%=HOPE_InstallDir%>mall.js"  type=text/JavaScript></SCRIPT>
<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>
<table cellspacing="0" cellpadding="0" width="<%=HOPE_PageWidth%>" align="center" border="0">
  <tbody>
    <tr>
      <td height="3"></td>
    </tr>
    <tr>
      <td><table cellspacing="0" bordercolordark="#ffffff" cellpadding="0" width="100%" bordercolorlight="#cccccc" border="1">
        <tbody>
          <tr>
            <td height="22"><table cellspacing="0" cellpadding="0" width="100%" border="0">
              <tbody>
                <tr>
                  <td width="23%"><img height="25" src="<%=HOPE_InstallDir%>search/images/so.gif" width="176" /></td>
                  <td width="77%" align="left"><% response.Write("&nbsp;<b><font color=red>→</font></b> 〖<a href='"&HOPE_InstallDir&"search/searchproduct.asp'>产品搜索</a>〗 〖<a href='"&HOPE_InstallDir&"search/searchCom.asp'>公司搜索</a>〗 〖<a href='"&HOPE_InstallDir&"search/News_search.asp'>资讯搜索</a>〗 〖<a href='"&HOPE_InstallDir&"search/searchhelp.asp'>帮助搜索</a>〗 〖<a href='"&HOPE_InstallDir&"search/searchsale.asp'>供应搜索</a>〗 〖<a href='"&HOPE_InstallDir&"search/searchbuy.asp'>求购搜索</a>〗 〖<a href='"&HOPE_InstallDir&"corporation/sitemap.html' target=_blank>行业类别导航</a>〗")%><a href='<%=HOPE_InstallDir%>search/searchnear.asp'><font color="#0099CC"><b>模糊搜索</b></font></a></td>
                </tr>
              </tbody>
            </table></td>
          </tr>
          <tr>
            <td bgcolor="#eeeeee" height="28"><div align="center">
              <table border="0" width="<%=HOPE_PageWidth%>" align="center" cellpadding="0" cellspacing="0">
                <form action="<%=HOPE_InstallDir%>search/searchvipinfo.asp" method="post" name="form" id="form" onsubmit="return subcheck();">
                  <tr>
                    <td width="89" align="right">行业类别:                       </td>
                    <td width="574" align="left">
                      <select id=topCatFormKey onchange=onChangeTopCategory() name=topCatFormKey maxlength="80" style="width:120px;">
                        <option value="0" selected="selected"></option>
                      </select>
&nbsp;
<select id=secondCatFormKey onchange=onChangeSecondCategory() maxlength="80" name=secondCatFormKey style="width:120px;">
  <option value="0" selected="selected"></option>
</select>
&nbsp;
<select id=leafCatFormKey onchange=onChangeLeafCategory() maxlength="80"
                  name=leafCatFormKey style="width:120px;">
  <option value="0" selected="selected"></option>
</select>
<input name="topCatFormKeyValue" type="hidden" id="topCatFormKeyValue" value="" />
<input name="secondCatFormKeyValue" type="hidden" id="secondCatFormKeyValue" value="" />
<input name="leafCatFormKeyValue" type="hidden" id="leafCatFormKeyValue" value="" />
<script language=JavaScript src="<%=HOPE_InstallDir%>js/changehope.js"></script>
<script language=JavaScript src="<%=HOPE_InstallDir%>js/allCategorys.js"></script>
<script language=JavaScript>
//调用initTopCategoryForm函数向列表中加入数据
initTopCategoryForm();
</script></td>
                  </tr>
                  <tr>
                    <td width="89" align="right">商机类别:</td>
                    <td align="left">
                      <select size="1" name="viptype">
                          <option value="all">全部</option>
                          <%
 set rsvip=server.CreateObject("adodb.recordset")
 sqlvip="select * from yixiang_vipinfo_class"
 rsvip.open sqlvip,conn,1,1
 if not rsvip.eof then 
 do while not rsvip.eof 
 %>
           <option value="<%=rsvip("typeid")%>"><%=rsvip("type")%></option>
   <%
 rsvip.movenext
 loop
 rsvip.close
 end if
 %>
                        </select>
                      &nbsp;关键字:
                      <input name="keywords" type="text" id="keywords"  onfocus="if(this.value=='请输入关键字'){this.value='';}" onblur="this.value=this.value.replace(/\s/g,'')" value=""   maxlength="25" />
                      &nbsp;
                      <input type="submit"  name="seabtn"  value="立即搜索" style=" border-color:#ffffff"/></td>
                  </tr>
                </form>
              </table>
            </div></td>
          </tr>
        </tbody>
      </table></td>
    </tr>
    <tr>
      <td height="5"></td>
    </tr>
  </tbody>
</table>
<table width="<%=HOPE_PageWidth%>"  border="1" bordercolor="#F2F2F2" align="center" cellpadding="2" cellspacing="0" bgcolor="#FAFAFA">
        <tr>
          <td  align="left"> &nbsp;
            <% 
		    response.write" <img src="""&HOPE_InstallDir&"images/icon_point.gif"" border=0 width=18 height=19  align=absmiddle> <A href='"&HOPE_InstallDir&"search/searchproduct.asp?sortid="&sortid&"&typeid="&typeid&"&typeid_2="&typeid_2&"&keywords="&keywords&"'>所有产品信息</a>"
		    %>
            <%response.write" <img src="""&HOPE_InstallDir&"images/icon_point.gif"" border=0 width=18 height=19  align=absmiddle> <A href='"&HOPE_InstallDir&"search/searchsale.asp?sortid="&sortid&"&typeid="&typeid&"&typeid_2="&typeid_2&"&keywords="&keywords&"'>供应信息</A>"%>
            <img src="<%=HOPE_InstallDir%>images/icon_point.gif" border="0" width="18" height="19"  align="absmiddle" />
            <%response.write"<A href='"&HOPE_InstallDir&"search/searchbuy.asp?sortid="&sortid&"&typeid="&typeid&"&typeid_2="&typeid_2&"&keywords="&keywords&"'>求购信息</A>"%>
            </span><img src="<%=HOPE_InstallDir%>images/icon_point.gif" border="0" width="18" height="19"  align="absmiddle" /><a href="<%=HOPE_InstallDir%>member/">发布求购信息</a><img src="<%=HOPE_InstallDir%>images/icon_point.gif" border="0" width="18" height="19"  align="absmiddle" /> <a href="<%=HOPE_InstallDir%>member/" class="red">按关键字定阅</a></td>
        </tr>
</table>
    <table width="<%=HOPE_PageWidth%>"   border="1" bordercolor="#F2F2F2" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse">
 		   <tr> <td bgcolor="E7E7E7" height="30" align="center" width="16%"  ><font color="666666">图片 </font></td>            
              <td bgcolor="E7E7E7" align="center" width="44%" ><font color="666666">信息主题</font></td>
              <td bgcolor="E7E7E7" align="center" width="11%"  ><div align="center"><font color="666666">有效期</font></div></td>
              <td bgcolor="E7E7E7" align="center" width="11%" ><div align="center"><font color="666666">所属类型</font></div></td>
              <td bgcolor="E7E7E7" align="center" width="18%"  ><div align="center"><font color="666666">所属区域</font></div></td>
          </tr>
   <%
if rs.eof then
 response.Write"<tr><td  colspan=5 height=150 align=center><br><br><font color=red>暂无信息</font></td></tr>"
 else
 do while not rs.eof and rowcount > 0
 %>
             <tr <%if icolor=0 then response.write"bgColor=#ffffff" else response.write"bgColor=#f6f6f6" end if%> onmouseover="this.style.backgroundColor='#FFF8F4'" onmouseout="this.style.backgroundColor='<%if icolor=0 then response.write"#ffffff" else response.write"#f6f6f6" end if%>'">
			<td  height="80" align="center"><%if rs("picture")<>"" and  rs("picture")<>"nopicture.gif" then %>
			
			<a class="M" href="<%=HOPE_InstallDir%>vipinfo/offerdetail/<%=rs("viptype")%>-<%=rs("vipinfo_id")%>.html" target="_blank"> 
			
  		<IMG    onmouseover="popImage(this,'<%=HOPE_InstallDir%>uploadfile/<%=rs("picture")%>','<%=HOPE_InstallDir%>vipinfo/offerdetail/<%=rs("viptype")%>-<%=rs("vipinfo_id")%>.html');"   src="<%=HOPE_InstallDir%>uploadfile/<%=rs("picture")%>"  width="55" height="55"    border=0 >	
			
			</a>
			<%else%>
			<font color="#999999">无图</font>
			<%end if%>
			</td>
              <td width="44%" align="left" class="m">&nbsp;<a class="M" href="<%=HOPE_InstallDir%>vipinfo/offerdetail/<%=rs("viptype")%>-<%=rs("vipinfo_id")%>.html" target="_blank" style="text-decoration:underline"> 
                <% Set re = New RegExp
re.Pattern ="("&keywords&")"
re.IgnoreCase = True
re.Global=True
result = re.Replace(rs("vipshowname"), "<font color=red>$1</font>")%>
                <%=result%></a>
               
				<br />&nbsp;<%=left(rs("vipcontent"),150)%>..
				<br /><font color="#666666">&nbsp;[发布时间：<%=rs("dateandtime")%>] </font>
			  </td>
              <td width="11%" class="cate"><div align="center"> <%=rs("vipperiod")%></div></td>
              <td align="middle" width="11%" class="cate"><div align="center">
                <%
	  set rsvt=server.CreateObject("adodb.recordset")
	  sqlvt="select * from yixiang_vipinfo_class where typeid="&rs("viptype")
	  rsvt.open sqlvt,conn,1,1
	  if not rsvt.eof then 
	  response.Write(rsvt("type"))
      rsvt.close
	  end if	  
	%>
              </div></td>
              <td class="s" align="middle" width="18%" style="word-break:break-all"> <%=rs("country")%>   </td>
            </tr>
        <%
icolor=icolor+1
if icolor>1 then icolor=0
rowcount=rowcount-1
rs.movenext
loop
end if

%> 
      
	  <tr><td  colspan="5"  align="center" ><%=listPages(""&HOPE_InstallDir&"search/searchvipinfo.asp")%></td></tr>
</table></td>
    </tr>
  </tbody>
</table>
<br />
<script>
   
     function Category(id,title) {
			this.id = id;
			this.title=title;
			this.boardlist=new Array();
			this.addBoard=addBoard;
			this.getOptions = getOptions;
        }        
       function addBoard(board) {
            this.boardlist = this.boardlist.concat(board);
        }
       function getOptions() {
			var tmp = new Array();
			for(var i=0; i < this.boardlist.length;i++) {
			var b = this.boardlist[i];
			tmp[i]= b.getOption();
			}
			return tmp;
        }
      function Board(catid,id,title,total) {                
			this.catid=catid;
			this.id=id;
			this.title=title;
			this.getOption=getOption;
        }
     function getOption() {
       return new Option(this.title,this.id);                
        }
     function changeCategory(list) {
        if (list.selectedIndex<=0) {
                catForm.options[0].selected=true;
                var len = boardForm.options.length;
                for (var i=len-1;i>0;i--){
                        boardForm.options[i]=null;
                }                                        
         }
        else {
                var boards = catArr[list.selectedIndex-1].getOptions();
                var len = boardForm.options.length;
                for (var i=len-1;i>0;i--){
                        boardForm.options[i]=null;
                }                
                for (var i=0;i<boards.length;i++) {
                        boardForm.options[i+1]=boards[i];
                }
                }
                boardForm.options[0].selected=true;
        }
     function selectBoard(catid,bid,list) {
		var isExist = false; //是否是叶子类目
		for(var i=0;i<catForm.length;i++) {
				if (catForm.options[i].value==catid) {
						//alert("get Category");
						catForm.options[i].selected=true;
						changeCategory(catForm);
						break;                        
				}                        
		}                                
		for(var i=0;i<boardForm.length;i++) {
				if (boardForm.options[i].value==bid) {
						//alert("get Board");
						boardForm.options[i].selected=true;  
						isExist = true;                              
						break;
				}                        
		}   
		 if (!isExist) {//如果是二级类目，则下拉框只显示该二级类目下所有类目                   
			var boards = catArr[catForm.selectedIndex-1].getOptions();
			var len = boardForm.options.length;
			for (var i=len-1;i>0;i--){
				boardForm.options[i]=null;
			}     
			var locate = 1;           
			for (var i=0;i<boards.length;i++) {                                                              
				if(boards[i].text.indexOf(bid) == 0){
					boardForm.options[locate]=boards[i];
					locate++;
				}                                                
			}
			 boardForm.options[0].selected=true;   
		}            
        }        
	  var catArr = new Array();
	  var cur;   
	  var catForm = document.form.p_z_Z_RootCategory;
	  var boardForm = document.form.p_z_Z_CategoryId1;
    function showCategorys() {
		var catId = catForm.value
		if(boardForm.value){
			catId = boardForm.value
		}else if(catForm.value){
			catId = catForm.value
		}
	   }
        for (var i=0;i<catArr.length;i++) {
          catForm.options[i+1]=new Option(catArr[i].title,catArr[i].id);
        }
     function initRootCategorys(){
	    for (var i=0;i<catArr.length;i++) {
	    catForm.options[i+1]=new Option(catArr[i].title,catArr[i].id);
	    }
	}  
 </script>
<tr><td valign=top><!--#include file="../inc/end.asp"-->
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>