admin.asp
---------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<style>
<!--
body{
font-size: 9pt;
}
-->
</style>
<!--增加分组时需要修改-->
<%
if strcomp(request.Cookies("User")("aspbbsUserName"),"admin",1)<>0 then
%>
<script language="javascript">
window.alert ('没有权限!');
</script>
<script language="JavaScript">
//页面跳转
function moveNew(){
location.href="../user/enter.asp";
}
window.setTimeout('moveNew()','500'); //1000=1秒
</script>
<%
response.end
end if
%>
<!--#include file="conn.asp"-->
<%
sub sub_fy
dim sql3
sql3="select * from main order by date desc"
rs1.open sql3,conn,3
dim intPageSize '每页显示多少条记录
dim intCur '确定当前的显示的页
dim intTotal '总页数
dim I '循环的变量
intPageSize=20
intCur=CInt(Request("CurPage")) '从表单中取得当前页号
if intCur=0 then
intcur=1
end if
rs1.PageSize=intPageSize '将PageSize属性设为一页上要显示的记录数
If Not rs1.EOF Then '记录集不空
rs1.AbsolutePage=intCur '设置当前记录所在的页号
End If
intTotal=rs1.PageCount '获得总页数
I=0
response.write "<table width=""100%"" border=""0"" class=""word01"">"
Do While Not rs1.EOF and I<rs1.Pagesize
response.write "<tr> <td><font size=""1"">○</font> <font color=""#0099FF"">"&rs1("title")&"</font></td></tr><tr> <td>"&rs1("content")&"<br></td></tr><tr> <td>作者:"&rs1("name")&" "&rs1("date")&" "&rs1("ip")&" 屏蔽: "&rs1("shlied")&" <form action=""admin.asp?CurPage=0"" method=""post"" name=""form_shlied"" id=""form_shlied""><input name=""screen"" type=""submit"" id=""screen"" value=""屏蔽""> <input name=""clear"" type=""submit"" id=""clear"" value=""清除""><input name=""hidden"" type=""hidden"" id=""hidden"" value="&rs1("ID")&"></form><hr noshade></td></tr>"
rs1.MoveNext
I=I+1
Loop
if i>=rs1.Pagesize then
PaginationList=1
end if
response.write "</table>"
response.write "共" & intTotal & "页 当前第" & intCur & "页"
response.write "<br>"
dim apage
apage=0
do while apage<>cint(intTotal)
apage=apage+1
response.write "<a href=admin.asp?CurPage="&apage&">[" & apage &"]</a> "
loop
end sub
%>
<%
sub sub_shlied
dim hid,sql2
hid=request("hidden")
if request("screen")<>empty then
sql2="select shlied from main where id="&cint(hid)&""
rs2.open sql2,conn,3
if not rs2.eof or not rs2.bof then
rs2("shlied")="Y"
rs2.update
end if
end if
end sub
%>
<%
sub sub_clear
dim hid,sql2
hid=request("hidden")
if request("clear")<>empty then
sql2="select shlied from main where id="&cint(hid)&""
rs2.open sql2,conn,3
if not rs2.eof or not rs2.bof then
rs2("shlied")="N"
rs2.update
end if
end if
end sub
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理BBS</title>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>管理BBS <a href="main.asp">首页</a></td>
---------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<style>
<!--
body{
font-size: 9pt;
}
-->
</style>
<!--增加分组时需要修改-->
<%
if strcomp(request.Cookies("User")("aspbbsUserName"),"admin",1)<>0 then
%>
<script language="javascript">
window.alert ('没有权限!');
</script>
<script language="JavaScript">
//页面跳转
function moveNew(){
location.href="../user/enter.asp";
}
window.setTimeout('moveNew()','500'); //1000=1秒
</script>
<%
response.end
end if
%>
<!--#include file="conn.asp"-->
<%
sub sub_fy
dim sql3
sql3="select * from main order by date desc"
rs1.open sql3,conn,3
dim intPageSize '每页显示多少条记录
dim intCur '确定当前的显示的页
dim intTotal '总页数
dim I '循环的变量
intPageSize=20
intCur=CInt(Request("CurPage")) '从表单中取得当前页号
if intCur=0 then
intcur=1
end if
rs1.PageSize=intPageSize '将PageSize属性设为一页上要显示的记录数
If Not rs1.EOF Then '记录集不空
rs1.AbsolutePage=intCur '设置当前记录所在的页号
End If
intTotal=rs1.PageCount '获得总页数
I=0
response.write "<table width=""100%"" border=""0"" class=""word01"">"
Do While Not rs1.EOF and I<rs1.Pagesize
response.write "<tr> <td><font size=""1"">○</font> <font color=""#0099FF"">"&rs1("title")&"</font></td></tr><tr> <td>"&rs1("content")&"<br></td></tr><tr> <td>作者:"&rs1("name")&" "&rs1("date")&" "&rs1("ip")&" 屏蔽: "&rs1("shlied")&" <form action=""admin.asp?CurPage=0"" method=""post"" name=""form_shlied"" id=""form_shlied""><input name=""screen"" type=""submit"" id=""screen"" value=""屏蔽""> <input name=""clear"" type=""submit"" id=""clear"" value=""清除""><input name=""hidden"" type=""hidden"" id=""hidden"" value="&rs1("ID")&"></form><hr noshade></td></tr>"
rs1.MoveNext
I=I+1
Loop
if i>=rs1.Pagesize then
PaginationList=1
end if
response.write "</table>"
response.write "共" & intTotal & "页 当前第" & intCur & "页"
response.write "<br>"
dim apage
apage=0
do while apage<>cint(intTotal)
apage=apage+1
response.write "<a href=admin.asp?CurPage="&apage&">[" & apage &"]</a> "
loop
end sub
%>
<%
sub sub_shlied
dim hid,sql2
hid=request("hidden")
if request("screen")<>empty then
sql2="select shlied from main where id="&cint(hid)&""
rs2.open sql2,conn,3
if not rs2.eof or not rs2.bof then
rs2("shlied")="Y"
rs2.update
end if
end if
end sub
%>
<%
sub sub_clear
dim hid,sql2
hid=request("hidden")
if request("clear")<>empty then
sql2="select shlied from main where id="&cint(hid)&""
rs2.open sql2,conn,3
if not rs2.eof or not rs2.bof then
rs2("shlied")="N"
rs2.update
end if
end if
end sub
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理BBS</title>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>管理BBS <a href="main.asp">首页</a></td>