<!--#include file="head.asp"-->
<!-- 这里是主题 -->

<%thename=HtmlEncode(trim(request("name")))
if thename="" then
response.write "<script>alert('参数错误，关闭窗口！');window.close();</script>"
response.end
end if

Function PageSplit(currentpage,totalpage,pagename)                            
if currentpage mod 10 = 0 then                            
Sp = currentpage \ 10                            
else                            
Sp = currentpage \ 10 + 1                            
end if                            
Pagestart = (Sp-1)*10+1                            
Pageend = Sp*10                            
strSplit = "<a href="&pagename&"?name="&thename&"&pageid=1><font face=webdings title=第一页>9</font></a>&nbsp;"                            
if Sp > 1 then strSplit = strSplit & "<a href="&pagename&"?name="&thename&"&pageid="&Pagestart-10&"><font face=webdings title=前十页>7</font></a>&nbsp;"                            
for j=PageStart to Pageend                            
if j > totalpage then exit for                            
if j <> currentpage then                            
strSplit = strSplit & "<a href="&pagename&"?name="&thename&"&pageid="&j&">["&j&"]</a>&nbsp;"			                            
else                            
strSplit = strSplit & "<font color=red>["&j&"]</font>&nbsp;"                            
end if                            
next                            
if Sp*10  < totalpage then strSplit = strSplit & "<a href="&pagename&"?name="&thename&"&pageid="&Pagestart+10&"><font face=webdings title=后十页>8</font></a>"                             
strSplit = strSplit & "<a href="&pagename&"?name="&thename&"&pageid="&totalpage&" ><font face=webdings title=""最后一页"">:</font></a>"                            
PageSplit = strSplit                            
End Function%>


<%dim sql,rs,thepage,currentpage,pagename,totalpage,n,page
sql="select * from nyeee_data where type ='"&thename&"' and mark='yes' and stop >= date() order by top desc,money desc,time desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1 
if rs.eof then %><title>北京分类信息网|北京招贴网-Www.8cms.cn-[立足北京，服务北京]</title><body bgcolor="#FFFFFF">                        
<TABLE WIDTH=900 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
	<TR>
	 <td width="100%" height="200" style="BORDER-RIGHT: #91b9dd 1px dotted; BORDER-TOP: #91b9dd 1px dotted; BORDER-LEFT: #91b9dd 1px dotted; BORDER-BOTTOM: #91b9dd 1px dotted" colspan="4" align="center">
<%=thename%>分类中暂无广告！
	 </td>
  </tr>
</TABLE>
<%rs.close  
set rs=nothing                                                                                     
'response.end                             
else  
thepage=request("pageid")
if isnumeric(thepage)=false then
response.write "<script>alert('参数错误，关闭窗口！');window.close();</script>"
response.end
end if
currentpage = cLng(thepage)            
if currentpage <= 0 then currentpage=1       
const maxperpage=40                        
rs.Pagesize = maxperpage  
pagename="type.asp"                     
totalpage = rs.PageCount 
rs.absolutepage = currentpage 
n=rs.recordcount                    
page = PageSplit(currentpage,totalpage,pagename)%>
<table width="900" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CAE2F8">
  <tr>
    <td height="26" align="center" bgcolor="#EFF7FE">
 <font style="font-size:14px" color="#0000BF"><%=thename%></font>&nbsp;&nbsp;页次：<b><%=currentpage%>/<%=totalpage%></b>&nbsp;&nbsp;每页<b><%=maxperpage%></b>条&nbsp;&nbsp;共刊登<b><%=n%></b>条广告&nbsp;&nbsp;&nbsp;&nbsp;<%response.write page%>
    </td>
  </tr>
</TABLE>
<table width="760" height="2" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table> 
<TABLE WIDTH=900 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  <TR>
    <%i=0 
do while i < maxperpage and not rs.eof%>
    <td width="25%" valign="top">
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CAE2F8">
        <tr>
          <td width="100%" height="24" align="center" bgcolor="#EFF7FE" <%if rs("bgcolor1")<>"" then%>bgcolor="<%=rs("bgcolor1")%>"<%else%>bgColor="#ffe8e8"<%end if%>> <a href="show.asp?id=<%=rs("adid")%>" target="_blank">
          <%if rs("cu")="yes" then%>
          <b><font style="font-size:14px" <%if rs("color")<>"" then%>color="<%=rs("color")%>"<%end if%>><%=left(rs("title"),10)%></font></b>
          <%else%>
          <font style="font-size:14px" <%if rs("color")<>"" then%>color="<%=rs("color")%>"<%end if%>><%=left(rs("title"),10)%></font>
          <%end if%>
          </a> </td>
        </tr>
        <tr>
          <script language=JavaScript>
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
function statusOut() {
self.status = '';
}
</script>
          <td width="100%" height="127" align="center" valign="top" bgcolor="#FFFFFF" style="cursor: hand" onclick=window.open("show.asp?id=<%=rs("adid")%>","_blank") onMouseOver="MM_displayStatusMsg('键连至 <%=rs("title")%>');return true;return document.MM_returnValue" onMouseOut=statusOut();>
            <%if rs("ispic")<>"yes" then%>
            <table border="0" width="100%" cellspacing="0" cellpadding="1">
              <tr>
                <td width="100%" style="word-break:break-all">
                  <%if len(trim(rs("text")))>75 then%>
                  <%=left(rs("text"),75)%>...
                  <%else%>
                  <%=rs("text")%>
                  <%end if%>
&nbsp;(联系人:<%=rs("username")%>|电话:<%=rs("tel")%>)</td>
              </tr>
          </table>          
            <%else%>
            <img src="adpic/<%=rs("pic")%>" border="0" width="180" height="123">
          <%end if%></td>
        </tr>
        <tr>
          <td width="100%" bgcolor="#EFF7FE">
            <p align="center"><font color="#FF0000">发布时间:</font> <font color="#008000"><%=rs("date")%></font> <br>
                <%if rs("top")="1" then%>
                <font color="#FF0000">固顶广告</font> <font color="#008000">有效期还有<%=datediff("d",date(),rs("stop"))%>天</font>
                <%else%>
                <%if rs("money")<>"0" then%>
                <img src="images/dot.gif"> <font color="#FF6600">竞价广告</font> <font color="#008000">有效期还有<%=datediff("d",date(),rs("stop"))%>天</font>
                <%else%>
                <font color="#008000">↑有效期还有<%=datediff("d",date(),rs("stop"))%>天↑</font>
                <%end if%>
                <%end if%>
          </td>
        </tr>
      </table>
      <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
    </table></td>
    <%i=i+1
if i mod 4=0 then  
%>
  </tr>
  <tr>
    <%       
end if
rs.movenext
loop  
if (n mod 4) <> 0 and not i mod maxperpage = 0 Then 
for i = 1 to (4 - (n mod 4))%>
    <td width="25%">
      <table border="0" width="100%" cellpadding="1" cellspacing="1">
        <tr>
          <td width="100%" height="24" align="center" bgColor="#ffe8e8" style="BORDER-RIGHT: #dd91a5 1px dotted; BORDER-TOP: #dd91a5 1px dotted; BORDER-LEFT: #dd91a5 1px dotted; BORDER-BOTTOM: #dd91a5 1px dotted"><b><font style="font-size:14px" ><font color="red">分类广告 针对性强</font></font></b></td>
        </tr>
        <tr>
          <td width="100%" height="127" style="BORDER-RIGHT: #dd91a5 1px dotted; BORDER-TOP: #dd91a5 1px dotted; BORDER-LEFT: #dd91a5 1px dotted; BORDER-BOTTOM: #dd91a5 1px dotted"><div align="center">
              <table border="0" width="93%" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="100%"><p style="margin-top: 2" align="center"><font color="red">茫茫商海何处有生意<br>
                            <br>
                      分类广告处处是商机</font><br>
                      <br>
                      本栏目诚征各类供求广告</p></td>
                </tr>
              </table>
          </div></td>
        </tr>
        <tr>
          <td width="100%" style="BORDER-RIGHT: #92dcb9 1px dotted; BORDER-TOP: #92dcb9 1px dotted; BORDER-LEFT: #92dcb9 1px dotted; BORDER-BOTTOM: #92dcb9 1px dotted" align="center"><font color="#008000">http://www.8cms.cn</font> <br>
          <font color="#FF0000">本站广告</font> <font color="#008000">有效期还有365天</font> </td>
        </tr>
    </table></td>
    <%next                                                  
end if                                                                            
rs.close                                                   
set rs=nothing                                                 
conn.close                                                    
set conn=nothing%>
  </tr>
</table>
<table width="900" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CAE2F8">
  <tr>
    <td height="26" align="center" bgcolor="#EFF7FE"> <a href="ad.asp"><font style="font-size:14px" color="#0000BF">全部广告</font></a>&nbsp;&nbsp;页次：<b><%=currentpage%>/<%=totalpage%></b>&nbsp;&nbsp;每页<b><%=maxperpage%></b>条&nbsp;&nbsp;共刊登<b><%=n%></b>条广告&nbsp;&nbsp;&nbsp;&nbsp;
        <%response.write page%></td>
  </tr>
</table>
<table border="0" width="900" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" align=center>
  <tr>
    <td><!--#include file="listtype.asp"--></td>
  </tr>
</table>
<%end if%> 




<!-- 这里是主题结束 -->

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