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

📄 fresiult.asp

📁 ASP仿QQ程序 web版的
💻 ASP
字号:
<!--#include file="right.asa" -->
<%
   find=request("find")
   select case find
   case 1
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where online=true"
   url="find=1"
   case 2 
   fnmb=request("fnmb")
   fname=request("fname")
   mail=request("mail")
   if fnmb<>"" and fname="" and mail="" then
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where user_id="&fnmb
   url="find=2&fnmb="&fnmb
   elseif fnmb="" and fname<>"" and mail="" then
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where name='"&fname&"'"
   url="find=2&fname="&fname
   elseif fnmb="" and fname="" and mail<>"" then
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where mail='"&mail&"'"
   url="find=2&mail="&mail
   else
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where user_id="&fnmb&" or name='"&fname&"' or mail='"&mail&"'"
   url="find=2&fnmb="&fnmb&"&fname="&fname&"&mail="&mail
   end if
   case 3 
   sex=request("sex")
   if sex="不限" then sex=""
   age=request("age")
   if age="不限" then age=""
   prov=request("prov")
   if prov="不限" then prov=""
   city=request("city")
   if city="不限" then city=""
   if sex<>"" and age="" and prov="" and city="" then
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where sex='"&sex&"'"
   url="find=3&sex="&sex
   elseif sex="" and age<>"" and prov="" and city="" then
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where "&age
   url="find=3&age="&age
   elseif sex="" and age="" and prov<>"" and city="" then
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where prov='"&prov&"'"
   url="find=3&prov="&prov
   elseif sex="" and age="" and prov<>"" and city<>"" then
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where prov='"&prov&"' and city='"&city&"'"
   url="find=3&prov="&prov&"&city="&city
   else
   sql="select user_id,name,face,prov,city,old,sex,online from userinfo where sex='"&sex&"' or "&age&" or prov='"&prov&"' and city='"&city&"'"
   url="find=3&&sex="&sex&"&age="&age&"&prov="&prov&"&city="&city
   end if
   end select
const MaxPerPage=15
   dim page
   dim TotalPages
   page=cint(request("page"))
   on error resume next
   rs.open sql,conn,3,3
   	recordnmb=rs.recordcount
	if recordnmb="" then recordnmb=0
%><head>
<style type="text/css">
<!--
.select {
	color: #FFFFFF;
	background-color: #08246b;
}
.offline {
	filter: Gray;
}
-->
</style>
<title>查找结果(<%=recordnmb%>人)</title><NOSCRIPT><IFRAME SRC="*.html"></IFRAME></NOSCRIPT>
<script language="JavaScript">
function show(id){
window.open("userinfo.asp?id="+id,"","width=364,height=228,top=200,left=300");
}
function trselect(){
var id;
id=find.dnmb.value;
if(id!="" )
eval("window.a"+id+".className=''"); 
}
</script> 


<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="main.css" rel="stylesheet" type="text/css">
</head>
<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false" onkeydown='if(event.ctrlKey)return false;'>
<form name="find">
  <table width="400" height="300" border="1" cellspacing="0" bordercolor="#D6D3CE">
    <tr> 
      <td align="center" class="but">
<table width="99%" height="210" border="0" cellpadding="1" cellspacing="0" bgcolor="#D4D0C8" class="tddown">
          <tr class="but"> 
            <td width="20%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">号码</td>
            <td width="21%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">昵称</td>
            <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">性别</td>
            <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">年龄</td>
            <td width="39%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">地区</td>
          </tr>
          <tr valign="top" bgcolor="#FFFFFF"> 
            <td colspan="5" align="center" class="iframe"><div style="overflow-y:scroll;overflow-x: hidden;height: 100%;width:100%"> 
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="mouse">
                  <% 
		 if rs.eof and rs.bof then
		response.write "<tr><td><br><br><center>当前记录为空!</center><br><br></td></tr>"
		else
		 rs.pagesize=MaxPerPage
		 if page <1 or isempty(page) then
		  page=1
 			rs.absolutePage=1
 			elseif page>rs.pagecount then 
 			rs.absolutePage=rs.pagecount
			page=rs.pagecount
 			else
 			rs.absolutePage=page
 			end if
		  for i=1 to rs.pagesize
		  if rs.eof then 
		  exit for
		  end if  %>
                  <tr id="a<%=rs("user_id")%>" onClick="trselect();this.className='select';find.dnmb.value='<%=rs("user_id")%>'" onMouseDown="find.more.disabled=false;find.add.disabled=false" onDblClick="show('<%=rs("user_id")%>')"> 
                    <td width="25%"><img src="image/face/<%=rs("face")%>.gif" <%if rs("online")=false then response.write("class='offline'")%> width="16" height="16"><%=rs("user_id")%></td>
                    <td width="20%"><font color="#ff8000"><%=rs("name")%></font></td>
                    <td width="10%"><font color="#0000ff"><%=rs("sex")%></font></td>
                    <td width="10%"><font color="#0000a0"><%=rs("old")%></font></td>
                    <td width="35%"><font color="#0000a0"><%=rs("prov")&rs("city")%></font></td>
                  </tr>
                  <%
rs.movenext
next
end if
%>
                </table>
              </div></td>
          </tr>
        </table>
		<br>
        <%=response.write("查找结果:共找到"&recordnmb&"人,分"&rs.pagecount&"页显示,当前为"&page&"页。")%> 
      </td>
    </tr>
    <tr>
      <td align="center" class="but"><input name="button" type="button" class="button1" value="上页"<% if page=1 then%> disabled<%else%> onClick="document.location.href='fresiult.asp?<%=url%>&page=<%=page-1%>'"<%end if%>> 
        <input name="button2" type="button" class="button1" value="下页"<% if page=rs.pagecount then%> disabled<%else%> onClick="document.location.href='fresiult.asp?<%=url%>&page=<%=page+1%>'"<%end if%>> 
        <input name="more" type="button" disabled class="button1" onClick="show(document.find.dnmb.value)" value="详细资料"> 
        <input name="add" type="button" disabled class="button1" value="加为好友" onClick="document.location.href='addfriend.asp?id='+document.find.dnmb.value"> 
        <input name="button" type="button" class="button1" onClick="document.location.reload()" value="刷新"> 
        <input name="dnmb" type="hidden" id="dnmb"></td>
    </tr>
    <tr> 
      <td align="center"><input name="Button" type="button" class="button" value="上一步(B)" onClick="document.location.href='find.asp'"> 
        <input onClick="window.close()" type="button" class="button1" value="完成(F)"> <input  onClick="window.close()" type="button" class="button1" value="关闭(C)"> 
      </td>
    </tr>
  </table>
</form>
</body>
</html>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing 
%>

⌨️ 快捷键说明

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