人事管理系统毕业论文和代码 希望大家喜欢
源代码在线查看: manage.asp
if request.cookies("adminok")="" then
response.redirect "login.asp"
end if
%>
ASP技巧专题
function popwin2(id,path)
{ window.open("openarticle.asp?id="+id+"&ppath="+path,"","height=450,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,top=10,left=100,location=no");
}
const MaxPerPage=18
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim typename
typename="ASP技巧专题"
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim sql
dim rs
dim rstype
dim typesql
dim typeid,typename1
if not isEmpty(request("typeid")) then
typeid=request("typeid")
else
typeid=1
end if
set rstype=server.createobject("adodb.recordset")
typesql="select * from type where typeID="&cstr(typeid)
rstype.open typesql,conn,1,1
if not rstype.eof then
typename1=rstype("type")
end if
rstype.close
set rstype=nothing
%>
味道网ASP技巧专题>>
ASP教程|ASP FAQ|ASP文摘
|ASP实例|ASP安全|
管理页面|增加文章
新闻管理---基础文章管理---数据库管理---资源管理---连接管理---下载管理---图书管理
sql="select articleid,title,dateandtime,hits from learning where typeid="+cstr(typeid)+" 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 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
showpage totalput,MaxPerPage,"manage.asp"
showContent
showpage totalput,MaxPerPage,"manage.asp"
else
if (currentPage-1)*MaxPerPage rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"manage.asp"
showContent
showpage totalput,MaxPerPage,"manage.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"manage.asp"
showContent
showpage totalput,MaxPerPage,"manage.asp"
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
%>
ID号
文章标题
修改
删除
href="edit.asp?id=">修改
href="dele.asp?id=">删除
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write ""
response.write " "
if CurrentPage response.write "首页 上一页 "
else
response.write "首页 "
response.write "上一页 "
end if
if n-currentpage response.write "下一页 尾页"
else
response.write ""
response.write "下一页 尾页"
end if
response.write " 页次:"&CurrentPage&"/"&n&"页 "
response.write " 共"&totalnumber&"篇文章 "&maxperpage&"篇文章/页 "
response.write " 转到:"
response.write ""
end function
%>
..:味道网:.. 版权所有,Three-UNknown拍档组合©2001-2003
All Rights Reserved