<!--#include file="pysjzx_conn.asp"-->
<!--#include file="webconfig.asp"-->
<html>
<head>
<title><%=webname%>-经销商</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
<meta content="<%=keyword%>" name="keywords">
<meta content="<%=description%>" name="description">
<LINK href="css/style.css" rel=stylesheet type=text/css>
</head>
<!--#include file="webhead.asp"-->
			<div align="center">
			<table style="MARGIN-TOP: 20px" cellSpacing="0" cellPadding="0" border="0" width="780">
				<tr>
					<td>
					<p align="center">
					<img height="39" src="images/dealer2.gif" width="780"></td>
				</tr>
				<tr>
					<td style="BORDER-RIGHT: #9b9c80 1px solid" vAlign="top">
					<table cellSpacing="1" cellPadding="0" width="100%" bgColor="#ffffff" border="0">
										<tr height="22">
											<td class="t01" align="middle" width="15%" bgColor="#b3b3b3">
											LOGO</td>
											<td class="t01" align="middle" width="15%" bgColor="#b3b3b3">
											经销商</td>
											<td class="t01" align="middle" width="18%" bgColor="#b3b3b3">
											服务类型</td>
											<td class="t01" align="middle" width="14%" bgColor="#b3b3b3">
											城市</td>
											<td class="t01" align="middle" width="18%" bgColor="#b3b3b3">
											电话</td>
										</tr>
									</table>			

					<table cellSpacing="1" cellPadding="0" width="100%" bgColor="#ffffff" border="0">
						 <%set rs=server.CreateObject("adodb.recordset")
rs.Open "select  * from pysjzx_user where sort=2 and reglx=2 order by adddate desc ",conn,1,1
	if rs.recordcount=0 then 
		else
		
	  		rs.PageSize =10 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.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.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	
			For i=1 To x
		%><tr style="BACKGROUND-COLOR: #efefef; ; BACKGROUND-COLOR: expression(rowIndex%2==1?'#F9F9F9':'#EFEFEF')" height="45">
							<td width="15%">
							<p align="center"><%if rs("logo") <>"" then%><img height="40" src="<%=rs("logo")%>" width="70" border="0">
							<%end if%></td>
							<td width="15%"><p align="center">
							<a title="<%=rs("company")%>" href="dealer_list.asp?id=<%=rs("userid")%>">
							<%=rs("company")%></a>
							　</td><td align="middle" width="18%"><%if rs("service_sort1")=1 then%>报价 <%end if%>
							<%if rs("service_sort2")=1 then%>二手车 <%end if%>
							<%if rs("service_sort3")=1 then%>租赁车 <%end if%></td>
							
							<td width="14%">
							<p align="center"><%  set rss=server.createobject("adodb.recordset")
sqls="select * from province where shengNo="&int(rs("province"))
rss.open sqls,conn,1,1
if rss.eof then

end if
if rs("province") =0 then
response.write "不详"
end if
               response.write  rss("shengname")
               shengid=rss("id")
                rss.close
                set rss=nothing
                %>
							　</td>
							<td width="18%">
							<p align="center"><%=rs("tel")%></td>
						</tr>
							<% rs.movenext
		next
			end if
						%>
					
						<tr style="BACKGROUND-COLOR: #efefef; ; BACKGROUND-COLOR: expression(rowIndex%2==1?'#F9F9F9':'#EFEFEF')" height="22">
							<td align="middle" width="780" colspan="5">	<%	call PageControl(iCount,maxpage,page,"border=0 align=right","<p align=center>")


		rs.close
		set rs=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 " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then     
        Response.Write ("上页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
    end if

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

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "条信息" &  vbCrLf)
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>　</td>
						</tr>
					</table>
					</td>
				</tr>
				<tr>
					<td style="BORDER-RIGHT: #9b9c80 1px solid; BORDER-BOTTOM: #9b9c80 1px solid" vAlign="bottom" align="left" height="13">
					<table height="3" cellSpacing="0" cellPadding="0" width="155" align="left" border="0">
						<tr>
							<td bgColor="#9b9c80">　</td>
						</tr>
					</table>
					</td>
				</tr>
			</table>

</div>

<!--#include file="webfoot.asp"-->