📄 manage.asp
字号:
<!--#include file="dbpath/dbpath.asp"-->
<%
if request.cookies("adminok")="" then
response.redirect "login.asp"
end if
const MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim typename
typename="常用网址"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=typename%></title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script language="javascript">
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,location=no");
}
</script>
</head>
<%
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 linktype 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
%>
<body>
<div align="center"><center>
</center></div><div align="center"><center>
<table border="0" width="92%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" ><p align="center"><br>
<%=typename%>>><font color="#FF0000"><%response.write ""&typename1&""%></font><br>
<center>
<%
dim rst,tsql
dim k
Set rst= Server.CreateObject("ADODB.Recordset")
tsql="select * from linktype order by typeid desc"
rst.open tsql,conn,1,1
if rst.EOF then
response.write "没有类别!"
else
%>
|<%
k=1
do while NOT rst.EOF
if k>8 then
k=1
%>
<br>|
<% end if%>
<a href="manage.asp?typeid=<%=rst("typeid")%>"><%=rst("type")%></a>|
<%
k=k+1
rst.MoveNext
loop
end if
rst.close
%>
</center>
<div align="center"><%
sql="select * from yqlink 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 "<p align='center'> 还 没 有 任 何 链 接</p>"
showpage totalput,MaxPerPage,"manage.asp"
else
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
showpage totalput,MaxPerPage,"manage.asp"
showContent
showpage totalput,MaxPerPage,"manage.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
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
%>
<div align="center"><center>
<table border="1" cellspacing="3" width="750" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0">
<tr>
<td width="150" align="center" height="20"><b>站名</b></td>
<td width="100" align="center" height="20"><b>图标</b></td>
<td width="100" align="center" height="20"><b>站长</b></td>
<td width="250" align="center" height="20"><b>网站简介</b></td>
<td width="75" align="center" height="20"><b>修改</b></td>
<td width="75" align="center" height="20"><b>删除</b></td>
</tr>
<%do while not rs.eof%>
<tr bgcolor="#AB6C00">
<td height="35" bgcolor="#AB6C00">
<div align="center"><a href="<%=rs("homepage")%>" target="_blank"><%=rs("webname")%></a></div>
</td>
<% if rs("homelogo")="" then
logo="images/nologo.gif"
elseif rs("homelogo")="http://" then
logo="images/nologo.gif"
else
logo=rs("homelogo")
end if %>
<td height="35" bgcolor="#AB6C00" valign="middle" align="center">
<div align="center"><img src="<%=logo%>" width="88" height="31"></div>
</td>
<td height="35" bgcolor="#AB6C00">
<div align="center"><a href=mailto:<%=rs("email")%>><%=rs("name")%></a></div>
</td>
<td height="35">
<a href="javascript:popwin2(<%=rs("articleid")%>)"><%=rs("title")%></a>
</td>
<td height="35">
<div align="center"><a
href="edit.asp?id=<%=rs("articleid")%>">修改</a></div></td>
<td height="35">
<div align="center"><a
href="delete.asp?id=<%=rs("articleid")%>">删除</a></div></td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
</center></div>
<%
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 "<form method=Post action="&filename&"?typeid="&typeid&">"
if CurrentPage<>1 then
response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a> "
end if
if currentpage<>n then
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
end if
response.write " 页次:<font color=red>"&CurrentPage&"</font>/"&n&"页 "
response.write " 共"&totalnumber&"个网站 "&maxperpage&"个/页 "
response.write " 转到:<select name='page' size=1 class=smallselsect style='BACKGROUND-COLOR:#FFE7B3;'>"
for i=1 to n
response.write "<option value="& i
if currentpage=i then
response.write " selected"
end if
response.write ">"& i &"</option>"
next
response.write "</select>"
response.write " <input class=buttonface type='submit' value='确 定' name='cndok' style='BACKGROUND-COLOR:#AB6C00;font-family: 宋体; font-size: 9pt;'></span></p></form>"
end function
%></div>
</td>
</tr>
</table>
[<a href="index.asp" title="退出管理员登陆界面,返回浏览链接网站界面">退出网站链接管理界面</a>][<a href="changepass.asp" title="用于修改管理员密码名称以及增加修改删除网站类别">网站高级维护系统界面</a>]<!--#include file="function/ads.inc"-->
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -