📄 index.asp
字号:
<%@ Language=VBScript %>
<% option explicit%>
<!--#include file="adovbs.asp"-->
<!-- #include file="conn.asp" -->
<html><head>
<script language='javascript' SRC="tip.js"></script>
<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">
<style>
<!--
#tipBox {position: absolute;
width: 160px;
z-index: 100;
border: 1pt black solid;
font-family:宋体;
font-size: 9pt;
background: ffffdf;
visibility: hidden}
a:link {color:#000000;text-decoration: none}
a:visited {color:#000000;text-decoration: none}
a:active {color:#000000;text-decoration: none}
a:hover {color:red;text-decoration: none}
-->
</style>
<title>朋 友 列 表</title>
</head><body topmargin="0" leftmargin="0">
<div ID="tipBox" style="width: 142; height: 8"></div>
<div align="center"><center>
<table border="1" width="650" cellspacing="0" cellpadding="3" style="font-family: 宋体; font-size: 9pt; color: #000000" bordercolor="#988CD0">
<tr>
<td width="100%" colspan="6">
<p align="center"><font size="3">朋 友 列 表</font></p>
</td>
</tr>
<tr>
<td width="16%" bgcolor="#F8EBD1" align="center">⊙-朋友列表</td>
<td width="16%" bgcolor="#F8EBD1" align="center"><a href="add.asp">⊙-朋友加入</a></td>
<td width="16%" bgcolor="#F8EBD1" align="center"><a href="userre.asp">⊙-修改资料</a></td>
<td width="16%" bgcolor="#F8EBD1" align="center"><a href="sf.asp?Keys=Login">⊙-管理入口</a></td>
<td width="16%" bgcolor="#F8EBD1" align="center"><a href="admsearch.asp?keys=admsearch">⊙-高级搜索</a></td>
<td width="17%" bgcolor="#F8EBD1" align="center"><a href="http://www.bjzx.net/97jsj">⊙-97计算机</a></td>
</tr>
<tr>
<td width="16%" bgcolor="#988CD0"> </td>
<td width="16%" bgcolor="#988CD0"> </td>
<td width="16%" bgcolor="#988CD0"> </td>
<td width="16%" bgcolor="#988CD0"> </td>
<td width="16%" bgcolor="#988CD0"> </td>
<td width="17%" bgcolor="#988CD0"> </td>
</tr>
</table>
</center></div>
<%
'###################################
'--- Copyright lanmang (c) S.f. ---
'--- Http://Www.Guyee.Com ---
'index.asp?action=search
'带参数action=search为默认的列表显示
'###################################
dim list,strSQL
const MaxPage=5
dim CurrentPage
dim totalPut
dim TotalPages
dim i,j,action
dim Aff,m
Aff = Chr(34)
if request("action")="search" then
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
'----------------STart--
'Response.Write request("keyword") '反馈搜索数据
'----------------ENd----
select case request("kind")
case "name"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " name LIKE '%"&request("keyword")&"%'"
case "sex"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " sex LIKE '%"&request("keyword")&"%'"
case "age"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " age LIKE '%"&request("keyword")&"%'"
case "xingzuo"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " xingzuo LIKE '%"&request("keyword")&"%'"
case "icqnum"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " icqnum LIKE '%"&request("keyword")&"%'"
case "likes"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " likes LIKE '%"&request("keyword")&"%'"
case "liuyan"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " doc LIKE '%"&request("keyword")&"%'"
case "address"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " address LIKE '%"&request("keyword")&"%'"
case "mail"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " mail LIKE '%"&request("keyword")&"%'"
case "url"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " url LIKE '%"&request("keyword")&"%'"
case "mode"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " mode LIKE '%"&request("keyword")&"%'"
case "alls"
strSQL="SELECT * FROM List WHERE "
strSQL=strSQL & " name LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or sex LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or age LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or xingzuo LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or icqnum LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or likes LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or doc LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or address LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or mail LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or url LIKE '%"&request("keyword")&"%'"
strSQL=strSQL & " or mode LIKE '%"&request("keyword")&"%'"
case else
strSQL="SELECT * FROM List "
end select
If request.querystring("m")<>"" Then
Select case request.Querystring("m")
case "counter"
strSQL =strSQL & " Order by counter DESC"
m = "counter"
case "name"
strSQL =strSQL & " Order by name DESC"
m = "name"
case "sex"
strSQL =strSQL & " Order by sex DESC"
m = "sex"
case "age"
strSQL =strSQL & " Order by age DESC"
m = "age"
case "mode"
strSQL =strSQL & " Order by mode DESC"
m = "mode"
case "ip"
strSQL =strSQL & " Order by ip DESC"
m = "ip"
case "times"
strSQL =strSQL & " Order by times DESC"
m = "times"
End Select
Else
strSQL =strSQL & " Order by ID DESC"
m = ""
End if
'-------STart--
' Response.Write strSQL '<<@@@----------显示SQL语法是否正确!
'-------ENd----
set list=server.createobject("adodb.recordset")
list.open strSQL,conntmp,adOpenKeySet,adLockPessimistic
if list.eof and list.bof then
%>
<div align="center"><center>
<table border="1" width="650" cellspacing="0" cellpadding="3" bordercolor="#988CD0" bgcolor="#E0E0E0" style="font-family: 宋体; font-size: 9pt; color: #000000">
<tr><td width="100%">
<p align="center"><font color="#FF0000">
Sorry! 没有你想找的资料!</font></p>
</td></tr></table></center></div>
<%
searchForm
else
totalPut=list.recordcount
if currentPage=1 then
showContent
showpages
searchForm
else
if (currentPage-1)*MaxPage<totalPut then
list.move (currentPage-1)*MaxPage
dim bookmark
bookmark=list.bookmark
showContent
showpages
searchForm
else
currentPage=1
showContent
searchForm
end if
end if
list.close
end if
set list=nothing
else
searchForm
sub searchForm()%>
<form method=post action=index.asp name=searchform >
<div align="center"><center><table border="1" width="650" cellspacing="0" cellpadding="3" bordercolor="#988CD0" bgcolor="#E0E0E0" style="font-family: 宋体; font-size: 9pt; color: #000000">
<tr><td width="100%"><p align="center">
<select name="kind" style="font-family: 宋体; font-size: 9pt" size="1">
<option value="alls" selected>按字段搜索</option>
<option value="name">按姓名搜索</option>
<option value="sex">按性别搜索</option>
<option value="age">按年龄搜索</option>
<option value="xingzuo">按星座搜索</option>
<option value="icqnum">按ICQ 搜索</option>
<option value="likes">按电话搜索</option>
<option value="liuyan">按留言搜索</option>
<option value="address">按联系地址</option>
<option value="mail">按电子邮件</option>
<option value="url">按主页地址</option>
<option value="mode">按成员方式</option>
</select>
<input name="keyword" size="20" style="font-family: 宋体; font-size: 9pt">
<input name=action type=hidden value=search>
<input name="ok" style="font-family: 宋体; font-size: 9pt;BACKGROUND-COLOR: #e7e7de; PADDING-TOP: 1pt" type="submit"
value="<%
if request("action")="search" then
Response.Write "新搜索"
else
Response.Write "搜 索"
end if
%>">
</p></td></tr>
</table></center></div></form>
<%
end sub
end if
sub showcontent
dim cal
cal=1
%>
<div align="center"><center><table border="1" width="650" bgcolor="#E0E0E0" cellspacing="0" cellpadding="3" style="font-family: 宋体; font-size: 9pt; color: #000099" bordercolor="#988CD0">
<tr>
<td width="71" align="center"><a href="index.asp?action=search&m=name">姓名</a></td>
<td width="31" align="center"><a href="index.asp?action=search&m=sex">性别</a></td>
<td width="37" align="center"><a href="index.asp?action=search&m=age">年龄</a></td>
<td width="124" align="center"><a href="index.asp?action=search&m=mode">联系方法</a></td>
<td width="91" align="center"><a href="index.asp?action=search&m=ip">登记IP</a></td>
<td width="183" align="center"><a href="index.asp?action=search&m=times">登记时间</a></td>
<td width="57" align="center"><a href="index.asp?action=search&m=counter">浏览次数</a></td>
</tr>
<%do while not (list.eof or err)%>
<tr>
<form method=post action=lookuser.asp name=lookuser >
<input name=id type=hidden value=<%=list("id")%>>
<td width="71" align="center"><%'用户的名称和ID号码!%>
<a href=lookuser.asp?ID=<%=list("ID")%> onMouseOver="this._tip = '<%=list("name")%> <font color = blue><%=list("sex")%></font> <%=list("age")%>岁<br>生日:<%=list("years")%>年<%=list("mons")%>月<%=list("days")%>日<br>星座:<%=list("xingzuo")%><br><font color = 8080FF>更详细信息,请</font><font color=red>点击</font><font color = 8080FF>进入</font>'"><font class=pt9 color=#0000FF><%=list("name")%></font></a>
<%IF list("photo")<>"" Then%>
<img src =photo.gif onMouseOver="this._tip = '<font color=red>有照片呀!</font><font color=000000>大小:</font><font=blue>103582</font><font color=000000> byte<br>用56K modem下载需要</font><font color=red>20.72</font><font color=000000>秒</font>'">
<%End If%>
</td>
<td width="31" align="center"><%=list("sex") %></td>
<td width="37" align="center"><%=list("age") %></td>
<td width="124" align="center"><%=list("mode") %> <%If list("icq_img")<>"" and list("icqnum")<>"" Then%>
<% If List("icq_img")="icq.gif" Then%> <img src =icq.gif onMouseOver="this._tip = '<img src=oicq.gif><font color=blue> Icq: </font><font color=red><%=list("icqnum")%></font>'" width="17" height="18"><span><font class=pt9 color=#000000></font><%=list("icqnum")%></span>
<%Else%> <img src =oicq.gif onMouseOver="this._tip = '<img src=oicq.gif><font color=blue> Oicq: </font><font color=red><%=list("icqnum")%></font>'" width="19" height="19"><span><font class=pt9 color=#000000></font><%=list("icqnum")%></span>
<%End If
End If%> </td>
<td width="91" align="center"><%=list("ip") %></td>
<td width="183" align="center"><%=list("times") %></td>
<td width="57" align="center"><%=list("counter")%></td>
</tr>
<% i=i+1
if i>=MaxPage then exit do
list.movenext
loop
%>
</table></center></div></form>
<%end sub
sub showpages()
dim n
if (totalPut mod MaxPage)=0 then
n= totalPut \ MaxPage
else
n= totalPut \ MaxPage + 1
end if
if n=1 then exit sub
%>
<div align="center"><center><table border="1" width="650" cellspacing="0" cellpadding="3" bordercolor="#988CD0" style="font-family: 宋体; font-size: 9pt; color: #000000">
<tr><td width="100%">共有<%=n%>页:
</center>
<% dim k
for k=1 to n
if k=currentPage then
response.write "<b>" & Cstr(k)+" </b>"
else
If m<>"" Then
response.write "<a href='index.asp?action=search&m="+m+"&kind="+request("kind")+"&keyword="+request("keyword")+"&page="+cstr(k)+"'>"+Cstr(k)+"</a> "
Else
response.write "<a href='index.asp?action=search&kind="+request("kind")+"&keyword="+request("keyword")+"&page="+cstr(k)+"'>"+Cstr(k)+"</a> "
End if
end if
next%>
</td></tr>
<tr>
<td width="100%">
<p align="right">当前为第<%=currentPage%>页</p>
</td>
</tr>
<%end sub%>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -