<!--#Include File=Conn.asp-->
<%
Name=request.form("Name")
SqlStr="select * from userlist where 1=1 "
if Name<>""then
SqlStr=SqlStr & "AND 姓名 LIKE '%"& Name &"%'"
end if
SqlStr=SqlStr & "Order by Id"
Set Rs=conn.Execute(SqlStr)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>通讯录列表---软件B班杨小斌</title>
</head>
<body>
<center>
<p align ="center"></center><b>通讯录名单</b>
<table border="1" borderColorDark="#ffffff" borderColorLight="#848284" cellSpacing="0" width="100%" vAlign="top">
<tbody>
<tr>
<td align="middle" width="12%" bgcolor="#D6D3CE">姓名</td>
<td align="middle" width="12%" bgcolor="#D6D3CE">性别</td>
<td align="middle" width="12%" bgcolor="#D6D3CE">出生日期</td>
<td align="middle" width="12%" bgcolor="#D6D3CE">电话</td>
<td align="middle" width="12%" bgcolor="#D6D3CE">地址</td>
<td align="middle" width="12%" bgcolor="#D6D3CE">Email</td>
<td align="middle" width="12%" bgcolor="#D6D3CE">修改</td>
<td align="middle" width="12%" bgcolor="#D6D3CE">删除</td>
</tr>
<%do while not rs.eof %>
<tr>
<td align="middle" bgColor="#ffffff" width="12%">
<a href="modify.asp?id=<%=rs("ID")%>"title="修改"><%=rs("姓名")%></a>
</td>
<td align="middle" bgColor="#ffffff" width ="12%"><%=rs("性别")%></td>
<td align="middle" bgColor="#ffffff" width ="12%"><%=rs("出生日期")%></td>
<td align="middle" bgColor="#ffffff" width ="12%"><%=rs("电话")%></td>
<td align="middle" bgColor="#ffffff" width ="12%"><%=rs("地址")%></td>
<td align="middle" bgColor="#ffffff" width ="13%"><%=rs("Email")%></td>
<td align="middle" bgColor="#ffffff" width ="13%">
<a href="modify.asp?id=<%=rs("ID")%>">修改</a>
</td>
<td ailgn="middle"bgColor="#ffffff" width="13%">
<a href="delete.asp?id=<%=rs("ID")%>">删除</a>
</td>
</tr>
<%
rs.movenext
loop
%>
<%
rs.close
set rs=nothing
%>
</tbody>
</table>
<div>
<center><input name="bt1" onclick="document.location.href='write.asp';"style="cursor:hand;"type="button"value="添加通讯名单">
<input name="bt2"onclick="document.location.href='show.asp';"style="cursor:hand;"type="button"value="显示所有名单"></center>
</div><BR>
<%if page=1 and not page=pagecount then%>
<div align="center">第<%=page%>页
<%for i=1 to pagecount%>
<a href="Show.asp?page=<%=i%>"><%=i%></a>
<%next%>
<a href="Show.asp?page=<%=page+1%>">下一页</a> </div>
<%elseif page=pagecount and not page=1 then%>
<div align="center">第<%=page%>页
<%for i=1 to pagecount%>
<a href="Show.asp?page=<%=i%>"><%=i%></a>
<%next%>
<a href="Show.asp?page=<%=page-1%>">上一页</a> </div>
<%elseif page<1 then%>
<div class="font" align="center"><font color=red>没有任何记录!</font></div>
<%elseif page>pagecount then%>
<div class="font" align="center"><font color=red>没有任何记录!</font></div>
<%elseif page=1 and page=pagecount then%>
<%else%>
<div align="center">第<%=page%>页
<%for i=1 to pagecount%>
<a href="Show.asp?page=<%=i%>"><%=i%></a>
<%next%>
<a href="Show.asp?page=<%=page-1%>">上一页</a> <a href="Show.asp?page=<%=page+1%>">下一页</a> </div>
<% End if %>
<!--以下是查询表单-->
<form method="post" action="show.asp">
<p>按[姓名]模糊查询:
<input type="text" name="Name"size="20">
<input type="submit" value="查询" name="B1">
<input type="reset" value="清除" name="B2"></p>
</form>
</body>
</html>