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

<%dim sql,rs,thepage,currentpage,totalpage,n,pagename,page
sql="select * from nyeee_data where mark='yes' and stop >= date() order by top desc,money desc,time desc"               
set rs=server.createobject("adodb.recordset")               
rs.open sql,connstr,1,1  
if rs.eof then                          
%><p align='center'><font color='#FF0000'>暂无文字广告！</font></p><%
rs.close
set rs=nothing                            
else  
thepage=request("pageid")
if isnumeric(thepage)=false then
response.write "<script>alert('参数错误，关闭窗口！');window.close();</script>"
response.end
end if
currentpage = cint(thepage)            
if currentpage <= 0 then 
currentpage=1
end if       
const maxperpage=40                        
rs.Pagesize = maxperpage                      
totalpage = rs.PageCount 
rs.absolutepage = currentpage 
n=rs.recordcount  
pagename="ad.asp"                   
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">
<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 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;" 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"-->