📄 index1.asp
字号:
<!--#include file="dbpath/dbpath.asp"-->
<%
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
typename1=rstype("type")
rstype.close
%>
<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
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
do while NOT rst.EOF
%>
<a href="index.asp?typeid=<%=rst("typeid")%>"><%=rst("type")%></a>|
<%
rst.MoveNext
loop
end if
rst.close
%></center>
<div align="center">
<%
sql="select * from yqlink where title like '%"&request("txtitle")&"%' and 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>"
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,"index.asp"
showContent
showpage totalput,MaxPerPage,"index.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"index.asp"
showContent
showpage totalput,MaxPerPage,"index.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"index.asp"
showContent
showpage totalput,MaxPerPage,"index.asp"
end if
end if
rs.close
end if
set rs=nothing
sub showContent
dim i
dim logo
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"><strong>站名</strong></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"><strong>网站简介</strong></td>
<td width="100" align="center"><strong>加入日期</strong></td>
<td width="50" align="center"><strong>点击</strong></td>
</tr>
<%do while not rs.eof%>
<tr bgcolor="#AB6C00">
<td height="35" bgcolor="#AB6C00">
<p align="center"><a href="<%=rs("homepage")%>" target="_blank"><%=rs("webname")%></a>
</td>
<% if rs("homelogo")="" then
logo="nologo.gif"
elseif rs("homelogo")="http://" then
logo="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">
<p align="center"><a href="javascript:popwin2(<%=rs("articleid")%>)"><%=rs("title")%></a>
</td>
<td height="35">
<p align="center"><font color="#ffffff"><i><%=rs("dateandtime")%></i></font>
</td>
<td height="35">
<p align="center"><%=rs("hits")%>
</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
%>
<form name="searchtitle" method="POST" action="index.asp">
标题:
<input class="smallInput" type="text" name="txtitle" size="13" style="BACKGROUND-COLOR:#FFE7B3;font-family: 宋体; font-size: 9pt">
<select class="smallSel" name="typeid" size="1" style="BACKGROUND-COLOR:#FFE7B3;font-family: 宋体; font-size: 9pt">
<%
typesql="select * from linktype"
rstype.open typesql,conn,1,1
do while not rstype.eof
sel="selected"
response.write "<option " & sel & " value='"+CStr(rstype("typeID"))+"' name=typeid>"+rstype("type")+"</option>"+chr(13)+chr(10)
rstype.movenext
loop
rstype.close
set conn=nothing
%>
</select>
<input class="buttonface" type="submit" value="查 询" name="title" style="BACKGROUND-COLOR:#AB6C00;font-family: 宋体; font-size: 9pt;">
<p> [<a href="top10.asp" title="电击人数排在前10名的网站">前10名网站</a>][<a href="Login.asp" title="自动链接系统的管理员登陆维护界面" >管理员登陆</a>]
</p>
</form>
</div>
</td>
</tr>
</table>
<!--#include file="function/ads.inc"--></center></div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -