📄 index.asp
字号:
<%@ Language=VBScript %>
<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="config.asp" -->
<%
user=request("user")
set rs=server.createobject("adodb.recordset")
sql="select * from link order by id desc"
rs.open sql,conn,1,1 %>
<html>
<head>
<title><%=tit%></title>
<link rel="stylesheet" href="style.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style1 {color: #D4D0C8}
.style2 {color: #939393}
-->
</style>
</head>
<style type=text/css>
body {cursor: default;}
</style>
<style fprolloverstyle>
A:hover {color: #A851FF}
.style3 {font-size: 9px}
.style4 {font-size: 12px}
</style>
<body text="#000000" link="#000000" vlink="#000000" style="text-align: right">
<div align="center">
<center>
<table width="700" height="25" border="0" cellpadding="0" cellspacing="1" bordercolor="0" background="bg1.gif" bgcolor="#F0f0f0" id="AutoNumber2" style="border-collapse: collapse">
<tr>
<td width="498" height="20" align="left" nowrap> <p align="left"><font face="Arial" size="2"> <a href="add.asp">加入链接</a>│<a href="tj.asp?user=y">推荐网站</a>│<span lang="zh-cn"><a href="login.asp">登陆管理</a></span></font></td>
<td width="199" align="center" nowrap><span class="style3"><span class="style4"><a href="index.asp">综合显示</a><font face="Arial">│<a href="pic.asp">图片显示</a>│<a href="text.asp">文字显示</a></font></span></span></td>
</tr>
</table>
<br>
</center>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="1" width="700" id="AutoNumber1" bgcolor="#f0f0f0" height="70">
<tr bgcolor="#FFFFFF">
<td height="25" colspan="5" align="center">
<p align="left"> 目前共有<font color="#009900"><%=rs.RecordCount%></font>个网站加入本自助连接!</td>
</tr>
<tr bgcolor="#F9f9f9">
<td height="25" valign="middle">
<p align="center" class="style1">网站图标或名称</td>
<td width="296" height="25">
<p align="center" class="style1">网站简介</td>
<td width="44" height="25" nowrap>
<p align="center" class="style1">点击</td>
<td width="128" height="25" nowrap>
<p align="center" class="style1">加入时间</td>
</tr>
<%
if rs.recordcount=0 then
%>
<br>
<table width="250" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#D4D0C8">
<tr>
<td height="30" align=center bgcolor="#FFFFFF"><font color="red">数据库找不到信息,请查看该文件!</font></td>
</tr>
</table>
<% else
rs.PageSize =15'每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%> <% for i=1 to x %>
<tr bgcolor="#FFFFFF">
<td height="40" align="center" width="130"><% If rs("logo")<>"" Then %>
<a href="open.asp?id=<%=rs("id")%>&url=<%=rs("homepage")%>" target="_blank">
<img border="0" src="<%=rs("logo")%>" width="88" height="31" alt="<%=rs("site")%>"></a><% Else %>
<a href="open.asp?id=<%=rs("id")%>&url=<%=rs("homepage")%>" target="_blank"><span class="style2"><%=rs("site")%></span></a>
<% End If %></td>
<td height="25" align="left" width="420"><%=rs("jj")%></td>
<td height="25" align="center" width="50">
<%=rs("hits")%></td>
<td height="25" align="center" width="100"><font color="#D4D0C8"><%=rs("linktime")%></font></td>
</tr>
<% if request.cookies("adminok") <> "" then %>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="5" align="left" nowrap>
<p align="center"><span lang="zh-cn"><a href="del.asp?id=<%=rs("id")%>" onClick="return confirm('确定要删除吗?');">删除</a> <span class="style3"><span class="style4"><font face="Arial">│</font></span></span> <a href="com.asp?id=<%=rs("id")%>">推荐</a> <span class="style3"><span class="style4"><font face="Arial">│</font></span></span> <a href="out.asp" onClick="return confirm('确定要退出管理吗?');">退出</a></span></td>
<% end if %>
</tr>
<% rs.movenext
next
%>
<tr bgcolor="#f9f9f9">
<td height="25" colspan="5" align="center"><%
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
rs.close
set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<table " & Table_style & ">" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上一页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下一页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)
end if
Response.Write(" 页次:" & page & "/" & pageCount & "页" & vbCrLf)
Response.Write(" 共有" & iCount & "条" & vbCrLf)
Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页" & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
%></td>
</tr>
</table>
</div>
<br>
<center>
<table width="700" height="25" border="0" cellpadding="0" cellspacing="1" background="bg1.gif" bgcolor="#F0f0f0" id="AutoNumber2" style="border-collapse: collapse">
<tr>
<td width="100%" align=left height="20" nowrap> <a href="http://www.jhidc.cn" target="_blank"><font colof="#f0f0f0">程序开发:刘雄龙</font></a>(QQ:171887742)</td>
</tr>
</table>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -