📄 search.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="function/userview.asp"-->
<!--#include file="function/messagecount.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--#include file="inc/css.asp"-->
<title><%=WebSiteName%></title>
</head>
<body topmargin="0" background="images/bg.gif">
<!--#include file="top.asp"-->
<div align="center">
<center>
<table border="0" width="755" cellspacing="0" cellpadding="0">
<tr>
<td width="189" style="background-color: #FFFFFF; border-left: 1 solid #000000; border-top: 1 solid #000000; border-bottom: 1 solid #000000" valign="top">
<!--#include file="left.asp"-->
</td>
<td width="562" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<!--#include file="navigation.asp"-->
<tr>
<td width="66%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="66%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
<tr>
<td width="100%">
<div align="center">
<center>
<table border="0" width="95%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000">
<form action="search.asp" method="post">
<tr>
<td width="100%" background="images/bg2.gif" height="22" colspan="4"><img border="0" src="images/find.gif"></td>
</tr>
</center>
<tr>
<td width="22%" valign="bottom">
<p align="right" style="margin-top: 3">真实姓名:</p>
</td>
<td width="26%">
<p style="margin-top: 3" align="left"><input type=text name="Name" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
<td width="22%" valign="bottom">
<p style="margin-top: 3" align="right">网络昵称:</p>
</td>
<td width="38%">
<p style="margin-top: 3" align="left"><input type=text name="NickName" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
</tr>
<tr>
<td width="22%" valign="bottom">
<p align="right">OICQ号码:</td>
<td width="19%">
<p align="left"><input type=text name="OICQ" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
<td width="22%" valign="bottom">
<p align="right">邮件地址:</td>
<td width="33%">
<p align="left"><input type=text name="Email" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 85; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
</tr>
<center>
<tr>
<td width="100%" colspan="4">
<p style="margin-left: -1; margin-top: 2; margin-bottom: 3">
<font color="#FF0000">(可按多个条件同时搜索校友信息)</font>
<INPUT type=submit value=' 搜 索 ' name=Submit style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 85; border: 1px groove #000000; background-position: 0% 50%">
</td>
</tr>
</form>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="100%" height="10"></td>
</tr>
<%
SearchName=Trim(Request.Form("Name"))
SearchNickName=Trim(Request.Form("NickName"))
SearchOICQ=Trim(Request.Form("OICQ"))
SearchEmail=Trim(Request.Form("Email"))
SearchSpace=False
IF SearchName="" And SearchNickName="" And SearchOICQ="" And SearchEmail="" Then
SearchChar="False"
End IF
SQL="Select ID,姓名,性别,注册日期,OICQ,昵称,电子邮件,专业,班别 From 注册信息 WHERE "
IF SearchName<>"" Then
SQL=SQL & "姓名 LIKE '%"& SearchName & "%'"
SearchSpace=True
End IF
IF SearchOICQ<>"" Then
IF SearchSpace=True Then
SQL=SQL & "Or OICQ LIKE '%"& SearchOICQ & "%'"
Else
SQL=SQL & "OICQ LIKE '%"& SearchOICQ & "%'"
End IF
End IF
IF SearchEmail<>"" Then
IF SearchSpace=True Then
SQL=SQL & "Or 电子邮件 LIKE '%"& SearchEmail & "%'"
Else
SQL=SQL & "电子邮件 LIKE '%"& SearchEmail & "%'"
End IF
End IF
IF SearchNickName<>"" Then
IF SearchSpace=True Then
SQL=SQL & "Or 昵称 LIKE '%"& SearchNickName & "%'"
Else
SQL=SQL & "昵称 LIKE '%"& SearchNickName & "%'"
End IF
End IF
IF SearchChar="False" Then
SQL=SQL & "1=1"
End IF
Set SearchRS=Server.CreateObject("ADODB.Recordset")
SearchRS.Open SQL,Conn,1,1
%>
<tr>
<td width="100%">
<p style="margin-left: 10; margin-top: 10; margin-bottom: 10">搜索结果如下:</td>
</tr>
<tr>
<td width="100%">
<hr width="90%" color="#EDEDED">
</td>
</tr>
<%If Not SearchRS.EOF And SearchChar<>"False" Then%>
<%Do While Not SearchRS.EOF%>
<tr>
<td width="100%" height="22">
<p style="margin-left: 20"><a href="userinfo.asp?id=<%=SearchRS("ID")%>"><%=SearchRS("姓名")%></a>
<%=CheckSex(SearchRS("性别"))%><img border="0" src="<%=CheckSexImg(SearchRS("性别"))%>" width="20" height="14">
<%=ViewPro (SearchRS("专业"))%>专业
<%
ClassID=Cint(SearchRS("班别"))'Request.QueryString("ID")
IF ClassID <> 0 Then
SQL="SELECT * FROM 班级设置 WHERE ID=" & Cint(ClassID)
Set ClassRS=Server.CreateObject("ADODB.Recordset")
ClassRS.Open SQL,Conn,1
IF Not ClassRS.EOF Then
ClassNameS=ClassRS("班级名称") & "班"
ClassIDS=ClassRS("ID")
End IF
Else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -