首頁管理篇

來源:互聯網
上載者:User
manage.asp
'管理頁同首頁顯示篇差不多,這裡阿喔只介紹如何串連刪除鏈!
'見尾頁
<%
if request.cookies("adminok")="" then
response.redirect "login.asp"
end if
%>
<!--#include file="articleconn.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理檔案</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<link rel="stylesheet" href="../css/style.css">
</head>
<%
const MaxPerPage=40
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j

if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if

%>
<body bgcolor="#FFFFFF">
<p> </p>
<table width="90%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#99CCFF">
<td height="10">
<div align="center"><b>管 理 界 面</b></div>
</td>
</tr>
<tr>
<td height="49"><%
dim sql
dim rs
sql="select * from learning order by articleid desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'> 還 沒 有 任 何 文 章</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if

end if
if currentPage=1 then
showpages
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpages
showContent
showpages
else
currentPage=1
showpages
showContent
showpages
end if
end if
rs.close
end if

set rs=nothing
conn.close
set conn=nothing


sub showContent
dim i
i=0

%>
<table border="1" cellspacing="0" width="90%" bgcolor="#F0F8FF" bordercolorlight="#000000"
bordercolordark="#FFFFFF" align="center">
<tr>
<td width="10%" align="center"><strong>識別碼</strong></td>
<td width="54%" align="center"><b>主 題</b></td>
<td width="15%" align="center"> <b>時 間</b></td>
<td width="11%" align="center"><strong>刪 除</strong></td>
</tr>
<%do while not rs.eof%>
<tr>
<td width="10%" height="3">
<p align="center"><%=rs("articleid")%>
</td>
<td width="54%" height="3">
<div align="center"></div>
<div align="left"><%=rs("title")%></div>
</td>
<td width="15%" height="3">
<div align="center"><%=rs("dateandtime")%></div>
</td>
<td width="11%" align="center" height="3"><a
href="delete.asp?id=<%=rs("articleid")%>">刪 除</a></td>
</tr>
<% i=i+1



相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。