<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html><head><title><%=webname%>--品牌店铺</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
        <tr> 
          <td colspan="3" background="images/class_bg.jpg" height=50>　<img border="0" src="img/14.gif"> 
            <a href=index.asp><%=webname%></a> >> 品牌店铺</td>
        </tr>
        <td width="100%" valign="top" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> 
          <table width=100% align=center class=table-shang border=0 cellpadding=0 cellspacing=0 bgcolor=#f1f1f1>
            <TR> 
              <TD bgColor=#ffffff colSpan=4 height=1></TD>
            <TR> 
            <tr> 
                <td width=180 height=20 align=center background="img/yellowback.gif">店铺标志</td>
                <td width=400 height=20 align=center background="img/green.gif">店铺简介</td>
                <td width=180 height=20 align=center background="img/yellowback.gif">店铺域名</td>
            </tr>
            <TR> 
              <TD bgColor=#cccccc colSpan=4 height=1></TD>
            </TR>
            <TR> 
              <TD bgColor=#f1f1f1 colSpan=4 height=3></TD>
            </TR>
          </table>
          <%set rs_shp=server.createobject("adodb.recordset")
		rs_shp.open "select * from shjia where flag=2 order by adddate,tel desc",conn,1,1
		if rs_shp.recordcount=0 then 
		%> <table width="90%" border="0" cellspacing="0" cellpadding="5" align="center">
            <tr> 
              <td align=center>暂无商家</td>
            </tr>
          </table>
          <%
		else
	  		rs_shp.PageSize =20 '每页记录条数
			iCount=rs_shp.RecordCount '记录总数
			iPageSize=rs_shp.PageSize
    		maxpage=rs_shp.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs_shp.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	
		For i=1 To x
		%> <table width="100%" align="center" border="0" cellpadding="10" cellspacing="0" class="table-xia">
            <tr> 
              <td width="180" height="100" align="center"> <a href=user/index.asp?id=<%=rs_shp("shjiaid")%> target=_blank><img src=<%=trim(rs_shp("logo"))%> width=150 height=60 border=0></a> 
              </td>
              <%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shjia where tj=1 or tj=2 or tj=3 or tj=4 or tj=5 order by adddate desc",conn,1,1
%>
              <td width="400" class="table-zuo"> <img src="images/ring01.gif"> 
                <%response.write "<a href=user/index.asp?id="&rs_shp("shjiaid")&" target=_blank>"
				if len(trim(rs_shp("name")))>25 then
				response.write left(trim(rs_shp("name")),20)&"..."
				else
				response.write trim(rs_shp("name"))
				end if
				response.write "</a>　"
				if rs_shp("tj")=5 then
				response.write "<img src=images/icon1.gif alt=超级商家>"
				end if%> &nbsp;商家星级：<img src=images/level<%=trim(rs_shp("tj"))%>.gif alt=商家星级> 
                <br> <br> <font color="#666666">简评： 
                <%if len(trim(rs_shp("content")))>60 then
				response.write left(trim(rs_shp("content")),58)&"..."
				else
				response.write trim(rs_shp("content"))
				end if
				%>
                </font> </td>
              <%rs.close
set rs=nothing%>
              <td width="150" class="table-zuo" align="center"> <%if rs_shp.recordcount<>0 then
	response.write "<a href=http://"&rs_shp("url")&" target=_blank><font color=#ff3300>"
	response.write ""&trim(rs_shp("url"))&""
	response.write "</font></a>"
	end if%> <br> <%=year(rs_shp("adddate"))&"."&month(rs_shp("adddate"))&"."&day(rs_shp("adddate"))%> </td>
            </tr>
          </table>
          <%rs_shp.movenext
		next
		call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
		end if
		rs_shp.close
		set rs_shp=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next

    Response.Write("<table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#f1f1f1>" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=center height=35>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首 页 " & vbCrLf)        
        Response.Write ("上一页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首 页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下一页 " & vbCrLf)
        Response.Write ("尾 页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾 页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "个店铺" &  vbCrLf)
    Response.Write(" 转到" & "<INPUT TYEP=TEXT CLASS=wenbenkuang NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%> </td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="service.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>