📄 searchout.asp
字号:
<%Option Explicit%>
<!--#include file="conn.asp"--><%
dim rs_lar
dim c_age,c_name,c_sex,c_netname,c_home,c_education,c_job,c_netcall,c_tel,c_book,c_music,c_sport,c_interest,c_character,c_photo
dim age1,age2,name,sex,netname,home,education,job,netcall,tel,sport,book,music,interest,character,photo
dim sql,str,hrefdate
dim pages,records,currentpage,linenumber,line,p
c_age=request("c_age")
c_name=request("c_name")
c_sex=request("c_sex")
c_netname=request("c_netname")
c_home =request("c_home")
c_education=request("c_education")
c_job=request("c_job")
c_netcall=request("c_netcall")
c_tel=request("c_tel")
c_sport=request("c_sport")
c_book=request("c_book")
c_music=request("c_music")
c_sport=request("c_sport")
c_interest=request("c_interest")
c_character=request("c_character")
c_photo=request("c_photo")
age1=request("age1")
age2=request("age2")
name=request("name")
sex=request("sex")
netname=request("netname")
home=request("home")
education=request("education")
job=request("job")
netcall=request("netcall")
tel=request("tel")
sport=request("sport")
book=request("book")
music=request("music")
sport=request("sport")
interest=request("interest")
character=request("character")
photo=request("photo")
Set rs_lar = Server.CreateObject("ADODB.Recordset")
hrefdate=""
sql="select * from larchives where cstr(lar_id) like '%'"
if c_age="ON" then
sql=sql & " and age>" & clng(age1) & " and age<" & clng(age2)
hrefdate=hrefdate & "&c_age=" & "ON" & "&age1=" & age1 & "age2=" & age2
end if
if c_name="ON" then
sql=sql & " and name like '" & name & "'"
hrefdate=hrefdate & "&c_age=" & "ON" & "&age1=" & age1 & "age2=" & age2
end if
if c_netname="ON" then
sql=sql & " and netname like '" & netname & "'"
hrefdate=hrefdate & "&c_netname=" & "ON" & "&netname=" & netname
end if
if c_sex="ON" then
sql=sql & " and sex like '" & sex & "'"
hrefdate=hrefdate & "&c_sex=" & "ON" & "&sex=" & sex
end if
if c_home="ON" then
sql=sql & " and home like '%" & home & "%'"
hrefdate=hrefdate & "&c_home=" & "ON" & "&home=" & home
end if
if c_education="ON" then
sql=sql & " and education like '" & education & "'"
hrefdate=hrefdate & "&c_education=" & "ON" & "&education=" & education
end if
if c_job="ON" then
sql=sql & " and job like '" & job & "'"
hrefdate=hrefdate & "&c_job=" & "ON" & "&job=" & job
end if
if c_netcall="ON" then
sql=sql & " and netcall like '%" & netcall & "%'"
hrefdate=hrefdate & "&c_netcall=" & "ON" & "&netcall=" & netcall
end if
if c_tel="ON" then
sql=sql & " and tel like '" & tel & "'"
hrefdate=hrefdate & "&c_tel=" & "ON" & "&tel=" & tel
end if
if c_sport="ON" then
sql=sql & " and sport like '%" & sport & "%'"
hrefdate=hrefdate & "&c_sport=" & "ON" & "&sport=" & sport
end if
if c_book="ON" then
sql=sql & " and book like '%" & book & "%'"
hrefdate=hrefdate & "&c_book=" & "ON" & "&book=" & book
end if
if c_music="ON" then
sql=sql & " and music like '%" & music & "%'"
hrefdate=hrefdate & "&c_music=" & "ON" & "&music=" & music
end if
if c_interest="ON" then
sql=sql & " and interest like '%" & interest & "%'"
hrefdate=hrefdate & "&c_interest=" & "ON" & "&interest=" & interest
end if
if c_character="ON" then
sql=sql & " and character like '%" & character & "%'"
hrefdate=hrefdate & "&c_character=" & "ON" & "&character=" & character
end if
if c_photo="ON" then
if photo="有" then sql=sql & " and photo>0" else sql=sql & " and photo=0"
hrefdate=hrefdate & "&c_photo=" & "ON" & "&photo=" & photo
end if
rs_lar.open sql,conn,3,2
if rs_lar.eof and rs_lar.bof then str="此交友系统还没有一个网友!"
'分页设置
if str="" then
rs_lar.PageSize=12
pages=rs_lar.pagecount
records=rs_lar.recordcount
currentpage=request("currentpage")
if currentpage="" or currentpage<1 then currentpage=1
currentpage=cint(currentpage)
if currentpage>pages then currentpage=pages
rs_lar.absolutepage=currentpage
else
currentpage=1
records=0
pages=1
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>搜索结果</title>
<style>
<!--
.x:link { color: white; text-decoration: none }
.x:visited { color: white; text-decoration: none }
.x:active { color: red; text-decoration: none }
.x:hover { color: red;text-decoration:nome}
tr { font-size: 9pt }
td { font-size: 9pt }
body { font-size: 9pt }
a:link { color: blue; text-decoration: none }
a:visited { color: blue; text-decoration: none }
a:active { color: red; text-decoration: none }
a:hover { color: red; text-decoration: none }
BODY {
SCROLLBAR-FACE-COLOR: #ee9999; SCROLLBAR-HIGHLIGHT-COLOR: #fef7f7; SCROLLBAR-SHADOW-COLOR: #fef7f7; SCROLLBAR-3DLIGHT-COLOR: #fef7f7; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-TRACK-COLOR: #fef7f7; SCROLLBAR-DARKSHADOW-COLOR: #fef7f7
}
.style1 {color: #FFFFFF}
-->
</style>
</head>
<body topmargin="0" bgcolor="#FFF4F4">
<!--#include file=top.asp -->
<table border="0" width="750">
<tr>
<td width="578" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<p align="left">
<font size="2"> 以下是符合您搜索条件的网友</font>
</p>
</td>
</tr>
<tr>
<td width="578">
<font size="2"><i>第<font color="red"><%=currentpage%></font>页 找到网友<font color="blue"><%=Records%></font>位 共<font color="blue"><%=Pages%></font>页</i></font>
</td>
</tr>
<tr>
<%if pages>1 then%>
<td width="578">
<font size="2"><i>转到页码:[
<%for p=1 to pages%>
<a <%if currentpage=p then%> style="color:red"<%end if%> href="searchout.asp?currentpage=<%=p%><%=hrefdate%>"><%=p%></a>
<%if p/30=0 then%>
<%end if%>
<%next%>
]</i></font>
</td>
<%end if%>
</tr>
</table>
<!------------------------------------------------------------------------------------------------------------------------->
<!------------------------------------------------------------------------------------------------------------------------->
<table border="0" width="750" cellspacing="0">
<tr bgcolor="#9966FF">
<td width="87" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">网名</font></td>
<td width="60" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF"><span class="style1">性别</span></td>
<td width="127" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF"><span class="style1">来自</span></td>
<td width="78" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><span class="style1"><font color="#FFFFFF">生日</span></td>
<td width="110" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF"><span class="style1">网络寻呼机</span></td>
<td width="90" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">登记IP</font></td>
<td width="81" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF">登记时间</font></td>
<td width="69" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><font color="#FFFFFF"><span class="style1">人气</span></td>
</tr>
<%linenumber=rs_lar.pagesize%>
<%do while (not rs_lar.eof) and (line<linenumber)%>
<tr>
<td width="87" align="center"><a href="read.asp?user_id=<%=rs_lar("user_id")%>" title="查看网友<%=rs_lar("netname")%>的祥细资料"><%=rs_lar("netname")%></a></td>
<td width="60" align="center"><%=rs_lar("sex")%></td>
<td width="127" align="center"><%=rs_lar("home")%></td>
<td width="78" align="center"><%=rs_lar("britherday")%></td>
<td width="110" align="center"><%=rs_lar("netcall")%></td>
<td width="90" align="center"><%=rs_lar("ip")%></td>
<td width="81" align="center"><%=rs_lar("date")%></td>
<td width="69" align="center"><%=rs_lar("renqi")%></td>
</tr>
<%rs_lar.movenext%>
<%line=line+1%>
<%loop%>
<%rs_lar.close%>
</table>
<!-------------------------------------分页导航--------------------------------------->
<table width="750">
<tr>
<td>
<font size="2">
<%if currentpage>1 then%>
<a href="searchout.asp?currentpage=<%=currentpage-1%>">[上一页]</a>
<%end if%>
<%if currentpage<pages then%>
<a href="searchout.asp?currentpage=<%=currentpage+1%>">[下一页]</a>
<%end if%>
<%if currentpage>1 then%>
<a href="searchout.asp?currentpage=1">[最首页]</a>
<%end if%>
<%if currentpage<pages then%>
<a href="searchout.asp?currentpage=<%=pages%>">[最末页]</a>
<%end if%>
</font>
</td>
</tr>
</table>
<!------------------------------------------------------------------------------------------------------------------------->
<div align="center">
<center>
<table border="0" width="750" cellspacing="0">
<tr>
<td width="100%" style="border-bottom-style: solid; border-bottom-width: 1">
<p align="center"> </td>
</tr>
<tr>
<td width="100%">
<p align="center"><a href="wjxy.asp">[再搜索]</a></td>
</tr>
</table>
</center>
</div>
</body>
<!--#include file=CopyRight.asp -->
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -