📄 notelist.asp
字号:
<!--#include file="top.asp"-->
<script language=Javascript>
<!--
function DeleteMe(i){
if (confirm("确定要删除该条提问吗?")==1){
window.location="NoteDel.asp?NoteID="+i
}
}
//-->
</script>
<table width="100%" align="center" bgcolor="#cccccc" border="0" cellpadding="5" cellspacing="1">
<tr>
<td align=center bgcolor="#FFFFFF">
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select A.*,B.ID,B.UserID,B.Name from [Notes] A, [Agent_User] B where A.UserID=B.ID ORDER BY NoteID DESC"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "<!--没有内容-->"
response.end()
else
RowCount=PageNum
Tmp=IsNumeric(Request("PageNo"))
if (Tmp=False) then
PageNo=1
else
PageNo=Request("PageNo")
end if
TSum=INT(rs.RECORDCOUNT/RowCount*-1)*-1
if PageNo="" or PageNo=0 then
PageNo=1
else
PageNo=PageNo+1
PageNo=PageNo-1
end if
if CINT(PageNo)>1 then
if CINT(PageNo)>CINT(TSum) then
PageNo=1
end if
end if
if PageNo<0 then
PageNo=1
End if
RS.PageSize=RowCount
RS.AbsolutePage=PageNo
RECORDCOUNT=rs.RECORDCOUNT
%>
<br>
<table align=center width=600 cellpadding="2" cellspacing="1" bgcolor=#cccccc>
<%DO WHILE NOT rs.EOF AND RowCount>0%>
<tr>
<td bgcolor=ffffff height=24>
<%=rs("NoteSub")%>
</td>
<td bgcolor=ffffff align=center width=60>
<%=rs("NoteType")%>
</td>
<td bgcolor=ffffff align=center width=120>
<%=rs("NoteTime")%>
</td>
<td bgcolor=ffffff align=center width=100>
<a href="UserEdit.asp?ID=<%=rs("ID")%>"><%=rs("Name")%>(<%=rs("UserID")%>)</a>
</td>
<td bgcolor=ffffff align=center width=40>
<a href="NoteRep.asp?NoteID=<%=rs("NoteID")%>">回复</a>
</td>
<td bgcolor=ffffff align=center width=40>
<a href="Javascript:DeleteMe(<%=rs("NoteID")%>)"><font color=red>删除</font></a>
</td>
</tr>
<tr>
<td bgcolor=FFFFFF height=24 colspan="6">
<%=rs("NoteBody")%><%if rs("NoteRep")<>"" then response.write ("<hr size=1 color=E1E6EC>" & rs("NoteRep"))%>
</td>
</tr>
<%
RowCount = RowCount - 1
rs.MoveNext
Loop
rs.close
set rs = nothing
end if%>
</table>
<br>
<table width="600" align="center" bgcolor="#cccccc" border="0" cellpadding="5" cellspacing="1">
<tr bgcolor="#FFFFFF">
<td align=center>
<table width=100% border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
共有信息 <%=RECORDCOUNT%> 条 当前第 <%=PageNo%>/<%=TSum%> 页
</td>
<td align=right>
<%=PageList%>
</td>
</tr>
</table>
</td>
</tr>
<%if TSum>3 then%>
<tr bgcolor="#FFFFFF">
<td align=center>
<%for i=1 to TSum%>
<a href="?PageNo=<%=i%>">第<%=i%>页</a>
<%next%>
</td>
</tr>
<%end if%>
</table>
<%Function PageList()
if TSum>1 then
if PageNo=1 then
NextPage=PageNo+1
response.write"首页 上一页 <a href='?PageNo="&NextPage&"'>下一页</a> <a href='?PageNo="&TSum&"'>尾页</a>"
end if
if PageNo=TSum then
PrwePage=PageNo-1
response.write "<a href='?PageNo=1'>首页</a> <a href='?PageNo="&PrwePage&"'>上一页</a> 下一页 尾页"
end if
if PageNo>1 and TSum>PageNo then
NextPage=PageNo+1
PrwePage=PageNo-1
response.write "<a href='?PageNo=1'>首页</a> <a href='?PageNo="&PrwePage&"'>上一页</a> <a href='?PageNo="&NextPage&"'>下一页</a> <a href='?PageNo="&TSum&"'>尾页</a>"
end if
else
response.write "首页 上一页 下一页 尾页"
end if
End Function%>
<br>
</td>
</tr>
</table>
<!--#include file="foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -