<!--#include file="mdb.asp"-->
<!--#Include File="Check_hx.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/format.asp"-->
<!--#include file="inc/inc.asp"-->
<%
if request.form("bigclass")<>"" then
  if not isInteger(request.form("bigclass")) then
    Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
    Response.End
  end if
end if
if request.form("smallclass")<>"" then
  if not isInteger(request.form("smallclass")) then
    Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
    Response.End
  end if
end if
if request.form("sheng")<>"" then
  if not isInteger(request.form("sheng")) then
    Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
    Response.End
  end if
end if
if request.form("city")<>"" then
  if not isInteger(request.form("city")) then
    Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
    Response.End
  end if
end if
if request.querystring("ss")<>"" then
  if not isInteger(request.querystring("ss")) then
    Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
    Response.End
  end if
end if
bigclass=cint(request.form("bigclass"))
smallclass=cint(request.form("smallclass"))
sheng=cint(request.form("sheng"))
city=cint(request.form("city"))
keyword=trim(replace(request.form("keyword"),"'",""))
strsql=""
if bigclass<>"" then
strsql=strsql&" and bcat_id="&bigclass&" "
end if
if smallclass<>"" then
strsql=strsql&" and cat_id="&smallclass&" "
end if
if sheng<>"" then
strsql=strsql&" and sheng="&sheng&" "
end if
if city<>"" then
strsql=strsql&" and city="&city&" "
end if
if Keyword<>"" then
strsql=strsql&" and hy_title like '%"&Keyword&"%' "
end if
sql="select * from hy where passed=0 "&strsql&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalhy=rs.recordcount
start="企业黄页"
call head()
call menu()
%>
<!--导航栏-->
<TABLE cellSpacing=0 cellPadding=0 width=958 border=0 align="center">
    <TR>
      <TD width=4></TD>
      <TD width=950 class="a3" height=24>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="show_corporation.asp?bigclass=1">国家机关</a> ·<a href="show_corporation.asp?bigclass=2">科教文体</a> ·<a href="show_corporation.asp?bigclass=3">运输物流</a> ·<a href="show_corporation.asp?bigclass=4">金融贸易</a> ·<a href="show_corporation.asp?bigclass=5">医疗保健</a> ·<a href="show_corporation.asp?bigclass=6">娱乐休闲</a> ·<a href="show_corporation.asp?bigclass=7">日用百货</a> ·<a href="show_corporation.asp?bigclass=8">城建房产</a> ·<a href="show_corporation.asp?bigclass=9">通信互联</a> ·<a href="show_corporation.asp?bigclass=10">商务广告</a> ·<a href="show_corporation.asp?bigclass=11">粮油食品</a> ·<a href="show_corporation.asp?bigclass=12">印刷包装</a></TD>
      <TD width=4></TD>
    </TR>
    <TR>
      <TD width=4></TD>
      <TD width=950 class="a4" height=9></TD>
      <TD width=4></TD>
    </TR>
</TABLE>
<!--导航栏-->

<!--广告位A-->
<TABLE width=958 border=0 align="center" cellPadding=0 cellSpacing=0>
    <TR>
      <TD width=4></TD>
      <TD align=middle width=950 bgColor=#ffffff height=24><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TR>
            <TD width="100%" bgColor=#da251d height=2></TD>
          </TR>
          <TR>
            <TD width="100%"><%Call hx66_AD(1)%></TD>
          </TR>
          <TR>
            <TD width="100%" bgColor=#da251d height=2></TD>
          </TR>
      </TABLE></TD>
      <TD width=4></TD>
    </TR>
</TABLE>
<!--广告位A-->

<!--倒计时-->
<TABLE cellSpacing=0 cellPadding=0 width=958 border=0 align="center">
    <TR>
      <TD width=4></TD>
      <TD align=middle width=950 bgColor=#ffffff height=24><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TR>
            <TD width="100%" class="a5" height=9></TD>
          </TR>
          <TR>
            <TD align=middle width="100%" class="a6" height=31>
<table width="100%" border=0 cellpadding=0 cellspacing=0>
 <TR>
   <TD width="65" align="center"><img src="skin/1/login_title.gif" width="37" height="31"><TD><%
  Response.Write "您的位置： <a href='index.asp'>"&webname&"</a> ->> <a href='corporation.asp'>企业黄页</a>" & vbCrLf
if request.querystring("bigclass")<>"" then
sql="select * from hycat where cat_id="&request.querystring("bigclass")
set rs1=server.createobject("adodb.recordset")
rs1.open sql,conn,1,1
%>  → <b><%=rs1("cat_name")%></b> 行业 的所有企业
<%elseif request.querystring("smallclass")<>"" then
sql="select * from hycat where cat_id="&request.querystring("smallclass")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1%>  → <b><%=rs2("cat_name")%></b> 行业 的所有企业
<%else
sql="select * from area where cat_id="&request.querystring("sheng")
set rs3=server.createobject("adodb.recordset")
rs3.open sql,conn,1,1
sql="select * from area where cat_id="&request.querystring("city")
set rs4=server.createobject("adodb.recordset")
rs4.open sql,conn,1,1
%>  → <b><%=rs3("cat_name")%><%=rs4("cat_name")%></b>所有企业
<%
end if%><td height="25" align="right"><a href="corporation_put.asp"><B>申请加入黄页</B></a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
</TD>
 </TR>
</TABLE>
            </TD>
          </TR>
      </TABLE></TD>
      <TD width=4></TD>
    </TR>
</TABLE>
<!--倒计时-->

<TABLE width=958 border=0 align="center" cellPadding=0 cellSpacing=0>
    <TR>
      <TD width=4></TD>
      <TD align=middle width=950 bgColor=#ffffff height=24><TABLE cellSpacing=0 cellPadding=0 width=950 border=0>
          <TR>
            <TD align=middle vAlign=top width=198><TABLE height=51 cellSpacing=0 cellPadding=0 
width="100%" border=0>
                <TR>
                  <TD align=middle width=30 class="a1" height=34><IMG height=20 src="skin/1/gu1.gif" width=24 border=0></TD>
                    <TD class="a1" height=34 width=170><a href="#" class="STYLE1">会员登录</a></TD>
                </TR>
                <TR>
                  <TD width="100%" colSpan=2 height=1></TD>
                </TR>
                <TR>
                  <TD width="100%" colSpan=2 height=150><%call userlogin()%></TD>
                </TR>
                <TR>
                  <TD width="100%" colSpan=2 height=1></TD>
                </TR>
            </TABLE><TABLE height=51 cellSpacing=0 cellPadding=0 width="100%" border=0>
                <TR>
                  <TD align=middle width=30 class="a1" height=34><IMG height=20 src="skin/1/gu1.gif" width=24 border=0></TD>
                    <TD class="a1" height=34 width=170><a href="#" class="STYLE1">分类索引</a></TD>
                </TR>
                <TR>
                  <TD width="100%" colSpan=2 height=1></TD>
                </TR>
                <TR>
                  <TD width="100%" colSpan=2 height=80><TABLE WIDTH='100%' CELLPADDING='0' CELLSPACING='0' BORDER='0'>
<tr>
<td height='22' width='100%'>
<SCRIPT language=javascript>
function showmenu1(buyok,img)
{
if(buyok.style.display=="none"){
buyok.style.display="";
img.src="img/bclass2.gif";
} else {
buyok.style.display="none"; 
img.src="img/bclass1.gif";
}
}
</SCRIPT><%
response.write "<TABLE align=center cellSpacing=0 cellPadding=0 width='100%' border=0>" & vbCrLf
sql="select * from hycat where sid=0"
set rs1=conn.execute(sql)
i=0
do while not rs1.eof
i=i+1
response.write "<TR><TD language=javascript onmouseup='showmenu1(buyok"&i&",img"&i&");' valign=middle>&nbsp;<IMG id=img"&i&" height=20 src=img/bclass1.gif width=20 align=absMiddle>"
sql="select hy_id from hy where bcat_id="&rs1("cat_id")
set rs01=server.createobject("adodb.recordset")
rs01.open sql,conn,1,1
geshu=rs01.recordcount

if request("bigclass")=cstr(rs1("cat_id")) then
response.write "&nbsp;<font color=""#FF0000"">［"&rs1("cat_name")&"］</a></font>("&geshu&")</td></tr>" & vbCrLf
else
response.write "&nbsp;<a href='show_corporation.asp?bigclass="&rs1("cat_id")&"'>［"&rs1("cat_name")&"］</a>("&geshu&")</td></tr>" & vbCrLf
end if
sql="select * from hycat where sid="&rs1("cat_id") 
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
response.write "<TR><TD id=buyok"&i&" style='display: none'>" & vbCrLf
do while not rs2.eof
sql="select hy_id from hy where cat_id="&rs2("cat_id")
set rs02=server.createobject("adodb.recordset")
rs02.open sql,conn,1,1
geshu1=rs02.recordcount
if request("smallclass")=cstr(rs2("cat_id")) then
response.write "&nbsp;<IMG height=20 src=img/bclass3.gif width=36 align=absMiddle border=0><font color=""#FF0000"">"&rs2("cat_name")&"</font>("&geshu1&")<BR>" & vbCrLf
else
response.write "&nbsp;<IMG height=20 src=img/bclass3.gif width=36 align=absMiddle border=0><a href='Show_corporation.asp?smallclass="&rs2("cat_id")&"'>"&rs2("cat_name")&"</a>("&geshu1&")<BR>" & vbCrLf
end if
rs2.movenext
loop
response.write "</td></tr>" & vbCrLf
rs1.movenext
loop
if rs1.eof and rs1.bof then%><tr><td>
	<p align="center">当前没有分类</td></tr>
<%end if
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing
response.write "</table>" & vbCrLf
%></td></tr>

</table></TD>
                </TR>
                <TR>
                  <TD width="100%" colSpan=2 height=1></TD>
                </TR>
            </TABLE></TD>
            <TD vAlign=top align=middle width=1 bgColor=#cecccc></TD>
            <TD vAlign=top align=middle><TABLE height=51 cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TR>
                <TD align=middle width=30 class="a1" height=34><IMG height=20 src="skin/1/gu1.gif" width=24 border=0></TD>
                <TD class="a1" height=34 width=720><a href="#" class="STYLE1">企业展示</b></span>&nbsp;&nbsp;<%sql="select hy_id from hy where passed=1"
  set rs1=server.createobject("adodb.recordset")
  rs1.open sql,conn,1,1
  shgqcount=rs1.recordcount%>待审核<span><%=shgqcount%></SPAN>个</a></TD></TR>
              <TR></tr>
        <%if request.querystring("sheng")<>"" then%>
        <tr>
                <TD width="100%" colSpan=2 align="center"><table border='1' bordercolor='#e7e7e7' cellpadding=0 width='98%' align='center' style='margin-top:4px;margin-bottom:4px;'>
				<tr>
<%sql="select * from area where sid="&request.querystring("sheng")
set rs0=server.createobject("adodb.recordset")
rs0.open sql,conn,1,1
i=0
do while not rs0.eof
i=i+1
sql="select hy_id from hy where city="&rs0("cat_id")
set rs01=server.createobject("adodb.recordset")
rs01.open sql,conn,1,1
geshu2=rs01.recordcount
%>
<td align="center" height="22"><a href="Show_corporation.asp?sheng=<%=request.querystring("sheng")%>&city=<%=rs0("cat_id")%>"><%=rs0("cat_name")%></a>(<%=geshu2%>)</td>
<%if i mod 6 =0 then%>
</tr><tr>
<%
end if
rs0.movenext
loop
if rs0.eof and rs0.bof then%>
<td>
	<p align="center">当前没有小分类</td>
<%end if%>
</tr>

				</tr>
			</table>
			</TD>
        </tr><%end if%>
        <tr><script language = "JavaScript">
var onecount;
subcat = new Array();
         <%sql="select * from hycat where sid<>0"
set rs0=server.createobject("adodb.recordset")
rs0.open sql,conn,1,1
i=0
do while not rs0.eof
sql="select * from hycat where cat_id="&rs0("sid")
set rs1=server.createobject("adodb.recordset")
rs1.open sql,conn,1,1
%>         
         subcat[<%=i%>] = new Array("<%=rs0("cat_name")%>","<%=rs1("cat_id")%>","<%=rs0("cat_id")%>");
   <%
   i=i+1
rs0.movenext
loop%>             
        onecount=<%=i%>;

function changelocationid(locationid)
    {
    document.form2.smallclass.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.form2.smallclass.options[document.form2.smallclass.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    
</SCRIPT>
          <td align=center colspan=2><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BORDER="0">
<FORM name="form2"  method=post action="searchhy.asp">
  <TR>
    <TD VALIGN="top" ALIGN="center">
       
        <p>
       
        信息搜索：<select name="sheng"  size="1" onchange="window.open('show_corporation.asp?ss='+this.options[this.selectedIndex].value,'_self')">
        <option value="0" selected>省份</option>
        <%sql="select * from area where sid=0"
set rs0=server.createobject("adodb.recordset")
rs0.open sql,conn,1,1
do while not rs0.eof
%>         
<option value="<%=rs0("cat_id")%>" <%if cstr(request("ss"))=cstr(rs0("cat_id")) and request("ss")<>"" then%> selected<%end if%>><%=rs0("cat_name")%></option>
<%
rs0.movenext
loop
%>
          </select> 
            <select name="city" >
            <option value="0" selected>城市</option>
  <%ss=cint(request.querystring("ss"))
  if ss<>"" then
        sql="select * from area where sid<>0 and sid="&ss&""
set rs0=server.createobject("adodb.recordset")
rs0.open sql,conn,1,1
do while not rs0.eof
%>         
<option value="<%=rs0("cat_id")%>" ><%=rs0("cat_name")%></option>
<%
rs0.movenext
loop
end if
%>   
        
          </select>
<select name="bigclass" onChange="changelocationid(document.form2.bigclass.options[document.form2.bigclass.selectedIndex].value)" size="1">
              <option value="" selected>大类</option>
        <%sql="select * from hycat where sid=0"
set rs0=server.createobject("adodb.recordset")
rs0.open sql,conn,1,1
do while not rs0.eof
%>         
<option value="<%=rs0("cat_id")%>"><%=rs0("cat_name")%></option>
<%
rs0.movenext
loop
%>
              </select>
              <select name="smallclass" class="input">
            <option value="" selected>小类</option>         
          </select>&nbsp;<input type="text" name="keyword" size="20" class="input" value="输入查询信息关键字" maxlength="50" onfocus="this.value=''">
&nbsp;&nbsp;&nbsp;&nbsp;<input style="{background-image: url(img/search_1.gif);height: 18px; width: 52px;border: 0px;}" value="" type="submit"></TD>
</TR></FORM>
</TABLE>
</TD>
        </tr>

        <tr>
          <td valign="top" colspan=2>
<TABLE border="1" style="border-collapse: collapse;border:dotted 1px" bordercolor="#F7F7F7" cellpadding=0 width="100%" align="center">
   <tr align="center">
    <td width="6%" height="26">状态</td>
    <td width="35%">企业名称</td>
    <td width="12%">所属行业</td>
    <td width="12%">性质</td>
    <td width="11%">省份</td>
    <td width="11%">城市</td>
    <td width="13%">加入日期</td>
  </tr>
<%if rs.eof and rs.bof then%>
<tr><td colspan=7>
	<p align="center"><%if request("keyword")<>"" then%>没有找到包含[<b><font color=red><%=request("keyword")%></font></b>]的信息！<%else%>该分类暂时没有信息<%end if%></td></tr>
<%end if%><%hyperpage=30
if not rs.eof then
rs.movefirst
rs.pagesize=hyperpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   end if
else
   currentpage=1
end if
   if currentpage<>1 then
       if (currentpage-1)*hyperpage<totalhy then
	       rs.move(currentpage-1)*hyperpage
		   dim bookmark
		   bookmark=rs.bookmark
	   end if
   end if
   if (totalhy mod hyperpage)=0 then
      totalpages=totalhy\hyperpage
   else
      totalpages=totalhy\hyperpage+1
   end if
i=0
do while not rs.eof and i<hyperpage
        %>
<tr align="center">
<TD height=22>
<%  sql="select cat_id,cat_name from hycat where cat_id="&rs("cat_id")
set rscat=server.createobject("adodb.recordset")
rscat.open sql,conn,1,1   
  
if rs("istop")="1" then      
folder="<img src=""img/1.gif"" title=固顶信息>"       
else
folder="<img src=""img/4.gif"" title=普通信息>"       
end if      
if rs("istop")="0" then      
if rs("isbest")=1 then
folder="<img src=""img/2.gif"" title=推荐信息>"
elseif rs("gq_count")>=popgqnum then
folder="<img src=""img/3.gif"" title=热门信息>"      
else
folder="<img src=""img/4.gif"" title=普通信息>"       
end if      
end if      
%>  <%sql="select * from [User] where username='"&rs("tjuser")&"'"
set rs1=server.createobject("adodb.recordset")
rs1.open sql,conn,1,1

%>

<%=folder%>

</td>
<TD align="left"><%if rs1("usergrade")=1 then%>
<img src="img/vip.gif" align="absmiddle" alt="VIP会员企业"><%else%><img src="img/user.gif" align="absmiddle" alt="普通会员企业"><%end if%>
<a href="showcompany.asp?hy_id=<%=rs("hy_id")%>">
<font color="#FF6500">
<%=rs("hy_title")%>
</font></a>&nbsp;  <%if rs("isimg")=1 then %><img src='img/img.gif' alt='图片黄页'><%end if%></TD><td><%=rscat("cat_name")%></td>
<td><%=rs("qyxz")%></td>
<%sql="select * from area where cat_id="&rs("city")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
sql="select * from area where cat_id="&rs2("sid")
set rs3=server.createobject("adodb.recordset")
rs3.open sql,conn,1,1
%>
<td><%=rs3("cat_name")%></td>
<td><%=rs2("cat_name")%></td>
<td><%=formatdatetime(rs("hy_date"),2)%></td>
</TR>
<%rs.movenext
loop
%>
</table>
<form name='form1' method='post' action='Show_corporation.asp?sheng=<%=request.querystring("sheng")%>&city=<%=request.querystring("city")%>&bigclass=<%=request.querystring("bigclass")%>&smallclass=<%=request.querystring("smallclass")%>&select=<%=request("select")%>&keyword=<%=request("keyword")%>'>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR> 
<TD align=middle width="35%" height=25><IMG height=14 src="img/so.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totalhy%></font>]个信息　分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
<TD width="40%" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=Show_corporation.asp?select="&request("select")&"&keyword="&request("keyword")&"&page=1&gqcat_id="&request.querystring("gqcat_id")&">首页</a> "
response.write "<a href=Show_corporation.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage-1&"&gqcat_id="&request.querystring("gqcat_id")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=Show_corporation.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage+1&"&gqcat_id="&request.querystring("gqcat_id")
response.write ">下一页</a> <a href=Show_corporation.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&totalpages&"&gqcat_id="&request.querystring("gqcat_id")&">尾页</a>"
end if
%>&nbsp;<IMG height=11 src="img/rt.gif" width=11 align=absMiddle></TD>
<TD align=middle width="25%">
<select name="page" >
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>页</option> 
<%else%>
<option value=<%=i%>>第<%=i%>页</option> 
<%end if
next

%>
</select><input type="submit" name="Submit2" value="转向" onmouseover="this.className='boton'" onmouseout="this.className='botoff'" class="botoff"> </TD>
</TR>
</FORM><%end if
%>
</TABLE></TD>
              </TR>
            </TABLE></TD>
          </TR>
      </TABLE></TD>
      <TD width=4></TD>
    </TR>
</TABLE>
<%
call footer()
%>