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

<%
if session("admin")="" then
response.Write "<script language='javascript'>alert('请先登录！');history.go(-1);</script>"
response.End
else
if request.cookies("sundxshop")("admin")="" then
response.Write "<script language='javascript'>alert('请先登录！');history.go(-1);</script>"
response.End
end if
end if
if session("rank")>2 then
response.Write "<script language='javascript'>alert('你无权管理网站投票！');history.go(-1);</script>"
response.End
end if

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="#C6EBDE">
<div align="center"> <center> <table bgcolor="#39867B" border="0" width="90%" bordercolorlight="#000000" cellpadding="0" style="border-left: 2 solid #39867B; border-right: 2 solid #39867B" height="122" cellspacing="0"> 
<tr> <td width="100%" height="30" BGCOLOR="#39867B"> <!--#include file="menu.asp"--> </td></tr> <tr> <td width="100%" height="93" BGCOLOR="#C6EBDE"> <br><Br> 
<div align="center"> <center> <table border="0" width="80%" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" height="22"> 
<tr BGCOLOR="#39867B"> <td width="11%" height="20"> <p align="center"><font color="#ffffff">ID</font></td><td width="62%" height="20"> 
<p align="center"><font color="#ffffff">标题</font></td><td width="27%" height="20"> 
<p align="center"><font color="#ffffff">管理</font></td></tr> </table></center></div><%do while not rs.eof
  %> <div align="center"> <center> <table border="1" width="80%" bordercolor="#FFFFFF" cellspacing="0" cellpadding="0" height="22"> 
<tr> <td width="11%" height="20" bgcolor="#39867B"> <p align="center"><font color="ffffff"><%=rs("id")%></font></td><td width="62%" height="20" bgcolor="#C6EBDE"> 
<p align="center"><a href="showvote.asp?classid=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td><td width="27%" height="20" bgcolor="#39867B"> 
<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

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 BGCOLOR="#C6EBDE" WIDTH="100%"> <p align="center"><br> 对于单个投票的调用代码说明：<br> 
&lt;script language="javascript" src=&quot;<%=addr000%>votedy.asp?<font color="#ffffff">id=5</font>&quot;&gt;&lt;/script&gt;</p><p align="center">请把这里的<font color="#ffffff">id=5</font>的<font color="#ffffff">5</font>改成相应投票的ID就可以了<br> 
<br> <br> </p></td></tr><br> <tr><td height="18" BGCOLOR="#39867B" WIDTH="100%"></td></tr> 
</table></center></div><%rs.close
set rs=nothing
conn.close
set conn=nothing%> 