📄 affiche_more.asp
字号:
<!--#include file="chklogin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>账号充值记录</title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
color: #0000FF;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
<script language="JavaScript">
function tourl(form1_url){
location=form1_url;
for(var i=0;i<document.form1.elements.length;i++){
document.form1.elements[i].options[0].selected=true
}
}
</script>
</head>
<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<table width="500" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">[<a href="agent_index.asp">管理中心首页</a>] [<a href="edit.asp">修改资料</a>] [<a href="cz.asp">账号充值</a>] [<a href="cz_log.asp">充值记录</a>] [<a href="login.asp?action=logout">注销登陆</a>]</td>
</tr>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
<tr>
<td align="center"><strong class="font1">所有代理商公告列表</strong></td>
</tr>
</table>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from affiche where a_type=2 order by on_top desc,a_time desc",conn,1,1
if rs.eof and rs.bof then
%>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td height="100" align="center" bgcolor="#F7F7F7">暂时还没有任何代理商公告</td>
</tr>
</table>
<%
else
maxpage=10 '每页最大显示数
dim totalhow '数据库中的总记录数
dim totalpage '总共页数
dim CurrentPage '当前处于的页数
currentPage=request.Querystring("page")
totalhow=rs.recordcount
if totalhow mod maxpage=0 then
totalpage= totalhow \ maxpage
else
totalpage = totalhow \ maxpage +1
end if
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPage>totalhow then
if (totalhow mod MaxPage)=0 then
currentpage= totalhow \ MaxPage
else
currentpage= totalhow \ MaxPage + 1
end if
end if
if (currentPage-1)*MaxPage<totalhow then
rs.move (currentPage-1)*MaxPage
else
currentPage=1
end if
%>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td height="25" align="center" bgcolor="#F7F7F7">公告标题</td>
<td align="center" bgcolor="#F7F7F7">发布时间</td>
<td align="center" bgcolor="#F7F7F7">属性</td>
<td align="center" bgcolor="#F7F7F7"> 详细 </td>
</tr>
<%
i=0
do while not rs.eof
i=i+1
%>
<tr>
<td height="25" bgcolor="#FFFFFF"> <%=rs("a_title")%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%=rs("a_time")%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%if rs("on_top")=true then%>
<img src="images/ontop.gif" alt="置顶公告" width="20" height="20">
<%end if%>
<%if DateDiff("d",rs("a_time"),Now)<=3 and rs("on_top")<>true then%>
<img src="images/new.gif" alt="最近三天发布的公告" width="20" height="20">
<%end if%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><a href="affiche_view.asp?id=<%=rs("id")%>" target="_blank">查看</a></td>
</tr>
<%
if i>=maxpage then exit do
rs.movenext
loop
%>
</table>
<table width="550" height="40" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post">
<tr>
<td width="421" align="right"><!-- ########### 开始判断分页类型 ############### -->
<font face="Webdings">7</font>
<%if currentpage>1 then%><a href="<%=filename%>"><%end if%>首页<%if currentpage>1 then%></a><%end if%>
<%if currentpage>1 then%><a href="<%=filename%>?page=<%=currentPage-1%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%>
<%if cint(currentpage)<totalpage then%><a href="<%=filename%>?page=<%=currentPage+1%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%>
<%if cint(currentpage)<totalpage then%><a href="<%=filename%>?page=<%=totalpage%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%>
<font face="Webdings">8</font> 共有<span class="font3"><%=totalhow%></span>条记录 共<span class="font3"><%=currentPage%></span>/<span class="font3"><%=totalpage%></span>页</td>
<td width="129">
<select name="topage" size="1" class="select1" onChange="JavaScript:tourl(document.form1.topage.options[document.form1.topage.selectedIndex].value)">
<%
for j=1 to totalpage
%>
<option value="<%=filename%>?page=<%=j%>" <%if cint(request.Querystring("page"))=j then%>selected<%end if%>> 第<%=j%>页 </option>
<%next%>
</select></td>
</form>
<!-- ############################ 判断分页类型结束 ######################## -->
</table>
<%
end if
%>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -