⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 announce.asp

📁 windowsCE 串口
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=urlname%> - 公告板</title>
</head>
<body>
<!--#include file="top.asp"-->
<%
sql="Select * from announce order by time desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
noninfo="尚无公告..."
non(noninfo)
else
%>
<table width="70%"  border="1" bgcolor="#C1FFC1" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><%
dim currentpage,page_count,Pcount
dim totalrec,endpage
if request("page")="" then
currentPage=1
else
currentPage=cint(request("page"))
end if
rs.PageSize = page
rs.AbsolutePage=currentpage
page_count=0
totalrec=rs.recordcount
while (not rs.eof) and (not page_count = rs.PageSize)
%>
        <table width="100%" height="50%" border="0" align="center" cellpadding="5" cellspacing="0" style="border-collapse: collapse table-layout:fixed;word-break:break-all">
          <tr>
            <td height="20" colspan="2" background="images/leftbg.gif" > <b>&nbsp;&nbsp;<font color="#ee2200">公告信息</font> &nbsp;&nbsp;&nbsp;&nbsp;</b>斑竹发布于:&nbsp;<font color="#668800"><%=rs("time")%></font></td>
			<td align="center" bgcolor="#43CD80"><%if session(Variable&Names)=Variable then%>
                <a href="del_announce.asp?id=<%=rs("id")%>">删除公告</a>
                <%end if%></td>
          </tr>
          <tr>
            <td colspan="3"> 
			标题:<b><%= HTMLEncode(rs("title")) %></b><hr></td>
          </tr>
          <tr>
            <td colspan="3" > <%=change(rs("usercontent"))%> </td>
          </tr>
        </table>
        <p>
          <%
page_count = page_count + 1
rs.movenext
wend
call pages()
rs.close
set rs=nothing

sub pages()
dim ii,p,n
if totalrec mod page=0 then
n= totalrec \ page
else
n= totalrec \ page+1
end if
if currentpage-1 mod 10=0 then
p=(currentpage-1) \ 10
else
p=(currentpage-1) \ 10
end if
response.write "<table border=0 cellpadding=0 cellspacing=3 width='80%' align=center ><form method=post action=index.asp>"&_
"<tr>"&_
"<td valign=middle align=center>页次:<font color='#FF3300'><b>"& currentPage &"</b>/<b>"& n &"</b></font>&nbsp;页,每页&nbsp;<font color='#FF3300'><b>"& rs.PageSize &"</b></font>&nbsp;条公告,共&nbsp;<font color='#FF3300'><b>"& totalrec &"</b></font>&nbsp;条公告<br><br>"

if currentPage=1 then
response.write "<font face=webdings>9</font>   "
else
response.write "<a href='?page=1'><font face=webdings>9</font></a>   "
end if
if p*10>0 then response.write "<a href='?page="&Cstr(p*10)&"'><font face=webdings>7</font></a>   "
response.write "<b>"
for ii=p*10+1 to P*10+10
if ii=currentPage then
response.write "<font size=4>"+Cstr(ii)+"</font> "
else
response.write "<a href='?page="&Cstr(ii)&"'>"+Cstr(ii)+"</a>   "
end if
if ii=n then exit for
'p=p+1
next
response.write "</b>"
if ii<n then response.write "<a href='?page="&Cstr(ii)&"'><font face=webdings>8</font></a>   "
if currentPage=n then
response.write "<font face=webdings>:</font>   "
else
response.write "<a href='?page="&Cstr(n)&"'><font face=webdings>:</font></a>   "
end if
response.write "</form></table>"
end sub
%></p>
    </td>
  </tr>
</table><% end if %>
<!--#include file="bottom.asp"-->
</body>
</html> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -