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

📄 friendqueryok.asp

📁 此程序为网上下载
💻 ASP
字号:
<%@ LANGUAGE=VBScript.Encode codepage ="936" %>
<%Response.Buffer = True
Response.Expires = 0
Response.CacheControl = "Private"
Sub Msg (v)
 Response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta http-equiv='pragma' content='no-cache'><style type=text/css>body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style></head><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>"
 Response.Write "<script Language=JavaScript>alert('" & v & "');history.go(-1);</script></body></html>"
 Response.End
End Sub
nickname=Session("hxf_u_nickname")
usergrade=Int(Session("hxf_u_grade"))
if nickname="" then Msg "你尚未登录,或已经超时断开了连接,请重新登录"
keyword = Server.HTMLEncode(Trim(Request.QueryString("keyword")))
if keyword="" then Msg "请输入要查询的关键字!"
keyword = Replace(keyword, "{]", "{<!>]")
keyword = Replace(keyword, "'", "")
keyword = Replace(keyword, " ", "")
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
sql="SELECT username FROM reginfo WHERE kill='0' and times>0 And (username LIKE '%" & keyword & "%' OR email LIKE '%" & keyword & "%' OR info LIKE '%" & keyword & "%' OR lasttime LIKE '%" & keyword & "%')"
rs.open sql,conn,1,1
if rs.Eof and rs.Bof then
 rs.close
 conn.close
 set rs=nothing
 set conn=nothing
 Msg "搜索不到关键字“"& keyword &"”!"
end if
rs.PageSize=1
totalrec = rs.RecordCount
i = 1
Do While (Not rs.Eof) And (i <= 100)
 If show = "" Then
  show = rs("username")
 Else
  show = show & "|" & rs("username")
 End If
 i = i + 1
rs.MoveNext
Loop
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing%>
<html>
<head>
<title>查询结果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="readonly/style.css">
<script Language=JavaScript>
function cx(v){
 window.open("friendqueryview.asp?id=" + unescape(v),"", "width=320,height=200");
}
function show(v){
 if(v != ""){
  document.write("<table width=100% border=0>");
  m = v.split("|")
  for(i = 0;i < m.length;i = i+5){
   document.write("<tr>");
   for(j = i;j < i+5;j++){
    if(j < m.length){
     document.write("<td width=20% class=p9><a href=javascript:cx('" + escape(m[j]) + "');>" + m[j] + "</a></td>");
    }
    else{
     document.write("<td width=20% class=p9></td>");
    }
   }
   document.write("</tr>");
  }
  document.write("</table>");
 }
}
</script>
</head>
<body bgcolor=#DCD8D0 leftmargin="3" topmargin="25">
<hr color=#319A31 size="1">
<div align=center>以下用户名的信息中包括要搜索的关键词:<br>
  [<font color=red><%=keyword%></font>]<br>
  <br>
点击用户名即可显示该用户名的资料</div>
<hr color=#319A31 size="1">
<div align=center>共找到 <font color=red><%=totalrec%></font> 个用户名 <a href=friendquery.asp>[返回]</a> <a href=javascript:history.go(0)>[刷新]</a></div>
<script Language=JavaScript>
show("<%=show%>");
</script>
<hr color=#319A31 size="1">
<div align=center>如果查找到的记录多于100条,则只显示前100条。</div>
<hr size="1" color=#319A31>
</body>
</html>

⌨️ 快捷键说明

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