网站后台用户搜索代码怎么写啊?
[u][color=#006699]<!--#include file="conn.asp" --><%if session("islogin")="" then response.redirect("login.asp")%>
<%typee=request.querystring("type")%>
<%
randomize()
if typee="del" then
id=request.querystring("id")
cmd="delete from user where id="&cint(id)
conn.execute(cmd)
set conn = nothing
response.write "OK"
response.Write "<script language=javascript>alert('成功!!已经删除');document.location='user.asp?&type="&rnd()&"'</script>"
response.end
end if
%>[/color][/u]
[u][color=#006699]
<%
if typee="upvip" then
id=request.querystring("id")
cmd="update user set vip=true where id="&cint(id)
conn.execute(cmd)
set conn = nothing
response.write "ok"
response.Write "<script language=javascript>alert('成功!!已经升级为VIP');document.location='user.asp?&type="&rnd()&"'</script>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理</title>
<link href="1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.12white {
font-size: 12px;
color: #FFFFFF;
text-decoration: none;
font-weight: bold;
}
-->
</style>
</head>
<body bgcolor="31659C" leftmargin="0" topmargin="0">
<table width="100%" height="27" border="0" cellpadding="10" cellspacing="0">
<tr>
<td align=right><!--#include file="1inc_top.asp"-->
</td>
</tr>
</table>
<table width="100%" height="22" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="4292C6" class="toptd"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="400" class="middletdcolor" align=center><br>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="170" valign=top>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="image/all/menu_top.gif" width="159" height="17"></td>
</tr>
<tr>
<td background="image/all/menu_bg.gif" align=center><!--#include file="1inc_menu.asp"--></td>
</tr>
<tr>
<td><img src="image/all/menu_un.gif" width="159" height="20"></td>
</tr>
</table>
</td>
<td width="10"> </td>
<td valign=top><table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td> </td>
</tr>
<tr>
<td height="300" align=center valign=top>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>用户管理>>用户管理</td>
</tr>
</table>
<%set rs=server.createobject("adodb.recordset")
cmd="select * from user order by id desc"
rs.open cmd,conn,1,3
rs.pagesize=30
page=cint(request.querystring("page"))
if page="" then page=1
if page=0 or page < 1 then page=1
if page>rs.pagecount then page=rs.pagecount
if not rs.eof then rs.absolutepage=cint(page)
%>
<table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30"><strong>共有会员<%=rs.recordcount%>个,共有<%=rs.pagecount%>页,当前第<%=page%>页</strong></td>
</tr>
</table>
<table width="1000" border="0" cellpadding="1" cellspacing="1" bgcolor="#003399">
<tr>
<td width="47" height="30" align=center bgcolor="#0066CC" class="12white">账号</td>
<td width="59" align=center bgcolor="0066CC" class="12white">姓名</td>
<td width="61" align=center bgcolor="0066CC" class="12white">电话</td>
<td width="105" align=center bgcolor="0066CC" class="12white">Email</td>
<td width="54" align=center bgcolor="0066CC" class="12white">邮编</td>
<td width="317" align=center bgcolor="0066CC" class="12white">地址</td>
<td width="93" align=center bgcolor="0066CC" class="12white">注册时间</td>
<td width="45" align=center bgcolor="0066CC" class="12white">预存款</td>
<td width="28" align=center bgcolor="0066CC" class="12white">VIP</td>
<td width="160" align=center bgcolor="0066CC" class="12white"> </td>
</tr>
<%for i=1 to rs.pagesize%>
<%if rs.eof then exit for%>
<tr>
<td align=center bgcolor="#FFFFFF"><%=rs("name1")%></td>
<td align=center bgcolor="#FFFFCC"><%=rs("name2")%></td>
<td align=center bgcolor="#FFFFFF"><%=rs("tel")%></td>
<td align=center bgcolor="#FFFFCC"><%=rs("mail")%></td>
<td align=center bgcolor="#FFFFFF"><%=rs("zip")%></td>
<td align=center bgcolor="#FFFFCC"><%=rs("addr")%></td>
<td align=center bgcolor="#FFFFFF"><%=rs("reg_time")%></td>
<td align=center bgcolor="#FFFFCC"><%=rs("cash")%></td>
<td align=center bgcolor="#FFFFFF">
<%if rs("vip")=true then response.write "是" else response.write "否"%>
</td>
<td align=center bgcolor="#FFFFCC"><imgid")%>'}" src="image/all/delete.gif" width="33" height="20" border="0">
<%if rs("vip")=false then%>
<a href="?type=upvip&id=<%=rs("id")%>"><img src="image/all/upvip.gif" width="33" height="20" border="0"></a>
<%end if%>
<a href="user_addcash.asp?id=<%=rs("id")%>"><img src="image/all/bt-addcash.gif" width="50" height="20" border="0"></a>
</td>
</tr>
<%
rs.movenext
next%>
</table>
<br>
<table width="1018" height="40" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1018" align=center>
<%
for i=1 to rs.pagecount
if i<>page then
response.write "<a class=page href=?page="&i&">"&i&"</a> "
else
response.write "<b>"&i&"</b> "
end if
response.write "<span class=tag1>/</span> "
next
%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<br>
</td>
</tr>
</table>
<!--#include file="1inc_un.asp"-->
</body>
</html>
<%
set rs=nothing
set conn=nothing
%>
就没有网站后台用户搜索????????急。。。[/color][/u] 我汗
不就跟新闻搜索一样吗
顶,加油,楼主好贴
[size=2]顶,加油,楼主好贴,嘿嘿[/size] 自己写一个,应该跟新闻搜索没什么大的区别吧页:
[1]
