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

<%dim sql,rs,thepage,currentpage,totalpage,n,pagename,page
sql="select * from 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=70                        
rs.Pagesize = maxperpage                      
totalpage = rs.PageCount 
rs.absolutepage = currentpage 
n=rs.recordcount  
pagename="ad.asp"                   
page = PageSplit(currentpage,totalpage,pagename)%>


<TABLE WIDTH=778 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  <TR>
	 <td width="100%" height="30" style="BORDER-RIGHT: #91b9dd 1px dotted; BORDER-TOP: #91b9dd 1px dotted; BORDER-LEFT: #91b9dd 1px dotted; BORDER-BOTTOM: #91b9dd 1px dotted" bgColor="#e6faff" colspan="7">
 <p align="center"><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>
<TR>

<%i=0 
do while i < maxperpage and not rs.eof%>
    <td width="100%"> 
      <table width="100%" height="117" border="0" cellpadding="1" cellspacing="2" bordercolor="#66CCFF">
        <tr> 
          <td width="100%" height="24" align="center" background="upload/beijinggao.gif" bgcolor="#F9F168" style="BORDER-RIGHT: #dd91a5 1px dotted; BORDER-TOP: #dd91a5 1px dotted; BORDER-LEFT: #dd91a5 1px dotted; BORDER-BOTTOM: #dd91a5 1px dotted" <%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:12px" <%if rs("color")<>"" then%>color="<%=rs("color")%>"<%end if%>><%=left(rs("title"),10)%></font></b> 
            <%else%>
            <font style="font-size:12px" <%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="87" align="center" valign="top" style="BORDER-RIGHT: #dd91a5 1px dotted; BORDER-TOP: #dd91a5 1px dotted; BORDER-LEFT: #dd91a5 1px dotted; BORDER-BOTTOM: #dd91a5 1px dotted;cursor: hand" onMouseOut=statusOut(); onMouseOver="MM_displayStatusMsg('")> 
            <%if rs("ispic")<>"yes" then%>
            <%else%>
            <a href="<%=rs("url")%>" target="_blank"><img src="adpic/<%=rs("pic")%>" border="0" width="105" height="80"></a> 
            <%end if%>
          </td>
        </tr>
      </table></td>
    <%i=i+1
if i mod 7=0 then  
%>
  </tr>
  <tr>
    <%       
end if
rs.movenext
loop  
if (n mod 7) <> 0 and not i mod maxperpage = 0 Then 
for i = 1 to (7 - (n mod 7))%>
    <td width="100%" height="114"> 
      <table width="100%" height="114" border="0" cellpadding="1" cellspacing="2" bordercolor="#6699FF">
        <tr> 
          <td width="100%" height="24" align="center" background="upload/beijinggao.gif" bgColor="#F9F168" 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:12px" ><font color="#000000">招商信息</font></font></b></td>
        </tr>
        <tr> 
          <td width="100%" height="84" 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 width="105" height="80" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="100%"><p style="margin-top: 2" align="center"><font color="red">茫茫商海<br>
                      处处商机</font><br>
                      <br>
                      诚征各类广告</p></td>
                </tr>
              </table>
            </div></td>
        </tr>
      </table>
      
    </td>
    <%next                                                  
end if                                                                            
rs.close                                                   
set rs=nothing                                                 
conn.close                                                    
set conn=nothing%>
  </tr>
</table>


 
<%end if%>
<!-- 这里是主题结束 -->
<!--#include file="foot.asp"-->