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

📄 wz_search.asp

📁 xmuu.NET网址导航 V 3.3 正式版 直接修改后可使用。包括数百网址导航。
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
Const sBASE_64_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" 


Function Base64encode(asContents) 
Dim lnPosition 
Dim lsResult 
Dim Char1 
Dim Char2 
Dim Char3 
Dim Char4 
Dim Byte1 
Dim Byte2 
Dim Byte3 
Dim SaveBits1 
Dim SaveBits2 
Dim lsGroupBinary 
Dim lsGroup64 

If Len(asContents) Mod 3 > 0 Then asContents = asContents & String(3 - (Len(asContents) Mod 3), " ") 
lsResult = "" 

For lnPosition = 1 To Len(asContents) Step 3 
lsGroup64 = "" 
lsGroupBinary = Mid(asContents, lnPosition, 3) 

Byte1 = Asc(Mid(lsGroupBinary, 1, 1)): SaveBits1 = Byte1 And 3 
Byte2 = Asc(Mid(lsGroupBinary, 2, 1)): SaveBits2 = Byte2 And 15 
Byte3 = Asc(Mid(lsGroupBinary, 3, 1)) 

Char1 = Mid(sBASE_64_CHARACTERS, ((Byte1 And 252) \ 4) + 1, 1) 
Char2 = Mid(sBASE_64_CHARACTERS, (((Byte2 And 240) \ 16) Or (SaveBits1 * 16) And &HFF) + 1, 1) 
Char3 = Mid(sBASE_64_CHARACTERS, (((Byte3 And 192) \ 64) Or (SaveBits2 * 4) And &HFF) + 1, 1) 
Char4 = Mid(sBASE_64_CHARACTERS, (Byte3 And 63) + 1, 1) 
lsGroup64 = Char1 & Char2 & Char3 & Char4 

lsResult = lsResult + lsGroup64 
Next 

Base64encode = lsResult 
End Function


set rs=server.createobject("adodb.recordset")
sql="select * from admin where username='"&Session("Admin")&"'and password='"&Session("ap")&"'"
rs.open sql,conn,1,3
if rs.EOF then
	Response.Redirect "index.asp"
	Response.End 
end if
%>
<%
if Session("isAdmin")<>true Then
Response.Redirect "index.asp"
Response.End
End if
%>
<%
by=request("by")
word=request("word")
pn=request("pn")
if by="url" then
sql="select * from detail where url like '%"&word&"%'"
else
sql="select * from detail where title like '%"&word&"%'"
end if
%>
<%
delete=request("delete")
if delete<>"" and session("lastdeleted")<>delete then
conn.execute "delete from detail where id="&delete
response.write "<big><big><font color='red'>已删除一条编号为"&delete&"的网站记录!</font></big></big><br><br>"
session("lastdeleted")=delete
end if
%>
<HTML>
<HEAD>
<TITLE>网站搜索结果</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style type="text/css">
body {font-size:13px}
</style>
</HEAD>

<BODY>
网站搜索结果
<table border="1" bordercolor="black" cellspacing="0">
<tr>
<td nowrap>编号</td>
<td>网站名称</td>
<td>网站url</td>
<td nowrap>所属分类</td>
<td>编辑</td>
<td>删除</td>
</tr>
<%
if pn="" then pn=1
set r=server.createobject("adodb.recordset")
r.open sql,conn,1,3
if  r.eof or r.bof then
response.write "没有找到所需记录!"
response.end
end if
r.pagesize=100
r.absolutepage=pn
rowcount=r.pagesize
do while not r.eof and not r.bof and rowcount>0
set rr=server.createobject("adodb.recordset")
rr.open "select * from feilei where classid="&r("classid"),conn,1,3
response.write "<td nowrap>"&r("id")&"</td>"
response.write "<td nowrap>"&r("title")&"</td>"
response.write "<td nowrap>"&r("url")&"</td>"
response.write "<td nowrap>"&rr("classname")&"</td>"
response.write "<td nowrap><a href='wz_edit.asp?id="&r("id")&"' target='wz_edit'>编辑</a></td>"
response.write "<td nowrap><a href='"&request.servervariables("script_name")&"?pn="&pn&"&delete="&r("id")&"&by="&by&"&word="&word&"'>删除</a></td></tr>"
rr.close
set rr=nothing
rowcount=rowcount-1
r.movenext
loop
%>
</table>
<%
ppage=pn-1
npage=pn+1
if pn=1 then
%>
<a href='<%=request.servervariables("script_name")%>?pn=1&word=<%=word%>&by=<%=by%>'>首页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=r.pagecount%>&word=<%=word%>&by=<%=by%>'>最后一页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=npage%>&word=<%=word%>&by=<%=by%>'>下一页</a>
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=r.pagecount%>页
<%
elseif pn<r.pagecount then
%>
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=r.pagecount%>&word=<%=word%>&by=<%=by%>'>最后一页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=ppage%>&word=<%=word%>&by=<%=by%>'>上一页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=npage%>&word=<%=word%>&by=<%=by%>'>下一页</a>
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=r.pagecount%>页
<%
else
%>
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=r.pagecount%>&word=<%=word%>&by=<%=by%>'>最后一页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=ppage%>&word=<%=word%>&by=<%=by%>'>上一页</a>
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=r.pagecount%>页
<%
end if
%>
</BODY>
</HTML>

⌨️ 快捷键说明

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