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

📄 findotherok.asp

📁 基于ASP开发的聊天室源码
💻 ASP
字号:
<%Response.Expires=0%>
<%
Function CheckString(str)
	str = Trim(str)
	str = Replace(str," ","")
	str = Replace(str,"'","")
	str = Replace(str,";","")
	str = Replace(str,chr(34),"")
	CheckString = str
End Function

If Not IsArray(Session("info")) Then Response.Redirect "err1.asp?kind=01"
info = Session("info")
gradeinfo = Application("gradeinfo")
If InStr(Application("maninfo"),"," & info(0) & ",") <> 0 Then Response.Redirect "manyou.asp"
nowpage = Request("page")
If nowpage = "" Then nowpage = 1
nowpage = Int(nowpage)
If nowpage < 1 Then nowpage = 1
howturn = Request("turn")
If howturn = "" Then howturn = "id"
sqlword = CheckString(Request("sql"))
userp = CheckString(Request.Form("userp"))
gradep = CheckString(Request.Form("gradep"))
emailp = CheckString(Request.Form("emailp"))
tnamep = CheckString(Request.Form("tnamep"))
oicqp = CheckString(Request.Form("oicqp"))
ybp = CheckString(Request.Form("ybp"))
icqp = CheckString(Request.Form("icqp"))
placep = CheckString(Request.Form("placep"))
homep = CheckString(Request.Form("homep"))
bornp = CheckString(Request.Form("bornp"))
phonep = CheckString(Request.Form("phonep"))
jobp = CheckString(Request.Form("jobp"))
If sqlword = "" And userp <> "ON" And gradep <> "ON" And emailp <> "ON" And tnamep <> "ON" And oicqp <> "ON" And ybp <> "ON" And icqp <> "ON" And placep <> "ON" And homep <> "ON" And bornp <> "ON" And phonep <> "ON" And jobp <> "ON" Then Response.Redirect "err.asp?kind=21"
user = CheckString(Request.Form("user"))
grade = CheckString(Request.Form("grade"))
email = CheckString(Request.Form("email"))
tname = CheckString(Request.Form("tname"))
oicq = CheckString(Request.Form("oicq"))
yb = CheckString(Request.Form("yb"))
icq = CheckString(Request.Form("icq"))
place = CheckString(Request.Form("place"))
home = CheckString(Request.Form("home"))
byear = CheckString(Request.Form("byear"))
bmonth = CheckString(Request.Form("bmonth"))
bday = CheckString(Request.Form("bday"))
phone = CheckString(Request.Form("phone"))
job = CheckString(Request.Form("job"))
findk = CheckString(Request("findk"))
del = CStr(CheckString(Request.Form("del")))
Set Conn = Server.CreateObject("ADODB.CONNECTION")
Conn.Open Application("zzbird_conn")
If del = "yes" Then
	sql = "update userinfo set lastmonth=" & month(date) & ",monthv=0 where lastmonth<>" & month(date)
	Conn.Execute(sql)
End If
Set Rs = Server.CreateObject("adodb.recordset")
If sqlword = "" Then
	sql = ""
	If userp = "ON" Then sql = sql & " " & findk & " user='" & user & "'"
	If gradep = "ON" Then sql = sql & " " & findk & " grade=" & grade
	If emailp = "ON" Then sql = sql & " " & findk & " email='" & email & "'"
	If tnamep = "ON" Then sql = sql & " " & findk & " tname='" & tname & "'"
	If oicqp = "ON" And IsNumeric(CheckString(Request.Form("oicq"))) Then sql = sql & " " & findk & " oicq=" & oicq
	If ybp = "ON" And IsNumeric(CheckString(Request.Form("yb"))) Then sql = sql & " " & findk & " yb=" & yb
	If icqp = "ON" And IsNumeric(CheckString(Request.Form("icq"))) Then sql = sql & " " & findk & " icq=" & icq
	If placep = "ON" Then sql = sql & " " & findk & " place='" & place & "'"
	If homep = "ON" Then sql = sql & " " & findk & " home='" & home & "'"
	If bornp = "ON" Then sql = sql & " " & findk & " born='" & byear & ";" & bmonth & ";" & bday & ";'"
	If phonep = "ON" Then sql = sql & " " & findk & " phone='" & phone & "'"
	If jobp = "ON" Then sql = sql & " " & findk & " job='" & job & "'"
	sqlword = sql
Else
	sql = sqlword
End If
sqlword = Server.URLEncode(sqlword)
If findk = "and" Then
	sql = "select * from userinfo where id<>0 " & sql & " order by " & howturn & " desc"
Else
	sql = "select * from userinfo where id=0 " & sql & " order by " & howturn & " desc"
End If
Rs.Open sql,Conn,3,3
Rs.PageSize = 10           '每页显示数
howpage = Rs.PageCount    '共几页
If nowpage > howpage Then nowpage = howpage
If Rs.RecordCount <> 0 Then Rs.AbsolutePage = nowpage     '当前页
Dim tuser
Dim tvalue
Dim tmonthv
Dim ttimes
Dim tgrade
Set tuser = Rs("user")
Set tvalue = Rs("value")
Set tmonthv = Rs("monthv")
Set ttimes = Rs("times")
Set tgrade = Rs("grade")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查找别人资料</title>
<style>
<!--
input        { background-color: buttonface; width:116; height:18 }
-->
</style>
<script language="javascript">
function openwin(user){
window.open("seeinfo.asp?user="+user,"newwindow","height=310,width=290,left=150,top=60,resizable=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no");
}
function man1(user){
window.open('man_user_changename.asp?name='+user,'man','height=210,width=310,left=150,top=60,resizable=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no');
}
function man2(user){
window.open('man_grade.asp?name='+user,'man','height=210,width=310,left=150,top=60,resizable=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no');
}
function man3(user){
window.open('man_user_changeinfo.asp?name='+user,'man','height=210,width=310,left=150,top=60,resizable=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no');
}
</script>
</head>
<body oncontextmenu=self.event.returnValue=false style="border: 3px double buttonface; font-size:10pt" bgcolor="buttonface" link="#000000" vlink="#000000" alink="#800000">

  <fieldset style="padding: 2">
  <legend><font color="#A20000"><img border="0" src="images/find.gif">查找别人资料结果<%if rs.recordcount=0 then Response.Write "(没有查找到任何记录)"%></font></legend>
  <div align="center">多条件匹配方法:
	<%
	If findk = "and" Then
		Response.Write "同时(and)<br>(即有多个条件时必须同时满足所有条件。)"
	Else
		Response.Write "或者(or)<br>(即有多个条件时只要满足其中任意一个即可。)"
	End If
	%></div>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-size: 10pt" bordercolor="#111111" width="100%" id="AutoNumber2">
    <tr>
      <td width="100%" style="border: 2px inset #FFFFFF" colspan="2">
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-size: 10pt" width="100%" id="AutoNumber1">
    <tr>
      <td width="10%" height="16">
      <input type="button" value="序号" name="B8" <%
      If howturn = "id" Then
      %>style="border: 2px inset #D4D0C8"<%
      Else
      %> onclick="location.href='findotherok.asp?turn=id&sql=<%=sqlword%>&findk=<%=findk%>';"<%
      End If
      %> style="width: 100%; height: 18; font-size: 9pt"></td>
      <td width="19%" height="16">
      <input type="button" value="用户昵称" name="b2" <%If howturn = "user" Then%>style="border: 2px inset #D4D0C8"<%Else%> onclick="location.href='findotherok.asp?turn=user&sql=<%=sqlword%>&findk=<%=findk%>';"<%End If%> style="width: 100%; height: 18; font-size: 9pt"></td>
      <td width="14%" height="16">
      <input type="button" value="总积分" name="b4" <%If howturn = "value" Then%>style="border: 2px inset #D4D0C8"<%Else%> onclick="location.href='findotherok.asp?turn=value&sql=<%=sqlword%>&findk=<%=findk%>';"<%End If%> style="width: 100%; height: 18; font-size: 9pt"></td>
      <td width="14%" height="16">
      <input type="button" value="月积分" name="b5" <%If howturn = "monthv" Then%>style="border: 2px inset #D4D0C8"<%Else%> onclick="location.href='findotherok.asp?turn=monthv&sql=<%=sqlword%>&findk=<%=findk%>';"<%End If%> style="width: 100%; height: 18; font-size: 9pt"></td>
      <td width="14%" height="16">
      <input type="button" value="来访次数" name="b6" <%If howturn = "times" Then%>style="border: 2px inset #D4D0C8"<%Else%> onclick="location.href='findotherok.asp?turn=times&sql=<%=sqlword%>&findk=<%=findk%>';"<%End If%> style="width: 100%; height: 18; font-size: 9pt"></td>
      <td width="14%" height="16">
      <input type="button" value="用户等级" name="b3" <%If howturn = "grade" Then%>style="border: 2px inset #D4D0C8"<%Else%> onclick="location.href='findotherok.asp?turn=grade&sql=<%=sqlword%>&findk=<%=findk%>';"<%End If%> style="width: 100%; height: 18; font-size: 9pt"></td>
      <td width="15%" height="16">
      <input type="button" value="详细资料" name="b7" onclick="alert('不能以此作为排序依据。');" style="width: 100%; height: 18; font-size: 9pt"></td>
    </tr>
	<%
	For i = 1 To Rs.PageSize
    If Not Rs.Eof Then
    %>
    <tr>
      <td width="10%" height="16"><%=(nowpage - 1) * Rs.PageSize + i%></td>
      <td width="20%" height="16">
	<%
		Response.Write tuser
		If gradeinfo(info(1),24) = True Then Response.Write "<a href=javascript:man1('" & tuser & "')>(改)</a>"
	%>
      </td>
      <td width="14%" height="16"><%=tvalue%></td>
      <td width="14%" height="16"><%=tmonthv%></td>
      <td width="14%" height="16"><%=ttimes%></td>
      <td width="14%" height="16">
	<%
		Response.Write tgrade
		If gradeinfo(info(1),17) = True Or gradeinfo(info(1),19) = True Or gradeinfo(info(1),21) = True Then Response.Write "<a href=javascript:man2('" & tuser & "')>(改)</a>"
	%>
      </td>
      <td width="14%" height="16">
	<%
		If gradeinfo(info(1),24) = True Then
			Response.Write "<a href=javascript:openwin('" & tuser & "');>查</a>/<a href=javascript:man3('" & tuser & "')>改</a>"
		Else
			Response.Write "<a href=javascript:openwin('" & tuser & "');>查看</a>"
		End If
	%>
      </td>
    </tr>
    <%
		Rs.MoveNext
	Else
    %>
    <tr>
      <td width="10%" height="16"></td>
      <td width="20%" height="16"></td>
      <td width="14%" height="16"></td>
      <td width="14%" height="16"></td>
      <td width="14%" height="16"></td>
      <td width="14%" height="16"></td>
      <td width="14%" height="16"></td>
    </tr>
	<%
	End If
    Next
    %>
    </table>
      </td>
    </tr>
    <tr>
      <td width="61%">共<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="findotherok.asp?turn=<%=howturn%>&page=<%=i%>&sql=<%=sqlword%>&findk=<%=findk%>" <%If nowpage = i Then%>selected<%End If%>><%=i%></option>
      <%Next%>
      </select>页</td>
      <td width="39%" align="right"><%If nowpage = 1 Or Rs.RecordCount = 0 Then%><font color="#808080">首页 上页</font> <%Else%><a href="findotherok.asp?turn=<%=howturn%>&page=1&sql=<%=sqlword%>&findk=<%=findk%>">首页</a> <a href="findotherok.asp?turn=<%=howturn%>&page=<%=nowpage-1%>&sql=<%=sqlword%>&findk=<%=findk%>">上页</a><%End If
      If nowpage = howpage Then%>
      <font color="#808080">下页 末页</font><%Else%><a href="findotherok.asp?turn=<%=howturn%>&page=<%=nowpage+1%>&sql=<%=sqlword%>&findk=<%=findk%>">下页</a> <a href="findotherok.asp?turn=<%=howturn%>&page=<%=howpage%>&sql=<%=sqlword%>&findk=<%=findk%>">末页</a><%End If%></td>
    </tr>
  </table>
  </fieldset><div align="center">
    <input type="button" value="  重 查  " name="B3" style="border-style:outset; border-width:1; width: 76; height: 22; font-size:9pt" onclick=javascript:location.href="findother.asp">
    <input type="button" value="  关 闭  " name="B3" style="border-style:outset; border-width:1; width: 76; height: 22; font-size:9pt" onclick="javascript:window.close();"></div>
  <div 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></div>
</body>
</html>
<%
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
%>

⌨️ 快捷键说明

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