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

<!--#include file="check.asp"-->
<!--#include file="conn.asp"-->
<%response.expires=-1
addr00=request.servervariables("server_name")
addr10=request.servervariables("url")
addr10=replace(addr10,"votelist.asp","")
addr000="http://"&addr00&addr10
'response.write addr000
count=20
d=request("id")
if d="" then
d=0
page=1
n=1
else
page=d
n=count*(int(d)-1)
end if
set rs=server.createobject("adodb.recordset")
sql="select * from class order by id desc"
rs.open sql,conn,3,1
yushu=rs.recordcount mod count
if yushu=0 then
totalpage=rs.recordcount/count
else
totalpage=int(rs.recordcount/count)+1
end if
if int(page)>int(totalpage) then
page=totalpage
end if
k=0
if d<>0 and int(d)<=int(totalpage) then
for i=1 to n
rs.movenext
next
end if

addr0=request.servervariables("server_name")
addr1=request.servervariables("url")
addr="http://"&addr0&addr1%>

<head>
<link rel="stylesheet" type="text/css" href="STYLE.CSS">
<title></title>
</head>

<body bgcolor="#D5D5D5">

<div align="center">
  <center>
  <table bgcolor="#e8e8e8" border="0" width="600" bordercolorlight="#000000" cellspacing="0" cellpadding="0" style="border-left: 2 solid #82C130; border-right: 2 solid #82C130" height="122">    <tr>
      <td width="100%" height="30" background="l1.gif">
<!--#include file="menu.asp"-->
      </td>
    </tr>
    <tr>
      <td width="100%" height="93">
      <br><Br>
        <div align="center">
          <center>
              <table border="0" width="80%" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" height="22">
                <tr>
              <td width="11%" height="20" bgcolor="#82C130">
                <p align="center"><font color="#FFFFFF">ID</font></td>
              <td width="62%" height="20" bgcolor="#82C130">
                <p align="center"><font color="#FFFFFF">标题</font></td>
              <td width="27%" height="20" bgcolor="#82C130">
                <p align="center"><font color="#FFFFFF">管理</font></td>
            </tr>
          </table>
          </center>
     </div>
  <%do while not rs.eof
  if rs("ren")=request.cookies("admin") or request.cookies("qx")=2 then%>         
<div align="center">
  <center>
  <table border="1" width="80%" bordercolor="#FFFFFF" cellspacing="0" cellpadding="0" height="22">
    <tr>
      <td width="11%" height="20" bgcolor="#82C130">
        <p align="center"><font color="ffffff"><%=rs("id")%></font></td>
      <td width="62%" height="20" bgcolor="#f6f6f6">
        <p align="center"><a href="showvote.asp?classid=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td>
      <td width="27%" height="20" bgcolor="#82C130">
        <p align="center"><a href="xg.asp?id=<%=rs("id")%>&style=<%=rs("style")%>"><font color="#FFFFFF">修改</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="savevote.asp?id=del&classid=<%=rs("id")%>"><font color="#FFFFFF">删除</font></a></td>   
    </tr>
  </table>
  </center>
</div>
<%if k=count then 
exit do
end if
end if
rs.movenext
loop%>
              <form method='GET' action='<%=addr%>'><p align='center'>
              <% if page>1 then %>
              <a href='<%=addr%>?<%=(page-1)%>'>&lt;&lt;上一页</a>&nbsp;&nbsp;  
              <%end if%>
              <% if int(page) < int(totalpage) then %>  
              <a href='<%=addr%>?<%=(page+1)%>'>下一页&gt;&gt;</a>  
              <% end if %>  
              【共<font color=red><%=totalpage%></font>页】【第<font color=red><%=page%></font>页】跳转到<input style='border-style: solid; border-width: 1' type='text' name='id' size='3'>页<input type='submit' value='GO' style='border-style: solid; border-width: 1' name='B1'></form>  
      </td>
    </tr><br>
	<tr>
        <td> 
          <p align="center"><br>
            对于单个投票的调用代码说明：<br>
            &lt;script language="javascript" src=&quot;<%=addr000%>votedy.asp?<font color="#FF0000">id=5</font>&quot;&gt;&lt;/script&gt;</p>
          <p align="center">请把这里的<font color="#FF0000">id=5</font>的<font color="#FF0000">5</font>改成相应投票的ID就可以了<br>
            <br>
            <br>
          </p>
</td></tr><br>
	<tr><td height="18" background="l2.gif"></td></tr>
	
  </table>
  </center>
</div>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
