📄 managebbs.asp
字号:
<!--#include file="articleconn.asp"-->
<!--#include file="home1.asp"-->
<!--#include file="security.asp"-->
<!--#include file="../checkpost.asp"-->
<%if session("flag")>1 then
response.write "<script>alert('您的操作权限不够!');history.back();</script>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="inc/Admin_STYLE.CSS" type="text/css">
<title></title>
<style type="text/css">
<!--
.样式1 {color: #FFFFFF}
-->
</style>
</head>
<script language="javascript">
function popwin2(id,path)
{ window.open("openarticle.asp?id="+id+"&ppath="+path,"","height=500,width=600,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes");
}
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="top1.asp"-->
<%
dim rs
MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim typename
typename=""
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim sql
dim rstype
dim typesql
dim typeid,typename1
if not isEmpty(Replace(request("typeid"), "'", "''")) then
typeid=Replace(request("typeid"), "'", "''")
else
typeid=0
end if
%>
<br>
<div align="center">
<% if request("name23")="" then
sql="select articleid,title,dateandtime,review from learning order by dateandtime desc"
else
sql="select articleid,title,dateandtime,review from learning where title like '%"&request("name23")&"%' order by dateandtime desc"
end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'><br><br>还 没 有 任 何 文 章!</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,"managebbs.asp"
showContent
showpage totalput,MaxPerPage,"managebbs.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"managebbs.asp"
showContent
showpage totalput,MaxPerPage,"managebbs.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"managebbs.asp"
showContent
showpage totalput,MaxPerPage,"managebbs.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form method="POST" action="managebbs.asp">
<tr>
<td><div align="center"><b>按电影名查询</b>
<input type="text" name="name23" size="20">
<input name="submit" type="submit" value="查询">
<a href="managebbs01.asp"><b>只显示有评论的电影</b></a> </div></td>
</tr>
</table>
</div>
<center>
<center>
</center>
<table border="0" cellspacing="1" width="100%" class="border" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="2" height="47" style="border-collapse: collapse" bordercolor="#111111">
<tr bgcolor="#429AEF">
<td height="20"><div align="center" class="样式1"><strong>ID号</strong></div></td>
<td height="20"><div align="center" class="样式1"><strong>电影名称</strong></div></td>
<td height="20"><div align="center" class="样式1"><strong>修改</strong></div></td>
<td width="233" height="20"><div align="center" class="样式1"><strong>删除</strong></div></td>
</tr>
<%do while not rs.eof%>
<tr>
<td width="66" height="12" class="tdbg"> <p align="center"><%=rs("articleid")%></td>
<td width="407" height="12" class="tdbg">·<a href="../re.asp?id=<%=rs("articleid")%>" target="_blank"><%=rs("title")%> 相关评论</a></td>
<td width="264" height="12" class="tdbg"><div align="center"><a target="_blank" href="editbbs.asp?id=<%=rs("articleid")%>">修改</a></div></td>
<td class="tdbg"><div align="center"><a href="deletebbs.asp?articleid=<%=rs("articleid")%>"><font color="#000000">删除</font></a></div> </td>
</tr>
<% i=i+1
if i>=20 then exit do
rs.movenext
loop
%>
</table>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
%>
<table border="0" bgcolor="#FFFFFF" cellspacing="0" height="25" width="100%">
<form method=Post action="<%=filename%>?typeid=<%=typeid%>">
<tr>
<td>
<center>
共有<font color="#ff0000"><b><%=totalnumber%></b></font>部 当前:第<strong><font color="#ff0000"><%=CurrentPage%></font></strong>页/共<strong><font color="#ff0000"><%=n%></font></strong>页
</center>
<td><div align="right">
<%if CurrentPage<2 then%>
<font color='888888'>首页 上一页</font>
<%else%>
<a class=left href="<%=filename%>?typeid=<%=typeid%>&page=1&">首页</a> <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=CurrentPage-1%>">上一页</a>
<%
end if
if n-currentpage<1 then
%>
<font color='888888'>下一页 尾页</font>
<%else%>
<a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=(CurrentPage+1)%>">下一页</a> <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=n%>">尾页</a>
<%end if%>
</div>
<td align="center"> </td>
</tr>
</form>
<%
end function
%>
<%
sub gotopage
end sub
%>
</table>
<p></p>
</center>
<%rs.close
set rs=nothing
conn.close
set conn=nothing %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -