<!--#include virtual="inc/General.inc.asp"-->
<%
CheckManageUser()
code = replace(request("code"),"'","''")
set rs = server.createobject("adodb.recordset")
p = request.querystring("p")
if p&""="" or p&""="0" then p=1
pagesize = 15
rs.open "select count(id) from marquee",conn,1,1
totalCount = rs(0)
rs.cancel:rs.close
totalPage = totalCount \ pagesize
if totalCount mod pagesize > 0 then totalPage = totalPage + 1
if cint("0"&p)>totalPage then p = totalPage
if cint("0"&p)<=1 then
	strsql = "select top " & pagesize & " id,title,adddatetime from marquee order by id desc"
else
	strsql = "select top " & pagesize & " id,title,adddatetime from marquee where id not in (select top " & (pagesize * (cint("0"&p)-1)) & " id from marquee order by id desc) order by id desc"
end if
rs.open strsql,conn,1,1%>
<html>

<head>
<title>后台管理系统</title>
<link rel="stylesheet" href="../../css/main.css">
<script language="javascript" src="../../js/yzqm.js.asp"></script>
</head>

<body topmargin="0" leftmargin="0">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
	<td height="25" bgcolor="#EFEFEF" class="dtd" style="color:#FF6600">&nbsp;当前位置：内容管理</td>
  </tr>
  <tr>
	<td>
	  <table border="0" cellpadding="1" cellspacing="0" width="99%" align="right">
		<tr>
		  <td height="10"></td>
		</tr>
		<tr>
		  <td>
			<table border="0" cellpadding="1" cellspacing="1" width="100%" bgcolor="#00599C">
			  <tr bgcolor="#A5CCFF">
				<td height="23" align="center">ID号</td>
				<td align="center">标题</td>
				<td align="center">日期</td>
				<td align="center">修改</td>
				<td align="center">删除</td>
			  </tr>
			  <%while not rs.eof%>
			  <tr bgcolor="#FFFFFF">
				<td height="25" align="center" class="entxt">&nbsp;<%=rs("id")%>&nbsp;&nbsp;</td>
				<td align="center"><%=rs("Title")%></td>
				<td align="center"><%=formatdatetime(rs("AddDateTime"),2)%></td>
				<td align="center"><a href="AddMarquee.asp?id=<%=rs("id")%>">修改</a></td>
				<td align="center"><a href="javascript:if(confirm('你确定要删除此菜单吗？')) window.location.href='DeleteMarquee.asp?id=<%=rs("id")%>'">删除</a></td>
			  </tr>
			  <%rs.movenext
			  wend%>
			</table>
			<table border="0" cellpadding="1" cellspacing="1" width="100%">
			  <tr>
				<td height="33" align="right"><%if cint("0"&p)>1 then%><a href="marquee.asp?p=1">首页</a>　<a href="marquee.asp?p=<%=cint("0"&p)-1%>">上一页</a><%end if%><%if cint("0"&p)<totalPage then%>　<a href="marquee.asp?p=<%=cint("0"&p)+1%>">下一页</a>　<a href="marquee.asp?p=<%=totalPage%>">末页</a>　<%end if%></td>
			  </tr>
			</table>
			<%rs.cancel:rs.close%>
		  </td>
		</tr>
	  </table>
	</td>
  </tr>
</table>
</body>

<html>
<%set rs=nothing
CloseConnection()%>