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

📄 left.asp

📁 K风搜索 2.1商业版 完整功能版 后台http://XXXXXX/admin/ 管理帐号:admin 管理密码:admin 安全密码: ks21 网站设置http://XXXXXX/
💻 ASP
字号:
<!--#include file="setup.asp"-->
<!--#include file="conn.asp"-->
<%
function filtration(str)
str=replace(str,chr(34),"")
str=replace(str,chr(35),"")
str=replace(str,chr(37),"")
str=replace(str,chr(38),"")
str=replace(str,chr(39),"")
str=replace(str,chr(40),"")
str=replace(str,chr(41),"")
str=replace(str,chr(42),"")
str=replace(str,chr(43),"")
str=replace(str,chr(45),"")
str=replace(str,chr(46),"")
str=replace(str,chr(58),"")
str=replace(str,chr(59),"")
str=replace(str,chr(60),"")
str=replace(str,chr(61),"")
str=replace(str,chr(62),"")
filtration=str
end Function

dim rs
dim keyword
dim keywordlist

keyword=Request.QueryString("keyword")
if keyword="" then
response.write "<Script>window.alert('请输入关键词!');history.go(-1);</Script>"
response.end
else
keyword=replace(keyword,"  "," ")
keyword=filtration(keyword)
keyword=ltrim(rtrim(keyword))
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><%
if len(keyword)>=3 then
keyword_left=left(keyword,2)
keyword_right=right(keyword,2)
keywordlist=keyword &" "& keyword_left &" "&keyword_right
keywordlist=split(keywordlist,chr(32))
else
keywordlist=split(keyword,chr(32))
end if

for i=0 to ubound(keywordlist)
sql=sql &" web.title like '%" & keywordlist(i) & "%' or "
sql=sql &" web.keyword like '%" & keywordlist(i) & "%' or "
sql=sql &" web.content like '%" & keywordlist(i) & "%' or "
sql=sql &" web.one_click like '%" & keywordlist(i) & "%' or "
next
sql=Left(SQL,(LEN(SQL)-3))
set rs=server.createobject("adodb.recordset")
rs.open "select id,title,keyword,content,one_click,sequence,verify from web where one_click is not null and ("&sql&") and verify=0 order by sequence desc",conn,1,1
if Request.QueryString("action")="" then
Application("web_count"&keyword)=rs.recordcount
end if
web_count=Application("web_count"&keyword)
%>
      <table width="100%" border="0" cellpadding="5" cellspacing="0">
      <tr>
        <td align="right"><a href="ad_apply.asp?ad=one_click" target="_blank"><font color="#FF0000">一点通推广</font></a></td>
      </tr>
      <tr>
        <td><strong>共有<font color="#FF3300"><%=web_count%></font>相关结果</strong></td>
      </tr>
      <tr>
        <td height="1" bgcolor="#CCCCCC"></td>
      </tr>
    </table>
      <table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr>
          <td><%
if rs.eof and rs.bof then
'
else
response.write "<span style='line-height: 150%'>"
dim totalPut   
dim CurrentPage
dim TotalPages
dim Page
Const MaxPerPage=30
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,"left.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move  (currentPage-1)*MaxPerPage

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

dim id,title
set id=rs("id")
set title=rs("title")
for i=1 to MaxPerPage step 1
response.write "·<a href='goto.asp?id="&id&"'  target='_blank'>"&title&"</a><br>"
rs.movenext
if rs.eof then exit for
next
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "</span><br><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&"?keyword="&keyword&"&page="&CurrentPage-1&"&action=0'><span style='font-family: Webdings;'>7</span></a> "
End If
p=(currentpage-1) \ 5
for np=p*5+1 to p*5+5
if ii=currentpage then
response.write cstr(np)
else
response.write "<a href='"&filename&"?keyword="&keyword&"&page="&cstr(np)&"&action=0'>"&cstr(np)&"</a> "
end if
if np=n then exit for
next
If n-currentpage<1 Then
Else
response.write "<a href='"&filename&"?keyword="&keyword&"&page="&CurrentPage+1&"&action=0'><span style='font-family: Webdings;'>8</span></a> "
End If
End Function
%>
          </td>
        </tr>
      </table></td>
    <td width="1" bgcolor="#CCCCCC"></td>
  </tr>
</table>
</body>
</html>
<%end if%>

⌨️ 快捷键说明

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