共有2812人关注过本帖树形打印

主题:首页管理篇

帅哥哟,离线,有人找我吗?
gaofeng
  1楼 个性首页 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:3510 积分:11231 威望:5 精华:7 注册:2000-5-19 10:19:38
首页管理篇  发帖心情 Post By:2014-2-18 16:43:18

manage.asp
'管理页同首页显示篇差不多,这里阿喔只介绍如何连接删除链!
'见尾页
<%
if request.cookies("adminok")="" then
response.redirect "login.asp"
end if
%>
<!--#include file="articleconn.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" c>
<title>管理文件</title>
<meta name="GENERATOR" c>
<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>ID 号</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


支持(0中立(0反对(0回到顶部