📄 link.asp
字号:
<!--#include file="islogin.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
<!--
@import url("../style/admin.css");
.style2 {font-size: 18px; font-weight: bold; color: #0000FF; }
-->
</style></head>
<body>
<table border="0" cellpadding="0" cellspacing="0" class="table_1">
<tr>
<td height="30" class="table_1_top"><span class="style2"> 相关网址友情链接 <a href="javascript:openScript('Link_add.asp ',600,200)">添加网站</a></span></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" class="table_1_inc">
<tr <%if (ww mod 2)=1 then%>bgcolor="#F8F8FA"<%end if%> >
<td width="158" height="25"><strong>网址名称</strong></td>
<td><strong>网址</strong><strong></strong></td>
<td width="150"><strong>点击次数</strong></td>
</tr>
<%
dim i,j,intPage,page,pre,last,filepath'定义变量
page = trim(Request.QueryString("page"))'变量是跳转页面时的值
set rs=server.createobject("adodb.recordset")
sql="select * from Link order by n desc,id desc"
rs.open sql,conn,1,1
on error resume next
rs.PageSize = 25 '这里设定每页显示的记录数
rs.CursorLocation = 3
rs.Open sql,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
pre = true
last = true
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
<%
for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
%>
<tr bgcolor="#F8F8FA">
<td>·<a href="Linkgo.asp?id=<%=rs("id")%>" target="_blank"><%=rs("Name")%></a></td>
<td><a href="Linkgo.asp?id=<%=rs("id")%>" target="_blank"><%=rs("www")%></a> <a href="LinkDo.asp?action=del&id=<%=rs("id")%>">删除</a></td>
<td><%=rs("n")%></td>
</tr>
<%
rs.movenext
if rs.eof then
exit for
rs.close
set rs=nothing
end if
next
%>
</table></td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF"><div style="text-align:left;background-color:#e6e6e6; height:20px;padding-top:2px;font-size:12px;">
<table width="99%" border="0" cellpadding="0" cellspacing="0" borderColorLight=#808080 borderColorDark=#ffffff>
<tr>
<%if rs.pagecount > 0 then%>
<td width="100" align="left">当前页<%=intpage%>/<%=rs.PageCount%></td>
<%else%>
<td width="100" align="left">当前页0/0</td>
<%end if%>
<td align="left"><a href="?page=1">首页</a>| <a href="?page=<%=intpage -1%>">上页</a> | <a href="?page=<%=intpage +1%>">下页</a> | <a href="?page=<%=rs.PageCount%>">尾页</a>|转到
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs.PageCount
if i = intpage then%>
<option value="?page=<%=i%>" selected>第<%=i%>页</option>
<%else%>
<option value="?page=<%=i%>">第<%=i%>页</option>
<%
end if
next
%>
</select>
</td>
</tr>
</table>
</div></td>
</tr>
</table>
<br>
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
function openScript(url, width, height){
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}
</SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -