⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list.asp

📁 一个功能强大的搜索系统
💻 ASP
字号:
<!--#include file="setup.asp"-->
<!--#include file="conn.asp"-->
<%
'================================================================================
'Product:K-Search Version 2.1
'本“软件产品”受《中华人民共和国著作权法》和《中华人民共和国计算机软件保护条例》 
'和国际条约的保护。如未经授权而擅自复制或传播本程序(或其中任何部分),将受到严厉
'的刑事及民事制裁,并将在法律许可的范围内受到最大可能的起诉!
'Homepage:http://www.lucoo.com/
'--------------------------------------------------------------------------------
'Copyright(c) 2005 lucoo.com All Rights Reserved 绿色互联 版权所有
'================================================================================
dim rs
dim id
dim sort
dim s_sort
dim sort_id
dim s_sort_id
dim s_show
dim s_move_id
dim s_move_url

sort_id=Request.QueryString("sort_id")
if isnumeric(sort_id)=0 or sort_id="" then
response.write "非法ID参数"
response.end
end if
s_id=Request.QueryString("sort_id")
set rs=conn.execute("select id,sort,sort_id,show,move_id,move_url from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
id=rs("id")
sort=rs("sort")
s_sort=rs("sort")
sort_id=rs("sort_id")
s_sort_id=rs("sort_id")
s_show=rs("show")
s_move_id=rs("move_id")
s_move_url=rs("move_url")
end if
rs.close
set rs = nothing

dim locality
locality=" >> "&sort
if sort_id<>0 then
for i=1 to 8 step 1
set rs=conn.execute("select id,sort,sort_id from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
sort=rs("sort")    
locality=" >> <a href=list.asp?sort_id="&sort_id&">"&sort&"</a>"&locality  
sort_id=rs("sort_id")   
end if
rs.close
set rs = nothing
next
end if
%>
<html>
<head>
<title><%=WebSite_Title%> - <%=sort%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script language=javascript>
	function one_search(){
  	var url="one_search.asp";
  	document.form_search.action=url;
	}
	function search(){
  	var url="search.asp";
  	document.form_search.action=url;
	}
</script>
</head>
<body vlink="#990000" alink="#00CC00" leftmargin="5" topmargin="0" marginwidth="0" marginheight="5">
<!--#include file="top.asp" -->
<table border="0" cellpadding="5" cellspacing="0">
  <tr align="center" bgcolor="#f5f5f5">
    <td width="55" height="20"><a href="index.asp">网站搜索</a></td>
    <td width="55" bgcolor="#f5f5f5"><a href="dir.asp"><strong>分类目录</strong></a></td>
    <td width="55" bgcolor="#f5f5f5"><a href="protocol.asp">网站登录</a></td>
    <td width="55" bgcolor="#f5f5f5"><a href="admin.asp">网站修改</a></td>
    <td width="55" bgcolor="#f5f5f5"><a href="help.asp">搜索帮助</a></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr> 
    <td background="image/search_bg.gif"><table border="0" align="center" cellpadding="0" cellspacing="0">
        <form name="form_search" method="get" action="search.asp">
          <tr> 
            <td width="50" height="30">关键词:</td>
            <td width="225"><input name="keyword" type="text" id="keyword" size="35"></td>
            <td width="50"><input type="image" src="image/search.gif" onclick="search()" align="absMiddle" width="45" height="21" hspace="0" border="0"></td>
            <td width="50"><input type="image" src="image/one_search.gif" onclick="one_search()" align="absMiddle" width="45" height="21" hspace="0" border="0"></td>
            <td width="200"><input name="path" type="radio" value="0" checked>
所有分类
  <input type="radio" name="path" value="<%=s_id%>">
在本分类</td>
          </tr>
        </form>
    </table></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="73%" height="25" bgcolor="#f5f5f5">当前目录:<a href="<%=Web_path%>dir.asp">首页</a> <%=locality%></td>
    <td width="27%" align="right" bgcolor="#f5f5f5">本页更新日期:<%=formatdatetime(date,2)%></td>
  </tr>
  <tr> 
    <td height="1" colspan="2" bgcolor="#CCCCCC"></td>
  </tr>
  <tr>
    <td height="15" colspan="2"></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td>
<%
set rs=conn.execute("select id,sort,sort_id,move_id from sort where sort_id="&s_id)
if rs.eof or rs.bof then
'
else
do while not rs.eof
%>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="175" height="25" bgcolor="#FFFFFF"><%if not rs.eof then
                  response.write "· "
                        if rs("move_id")>0 then
                        response.write "<span style='font-size: 14px'><a href='list.asp?sort_id="&rs("move_id")&"' target='_blank'><b>"&rs("sort")&"@</b></a></span>"
                        else
                        response.write "<span style='font-size: 14px'><a href='list.asp?sort_id="&rs("id")&"'><b>"&rs("sort")&"</b></a></span>"
                        end if
rs.movenext
end if
%>
    </td>
    <td width="175" bgcolor="#FFFFFF"><%if not rs.eof then
                  response.write "· "
                        if rs("move_id")>0 then
                        response.write "<span style='font-size: 14px'><a href='list.asp?sort_id="&rs("move_id")&"' target='_blank'><b>"&rs("sort")&"@</b></a></span>"
                        else
                        response.write "<span style='font-size: 14px'><a href='list.asp?sort_id="&rs("id")&"'><b>"&rs("sort")&"</b></a></span>"
                        end if
rs.movenext
end if
%></td>
    <td width="175" bgcolor="#FFFFFF"><%if not rs.eof then
                  response.write "· "
                        if rs("move_id")>0 then
                        response.write "<span style='font-size: 14px'><a href='list.asp?sort_id="&rs("move_id")&"' target='_blank'><b>"&rs("sort")&"@</b></a></span>"
                        else
                        response.write "<span style='font-size: 14px'><a href='list.asp?sort_id="&rs("id")&"'><b>"&rs("sort")&"</b></a></span>"
                        end if
rs.movenext
end if
%></td>
  </tr>
</table>
<%
loop
end if
rs.close
set rs = nothing
dim web_count
dim web_countrs
set web_countrs=conn.execute("select count(id) from web where sort_id="&s_id&" and verify=0")
if web_countrs.eof or web_countrs.bof Then 
web_count=0 
else 
web_count=web_countrs(0) 
end If 
web_countrs.close
set web_countrs = nothing
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="10"></td>
  </tr>
  <tr> 
    <td height="30" background="image/search_bg.gif">当前目录共有 <%=web_count%> 个网站</td>
    </tr>
  <tr> 
    <td height="10"></td>
  </tr>
</table>
	 <ol>
        <%
set rs=server.createobject("adodb.recordset")
rs.open "select id,sort_id,title,content,url,verify from web where sort_id="&s_id&" and verify=0 order by id desc",conn,1,1

if rs.eof and rs.bof then
response.write ""
else
dim totalPut   
dim CurrentPage
dim TotalPages
dim Page
Const MaxPerPage=20
page=Request.QueryString("page")
if Not isempty(page) then
currentPage=Cint(page)
else
currentPage=1
end if 
totalPut=web_count
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
showContent
showpage totalput,MaxPerPage,"list.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move  (currentPage-1)*MaxPerPage

showContent
showpage totalput,MaxPerPage,"list.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"list.asp"
end if
end if
end if
sub showContent

dim id,title,content,url,sort_path
set id=rs("id")
set title=rs("title")
set content=rs("content")
set url=rs("url")
for i=1 to 20 step 1
response.write "<li><span style='font-size: 14px'><a href='goto.asp?id="&id&"'  target='_blank'>"&title&"</a></span><br>"
response.write "<span style='line-height: 150%'>"&content&"</span><br>"
response.write "<span style='line-height: 150%'><font color='#006600'>"&url&"</font></span><br><br>"
rs.movenext
if rs.eof then exit for
next
rs.close
set rs=Nothing
conn.close
set conn=Nothing
response.write "<br>"
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 

If CurrentPage<2 Then
Else
response.write " <a href='"&filename&"?sort_id="&s_id&"&page="&CurrentPage-1&"'>上一页</a> "
End If
p=(currentpage-1) \ 10
for np=p*10+1 to p*10+10
if ii=currentpage then
response.write cstr(np)
else
response.write "<a href='"&filename&"?sort_id="&s_id&"&page="&cstr(np)&"'>["&cstr(np)&"]</a> "
end if
if np=n then exit for
next
If n-currentpage<1 Then
Else
response.write "<a href='"&filename&"?sort_id="&s_id&"&page="&CurrentPage+1&"'>下一页</a> "
End If
response.write "页次:"&CurrentPage&"/"&n&"页 "
End Function
%></ol>
    </td>
    <td width="10"></td>
    <td width="1" bgcolor="#CCCCCC"></td>
    <td width="220" valign="top"><script language="javascript" src="commend_js.asp?path=<%=s_id%>&count=20"></script></td>
  </tr>
</table>
<br>
<!--#include file="bottom.asp" -->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -