文章导航PC6首页软件下载单机游戏安卓资源苹果资源

pc软件新闻网络操作系统办公工具编程服务器软件评测

安卓新闻资讯应用教程刷机教程安卓游戏攻略tv资讯深度阅读综合安卓评测

苹果ios资讯苹果手机越狱备份教程美化教程ios软件教程mac教程

单机游戏角色扮演即时战略动作射击棋牌游戏体育竞技模拟经营其它游戏游戏工具

网游cf活动dnf活动lol周免英雄lol礼包

手游最新动态手游评测手游活动新游预告手游问答

您的位置:首页精文荟萃软件资讯 → 动感首页更新实现之五 ------ 首页管理篇

动感首页更新实现之五 ------ 首页管理篇

时间:2004/10/7 19:05:00来源:本站整理作者:蓝点我要评论(0)

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




 

管理文件

 

 



<%
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

%>

&nbsp;













<%do while="" not="">






<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>



管 理 界 面








<%
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 "
还 没 有 任 何 文 章
"
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">







ID 号
主 题
时 间
删 除


<%=rs("articleid")%>




<%=rs("title")%>




<%=rs("dateandtime")%>


<a
href="delete.asp?id=<%=rs("articleid")%>">删 除

 

<%
end sub

sub showpages()
dim n
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
if n=1 then
response.write "

创建文章"
response.write "

"
exit sub
end if

dim k
response.write "

&gt;&gt; 文章分页 "
for k=1 to n
if k=currentPage then
response.write "["+Cstr(k)+"] "
else
response.write "["+""+Cstr(k)+"] "
end if
next
response.write " 创建文章"
response.write "

"
end sub


%>


 

 

《ASP动感在线》编辑制作

 

 






大家注意的是:
删 除
关系者要删除内容的位置,要不然KILL错了就麻烦了!

相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么

文章评论
发表评论

热门文章 360快剪辑怎么使用 36金山词霸如何屏幕取词百度收购PPS已敲定!3

最新文章 微信3.6.0测试版更新了微信支付漏洞会造成哪 360快剪辑怎么使用 360快剪辑软件使用方法介酷骑单车是什么 酷骑单车有什么用Apple pay与支付宝有什么区别 Apple pay与贝贝特卖是正品吗 贝贝特卖网可靠吗

人气排行 xp系统停止服务怎么办?xp系统升级win7系统方电脑闹钟怎么设置 win7电脑闹钟怎么设置office2013安装教程图解:手把手教你安装与qq影音闪退怎么办 QQ影音闪退解决方法VeryCD镜像网站逐个数,电驴资料库全集同步推是什么?同步推使用方法介绍QQ2012什么时候出 最新版下载EDiary——一款好用的电子日记本