📄 newlist.asp
字号:
<% response.buffer=true %>
<!--#include file="conn.asp"-->
<!-- #include file="adovbs.inc" -->
<!--#include file="error.asp"-->
<%
''Lex.Shi codecode
user=session("user")
pwd=session("pwd")
chkuser user,pwd
%>
<%
on error resume next
dim currentPage,rowCount,i,idd
idd=request("idd")'新闻类别
hot=request("hot")'热点=1
state=request("state")'状态,浏览权限
pid=request("pid") '大类id号
if state="" then
if hot="" then
sql="select news.id,news.title,news.content,news.state,picname,menu.title as newscalss from news,menu where news.class="&idd&" and menu.class="&pid&" and menu.rdclass="&idd&" order by news.addtime desc"
else
sql="select news.id,news.title,news.state,news.content,picname,menu.title as newscalss from news,menu where news.class="&idd&" and menu.class="&pid&" and state ="&hot&" and menu.rdclass="&idd&" order by news.addtime desc"
end if
else
sql="select news.id,news.title,news.state,news.content,picname,menu.title as newscalss from news,menu where news.class="&idd&" and state ="&state&" and menu.class="&pid&" and menu.rdclass="&idd&" order by news.addtime desc"
end if
'response.Write sql '& request("currentPage")
'---------------------------------------------------------connect_recordset---begin--
currentPage=trim(request("currentPage"))
if currentPage="" then
currentPage=1
end if
currentPage=cINT(currentPage)
set rs=Server.CreateObject("ADODB.Recordset")
rs.PageSize=15 '-----每页15条记录---
rs.CursorType = adOpenStatic '---*-
rs.CursorLocation = adUseServer '--*--
rs.open Sql,Conn,adOpenStatic
'---------------------------------------------------------connect_recordset---end--
%>
<html>
<head>
<title>- 信息浏览 - </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css">
<!-- #include file="select.js" -->
</head>
<body bgcolor="#FEFBF1" background="images/sky2.gif" leftmargin=5 topmargin=0>
<p align="center"></p>
<p align="center"></p>
<div align="center"><br>
<%
if rs.eof then
showerr "没有信息,请点返回增加!","xxgl.asp?idd="&idd&"&pid="&pid
response.End()
else
if currentPage>rs.PageCount then
currentPage=rs.PageCount
end if
rs.AbsolutePage=cINT(currentPage)
%>
<font color="0099FF">留言管理---[<%=rs("newscalss")%>]</font> </div>
<div align=center>
<table width=742><tr>
<td bgcolor=#FEFBF1>
<form name="f_member" action="newlist.asp?idd=<%=idd%>&pid=<%=pid%>" method="post">
<% ShowPage %>
<% ShowTitle %>
<%
rowCount=0
k=0
while not rs.eof and rowCount<rs.PageSize
k=k+1
T_Id=rs("Id")
title=trim(rs("title"))
pic=trim(rs("picname"))
content=trim(rs("content"))
type_id=rs("class")
DisplayData
response.Write(" <b>内容</b>:"&rs("content"))
rowCount=rowCount+1
rs.MoveNext
wend
%>
<% ShowFunction %>
</form>
<% ShowSubmitForm %>
<%
end if
%>
<table cellspacing=0 cellpadding=0 border=0><tr><td height=1 bgcolor=black></td></tr></table>
</td>
</tr></table>
<table width="56%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="10"> <div align="center"></div></td>
</tr>
<tr>
<td height="10"> <div align="center"><font size="2" face="宋体" color="#CCCCCC"><font color="#999999">CBUBS科技有限公司提供技术支持</font></font></div></td>
</tr>
<tr>
<td height="20"><div align="center"></div></td>
</tr>
</table>
</div>
<% Sub ShowPage()%>
<table width="742" cellpadding="0" cellspacing="1" bordercolor="#000000" border="0" >
<tr bgcolor="#FFFFFF">
<td height=25 colspan=8 align="right" valign="top" bgcolor="#B5E6FD" class="bfont">
<font color='#000000'>
<%
if currentPage<>1 then
response.write("<a href=newlist.asp?currentPage=1&idd="&idd&"&pid="&pid&">首页</a> ")
response.write("<a href=newlist.asp?currentPage="& (currentPage-1) &"&idd="&idd&"&pid="&pid&">上一页</a> ")
else
response.write("首页 上一页 ")
end if
if currentPage<>rs.PageCount then
response.write("<a href=newlist.asp?currentPage="& (currentPage+1) &"&idd="&idd&"&pid="&pid&">下一页</a> ")
response.write("<a href=newlist.asp?currentPage="& rs.PageCount &"&idd="&idd&"&pid="&pid&">末页</a> ")
else
response.write("下一页 末页 ")
end if
%>
</font> 页次:<strong><font color='red'><%=currentPage%></font></strong>/<%=rs.pagecount%>页
共:<font color='red'><b><%=rs.RecordCount%></b></font>个留言 输入页次:
<input type="text" name="currentPage" size="3" value=<%=currentPage%>>
<input type="submit" name="Submit" value="跳转">
</td>
</tr></table>
<% end sub %>
<% Sub ShowTitle() %>
<table width="742" height="11%" cellpadding="1" cellspacing="1">
<tr bgcolor="#f2f2f2">
<td height=16 nowrap class="bfont" width="20"> </td>
<td height=16 nowrap class="bfont" width="51"> <div align=center>序号</div></td>
<td width="585" height=16 class="bfont"> <div align="center">标题</div></td>
<td width="71" height="16" class="bfont"><div align="center">操作</div></td>
</tr>
</table>
<% end sub %>
<% Sub DisplayData() %>
<table width="742" cellpadding="2" cellspacing="1" bgcolor=#E9EEF3>
<%
if(k mod 2)<>0 then
response.write"<tr bgcolor='#FFFFFF'>"
else
response.write"<tr bgcolor='#eeeeee'>"
end if
%>
<td width="20" nowrap class="bfont"> <input type="checkbox" name="SelectMemberId<%=rowCount%>" value="<%=T_Id%>"> </td>
<td nowrap class="bfont" width="45"> <div align="center"><%=k%></div></td>
<td width="585" nowrap class="bfont" align="left"><div align="center"><%=title%></div></td>
<td width="69" nowrap class="bfont"><div align="center"><a href="javascript:OMDD('<%=T_Id%>')">[删除]</a></div></td>
</tr>
</table>
<% end sub %>
<%Sub ShowFunction() %>
<table width="742" height="1%" cellpadding="0" cellspacing="0">
<tr bgcolor="#DAFDFE">
<td height=11 colspan=8 align="right" valign="top" bgcolor="#B5E6FD" class="bfont">
〖
<input type="checkbox" name="allbox" onClick="CA()">
<font size="2" class="bfont">全部选中 </font> 〗 〖<a href='javascript:MDD()'><font size="2" class="bfont">删除选中的留言</font></a>〗 </td>
</tr></table>
<% end sub %>
<%Sub ShowSubmitForm() %>
<form name="showMemberdetail" action="newlist.asp?idd=<%=idd%>&pid=<%=pid%>" method="POST">
<input type="hidden" name="MemberIdUni">
</form>
<%if hot="" then%>
<form name="deleteMemberdetail" action="newdele.asp?idd=<%=idd%>&pid=<%=pid%>" method="POST">
<%else%>
<form name="deleteMemberdetail" action="newdele.asp?hot=1&idd=<%=idd%>&pid=<%=pid%>" method="POST">
<%end if%>
<input type="hidden" name="MemberIdUni">
</form>
<form name="editMemberdetail" action="newedit.asp?idd=<%=idd%>&pid=<%=pid%>" method="POST">
<input type="hidden" name="MemberIdUni">
</form>
<%end sub%>
<%
set rs=nothing
conn.close
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -