<!--#include file="fstop.asp"-->
<%function HTMLEncode(fString)
if not isnull(fString) then
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")
    fString = Replace(fString, CHR(32), "&nbsp;")
    fString = Replace(fString, CHR(9), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#39;")
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
    fString = Replace(fString, CHR(10), "<BR> ")
    HTMLEncode = fString
end if
end function
dim ThisPage,Pagesize,Allrecord,Allpage,tj
dim catid,i,strcat,catlist,pid
catid=Request("catid")
CatList =catid
PID = catid
		 if catid="" or catid = 0 then
		 	conn.close
			set conn = Nothing
		 	response.Redirect "shangjia.asp"
			response.end
		 end if
	dim rs
		 set rs=server.CreateObject("adodb.recordset")
		do while not PID = 0
		rs.open "Select categoryid,category,ParentID From FOX_category Where categoryid="&PID,conn,1,1
		 
		 	if rs.eof and rs.bof then
				response.Write "<script LANGUAGE='javascript'>alert('您输入的参数非法，请正确操作！');history.go(-1);</script>"
				rs.close
				set rs = Nothing
				conn.Close
				set conn=nothing
				response.end
			end if
dim lstcat,catstr,atrmeta,strintro,caid,catn
		 	lstcat = "=&gt; <a href=sjlist.asp?catid="&rs("categoryid")&">"&rs("category")&"</a>"&lstcat
		 	catstr = ""&rs("category")&" =&gt; "&catstr
		 	CaID = PID
		 	CatN = rs("category")
		 	PID = rs("ParentID")
		 	rs.close 
		 loop
		 
		 rs.open "Select category,meta From FOX_category Where categoryid="&catid,conn,1,1
		 strcat = rs("category")
		 strmeta = rs("meta")
		 strintro = rs("intro")
		 rs.close 
		set rs = Nothing
sorts(CatID)
dim tmpRs,intcat,sql
sub sorts(selec)
	sql="select categoryid from Fox_category where ParentID = "&selec&" order by categoryorder"
	set tmpRs= server.CreateObject("adodb.recordset")
	tmpRs.open sql,conn,1,1
	do while not tmpRs.eof
		IntCat =  tmpRs("categoryid")
	 	If Len(CatList) = 0 Then
      		CatList =catid
   		ElseIf InStr( CatList, IntCat ) <= 0 Then
      		CatList = CatList&", "&IntCat &""
   		End If
		sorts tmpRs("categoryid")
		tmpRs.movenext
	loop
	tmpRs.close
	Set tmpRs = Nothing
end sub	
			
		
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>百业联盟分类列表--<%=title%>--<%=web%></title>
</head>
<body>

<div align="center">
<div align="center">
<table cellPadding="0" width="930" border="1" id="table205" bordercolorlight="#E0DEDE" bordercolordark="#E0DEDE" style="border-collapse: collapse">
	<tr>
		<td width="1%">
		<img border="0" src="card/tkbg1.gif" width="11" height="27"></td>
		<td width="98%" background="card/tkbg.gif">
		<img border="0" src="card/dott.gif" width="7" height="16"> 
		<a href="<%=web%>"><%=title%></a> => <a href="shangjia.asp">商家联盟</a> => <%
response.write ""&lstcat  '再要显示的地方调用这段就可以了
%>
</td>
	</tr>
</table>
</div>
<table cellSpacing="0" cellPadding="0" width="930" align="center" border="0" id="table206">
	<tr>
		<td width="774">
		<div align="center">
		<table cellSpacing="0" cellPadding="0" width="930" border="0" id="table207">
			<tr>
				<td width="430">
				<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table208">
					<tr>
						<td>
						<table cellSpacing="1" cellPadding="0" width="100%" bgColor="#837352" border="0" id="table209">
							<tr>
								<td align="middle" bgColor="#f1f1e9" height="120">
								<img border="0" src="card/20061160187564.gif" width="600" height="120"></td>
							</tr>
						</table>
						</td>
					</tr>
					</table>
				</td>
				<td vAlign="top">
				<table cellSpacing="0" cellPadding="0" width="99%" align="right" border="0" id="table210">
					<tr>
						<td width="248">
						<table cellSpacing="0" cellPadding="0" width="324" align="right" border="0" id="table211">
							<tr>
								<td width="324" background="card/xjm.gif" height="36">
								<img height="1" src="card/spacer.gif" width="40" border="0">山西消费指南 
								<font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
								百业联盟　消费助手</font> 
								</td>
							</tr>
							<tr>
								<td align="middle" width="315" background="card/xjbg1.gif">
								<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table212">
									<tr>
										<td align="middle" rowspan="2">
										　<!--#include file="sjhang1.asp"--></td>
										<td align="middle" width="76">
										<a href="addnewshang.asp">
										<img height="48" src="card/t2.gif" width="76" border="0"></a></td>
									</tr>
									<tr>
										<td vAlign="center" align="middle" height="20" width="76">
										<a href="addnewshang.asp">商家加盟</a></td>
									</tr>
								</table>
								</td>
							</tr>
							<tr>
								<td width="248">
								<img height="18" src="card/xjbottom.gif" width="324"></td>
							</tr>
						</table>
						</td>
					</tr>
					</table>
				</td>
			</tr>
		</table>
		</div>
		<table cellSpacing="0" cellPadding="0" width="75%" align="center" border="0" id="table213">
			<tr>
				<td width="100%" height="1"></td>
			</tr>
		</table>
		</td>
		<td width="1" bgColor="#e6e6e6">　</td>
	</tr>
</table>
<table cellSpacing="0" cellPadding="0" width="930" border="0" id="table1">
				
		<tr bgColor="#d9ebe5">
			<td  height="25" bgcolor="#FFFFFF" width="223" valign="top">
				<table cellSpacing="0" cellPadding="0" width="2" align="center" border="0" id="table214">
					<tr>
						<td width="1" bgColor="#e6e6e6" rowSpan="2">　</td>
						<td vAlign="top" borderColor="#f2f2f2" width="1" bgColor="#f9f9f9">
						<table cellSpacing="0" cellPadding="0" width="219" border="0" id="table215">
							<tr>
								<td vAlign="top" width="219">
								<table cellSpacing="0" cellPadding="0" width="219" border="0" id="table216">
									<tr>
										<td width="219">
										<img height="46" src="card/t_r1.gif" width="219"></td>
									</tr>
									<tr>
										<td background="card/bg1.gif">
										<table cellSpacing="0" cellPadding="0" width="215" align="center" border="0" id="table217">
											<tr>
												<td vAlign="top" width="215">
												　<!--#include file="shangjialeft.asp" --></td>
											</tr>
										</table>
										</td>
									</tr>
									<tr>
										<td height="5">
										<img height="5" src="card/tbg.gif" width="219"></td>
									</tr>
								</table>
								</td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td vAlign="bottom" borderColor="#f2f2f2">
						<table cellSpacing="0" cellPadding="0" width="75%" border="0" id="table218">
							<tr>
								<td height="5"></td>
							</tr>
							<tr>
								<td>
								<img height="53" src="card/kfzx.gif" width="217"></td>
							</tr>
							<tr>
								<td>
								<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table219">
									<tr>
										<td background="card/kfbg.gif">
										<table cellSpacing="0" cellPadding="0" width="95%" align="center" border="0" id="table220">
											<tr>
												<td height="70">
												加盟电话：0351-6618875<p>
												在线QQ：130135234<br>
												<br>
　</td>
											</tr>
										</table>
										<img height="5" src="card/tbg.gif" width="211"></td>
										<td width="7">
										<img height="75" src="card/yy.gif" width="7"></td>
									</tr>
								</table>
								</td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			<td  height="25" bgcolor="#FFFFFF" width="57" align="center" valign="top"><img border="0" src="<%=css%>bgfox5.jpg"></td>
			<td  height="25" bgcolor="#FFFFFF" width="649" valign="top">
						<table border="0" width="100%" id="table221" cellspacing="0" cellpadding="0">
							<tr>
								<td width="17%">
								<img border="0" src="card/zxsj_r1_c11.gif" width="111" height="27"></td>
								<td width="76%" background="card/zxsj_r1_c2.gif">　</td>
								<td width="7%">
								<img border="0" src="card/zxsj_r1_c4.gif" width="46" height="27"></td>
							</tr>

						</table>
<%dim rsfoxf,sqlfoxf
tj=1
set rsfoxf=server.createobject("adodb.recordset")
 sqlfoxf="SELECT * FROM FOX_xiao where recommend<>3 and"
 If mark<>"" Then sqlfoxf=sqlfoxf&" mark='"&mark&"' and"
 If catid<>"" Then sqlfoxf=sqlfoxf&" categoryid in ("&CatList&") and"
' if right(sqlfoxf,5)="where" then sqlfoxf=left(sqlfoxf,clng(len(sqlfoxf))-5)
 if right(sqlfoxf,3)="and" then sqlfoxf=left(sqlfoxf,clng(len(sqlfoxf))-3)
 sqlfoxf=sqlfoxf&" order by adddate desc"
 rsfoxf.Open sqlfoxf,conn,1,3
 rsfoxf.Pagesize=6
Pagesize=rsfoxf.Pagesize
Allrecord=rsfoxf.Recordcount
Allpage=rsfoxf.Pagecount
if ThisPage<1 then                           
ThisPage=1                           
end if
On Error Resume Next
rsfoxf.move (ThisPage-1)*Pagesize
if rsfoxf.eof then
response.write "暂时没有！"
else
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0" style="border-collapse: collapse" class="table2" id="table169" height="142">

            <%do while not rsfoxf.eof%>
 <%dim rsq,sqlq,abc,shengc,shic
set rsq=server.createobject("adodb.recordset") 
sqlq = "select * from [FOX_category] where categoryid="&rsfoxf("categoryid")&""
rsq.open sqlq,conn,1,1
abc=rsq("category")
rsq.close
set rsq=nothing
set rsq=server.createobject("adodb.recordset") 
sqlq = "select sheng from [FOX_sheng] where id="&rsfoxf("sheng")&""
rsq.open sqlq,conn,1,1
shengc=rsq("sheng")
rsq.close
set rsq=nothing
set rsq=server.createobject("adodb.recordset") 
sqlq = "select shi from [FOX_shi] where id="&rsfoxf("shi")&""
rsq.open sqlq,conn,1,1
shic=rsq("shi")
rsq.close
set rsq=nothing
%>
            <tr bgcolor="#CCCCCC">
              <td colspan="4" height="1"></td>
            </tr> 

            <tr>
              <td height="22" width="1%" class="p9t" bgcolor="#F5F5F5">
				　</td>
              <td height="22" class="p9t" bgcolor="#F5F5F5" colspan="3">
				<table border="1" width="100%" id="table171" cellpadding="0" bordercolorlight="#EEEEEE" bordercolordark="#EEEEEE" style="border-collapse: collapse" height="27">
            <tr>
              <td colspan="2" class="p10t" background="card/005.gif">
				<p align="center">
				&nbsp;<img border="0" src="card/dott.gif" width="7" height="16"></td>
              <td height="27" colspan="3" class="p10t" background="card/005.gif">[<a href="sjqlist.asp?mark=<%=rsfoxf("mark")%>"><font color="#FF6C3B"><%=trim(rsfoxf("mark"))%></font></a>]<font color="#009933"><b><a href="shangjiainfo.asp?id=<%=rsfoxf("id")%>"><%=rsfoxf("name")%></a></b></font></strong>&nbsp;&nbsp;发布时间：<font color="#666666"><%=rsfoxf("adddate")%></font></td>
            </tr>
				</table>
				</td>
            </tr>

            <tr>
              <td height="30" width="1%" class="p9t" bgcolor="#F5F5F5" rowspan="2">
				<p align="right">
				　</td>
              <td class="p9t" bgcolor="#FFFFFF" width="49%" rowspan="3" valign="top">
				<TABLE WIDTH="321" BORDER="1" CELLPADDING="2" CELLSPACING="1" bordercolorlight="#EEEEEE" bordercolordark="#EEEEEE">
                          <TR>
                            <TD width="105" height="80" align="center"><a href=shangjiainfo.asp?id=<% = rsfoxf("id") %> target="_blank">
                              <% if trim(rsfoxf("spic"))<>"" then %>
                              <img src=image\<% = trim(rsfoxf("spic"))%>  border=0 width="105" height="70"></a>
                                <%  else %>
                                <img src=images/emptybook.jpg  border=0 width="105" height="70">
                                <% end if %>                            </TD>
                            <TD width="199" height="80" align="center">
							<table border="0" width="100%" id="table204" cellspacing="0" cellpadding="0" height="100%">
								<tr>
									<td width="22">
									<img border="0" src="card/111.gif" width="18" height="16"></td>
									<td><%=trim(rsfoxf("mark"))%></td>
								</tr>
								<tr>
									<td width="22">
									<img border="0" src="card/114.gif" width="18" height="16"></td>
									<td><%=trim(rsfoxf("llcs"))%>
									<img border="0" src="card/116.gif" width="18" height="16"></td>
								</tr>
								<tr>
									<td width="22">
									<img border="0" src="card/112.gif" width="18" height="16"></td>
									<td><%=trim(rsfoxf("code"))%></td>
								</tr>
								<tr>
									<td width="22">
									<img border="0" src="card/113.gif" width="18" height="16"></td>
									<td><%=trim(left(rsfoxf("telll"),18))%></td>
								</tr>
							</table>
							</TD>
                          </TR>
                          <TR>
                            <TD width="311" colspan="2">
						<div align="left">
							<table width="100%"  border="0" cellspacing="1" cellpadding="1" id="table205">
                        <tr>
                          <td align="left" width="22">
							<img border="0" src="card/115.gif" width="18" height="16"></td>
                          <td align="left"><%=trim(rsfoxf("pweight"))%>
							　</td>
                        </tr>
                      </table></div>
							</TD>
                            
                          </TR>
                          </TABLE>
				</td>
              <td width="7%">
              类别:</td>
              <td width="43%">
              　<a href="sjlist.asp?catid=<%=rsfoxf("categoryid")%>"><%=abc%></a></td>
            </tr>

            <tr>
              <td width="7%">
              <p align="right">属地:</td>
              <td width="43%"><%=shengc%> -> <a href="sjqlist.asp?catid=<%=rsfoxf("shi")%>"><%=shic%></a>(<a href="sjqlist.asp?catid=<%=rsfoxf("shi")%>"><font color="#FF6C3B">查看该域</font></a>)</td>
            </tr>

            <tr>
              <td height="22" width="1%" class="p9t" bgcolor="#F5F5F5">
				　</td>
              <td width="50%" class="p9t" colspan="2">
				<p align="left"><%=left(rsfoxf("detail"),90)%>...</td>
            </tr>            <%
        tj=tj+1
        if tj>=Pagesize then exit do
        rsfoxf.movenext
        loop
        %>

            </table>

				<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" style="border-collapse: collapse" id="table170">
                <tr>
                  <td height="25" width="163" class="p9t"><p align="center"> 
					<font color="#CC5200"><%=Pagesize%></font> 条/页 &nbsp;共 <font color="#CC5200"><%=Allrecord%></font> 条记录</td>
                  <td height="25" width="103" class="p9t"><p align="center">共 <font color="#CC5200"><%=Allpage%></font> 页</td>
                  <td height="25" width="78" class="p9t"><p align="center">第 <font color="#CC5200"><%=ThisPage%></font> 页</td>
                  <td height="25" width="187" class="p9t"><p align="center">
 <%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1&catid="&catid&">首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&"&catid="&catid&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&"&catid="&catid&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&catid="&catid&">尾页</a>&nbsp;"     
end if
%>  
                    </td>
                </tr>
              </table>


 <%end if
 rsfoxf.close
 set rsfoxf=nothing%>  
 </td>
		</tr>
		
</table>
</div>

</body>
<!--#include file="ffbottom.asp"-->