<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/const.jsp" -->
<!--#include file="../Include/Char.jsp" -->
<!--#include file="../Include/function.jsp" -->
<!--#include file="../Include/ShowPage.jsp" -->
<!--#include file="../Include/licky_fsql.jsp" -->
<%
    m_TypeID = checkStr(Trim(Request("TypeID")))
	if instr(m_TypeID,":") <> 0 then
      m_BigCategoryID = mid(m_TypeID,1,instr(m_TypeID,":")-1)
      m_SmallCategoryID = mid(m_TypeID,instr(m_TypeID,":")+1)
    else
	  m_BigCategoryID = "all"
	  m_SmallCategoryID = "all"
	end if
	
    m_TradeTypeID = checkStr(Request("TradeTypeID"))
	if m_TradeTypeID = "" then m_TradeTypeID = "all"
Function gradeimage(gradevalue)
select case gradevalue
case "4"
response.write "<img src='Img/3.gif' title='金牌商家' hspace='0' vspace='0' align='absmiddle'>"
case "3"
response.write "<img src='Img/2.gif' title='银牌商家' hspace='0' vspace='0' align='absmiddle'>"
case "2"
response.write "<img src='Img/1.gif' title='铜牌商家' hspace='0' vspace='0' align='absmiddle'>"
case else
response.write ""
end select
End function
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><TITLE><%=site_info(0)%> - 聚宝同盟</TITLE><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
media=all href="css/css.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2800.1555" name=GENERATOR></HEAD>
<BODY>
<div id="main">
<DIV id=nav>
<A 
href="../">首页</A> | <A href="../so/" 
target=_blank>本地搜</A> | <A href="../shop/">网上开店</A> | <A 
href="../info/" target=_blank>分类信息</A> | <A 
href="../club/photo_default.jsp" target=_blank>相册</A> | <A 
href="../club/qq_index.jsp" target=_blank>小圈子</A> | <A 
href="../blog/" target=_blank>博客</A> | <A 
href="../bbs/" target=_blank>社区</A> </DIV>
<DIV id=logo>
<UL>
  <LI><A href="#">在线购卡</A> 
  <LI><A href="#">办卡指南</A> 
  <LI><A href="../so/Suggestion.jsp">访客留言</A> </LI></UL><A 
href="/"><IMG id=ui 
src="img/logo_card.gif"></A> <IMG 
src="img/banner.gif"> </DIV>
<DIV id=top1><SPAN id=i1><A href="index.jsp">首 
页</A></SPAN> </DIV>
<DIV id=top2>
	<div id="top2_1"> </div>
<%m_SQL="SELECT * FROM T_CityType ORDER BY F_Grade ASC"
    Set rs = conn.Execute(m_SQL)
 do While Not rs.Eof%>
<DIV class=top2_3><A 
href="search.jsp?TypeID=<%=rs("F_id")%>:all&TradeID=all"><%=rs("F_Value")%></A></DIV>
		<div class="top2_1"></div>
<% if i mod 6=0 then Response.write ""
   rs.MoveNext
 loop
 rs.Close
%>
<DIV class=top2_1></DIV>
<DIV class=top2_4><a href="active_more.jsp?classid=2">商家招聘</a></DIV>
<DIV class=top2_1></DIV>
<DIV class=top2_4><a href="active_more.jsp?classid=1">促销活动</a></DIV>
<DIV class=top2_1></DIV>
<DIV class=top2_4>优惠券</DIV></DIV></DIV>
<DIV id=top_sou>
<FORM name=form1 action=Search.jsp method=post><IMG height=39 alt="" 
src="img/red_block1.jpg" width=28 align=absMiddle> 
&nbsp;&nbsp;&nbsp;&nbsp;城市地区 <select name="TradeTypeID">
                        <%
								Response.write "<option value='all'>所有地区</option>"
								m_SQL =  "SELECT F_ID,F_Value FROM T_TradeType ORDER BY F_ID"
								SET  rst = conn.Execute(m_SQL)
								Do While Not rst.Eof 
								  Response.write "<option value='"&rst(0)&"'>"&rst(1)&"</option>"
								  rst.MoveNext
								Loop
								rst.Close
								%>
                      </select>
                      &nbsp;&nbsp;&nbsp;&nbsp;行业类别  <select name="selBigCategory" onChange="TypeChange(this);" >
<%
			mSql="Select F_ID,F_Value From T_CityType order by F_ID"
			 Set rst = conn.Execute(mSql)

			 mBigArray = rst.GetRows()
			 for i=0 to ubound(mBigArray,2)
			   mSql2="Select * From T_AreaType Where F_CityTypeID="&mBigArray(0,i)&" order by F_Grade"
			   Set rst = conn.Execute(mSql2)
			   strSmallCategory = mBigArray(0,i)&"-"
			   Do While not rst.Eof 
			     
   			     strSmallCategory = strSmallCategory & rst("F_ID")&"+"&rst("F_Value")+"-"
				 rst.Movenext
			   Loop
			   Response.write "<option value="&strSmallCategory&">"&mBigArray(1,i)&"</option>"
			 next'for
%>
                      </select>
                      <script language="javascript">                               
function TypeChange(theSelect)
{
var sTemp,sString,i,sBigTypeID;
sValue=theSelect.value;
sSubTypeArray=sValue.split("-");
sBigTypeID = sSubTypeArray[0];
sString="<select name='TypeID'>";
 sString+="<option value='"+sBigTypeID+":all'>全　部</option>";
for(i=1;i<sSubTypeArray.length-1;i++)
{
 sTemp=sSubTypeArray[i].split("+");
 sString+="<option value='"+sBigTypeID+":"+sTemp[0]+"'>"+sTemp[1]+"</option>";
}

sString+="</Select>"
form1.TypeID.outerHTML=sString;

}
</script>
<select name="TypeID" >
                      </select>
                      <script language="javascript">TypeChange(form1.selBigCategory);</script>
&nbsp;&nbsp;关键字 <INPUT id=Keywords maxLength=30 size=15 name=Key>&nbsp;<INPUT type=submit value="搜 索"></FORM> </DIV>
<DIV id=top_dh>&nbsp;当前位置：首页 -&gt; 聚宝同盟 </DIV>
<DIV style="WIDTH: 760px">
<DIV style="FLOAT: left; WIDTH: 530px; PADDING-TOP: 6px">
<FIELDSET><LEGEND><IMG alt="" src="img/search_icon.gif" align=absMiddle> 
按地区检索 </LEGEND>
<UL id=dz><%m_SQL="SELECT * FROM T_TradeType ORDER BY F_Grade ASC"
    Set rs = conn.Execute(m_SQL)
 do While Not rs.Eof%>
  <LI><A 
href="Search.jsp?TypeID=<%=m_TypeID%>&TradeTypeID=<%=rs("F_id")%>"><%=rs("F_Value")%></A></LI>
<% if i mod 8=0 then Response.write ""
   rs.MoveNext
 loop
 rs.Close
%></UL></FIELDSET> 
<%if m_TypeID = "all" then%>
<FIELDSET><LEGEND><IMG alt="" src="img/search_icon.gif" align=absMiddle> 
按类别检索 </LEGEND>
<UL><%m_SQL="SELECT * FROM T_CityType ORDER BY F_Grade ASC"
    Set rs = conn.Execute(m_SQL)
 do While Not rs.Eof%>
  <LI class=li1>&nbsp;<A 
href="search.jsp?TypeID=<%=rs("F_id")%>:all&TradeID=all"><SPAN 
  style="FONT-WEIGHT: bold; COLOR: #f60"><%=rs("F_Value")%></SPAN></A> <%m_SQL="SELECT * FROM T_AreaType where F_CityTypeID="&rs("F_id")&" ORDER BY F_Grade ASC"
    Set rs1 = conn.Execute(m_SQL)
 do While Not rs1.Eof%><A title=<%=rs1("F_Value")%> 
  href="search.jsp?TypeID=<%=rs("F_id")%>:<%=rs1("F_id")%>&TradeID=all"><%=rs1("F_Value")%></A> 
  <% rs1.MoveNext
 loop
 rs1.Close
%></LI>
 
<% if i mod 1=0 then Response.write ""
   rs.MoveNext
 loop
 rs.Close
%>
</UL></FIELDSET> 
<%else%>
<FIELDSET><LEGEND><IMG alt="" src="img/search_icon.gif" align=absMiddle> 
按类别检索 </LEGEND>
<UL> <%m_SQL="SELECT * FROM T_CityType where F_id="&m_BigCategoryID&" ORDER BY F_Grade ASC"
    Set rs = conn.Execute(m_SQL)
 do While Not rs.Eof%>
  <LI class=li1>&nbsp; <%m_SQL="SELECT * FROM T_AreaType where F_CityTypeID="&rs("F_id")&" ORDER BY F_Grade ASC"
    Set rs1 = conn.Execute(m_SQL)
 do While Not rs1.Eof%><A title=<%=rs1("F_Value")%> 
  href="search.jsp?TypeID=<%=rs("F_id")%>:<%=rs1("F_id")%>&TradeID=all"><%=rs1("F_Value")%></A> 
  <% rs1.MoveNext
 loop
 rs1.Close
%></LI>
 
<% if i mod 1=0 then Response.write ""
   rs.MoveNext
 loop
 rs.Close
%>

</UL></FIELDSET> <%end if%>
<DIV class=h5></DIV>
  <%

    m_Keywords = checkStr(Trim(Request("Keywords")))
    m_Parameter = "TypeID="&m_TypeID&"&TradeTypeID="&m_TradeTypeID&"&Keywords="&m_Keywords
    dim m_RecordCount,m_PageNo,m_Page
    m_RecordCount=0 : m_PageNo=0 : m_Page=0
	m_PageSize = 11 '每页显示数录数
    m_PageNo = Trim(Request.querystring("PageNo"))
	Set rs = Server.createobject("Adodb.RecordSet")
    m_SQL = "SELECT  * FROM CityCard_League WHERE (ischecked=1)"
	
	if m_SmallCategoryID <> "all" then
	  m_SQL = m_SQL +" and cityid="&m_SmallCategoryID
	else
	  if m_BigCategoryID <> "all" then m_SQL = m_SQL +" and stateid="&m_BigCategoryID
	end if
	
	if m_TradeTypeID <> "all" then
	  m_SQL = m_SQL +" and hangyeid="&m_TradeTypeID
	end if
	
	m_SQL = m_SQL +" and (name like  '%" & m_Keywords & "%'"
	m_SQL = m_SQL +" or address like  '%" & m_Keywords & "%'"
	m_SQL = m_SQL +" or linkman like  '%" & m_Keywords & "%')"
	m_SQL = m_SQL +" order by companyid desc"
	
	rs.open m_SQL,conn,1,1
	if rs.Eof then
	   response.write "<br><p align='center'><font color=666666><B>对不起，找不到你想要查找的商家信息！</B></font></p><br>"
    else
      m_RecordCount = rs.RecordCount
      rs.PageSize = m_PageSize
      m_Page = rs.PageCount
      if m_PageNo = ""  then m_PageNo =1
      if cint(m_PageNo) < 1 or cint(m_PageNo) > m_Page then m_PageNo = 1
      rs.AbsolutePage = m_PageNo
      rc = m_PageSize
      re = 1
	  m_Count = 1'另加
      Do while not rs.eof and rc>0
	  m_Count = m_Count +1'另加
	  if m_Count mod 2 then m_BgColor = "ffffff" else m_BgColor = "f2f2f2" '另加
        '---------------------------------
		'调用显示内容
        ShowContent()
        '---------------------------------
      rs.MoveNext
      re = re+1
      rc = rc-1
    Loop
	rs.Close
 End if	
 Sub ShowContent()
  cardfile=""
  if rs("iscard")=1 then
  cardfile=""
  end if
 %>	
<DIV style="HEIGHT: 100px">
<DIV class=ss_l1><a target="_blank" href="<% if rs("template_id")<>"0" then %><%=rs("companyid")%><% else %>show.jsp?id=<%=rs("companyid")%><% end if %>"> 
                          <%if rs("logo")="" then m_Image = "../../jubao/img/defaultlogo.gif" else m_Image = rs("logo") %><IMG height=66 alt="" 
src="../CardManage/UploadLogoImages/<%=m_Image%>" width=88 align=absMiddle 
border=0></A></DIV>
<DIV class=ss_l2>
<DIV class=ss_l3><%
			m_SQL = "SELECT F_Value FROM citycard_grade Where F_ID=" & rs("grade")
			Set rst = conn.Execute(m_SQL)
			if not rst.Eof then
			%>
                          <%=rst(0)%>
<% end if
			rst.close
			set rst=nothing
			%> <A target="_blank" href="<% if rs("template_id")<>"0" then %><%=rs("companyid")%><% else %>show.jsp?id=<%=rs("companyid")%><% end if %>"><SPAN 
style="FONT-WEIGHT: bold">
                          <% =rs("name") %></SPAN></A>　<%if rs("agio")<>"" then%>优惠<% =rs("agio") %><%end if%>
</DIV>
<DIV class=ss_l4>电 话：<% =rs("tel") %><BR>地 址：<% =rs("address") %><BR>
					   分 类：
					   <% m_SQL = "SELECT F_ID,F_Value FROM T_CityType WHERE F_ID="&rs("stateid")
						  Set rst = conn.Execute(m_SQL)
						  Response.write "<a href='Search.jsp?TypeID="&m_TypeID&"&TradeID=all'>"
						  Response.write rst(1)
						  Response.write "</a> -> "
			              rst.Close
					   %>
					    <% m_SQL = "SELECT F_ID,F_Value FROM T_AreaType WHERE F_ID="&rs("cityid")
						  Set rst = conn.Execute(m_SQL)
						  Response.write "<a href='Search.jsp?TypeID="&m_TypeID&"&TradeID=all'>"
						  Response.write rst(1)
						  Response.write "</a>"
			              rst.Close
					   %>  <BR>

地 区： 

<% m_SQL = "SELECT F_ID,F_Value FROM T_TradeType WHERE F_ID="&rs("hangyeid")
						  Set rst = conn.Execute(m_SQL)
						  Response.write "<a href='Search.jsp?TypeID="&m_TypeID&"&TradeTypeID="&rst(0)&"'>"
						  Response.write rst(1)
						  Response.write "</a> "
			              rst.Close
					   %>
  </DIV></DIV></DIV>
   <%End Sub
				  %> 

<% Call ShowPage(m_Parameter)'调用示分页过程%%> </DIV>
<DIV style="BACKGROUND: #fff8e7; FLOAT: right; WIDTH: 222px">
<DIV style="FONT-SIZE: 0px; BACKGROUND: #fff; HEIGHT: 3px"></DIV>
<DIV class=line1 style="BACKGROUND: #d1dc73"></DIV>
<DIV class=line1 style="BACKGROUND: #fcfac9"></DIV>
<DIV class=r_bt><SPAN class=r_bt1>8</SPAN> <SPAN 
class=r_bt2>商家自助管理平台</SPAN></DIV>
<DIV class=r_bt3></DIV>
<FORM name=form onSubmit="return hy();" action=../CardManage/login.jsp?Login=OK 
method=post>
<DIV style="HEIGHT: 80px">
<SCRIPT language=javascript>
		function hy() {
		if (( document.form.UserName.value == '' )||(document.form.UserPWD.value == '')) {
		window.alert('会员名称和登陆密码不能为空!!');
		return false;}
		return true;}
    </SCRIPT>

<DIV style="HEIGHT: 28px">用户名称：<INPUT id=UserName style="WIDTH: 90px" 
maxLength=20 size=15 name=UserName></DIV>
<DIV style="HEIGHT: 28px">登陆密码：<INPUT id=UserPWD style="WIDTH: 90px" 
type=password maxLength=20 size=15 name=UserPWD></DIV>
<DIV style="HEIGHT: 28px"><INPUT id=Login type=submit value=" 登录 " name=Login> 
<A href="../CardManage/RegInfo.jsp">用户注册</A></DIV></DIV>
<DIV class=line1 style="BACKGROUND: #d1dc73"></DIV>
<DIV class=line1 style="BACKGROUND: #fcfac9"></DIV>
<DIV class=r_bt><SPAN class=r_bt1>8</SPAN> <SPAN class=r_bt2>商家活动</SPAN></DIV>
<DIV class=r_bt3></DIV>
<UL class=ul1> <%
				   m_SQL = "SELECT TOP 8 F_ID,F_Title FROM CityCard_LeaguePloy where f_classid=1 order by F_Addtime desc"
				   Set rs = conn.Execute(m_SQL)
				   Do While Not rs.Eof
				  %>
  <LI class=r_list>·<a title=<%=rs("F_Title")%> href='ShowPloy.jsp?id=<%=rs("F_ID")%>' target=_blank><SPAN class=a 
  style=" COLOR: #ff0000"><%=GetWord(rs("F_Title"),32,"...")%></SPAN></A></LI>
   <%
				  rs.MoveNext
				  Loop
				  rs.Close
				  %></UL>
<DIV class=line1 style="BACKGROUND: #d1dc73"></DIV>
<DIV class=line1 style="BACKGROUND: #fcfac9"></DIV>
<DIV class=r_bt><SPAN class=r_bt1>8</SPAN> <SPAN class=r_bt2>招聘信息</SPAN></DIV>
<DIV class=r_bt3></DIV>
<UL class=ul1>  <%
				   m_SQL = "SELECT TOP 8 F_ID,F_Title FROM CityCard_LeaguePloy where f_classid=2 order by F_Addtime desc"
				   Set rs = conn.Execute(m_SQL)
				   Do While Not rs.Eof
				  %>
 <LI class=r_list>·<a title=<%=rs("F_Title")%> href='ShowPloy.jsp?id=<%=rs("F_ID")%>' target=_blank><SPAN class=a><%=GetWord(rs("F_Title"),32,"...")%></SPAN></A></LI>
   <%
				  rs.MoveNext
				  Loop
				  rs.Close
				  %></UL>
<DIV class=h5></DIV>
<DIV class=line1 style="BACKGROUND: #d1dc73"></DIV>
<DIV class=line1 style="BACKGROUND: #fcfac9"></DIV>
<DIV class=r_bt><SPAN class=r_bt1>8</SPAN> <SPAN class=r_bt2>最新评论</SPAN></DIV>
<DIV class=r_bt3></DIV>
	<%
				   m_SQL = "SELECT TOP 8 * FROM CityCard_LeagueReview as A inner join CityCard_League as B on  A.F_LeagueID=B.companyid  order by A.F_Addtime desc"
				   Set rst = conn.Execute(m_SQL)
				   Do While Not rst.Eof
				   n=n+1
				  %>
<DIV class=r_sj_tui>
<DIV class=r_sj_tui2>
<DIV class=r_sj_tui3><%=n%></DIV></DIV>
<DIV class=r_sj_tui4><SPAN 
style="COLOR: #009900">【店名】</SPAN><SPAN class=a><A style="COLOR: #ff6600" 
                                href="<% if rst("template_id")<>"0" then %><%=rst("companyid")%><% else %>Show.jsp?id=<%=rst("companyid")%><% end if %>" 
                                target=_blank><%=rst("name")%></A></SPAN><BR><SPAN 
style="COLOR: #666"><%=rst("F_Content")%></SPAN></DIV></DIV>
<%
				  rst.MoveNext
				  Loop
				  rst.Close
				  %>
</DIV><BR><BR><BR><BR>
<DIV id=foot><A class=list href="../about/?Para=Intro" target=_blank>关于我们</A> ┊ <A class=list href="../about/?Para=Contact" target=_blank>联系方式</A> ┊ <A class=list href="../about/?Para=Job" target=_blank>招贤纳士</A> ┊ <A class=list href="../about/?Para=AdService" target=_blank>广告服务</A> ┊ <A class=list href="../about/?Para=Cooperate" target=_blank>合作伙伴</A> ┊ <A class=list href="../so/Suggestion.jsp" target=_blank> 留言/投诉</A> ┊ <A class=list href="../about/?Para=Job" target=_blank></A><BR><%=Site_info(5)%> </DIV></FORM></DIV></BODY></HTML>
