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

📄 libfindok.asp

📁 基于ASP开发的聊天室源码
💻 ASP
字号:
<%Response.Expires=0
Response.ExpiresAbsolute=Now()-1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
if not IsArray(Session("info")) then Response.Redirect "err1.asp?kind=01"
info=Session("info")
if InStr(Application("maninfo"),"," & info(0) & ",")<>0 then Response.Redirect "manyou.asp"
if Request("words")="" then Response.Redirect "err.asp?kind=27"
if Request("fs")<>"text" and Request("fs")<>"writer" then Response.Redirect "err.asp?kind=28"
words=Request("words")
fs=Request("fs")
nowpage=Request("page")
if nowpage="" then nowpage=1
nowpage=int(nowpage)
if nowpage<1 then nowpage=1
howturn=Request("turn")
if howturn="" then howturn="time"
if howturn<>"" and howturn<>"time" and howturn<>"text" and howturn<>"writer" then Response.Redirect "err.asp?kind=22"
Set Conn=server.createobject("ADODB.CONNECTION")
Conn.Open Application("zzbird_conn")
Set Rs=server.createobject("adodb.recordset")
sql="select * from lib where InStr("&server.HTMLEncode(fs)&",'"&words&"')<>0 order by "&howturn&" desc"
rs.open sql,conn,3,3
rs.pagesize=5           '每页显示数
howpage=rs.pagecount    '共几页
if nowpage>howpage then nowpage=howpage
if rs.recordcount<>0 then rs.absolutepage=nowpage     '当前页
dim tid
dim ttext
dim twrite
dim ttime
set tid=Rs("id")
set ttext=Rs("text")
set twriter=Rs("writer")
set ttime=Rs("time")
%>
<html>
<head>



<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>WEB 词库</title>
<style>
<!--
fieldset     { font-size: 10pt }
.but         { width: 100%; height: 18 }
legend       { font-size: 10pt }
table        { font-size: 10pt }
-->
</style>
</head>
<body bgcolor="buttonface" style="border: 3px double buttonface" link="#000000" vlink="#000000" alink="#800000">
<table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="592" id="AutoNumber1">
<tr>
<td align="center" width="588" valign="top">
<fieldset style="height:100%">
<legend>酷词词库--搜索酷词结果<%if rs.recordcount=0 then%><font color="#A20000">(没有找到任何记录)</font><%end if%></legend>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="100%" valign="top" style="border: 2px inset #FFFFFF" colspan="2">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber3" height="26">
<tr>
<td width="64%" align="center">
<input type="button" value="具体内容" name="b1" class="but" <%if howturn="text" then%>style="border: 2px inset #D4D0C8"<%else%> onclick="location.href='libfindok.asp?turn=text&fs=<%=fs%>&words=<%=server.URLEncode(words)%>';"<%end if%>></td>
<td width="12%" align="center">
<input type="button" value="加入者" name="b2" class="but" <%if howturn="writer" then%>style="border: 2px inset #D4D0C8"<%else%> onclick="location.href='libfindok.asp?turn=writer&fs=<%=fs%>&words=<%=server.URLEncode(words)%>';"<%end if%>></td>
<td width="18%" align="center">
<input type="button" value="加入时间" name="b3" class="but" <%if howturn="time" then%>style="border: 2px inset #D4D0C8"<%else%> onclick="location.href='libfindok.asp?turn=time&fs=<%=fs%>&words=<%=server.URLEncode(words)%>';"<%end if%>></td>
<td width="6%" align="center">
<input type="button" value="删除" name="b4" class="but" onclick="javascript:alert('不能以“删除”作为排序依据!');"></td>
</tr>
<%for i=1 to rs.pagesize
if not Rs.Eof then
nowwriter=twriter
nowtext=ttext
if fs="text" then
nowtext=Replace(nowtext,words,"<font color='#FF0000'>"&words&"</font>")
else
nowwriter=Replace(nowwriter,words,"<font color='#FF0000'>"&words&"</font>")
end if
%>
        <tr>
          <td width="64%" height="34" valign="top"><a href="#" onclick="javascript:opener.parent.l3.allsay.saysword.value='<%=ttext%>';"><%if len(ttext)>50 then Response.Write left(nowtext,50)&"</a> … …" else Response.Write nowtext&"</a>" end if%></td>
          <td width="12%" height="34"><%=nowwriter%></td>
          <td width="18%" height="34"><%=ttime%></td>
          <td width="6%" height="34" align="center">
          <a href="libdel.asp?id=<%=tid%>">删除</a></td>
        </tr>
        <%
        rs.movenext
else
        %>
        <tr>
          <td width="64%" height="34"> </td>
          <td width="12%" height="34"> </td>
          <td width="18%" height="34"> </td>
          <td width="6%" height="34"> </td>
        </tr>
<%end if
next%>
        </table>
      </td>
    </tr>
    <tr>
      <td width="50%" height="2">共<font color="#A20000"><%=rs.recordcount%></font>条,分<font color="#A20000"><%=howpage%></font>页
      ,当前<select size="1" name="nowpage" style="font-size: 8pt; color:#A20000" onchange="window.open(this.options[this.selectedIndex].value,'_self')">
      <%for i=1 to howpage%>
      <option value="libfindok.asp?turn=<%=howturn%>&page=<%=i%>&fs=<%=fs%>&words=<%=server.URLEncode(words)%>" <%if nowpage=i then%>selected<%end if%>><%=i%></option>
      <%next%>
      </select>页</td>
      <td width="50%" height="2" style="text-align: right"><%if nowpage=1 or rs.recordcount=0 then%><font color="#808080">首页 上页</font> <%else%><a href="libfindok.asp?turn=<%=howturn%>&page=1&fs=<%=fs%>&words=<%=server.URLEncode(words)%>">首页</a> <a href="libfindok.asp?turn=<%=howturn%>&page=<%=nowpage-1%>&fs=<%=fs%>&words=<%=server.URLEncode(words)%>">上页</a>
      <%end if
      if nowpage=howpage then%>
      <font color="#808080">下页 末页</font><%else%><a href="libfindok.asp?turn=<%=howturn%>&page=<%=nowpage+1%>&fs=<%=fs%>&words=<%=server.URLEncode(words)%>">下页</a> <a href="libfindok.asp?turn=<%=howturn%>&page=<%=howpage%>&fs=<%=fs%>&words=<%=server.URLEncode(words)%>">末页</a><%end if%></td>
    </tr>
    <tr>
      <td width="100%" height="1" colspan="2"></td>
    </tr>
  </table>
  </fieldset></td>
  </tr>
  <tr>
    <td height="1" width="588" align="center">
<input type="button" value=" 确 定 " name="B1" onclick="javascript:opener.parent.l3.allsay.send.click();window.close();">
<input type="button" value=" 重 查 " name="B2" onclick="javascript:location.href='libfind.asp'">
<input type="button" value=" 返 回 " name="B3" onclick="javascript:location.href='lib.asp'">
<input type="button" value=" 关 闭 " name="B4" onclick="javascript:window.close();"></td>
  </tr>
  <tr>
    <td height="12" width="588" align="right">
<a href="http://aspxer.com/go.aspx?action=nowchat" target="_blank"><font style="font-size: 8pt" color="#808080">NowChat 2.2 - Powered by 喳喳鸟</font></a></td>
  </tr>
  </table>
</body>
</html>
<%
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
%>

⌨️ 快捷键说明

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