📄 speaksearch.asp
字号:
<%@ LANGUAGE=VBScript%>
<%Response.Expires=0
Server.ScriptTimeout=600
username=Session("a_c_user_name")
search=Request.Form("search")
if search = "" then
Response.write "<html><head><title>出错提示</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'></head>"
Response.write "<body bgcolor='#EFC684'><table width='364' cellpadding='10' align='center'><tr align='center'><td>"
Response.write "<p><font face='黑体' color='#FF0000' style='font-size: 32pt'>出错提示</font></p>"
Response.write "<p>对不起,关键词不能为空</p>"
Response.write "<p><a href='javascript:history.go(-1)'>点击此处进行修改</a></p>"
Response.write "</td></tr></table></body></html>"
Response.end
end if
ly_index=Application("a_c_ly_index")
ly_num=Application("a_c_ly_num")
ggly=0
srly=0
zzly=0
for i=1 to ly_num step 3
if ly_index(i)="0" and username<>ly_index(i+1) and username<>ly_index(i+2) then ggly=ggly+1
if username=ly_index(i+1) or username=ly_index(i+2) then zzly=zzly+1
if ly_index(i)="1" and username=ly_index(i+1) then srly=srly+1
next
lyfile = server.mappath("speakdata_v200.asp")
countfile = server.mappath("speakcount.txt")
Set fs = CreateObject("Scripting.FileSystemObject")
set thisfile = fs.OpenTextFile(countfile,1,False)
addcount = thisfile.readline
thisfile.Close
Set thisfile = fs.OpenTextFile(lyfile,1,False)
dim lyb(),ly()
count=0
do while not thisfile.AtEndOfStream
thisline = thisfile.readline
Redim preserve lyb(count)
lyb(count) = thisline
count = count + 1
loop
thisfile.close
countly=1
for i=1 to count-1 step 11
if lyb(i)=0 or lyb(i+1)=username or lyb(i+3)=username then
Redim Preserve ly(countly),ly(countly+1),ly(countly+2),ly(countly+3),ly(countly+4),ly(countly+5),ly(countly+6),ly(countly+7),ly(countly+8),ly(countly+9),ly(countly+10)
ly(countly)=lyb(i)
ly(countly+1)=lyb(i+1)
ly(countly+2)=lyb(i+2)
ly(countly+3)=lyb(i+3)
ly(countly+4)=lyb(i+4)
ly(countly+5)=lyb(i+5)
ly(countly+6)=lyb(i+6)
ly(countly+7)=lyb(i+7)
ly(countly+8)=lyb(i+8)
ly(countly+9)=lyb(i+9)
ly(countly+10)=lyb(i+10)
countly=countly+11
end if
next
lynumber=(countly-1)/11
Dim show()
showjs=1
for i=1 to countly-1 step 11
if instr(LCase(ly(i+1)),LCase(search))<>0 or instr(LCase(ly(i+2)),LCase(search))<>0 or instr(LCase(ly(i+3)),LCase(search))<>0 or instr(LCase(ly(i+4)),LCase(search))<>0 or instr(LCase(ly(i+5)),LCase(search))<>0 or instr(LCase(ly(i+7)),LCase(search))<>0 or instr(LCase(ly(i+8)),LCase(search))<>0 or instr(LCase(ly(i+9)),LCase(search))<>0 or instr(LCase(ly(i+10)),LCase(search))<>0 then
Redim Preserve show(showjs),show(showjs+1),show(showjs+2),show(showjs+3),show(showjs+4),show(showjs+5),show(showjs+6),show(showjs+7),show(showjs+8),show(showjs+9),show(showjs+10)
show(showjs)=ly(i)
show(showjs+1)=ly(i+1)
show(showjs+2)=ly(i+2)
show(showjs+3)=ly(i+3)
show(showjs+4)=ly(i+4)
show(showjs+5)=ly(i+5)
show(showjs+6)=ly(i+6)
show(showjs+7)=ly(i+7)
show(showjs+8)=ly(i+8)
show(showjs+9)=ly(i+9)
show(showjs+10)=ly(i+10)
showjs=showjs+11
end if
next%><html>
<head>
<title>搜索包含 <%=search%> 的留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td { font-family: "宋体"; font-size: 9pt}
.p9 { font-family: "宋体"; font-size: 9pt; line-height: 150%}
.p12 { font-family: "宋体"; font-size: 12pt; line-height: 150%}
.p150 { line-height: 150%}
a:hover { color: #FF0000; text-decoration: none}
a:link { color: #0000FF; text-decoration: none}
a:active { color: #000000; text-decoration: none}
a:visited { color: #0000FF; text-decoration: none}
-->
</style></head>
<body bgcolor="EFC684" style="font-size: 9pt; font-family: 宋体" topmargin="0">
<form method="post" action="speaksearch.asp" name="">
<table width="756" border="0" cellspacing="0" cellpadding="2">
<tr>
<td bgcolor="#000000" width="50">
<div align="center"><font color="#FFFFFF" style="font-size:48pt" face="幼圆">聊</font></div>
</td>
<td bgcolor="#FFCCFF" width="80">
<div align="center"><font color="#FF0000" style="font-size:24pt" face="黑体">天室</font><br>
<span class="p150"><font color="#0000FF">衡蠡时空</font></span></div>
</td>
<td width="597" align="center" bgcolor="009900"><span class="p12">欢迎来到<%=Application("a_c_chatroom_name")%>留言簿,请您留点墨宝吧!</span>
<table border="1" cellspacing="0" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#E0E0E0" width="500">
<tr align="center">
<td height="24"><a href="speak.asp?page=1">返回总表</a></td>
<td height="24"><a href="speakmanage.asp" target="_blank">留言管理</a></td>
<td height="24"><a href="speaktalk.asp">书写留言</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#000099" valign="top" width="159">
<hr noshade size="1" color="#CCCCCC">
</td>
<td width="597" align="center" valign="top" bgcolor="#FFCCCC">在 <%Response.Write srly & "/" & zzly & "/" & ggly+zzly%>
条留言中搜索到包含关键词:<font color="0000FF"><b><%=search%></b></font> 的留言 <font color="FF0000"><b><%=(showjs-1)/11%></b></font>
条</td>
</tr>
<tr valign="top">
<td colspan="2" bgcolor="#000099" width="159">
<div align="center"></div>
<div align="center" class=p9> <font color="#FFFFFF">共加入留言 <% =addcount %> 条</font><font color="#FFFFFF"><br>
使用关键词搜索留言</font><br>
<input type="text" name="search" size="10" value="<%=search%>">
<input type="submit" name="Submit" value="搜索">
<hr noshade size="1" color="#CCCCCC">
<font color="#FFFF00">站长提醒大家</font><br>
<font color="#CCCCCC"> 不要把本留言板作为自己<br>
宣传主页的地方;本留言<br>
板不欢迎在此贴广告之类<br>
的帖子;绝不允许贴带政<br>
治色彩、人身攻击等非法<br>
内容的帖子;留言的内容<br>
请不要出现连续一长串的<br>
标点符号或无意义的字符<br>
;不得故意破坏留言簿;<br>
此类帖子将一律删除!</font>
<hr noshade size="1" color="#CCCCCC">
<a href="mailto:pgdcdb@263.net"><font color="#00FF00">E-mail:管理员</font></a>
<hr noshade size="1" color="#CCCCCC">
<script src="copyright.asp"></script>
</div>
</td>
<td width="597" bgcolor="#FFFFFF"><br>
<%for i=1 to showjs-1 step 11%>
<table width="96%" border="1" align="center" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF">
<tr>
<td>
<table width=100% border=0 cellpadding=3>
<tr bgcolor=C0F0C0>
<td width=15% align=center>第 <%=(i-1)/11+1%> 条</td>
<td width=75%><font color="#999999">To:</font> <%if username=show(i+1) then
Response.Write "<font color=#FF0000>" & show(i+1) & "</font>"
else
Response.Write show(i+1)
end if
if show(i)=1 then Response.Write " <font color=FF00FF>[私人留言]</font>"%></td>
<td width=10% align=center><a href=speaktalk.asp?tw=<%=server.URLEncode(show(i+3))%>>回复</a></td>
</tr>
<tr bgcolor=F0F0F0>
<td colspan=3><br>
<%=show(i+2)%>
<p>
</td>
</tr>
<tr bgcolor=F0F0F0>
<td colspan=3>
<table width=100% border=0 cellspacing=0>
<tr>
<td width=42%><%if show(i+4)<>"" then
Response.Write "姓名:<a href=mailto:" & show(i+4) & ">" & show(i+3) & "</a>"
else
Response.Write "姓名:" & show(i+3)
end if%></td>
<td width=58%><%if show(i+10)<>"" then
if show(i+9)<>"" then
Response.Write "主页:<a href=" & show(i+10) & " target=_blank>" & show(i+9) & "</a>"
else
Response.Write "主页:<a href=" & show(i+10) & " target=_blank>" & show(i+10) & "</a>"
end if
end if
if show(i+10)="" and show(i+9)<>"" then
Response.Write "主页:" & show(i+9)
end if%></td>
</tr>
<tr>
<td width=42%><%Response.Write "时间:" & show(i+5)%></td>
<td width=58%><%if NOT(show(i+6)="1" and show(i+8)="") then
if show(i+6)="1" then
Response.Write "来自:" & show(i+8)
else
Response.Write "来自:" & show(i+7) & " " & show(i+8)
end if
end if%></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<%next%></td>
</tr>
<tr>
<td width="159" colspan="2" bgcolor="#000099">
<div align="center"><font color="#FFFFFF">共加入留言 <% =addcount %> 条</font></div>
</td>
<td width="597" align="center" valign="top" bgcolor="#FFCCCC">在 <%Response.Write srly & "/" & zzly & "/" & ggly+zzly%>
条留言中搜索到包含关键词:<font color="0000FF"><b><%=search%></b></font> 的留言 <font color="FF0000"><b><%=(showjs-1)/11%></b></font>
条</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -