📄 my_infolist.asp
字号:
<!-- #include file="conn.asp" -->
<!--#include file="webconfig.asp"-->
<%
'url=request.servervariables("HTTP_REFERER")
if session("userid")="" then
//response.write "<script>alert('你还未登陆,或登陆已超时,请重新登陆!!');</script>"
response.write "<script>this.location.href='login_window.asp';</script>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%></title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="include/top.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="1" bgcolor="#cccccc"></td>
<td width="160" height="100">
<!--#include file="include/left1.asp" -->
</td>
<td width="1" bgcolor="cccccc"></td>
<td align="center">
<!--#include file="include/search.asp" -->
<%
if session("userid")="" then
response.redirect "login_window.asp"
else
sql="select * from Net008_infos where userid='"&session("userid")&"' or userid='admin' order by adddate desc"
set rs=server.createobject("adodb.recordset")
rs.open sql ,conn,1,2
'response.write rs.recordcount
%>
<table width="98%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><b><font color=ff0000> <font size="3"><%=session("userid")%> </font></font></b><font size="3">,您好!你的邮件列表如下:</font></td>
</tr>
</table>
<table width="98%"
border=0 cellpadding=3 cellspacing=1 class="table_front">
<tbody>
<tr class="th_front1">
<td width="40" align="center"><b>状态</b></td>
<td align="center"><b>邮件标题</b></td>
<td width=60 align="center"><b>发件日期</b></td>
<td width=65 align="center"><b>查看邮件</b></td>
<td width=40 align="center"><b>回复否</b></td>
<td width=40 align="center"><b>阅读否</b></td>
</tr>
<%
if rs.recordcount<1 then
response.write"暂无信息!"
'response.end
end if
const maxperpage=15 '定义每一页显示的数据记录的常量
dim currentpage '定义当前页的变量
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
'如果变量currentpage的数据类型不是数值型
'就1赋给变量currentpage
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n '定义变量
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not rs.eof
%>
<tr class="th_front2">
<td width="35" align="center">
<%
readyn=rs("readyn")
if readyn=1 then
response.write "<img src=../images/new.gif>"
end if
%> </td>
<td><%=rs("infotitle")%></td>
<td width="60" align="center"> <%=FormatDateTime(rs("adddate"),2)%> </td>
<td width=65 align="center">
<input type="button" name="button1222" value="查看内容" onClick="javascript:window.location.href='my_info_show.asp?id=<%=rs("id")%>'" class="sinput">
</td>
<td width="40" align="center">
<%
recontent=len(rs("recontent"))
if recontent>0 then
response.write "<font color=999999>已回复</font>"
else
response.write "<font color=ff0000>未回复</font>"
end if
%> </td>
<td width="40" align="center">
<%
if readyn=1 then
response.write "<font color=ff0000>未阅读</font>"
else
response.write "<font color=999999>已读</font>"
end if
%> </td>
</tr>
<%
i=i+1
rs.movenext
loop
%>
</tbody>
</table>
<br>
<table class=table_front cellspacing=1 cellpadding=0 width="98%" border=0>
<tbody>
<tr>
<td
height=22 colspan=3 align=middle class="th_front1">页数:<%=currentpage%>/
<% =n%>
<%k=currentpage
if k<>1 then%>
[<a href="my_infolist.asp?pageid=1" class="LeftTypeLinkU">首页</a>]
[<a href="my_infolist.asp?pageid=<%=k-1%>" class="LeftTypeLinkU">上一页</a>]
<%else%>
[首页] [上一页]
<%end if%>
<%if k<>n then%>
[<a href="my_infolist.asp?pageid=<%=k+1%>" class="LeftTypeLinkU">下一页</a>]
[<a href="my_infolist.asp?pageid=<%=n%>" class="LeftTypeLinkU">尾页</a>]
<%else%>
[下一页] [尾页]
<%end if%>
共有<font color="red"><%=totalput%></font>个消息</td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<%end if%>
</td>
<td width="1" bgcolor="cccccc"></td>
</tr>
</table>
<!-- #include file="include/bottom.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -