?? view_message.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="../function.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理計劃</title>
<style type="text/css">
body{
margin:0px;
background-color:#FF9900;
}
#all{
width:780px;
margin-right:auto;
padding-left:10px;
}
#title_top{
width:780px;
height:30px;
background-color:#FFFFFF;
text-align:center;
font-weight:bolder;
padding-top:10px;
border: 1px double #333333;
color:orange;
}
#tools{
width:780px;
height:auto;
background-color:#CCCCCC;
text-align:center;
font-weight:bolder;
border: 1px solid #999999;
padding-top:5px;
padding-bottom:5px;
FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorStr='orange', endColorStr='white', gradientType='1');
}
#body{
width:776px;
height:auto;
background-color:#ffffff;
border: 1px solid #999999;
padding-top:8px;
padding-bottom:8px;}
#page{
width:780px;
height:auto;
text-align:center;
background-color:white;
font-size:12px;
text-decoration:none;
padding-top:8px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: dotted;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: none;
border-top-color: #999999;
border-right-color: #999999;
border-bottom-color: #999999;
border-left-color: #999999;
padding-bottom:15px;
color:#666666;
}
#left-title{
font-weight:normal;
padding-top:8px;
padding-left:10px;
width:770px;
padding-bottom:8px;
height:25px;
background-color:#EEEEEE;
/*margin-top:5px;*/
border: 1px solid #666666;
font-size: 13px;
text-align:left;
}
#right{
width:125px;
padding-top:2px;
padding-bottom:2px;
height:auto;
margin:0px;
background-color:#ffffff;
white-space:normal;
font-size:13px;
margin-right:10px;
border: 1px solid #666666;
white-space:normal;
float:right;
color:balck;
}
a.page:link{
color:#9F7800;
text-decoration:none;
}
a.page:hover{
text-decoration:none;
color:#339933;
}
a.page:visited{
color:#000000;
text-decoration:none;}
a.page_no:link{
color:#9F7800;
text-decoration:none;
float:left;
}
a.page_no:hover{
text-decoration:none;
color:#339933;
float:left;
}
a.page_no:visited{
color:#000000;
text-decoration:none;
float:left;
}
.btn1{
background-color: #FEF8ED;
border: 1px solid #599F33;
}
</style>
</head>
<body>
<div id="all">
<%
dim page_no
'page_no=request.QueryString("page_no"))
if request.QueryString("page_no")="" then
page_no=1
session("page_no")=page_no
else
page_no=cint(request.QueryString("page_no"))
session("page_no")=page_no
end if
%>
<div id="title_top">所有計劃</div>
<div id="tools">
<%
'--------------------------------------------
'現在開始顯示數據庫中的信息主要是文章
'--------------------------------------------
dim planRs,planSql
set planRs=server.createobject("adodb.recordset")
planSql="select * from message order by subdate desc"
planRs.open planSql,db,1
'--------------------------------
'開始分頁顯示
'----------------------------------
if not planRs.eof and not planRs.bof then
planRs.pagesize=16
dim page_total
page_total=planRs.pagecount
planRs.absolutepage=page_no
dim i
i=16
do while not planRs.eof and i>0
i=i-1
%>
<!-- 這時顯示的是標題-->
<div id="left-title"><a href="../message.asp" class="page_no" target="_blank" align="left"><%=planRs("body")%></a>
<!--顯示修改信息-->
<div id="right">
<!--<a href="edit_plan.asp?planid=<%'=planRs("planid")%>" class="page_no">修改</a>-->
<a href="delete_message.asp?messageid=<%=planRs("messageid")%>" class="page_no" > 刪除 </a>
<!-- <a href="../show_plan.asp?planid=<%'=planRs("planid")%>" class="page_no" target="_blank">查看</a>--></div>
</div>
<%
'----------------------------
'這里結束了
'----------------------------------
planRs.movenext
loop
end if
planRs.close
set planRs=nothing
%>
<div id="page">
<%
dim numpre,numnext
numpre=page_no-1
numnext=page_no+1
response.write " <a href='view_message.asp?page_no=1' class='page'>首頁</a>"
if numpre=0 then
response.write " 上一頁"
else
response.write " <a href='view_message.asp?page_no="&numpre&"' class='page'>上一頁</a>"
end if
if numnext>page_total then
response.write " 下一頁"
else
response.write " <a href='view_message.asp?page_no="&numnext&"' class='page'>下一頁</a>"
end if
response.write " <a href='view_message.asp?page_no="&page_total&"' class='page'>尾頁</a>"
%>
<%
response.write " 現在是第 <font color='red'>"&page_no&"</font> 頁,"
response.write " 共有 "&page_total&" 頁,"
%>
<div align="center">
<%
'--------------------------------------------------------------------------------------
'這一段輸出頁數信息。Page_total由上面分頁顯示決定。
Response.Write "<p align='center'><b><font color='#CC0066'>" & page_no & "/" & page_total & "</b></font>頁 "
'顯示往前10頁的鏈接,為當前最小值減1
Dim numTemp
numTemp=minPage(page_no,page_total)-1
If numTemp>=1 Then
Response.Write "<a href='view_article.asp?page_no=" & numTemp & "'>前10頁</a> "
End If
'顯示當前10頁的鏈接
For I=minPage(page_no,page_total) To maxPage(page_no,page_total)
If I=page_no Then
Response.Write "<b><font color='#CC0066'>" & I & "</font></b> "
Else
Response.Write "<a href='view_article.asp?page_no=" & I & "'>" & I & "</a> "
End If
Next
'顯示往后10頁的鏈接,為當前最大值加1
numTemp=maxPage(page_no,page_total)+1
If numTemp<page_total Then
Response.Write "<a href='view_article.asp?page_no=" & numTemp & "'>后10頁</a> "
End If
%> </div>
</div>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -