<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%>区域公司库</title>
<style type="text/css">
<!--
.STYLE1 {color: #707070}
-->
</style>
<link rel="stylesheet" href="../hc360/hcB2B.css" type="text/css" />
</head>
 <body>
<!--#include file="../inc/head.asp"-->
<br />
<%
  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
%>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="970" >
<tr><td valign="top">
<!--左边-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=1  bordercolor="#F2F2F2">
   <TR>  <TD  width=197 background=<%=HOPE_InstallDir%>skins/skin1/images/i_n_bg.gif height=26> &nbsp;<a href="company.asp?provid=<%=Replace_Text(request("provid"))%>&province=<%=Replace_Text(request("province"))%>"><font color="white"><b><%=Replace_Text(request("province")) %></b></font></a> </TD>  </TR>  
   <TR>  
   <TD height=24  > 
    <% 
   if Replace_Text(request("provid"))<>"" then 
    if isnumeric(Replace_Text(request("provid"))) then 
	set rsci=server.CreateObject("adodb.recordset")
	sqlci="select * from Websen_areacity where cityof="&Replace_Text(request("provid"))
	rsci.open sqlci,conn,1,1
	if not rsci.eof then 
	k=1
    do while not rsci.eof 
	response.Write("&nbsp;<a href=company.asp?cityid="&rsci("id")&"&city="&rsci("city")&"&provid="&Replace_Text(request("provid"))&"&province="&Replace_Text(request("province"))&">"&rsci("city")&"</a>&nbsp;")
	if k mod 4=0 then
	response.Write("<br>")
	end if
	k=k+1
	rsci.movenext
	loop	
 	else
	response.Write("暂无下属区域")
	end if
	rsci.close
	end if
   end if
   
   %>
    </TD>
    </TR>
 	 </TABLE>
	 
	 <%
	 if Replace_Text(request("cityid"))<>"" and Replace_Text(request("provid"))<>"" then
	 
	 set rsad=server.CreateObject("adodb.recordset")
	 sqlad="select  * from Websen_areaaddr where addrof="&Replace_Text(request("cityid"))&" and cityof="&Replace_Text(request("provid"))&""
	 rsad.open sqlad,conn,1,1
	 if not rsad.eof then 
	 %>
  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=1  bordercolor="#F2F2F2">
   <TR>  <TD   width=50 align="center"  bgcolor="#7D9DD2" height=26> <font color="white"><%=Replace_Text(request("city"))%></font></TD> <td></td> </TR>  
   <tr><td bgcolor="#7D9DD2"  height="3" colspan="2"></td></tr>
   <TR>  <TD height=24 colspan="2"   >
   <%
   m=1
   do while not rsad.eof 
   %>
   <a href="company.asp?addrn=<%=rsad("addr")%>&addrid=<%=rsad("id")%>&cityid=<%=Replace_Text(request("cityid"))%>&roleid=<%=Replace_Text(request("roleid"))%>&city=<%=Replace_Text(request("city"))%>&provid=<%=Replace_Text(request("provid"))%>&ordercol=score&province=<%=Replace_Text(request("province"))%>"><%=rsad("addr")%></a>
<%
if m mod 5=0 then
response.Write("<br>")
end if
m=m+1
   rsad.movenext
   loop
    %>
   </TD>
    </TR>
 	 </TABLE> 
	 <%  
	  rsad.close
 	 end if
	 end if
	 %>
	
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=1  bordercolor="#F2F2F2">
   <TR>  <TD align=middle width=197 background=<%=HOPE_InstallDir%>skins/skin1/images/i_n_bg.gif height=26><B><font  color="#FFFFFF">推荐企业信息</font></B></TD>  </TR>  
   <TR>  <TD height=24 ><%=HOPE_Company(2,30,30,0,10,13,1,0,1,0)%></TD>
    </TR>
 	 </TABLE>
<!--左边 --end -->
</td>
<td valign="top">
<!--右边--->

<table border="0" cellpadding="0" cellspacing="0" align="center" width="710" >
<tr><td align="left"  height="25" bgcolor="#FFA569" background="<%=HOPE_InstallDir%>skins/skin1/images/i_n_bg.gif"><a href="<%=HOPE_InstallDir%>company/"><font color="white" ><b>
公司库</b></font>
</a></td> 
</tr>
</table>
<table cellpadding="0"   cellspacing="0" border="1" bordercolor="#D3DCEE" width="710"  align=center>
<tr><td valign="top" height="300">
<table cellpadding="0"   cellspacing="2" border="0" width="100%"  align=center>
   <tr> 
  <td   height="25" width="578">区域：
 <font color="#0099CC"><b><a href="company.asp?provid=<%=Replace_Text(request("provid"))%>&province=<%=Replace_Text(request("province"))%>"><%=Replace_Text(request("province"))%></a> <%if Replace_Text(request("city"))<>"" then response.Write("--&nbsp;"&Replace_Text(request("city"))) end if%><%if Replace_Text(request("addrn"))<>"" then response.Write("--&nbsp;"&Replace_Text(request("addrn"))) end if%></b></font>
  <%
 if Replace_Text(request("province"))<>"" then 
 set rsj=server.CreateObject("adodb.recordset")
 sqlj="select * from Websen_vipgrade "
 rsj.open sqlj,conn,1,1
 if not rsj.eof then 
 j=0
 %>&nbsp; <font color="red">[</font>&nbsp;
 <%
 do while not rsj.eof 
 %>
 <a href="company.asp?addrn=<%=Replace_Text(request("addrn"))%>&addrid=<%=Replace_Text(request("addrid"))%>&cityid=<%=Replace_Text(request("cityid"))%>&city=<%=Replace_Text(request("city"))%>&provid=<%=Replace_Text(request("provid"))%>&province=<%=Replace_Text(request("province"))%>&roleid=<%=rsj("roleid")%>"><%=rsj("gradename")%></a>&nbsp;&nbsp;
 <%
 j=j+1
 rsj.movenext
 loop
 rsj.close
 %>
 <font color="red">]</font>
 <%
 end if
 
 end if
 %>
 
 </td>
  </tr>
 <tr><td   bgcolor="#EEF1F7" height="2" align="center"></td></tr>
 <tr><td>
  <table cellpadding="0"   cellspacing="0" border="1" bordercolor="#F5F5F5" width="98%"  align=center>
<tr><td>
 <table cellpadding="0"   cellspacing="0" border="1" bordercolor="#FFFFFF" width="98%"  align=center>
  <tr bgcolor="#E7E7E7"><td width="6%" height="30" align="center"><a href="company.asp?addrn=<%=Replace_Text(request("addrn"))%>&addrid=<%=Replace_Text(request("addrid"))%>&cityid=<%=Replace_Text(request("cityid"))%>&roleid=<%=Replace_Text(request("roleid"))%>&city=<%=Replace_Text(request("city"))%>&provid=<%=Replace_Text(request("provid"))%>&ordercol=score&province=<%=Replace_Text(request("province"))%>"><b>指数</b></a></td>
  <td width="47%" align="center">企业信息</td>
  <td width="18%" align="center">区域</td>
  <td width="16%" align="center"><a href="company.asp?addrn=<%=Replace_Text(request("addrn"))%>&addrid=<%=Replace_Text(request("addrid"))%>&cityid=<%=Replace_Text(request("cityid"))%>&roleid=<%=Replace_Text(request("roleid"))%>&city=<%=Replace_Text(request("city"))%>&provid=<%=Replace_Text(request("provid"))%>&ordercol=grade&province=<%=Replace_Text(request("province"))%>"><b>类型</b></a></td>
  <td width="13%" align="center">联系</td>
  </tr> <%
 set rs=server.CreateObject("adodb.recordset")
 sql="select * from Websen_corporation where flag=1  "  
 if Replace_Text(request("city"))<>"" then 
  sql=sql&" and (country like '%"&Replace_Text(request("province"))&"%' or sf like '%"&Replace_Text(request("province"))&"%' or  city like '%"&Replace_Text(request("province"))&"%') and (country like '%"&replace(Replace_Text(request("city")),"省","")&"%' or sf like '%"&replace(Replace_Text(request("city")),"省","")&"%' or  city like '%"&replace(Replace_Text(request("city")),"省","")&"%')"
 end if
 if Replace_Text(request("addrn"))<>"" then
 sql=sql&" and   (country like '%"&Replace_Text(request("province"))&"%' or sf like '%"&Replace_Text(request("province"))&"%' or  city like '%"&Replace_Text(request("province"))&"%') and (country like '%"&replace(Replace_Text(request("city")),"省","")&"%' or sf like '%"&replace(Replace_Text(request("city")),"省","")&"%' or  city like '%"&replace(Replace_Text(request("city")),"省","")&"%') and (country like '%"&Replace_Text(request("addrn"))&"%' or sf like '%"&Replace_Text(request("addrn"))&"%' or  city like '%"&Replace_Text(request("addrn"))&"%')"
 end if
 if Replace_Text(request("roleid"))<>"" then
 if   isnumeric(Replace_Text(request("roleid"))) then
    sql=sql&" and gradeid="&Replace_Text(request("roleid"))&" "
 end if
 end if
 
 if Replace_Text(request("province"))<>"" then 
 sql=sql&" and (country like '%"&Replace_Text(request("province"))&"%' or sf like '%"&Replace_Text(request("province"))&"%' or  city like '%"&Replace_Text(request("province"))&"%')"
 end if
 if Replace_Text(request("ordercol"))<>"" then 
  if Replace_Text(request("ordercol"))="grade" then
   sql=sql&"  order by gradeid"
   elseif Replace_Text(request("ordercol"))="score" then  
   sql=sql&"  order by trust_score desc"
   else
    sql=sql&"  order by gradeid"
   end if
   else
    sql=sql&"  order by gradeid"
   end if 
  
 rs.open sql,conn,1,1
 msg_per_page=15 '定义每页显示记录条数
 %>
<!--#include file="../inc/headpage.asp"-->
<%
if rs.eof then
response.Write"<tr><td  colspan=5 align=center height=80><font color=red>暂无数据信息</font></td></tr> "
else
i=1
do while not rs.eof and rowcount > 0 %>
<tr <%if i mod 2=0 then response.Write("bgcolor=#F9F9F9   onMouseOut=""this.style.backgroundColor='#F9F9F9'"" onMouseOver=""this.style.backgroundColor='#D7E3F3'""") else response.Write("bgcolor=#ffffff  onMouseOut=""this.style.backgroundColor='#ffffff'"" onMouseOver=""this.style.backgroundColor='#D7E3F3'""") end if%> >
 <td height="30" align="center"><font color="red"><%=rs("trust_score")%></font></td>
<td style="word-break:break-all">
<%
'--是否使用的名片页------------------------------------------------------------
	   set rsmp2=server.CreateObject("adodb.recordset")
	   sqlmp2="select * from Websen_vipgrade where roleid="&rs("gradeid")
	   rsmp2.open sqlmp2,conn,1,1
	   if not rsmp2.eof  then 
   if instr(rsmp2("rolelist"),"qw")>0 then	 
   if is2weburl=1 then
 %>
 <a href="http://<%=rs("user")%>.<%=WebUrl1%>" target="_blank">
 <%
 else
%>
 <a href="<%=HOPE_InstallDir%>vipcom/<%=rs("user")%>" target="_blank">
 <%
end if
 else
%>
 <a href="<%=HOPE_InstallDir%>ptcom/<%=rs("user")%>.html" target="_blank">
 <%
end if
rsmp2.close
end if
%>
<b><%=rs("Qymc")%></b></a>
<br />
<%
if rs("qyjj")<>"" then
response.Write("<font color=#666666>"&left(rs("qyjj"),100)&"...</font>")
end if
%>
<br />
<font color=#666666><%=rs("qylb")%> </font>
<br />
<font color=#666666>主营产品/服务:<%=rs("zycp")%></font>
  </td>
  <td    ><%
  response.Write(rs("country")&"--"&rs("sf")&"--"&rs("city"))
  %>
  
  </td>
  <td align="center">
    <span class="STYLE1">
    <%
   set rsg=server.CreateObject("adodb.recordset")
  sqlg="select * from Websen_vipgrade where roleid="&rs("gradeid")
  rsg.open sqlg,conn,1,1
  if not rsg.eof then 
  response.Write(rsg("gradename"))
   else
  response.Write("不详")
   rsg.close
  end if
  %>
    </span> </td>
  <td align="center"  >
<%


if gsid<>""  and gradeid<>"" then 
set rsu=server.CreateObject("adodb.recordset")
sqlu="select * from Websen_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>
 <%
   i=i+1
  rowcount=rowcount-1
rs.movenext
loop
end if
%>
<tr><td align="center"  colspan="5"><%=listPages("company.asp?addrn="&Replace_Text(request("addrn"))&"&addrid="&Replace_Text(request("addrid"))&"&cityid="&Replace_Text(request("cityid"))&"&roleid="&Replace_Text(request("roleid"))&"&city="&Replace_Text(request("city"))&"&provid="&Replace_Text(request("provid"))&"&ordercol="&Replace_Text(request("ordercol"))&"&province="&Replace_Text(request("province"))&"")%></td></tr>

</table>
 </td></tr></table>
 
 </td></tr>
 
</table>
</td></tr></table>
<!--右边- end -->
 </td>
</tr></table>
<!--#include file="../inc/end.asp"-->

</body>
</html>
<%
rs.close
  conn.close
set conn=nothing

%>