<%
dim dns
dns="../"
%>
<!--#include file="../Common/Inc_DatConn.asp"-->
<!--#include file="../Common/Inc_Function.asp"-->
<%
dq=changechr(request("dq"))
bid=RtnReplaceInt(request("bid"),0)
sid=RtnReplaceInt(request("sid"),0)
strtype=RtnReplaceInt(request("type"),0)
InfoAdd=changechr(request("InfoAdd"))
BigClassName=RtnReplaceInt(request("BigClassName"),0)
SmallClassName=RtnReplaceInt(request("SmallClassName"),0)
strKeyword=changechr(request("Keyword"))
if sid<>0 then
set rszh=conn.execute("select * from hySmallClass where id="&sid&"")
if not rszh.eof then
bid=cint(rszh("dl"))
else
response.write"<SCRIPT language=JavaScript>alert('出错了！');"
response.write"javascript:history.go(-1) ;</SCRIPT>"
end if
rszh.close
set rszh=nothing
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><% = strSiteName%>－－企业黄页</title>
<style>
<!--
.LoginInput {
	BORDER-RIGHT: #eeeeee 1px solid; BORDER-TOP: #999999 1px solid; FONT: 12px "宋体", "Verdana", "Arial"; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #eeeeee 1px solid; HEIGHT: 17px; BACKGROUND-COLOR: #f6f6f6
}
-->
</style>
</head>
<link href="../imger/css.css" type="text/css" rel="stylesheet">
<!--#include file="../head.asp"-->
<body topmargin="0">
<table width="778" border="0" align="center" cellpadding="0" cellspacing="10" bgcolor="f2f2f2">
  <tr>
    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#e6e6e6">
      <tr>
        <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="10" cellpadding="0">
          <tr>
            <td height="24" background="../imger/09.gif"><span class="STYLE6">≡</span> <span class="STYLE2"><b>您的位置：</b></span><span class="STYLE4">首页 &gt;&gt; 企业黄页</span></td>
            </tr>
          <tr>
            <td height="7"><table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
	<tr>
		<td width="100%" align="center">
      <TABLE borderColor=#111111 cellSpacing=0 cellPadding=0 border=0 width="100%">
        <TBODY>
        <TR>
          <TD align=middle height=13>
<div class="toleft">
					<table class="linktable" id="Table5" cellSpacing="0" cellPadding="5" bgColor="#f1f1f1" border="0" width="100%">
						<tr>
							<td>
							<table id="Table6" height="5" cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
								<tr>
									<td width="5">
									<img height="5" src="images/0830_cor_1.gif" width="5"></td>
									<td width="100%" background="images/0830_cor_top.gif"></td>
									<td width="5">
									<img height="5" src="images/0830_cor_2.gif" width="5"></td>
								</tr>
							</table>
							<table id="Table7" style="BORDER-RIGHT: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid" cellSpacing="0" cellPadding="0" width="100%" align="center" bgColor="#ffffff" border="0">
								<tr>
									<td align="middle">
									<table style="border: 3px solid #FFFFFF; " cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr>
											<td align="middle"><table cellSpacing="0" cellPadding="8" width="100%" border="0">
												<tr>
													<td><%set rs1=server.createobject("adodb.recordset")
sql1="select *  from hyBigClass order by sj desc"
rs1.open sql1,conn,1,1
n=0
nn=rs1.recordcount%><table border="0" style="border-collapse: collapse" width="100%" cellpadding="0">
<tr><%
do while not rs1.eof
n=n+1%>
<%
strsid1=rs1("id")
	set rdsTotalRec2 = Conn.Execute("Select Count(MemberKey) From Dat_Member Where MemberType=2 and State=0 and dl='"&strsid1&"'")
	intTotalRec2 = rdsTotalRec2(0)
	rdsTotalRec2.close
if cstr(strsid1)=cstr(bid) then
%>
<td align="left" >·<a href=?bid=<%=strsid1%>><b><font color=#ff0000><%=rs1("BigClassName")%></font></b></a>(<%=intTotalRec2%>)</td>
<%else%>
<td align="left" >·<a href=?bid=<%=strsid1%>><%=rs1("BigClassName")%></a>(<%=intTotalRec2%>)</td>
<%
end if
if n mod 4=0 and nn<>n then response.write("</tr><tr>")
rs1.movenext
loop
rs1.close%></tr>
															</table></td>
												</tr>
												<tr>
													<td><%if bid<>0 then
													set rsb=server.createobject("adodb.recordset")
sqlb="select * from hybigclass where id="&bid
rsb.open sqlb,conn,1,1
	if rsb.eof and rsb.bof  then 
		response.write "<script>alert('对不起，此分类不存在，请返回！');window.close();</Script>"
		response.end
	else
	dlmc=rsb("bigclassname")
	dqwz="<font color=#ff0000>以下是 "&dlmc&" 的下属分类</font>"
%>
													<table cellSpacing="0" cellPadding="0" width="100%" border="0">
														<tr>
															<td style="font-size: 12px" align="left" width="1%">&nbsp;&nbsp;</td>
															<td class="f18" align="left" width="99%"><b><%=dqwz%></b></td>
														</tr>
														<tr vAlign="top">
															<td width="100%" style="font-size: 12px" colspan="2">
															<%set rs1=server.createobject("adodb.recordset")
sql1="select *  from hySmallClass where dl='"&bid&"' order by sj desc"
rs1.open sql1,conn,1,1
n=0
nn=rs1.recordcount
%><table border="0" style="border-collapse: collapse" width="100%" cellpadding="0">
<tr><%
do while not rs1.eof
n=n+1%>
<%
strsid=rs1("id")
	set rdsTotalRec1 = Conn.Execute("Select Count(MemberKey) From Dat_Member Where MemberType=2 and State=0 and xl='"&strsid&"'")
	intTotalRec1 = rdsTotalRec1(0)
	rdsTotalRec1.close
if cstr(strsid)=cstr(sid) then
%>
<td align="left" >·<a href=?sid=<%=strsid%>><b><font color=#ff00f><%=rs1("SmallClassName")%></font></b></a>(<%=intTotalRec1%>)</td>
<%else%>
<td align="left" >·<a href=?sid=<%=strsid%>><%=rs1("SmallClassName")%></a>(<%=intTotalRec1%>)</td>
<%
end if
if n mod 4=0 and nn<>n then response.write("</tr><tr>")
rs1.movenext
loop
rs1.close%></tr>
															</table>															</td>
														</tr>
														</table>
<%end if
rsb.close
set rsb=nothing
end if%>													</td>
												</tr>
											</table>
											</td>
										</tr>
									</table>
									</td>
								</tr>
							</table>
							<table id="Table9" height="5" cellSpacing="0" cellPadding="0" width="100%" align="center" background="images/0830_cor_bot.gif" border="0">
								<tr>
									<td width="5">
									<img height="5" src="images/0830_cor_3.gif" width="5"></td>
									<td width="100%"></td>
									<td width="5">
									<img height="5" src="images/0830_cor_4.gif" width="5"></td>
								</tr>
							</table>
							</td>
						</tr>
					</table>
				</div></TD></TR>
        </TBODY></TABLE>
		</td>
	</tr>
	</table></td>
          </tr>
          <tr>
            <td height="7">
	<table cellSpacing="0" cellPadding="0" width="100%" border="0">
			<tr>
				<td width="12" background="img/index_pcjob2_9.gif" height="20">
				<img height="29" src="img/index_pcjob2_8.gif" width="12"></td>
				<td align="middle" width="198" background="img/index_pcjob2_9.gif">
				<font color="#FFFFFF"><b>企 业 展 示</b></font></td>
				<td align="left" width="7">
				<img height="29" src="img/index_pcjob2_11.gif" width="7"></td>
				<td vAlign="bottom" align="right" width="575" background="img/index_pcjob2_12.gif">
				<table  width="100%" border="0">
					<tr>
						<td align="right">
						<a class="p1" href="../reg.asp">免费加入</a></td>
					</tr>
				</table>
				</td>
				<td align="right" width="8">
				<img height="29" src="img/index_pcjob2_14.gif" width="8"></td>
			</tr>
			<tr vAlign="top" align="middle">
				<td style="BORDER-RIGHT: #0d81bc 1px solid; BORDER-LEFT: #0d81bc 1px solid; BORDER-BOTTOM: #0d81bc 1px solid" colSpan="5"  bgcolor="#EEEEEE">
				<table cellSpacing="0" cellPadding="0" width="100%" border="0">
					<tr>
						<td>
						<table cellSpacing="0" cellPadding="0" width="100%" border="0">
							<tr>
								<td>                <table width="100%" height="22" border="0" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td height="23" valign="top"> 
                      <table width="99%" height="20" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF" align="center">
                      <tr onMouseOver="this.style.backgroundColor='#c5edfc';" onMouseOut="this.style.backgroundColor='#E6F7FF'" bgcolor="#E6F7FF"> 
                          <td width="50%" height="20" class="F16">&nbsp;单位名称</td>
                          <td width="13%" align="center">地区</td>
                          <td width="12%" align="center">电话</td>
                          <td width="11%" align="center">加入时间</td>
                          <td width="6%" align="center">点击</td>
                        </tr>
                        <tr>
						  <td width="100%" colspan="5" height="1" background="../images/dotline.gif"></td>
						</tr>
<%
Dim rdsInfo
Dim sqlInfo
Dim strInfoClass   '/供求信息类型/
Dim rdsTotalRec 
Dim intPage        '/当前页/
Dim intTotalRec	   '/所有记录/
Dim intInfoCount
Dim n,p,ii	       '/定义一些临时变量/
Dim strTopic

intPage = Replace(Trim(Request("Page")),"'","")
intPage = Replace(Trim(Request("Page"))," ","")
if intPage = "" then
	intPage = 1
else
	intPage = Clng(intPage)
end if
                      
set rdsInfo = Server.CreateObject("ADODB.Recordset")
strsql=""
if bid<>0 then
strsql=strsql&" and dl='"&bid&"' "
end if
if sid<>0 then
strsql=strsql&" and xl='"&sid&"' "
end if
if BigClassName<>0 then
strsql=strsql&" and dl='"&cstr(BigClassName)&"' "
end if
if SmallClassName<>0 then
strsql=strsql&" and xl='"&cstr(SmallClassName)&"' "
end if
if dq<>"" then
strsql=strsql&" and dq='"&dq&"' "
end if
if strKeyword<>"" then
if strtype=1 or strtype=0 then
strsql=strsql&" and CompanyName like '%"&strKeyword&"%' "
elseif strtype=2 then
strsql=strsql&" and Tel like '%"&strKeyword&"%' "
elseif strtype=3 then
strsql=strsql&" and js like '%"&strKeyword&"%' "
end if
end if
	set rdsTotalRec = Conn.Execute("Select Count(MemberKey) From Dat_Member Where State =0 and MemberType=2 "&strsql&"")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Member Where State=0 and MemberType=2  "&strsql&" order by MemberKey desc"
rdsInfo.Open sqlInfo,Conn,1,1
if not rdsInfo.EOF then
	if intTotalRec mod intInfoCot = 0 then
		n = intTotalRec \ intInfoCot
	else
		n = intTotalRec \ intInfoCot + 1
	end if
	rdsInfo.MoveFirst
	if intPage > n then intPage = n
	if intPage < 1 then intPage = 1
	rdsInfo.Move (intPage - 1) * intInfoCot
	do while not rdsInfo.EOF and intInfoCount < Clng(intInfoCot)
		intInfoCount = intInfoCount + 1
					strTopic = rdsInfo("CompanyName")
					dqname1=rdsInfo("dq")
                      %>
                        <tr onMouseOver="this.style.backgroundColor='#c5edfc';" onMouseOut="this.style.backgroundColor='#E6F7FF'" bgcolor="#E6F7FF"> 
                          <td width="50%" height="20" class="F16"><%if rdsInfo("jb")=1 then%>&nbsp;<img border="0" src="../images/arrow.gif" alt="高级会员"><%else%>&nbsp;<img border="0" src="../images/tu33.gif" alt="普通会员"><%end if%>&nbsp;<span style="font-size: 9pt">&nbsp;</span><a href="company.asp?cId=<% = rdsInfo("MemberKey")%>" target="_blank" class="a01"><span style="font-size: 9pt"><% = strTopic%></span></a></td>
                          <td width="13%" align="center"><a target="_blank" href="hyclass.asp?dq=<%=dqname1%>"><%=dqname1%></a></td>
                         <td width="12%" align="center"><% = rdsInfo("tel")%></td>
                          <td width="11%" align="center"><% =FormatTime(rdsInfo("CreateTime"),4)%></td>
                          <td width="6%" align="center"><% = rdsInfo("showcount")%></td>
                        </tr>
                        <tr>
						  <td width="100%" colspan="5" height="1" background="../images/dotline.gif"></td>
						</tr>
<%
  		rdsInfo.MoveNext
	loop
else
%>
						<tr>
						  <td width="100%" colspan="5" height="25">&nbsp;<font color="#FF0000">对不起!没有相匹配的信息</font>...</td>
						</tr>
<%
end if
rdsInfo.Close
set rdsInfo = nothing

if intPage - 1 mod 10 = 0 then
	p = (intPage - 1) \ 10
else
	p = (intPage - 1) \ 10
end if
%>
                      </table>
				    </td>
                  </tr>
                </table>
                <table border="0" cellspacing="0" width="100%" cellpadding="0">
				  <tr>
					<td width="100%" height="30" align="center" valign="top">
	  <table border="0" width="98%" cellspacing="0" cellpadding="0" align="center">
	    <form method="post" action="?" name="Form2">
	    <input type="hidden" name="KeyWord" value="<% = strKeyWord%>">
	    <input type="hidden" name="bid" value="<% =bid%>">
	    <input type="hidden" name="sid" value="<% =sid%>">
	    <input type="hidden" name="dq" value="<% =dq%>">
	    <input type="hidden" name="BigClassName" value="<%=BigClassName%>">
	    <input type="hidden" name="SmallClassName" value="<%=SmallClassName%>">
	    <tr>
		  <td width="38%" height="30" valign="middle">页次：<b><%= intPage %></b>/<b><%=n%></b>页 每页<b><%= intInfoCot %></b>条 共<b><%= intTotalRec %></b>条</td>
		  <td width="62%" height="30" valign="middle"><div align="right">分页：
			<%
			strpage="&KeyWord="&strKeyWord&"&bid="&bid&"&sid="&sid&"&dq="&dq&"&BigClassName="&BigClassName&"&SmallClassName="&SmallClassName&"&type="&strtype&""
				if intPage = 1 then
					Response.Write "<font face=webdings>9</font>   "
				else
					Response.Write "<a href='?Page=1"&strpage&"' title=首页><font face=webdings>9</font></a>   "
				end if
				if p * 10 > 0 then Response.Write "<a href='?Page="&Cstr(p*10)&""&strpage&"' title=上十页><font face=webdings>7</font></a>   "
				Response.Write "<b>"
				for ii = p * 10 + 1 to P * 10 + 10
					   if ii = intPage then
				          Response.Write "<font color=""#FF0000"">"+Cstr(ii)+"</font> "
					   else
					      Response.Write "<a href='?Page="&Cstr(ii)&""&strpage&"'>"+Cstr(ii)+"</a>   "
					   end if
					if ii = n then exit for
				next
				Response.Write "</b>"
				if ii < n then Response.Write "<a href='?Page="&Cstr(ii)&""&strpage&"' title=下十页><font face=webdings>8</font></a>   "
				if intPage=n then
					Response.Write "<font face=webdings>:</font>   "
				else
					Response.Write "<a href='?Page="&Cstr(n)&""&strpage&"' title=尾页><font face=webdings>:</font></a>   "
				end if
			%>
			转到：<input type="text" name="Page" size="2" maxlength="10" value="<%= intPage %>" class="face"> <input type="submit" value="Go" name="submit" class="button">
			</div></td>
		</tr>
		</form>
	  </table>
					</td>
				  </tr>
				</table></td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table></td>
          </tr>
          
          </table></td>
        </tr>
    </table></td>
  </tr>
</table>
<!--#include file="../boot.asp"-->
<%
conn.close
set conn=nothing
%>
</body>
</html>
