<%@LANGUAGE="VBSCRIPT"%>
<%if Session("weight")<>5 then 
Response.Redirect "error.asp?cause=4"
 end if
%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../images/css.css" type="text/css">
<!--#include file="data.asp"-->
<% if request("del")<>"" then 
   conn.Execute("delete * from Ad where id="&request("del"))
   end if %>
<table width="60%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td> 
      <div align="center">福建交友热线广告管理中心</div>
    </td>
  </tr>
  <tr> 
    <td><A HREF="#" onclick="window.open('adrot_add.asp','','width=500 height=250')"><img src="images/add_off.gif" align=middle border=0></A></td>
  </tr>
  <tr> 
    <td> 
      <%   
dim page
page=request("page")
PageSize = 3
dim rs,strSQL,news
strSQL ="SELECT * FROM Ad ORDER BY id DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSQL,Conn,1,1
    rs.PageSize = PageSize
	totalfilm=rs.recordcount
    pgnum=rs.Pagecount
    if page="" or clng(page)<1 then page=1
    if clng(page) > pgnum then page=pgnum
    if pgnum>0 then rs.AbsolutePage=page

if rs.eof then
response.write "<font color='#ffffff' class='3dfont'>还没有任何东东</font>"
else
%>
    </td>
  </tr>
  <tr> 
    <td> 
      <form method=Post action="">
        <div align="center">[<b><%=rs.pagecount%></b>/<%=page%>页] 
          [共<%=totalfilm%>个] 
          <%if page=1 then%>
          [首 页] [上一页] 
          <% else %>
          [<a href="?page=1">首 页</a>] [<a href="?page=<%=page-1%>">上一页</a>] 
          <%end if%>
          <%if rs.pagecount-page<1 then%>
          [下一页] [尾 页] 
          <%else%>
          [<a href="?page=<%=page+1%>">下一页</a>] [<a href="?page=<%=rs.pagecount%>">尾 
          页</a>] 
          <%end if%>
          <input type='text' name='page' size=2 maxlength=10 value="<%=page%>" align=center>
          <input type='submit'  value=' Goto '   size=2>
        </div>
      </form>
    </td>
  </tr>
  <tr> 
    <td> 
      <%
count=0 
do while not (rs.eof or rs.bof) and count<rs.PageSize 
%>
    </td>
  </tr>
  <tr> 
    <td> 
      <table border="1" cellspacing="0" cellpadding="0" width="100%" bordercolorlight=999999 bordercolordark=ffffff>
        <tr bgcolor="#E1E1E1"> 
          <td colspan=2 height="25" bgcolor="#FFCF00"> 
            <div align="right">[<a href="Adrot.asp?del=<%=rs("id")%>">删除该广告</a>]&nbsp;&nbsp;&nbsp;&nbsp; 
            </div>
          </td>
        </tr>
        <tr> 
          <td>说明:</td>
          <td> 
            <textarea name="textarea" rows="2" cols="35" style="overflow: auto"><%=rs("alt")%></textarea>
          </td>
        </tr>
        <tr> 
          <td>图片:</td>
          <td> 
            <input type="text" value="<%=rs("src")%>" name="src2" size=16>
            <input type="text" name="width2" value="<%=rs("width")%>" size=2>
            &times; 
            <input type="text" name="height2" value="<%=rs("height")%>" size=1>
            <select name="select" style="height:18px;font-size:9pt">
              <option value="GIF" <%if rs("type")="GIF" then response.write " selected" end if%>>GIF</option>
              <option value="SWF" <%if rs("type")="SWF" then response.write " selected" end if%>>SWF</option>
            </select>
          </td>
        </tr>
        <tr> 
          <td>链接:</td>
          <td> 
            <input type="text" value="<%=rs("url")%>" name="url2">
            <input type="hidden" name="id2" value="<%=rs("id")%>">
          </td>
        </tr>
        <tr> 
          <td colspan="2" height="70"> 
            <%if rs("type")="GIF" then%>
            <div align="center"><img src="<%=rs("src")%>"> 
              <%else%>
              <embed src="<%=rs("src")%>" type="application/x-shockwave-flash" width="468" height="60" ></embed> 
              <%end if%>
            </div>
          </td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
  <tr> 
    <td>
      <%rs.movenext 
count=count+1
loop 
end if%>
    </td>
  </tr>
  <tr>
    <td></td>
  </tr>
</table>
</body>
<% 
rs.Close
%>                     
              