<!--#include file="../include/conn.asp"-->
<!--#include file="../include/page.asp" -->
<!--#include file="seeion.asp" -->
<%

if request("deluser")="one_yes" then
set rs=server.createobject("adodb.recordset")
id=Request.QueryString("id")
sql="select * from bookuser where id="&id
rs.open sql,conn,1,3
rs.delete
rs.update
Response.Write "<script>alert('删除成功！');window.location.href='userlist.asp';</script>"
end if 

if Request.QueryString("deluser")="checkbox" Then
Dim ids,sql,caozuo
ids=request.Form("id")
caozuo=request.Form("caozuo")
if ids="" then
Response.Write "<script>alert('错误!请选择要操作的记录!');window.location.href='userlist.asp';</script>" 
response.end()
end If
if caozuo="" then
Response.Write "<script>alert('错误!请选择操作类型!');window.location.href='userlist.asp';</script>" 
response.end
end If
Select Case Trim(caozuo)
Case "1"
sql="update bookuser set user_isshow=1 where id in ("&ids&")" 
conn.execute(sql) 
Case "2"
sql="update bookuser set user_isshow=0 where id in ("&ids&")" 
conn.execute(sql)
Case "3"
sql="delete from [bookuser] where id in ("&ids&")"
conn.Execute ( sql )
Case Else 
End select
conn.close
set conn=nothing
Response.Write "<script>alert('恭喜!操作成功!');window.location.href='userlist.asp';</script>" 
end if
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Angel工作室留言板系统V1.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="留言板系统V1.0" />
<meta name="description" content="留言板系统V1.0" />
<link type="text/css" href="css/css.css" rel="stylesheet"/>
<script type="text/javascript" src="../js/jquery-1.js"></script>
<script type="text/javascript" src="../js/js.js"></script>
<script language="javascript"> 
function CheckAll(){ 
 for (var i=0;i<eval(myform.elements.length);i++){ 
  var e=myform.elements[i]; 
  if (e.name!="allbox") e.checked=myform.allbox.checked; 
 } 
} 
</script> 
</head>
<body>
<div class="bodycontent">
<!--#include file="head.asp"-->

<div class="msg_content">
<div class="left_menu">
<div class="leftmenutext"><a href="../index.asp">前台首页</a> <a href="index.asp">后台首页</a></div>
<div class="leftmenutext_top">留言板管理</div>
<div class="leftmenulistnav">
<!--#include file="left_menu.asp"-->
</div>
</div>
<div class="right_messagelist">
<div class="leftmenutext">当前操作：注册会员管理</div>
<div class="admin_sitecontent">

<form name="myform" class="myform" method="post" action="?deluser=checkbox">
<div class="listtextth">			
<ul>
<li style="width:100px">用户ID</li>
<li style="width:100px">会员名</li>
<li style="width:30px">是否审核</li>
<li style="width:220px">注册日期</li>
<li style="width:100px">操作</li>
</ul>
</div>
<%	
set rs=server.createobject("adodb.recordset") 
exec="select * from bookuser order by id desc" 
rs.open exec,conn,1,1 
if rs.eof then
response.write ("<div class=""listtextth"">暂无注册会员!</div>")
else
rs.PageSize =30 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount 
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif  page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if	
%>
            <% 
for i=1 to rs.pagesize 
j=i 
if j mod 2=0 then 
bg="#F1F5F8" 
else 
bg="#FFFFFF" 
end if 
%> 
<div class="listtext">
<ul>
<li><input name="ID" type="checkbox" id="ID" value="<%=rs("id")%>" /><%=rs("id")%></li>

<li style="width:100px"><a href="user_modify.asp?id=<%=rs("id")%>" style="color:#003399"><%=rs("user_name")%></a></li>
<li style="width:30px">
<%if rs("user_isshow")=1 then
			  response.Write("已审核")
			  else
			  response.Write("<font color=#FF0000>未审核</font>")
			  end if%></li>
<li style="width:220px" title="<%=rs("user_addtime")%>"><%=rs("user_addtime")%></li>
<li style="width:100px"> 
<input type="button" name="Submit3" value="修改" onclick="window.location.href='user_modify.asp?id=<%=rs("id")%>' " class="btn"/>
<input type="button" name="Submit" value="删除" onclick="javascript:if(confirm('确定删除？删除后不可恢复!')){window.location.href='?id=<%=rs("id")%>&amp;deluser=one_yes';}else{history.go(0);}"  class="btn"/>
</li>
</ul>
</div>
<% 
rs.movenext 
if rs.eof then exit for 
next 
%>
<%
end if
%>

<div class="listtext">


<div style="padding-left:5px;">
<input type="checkbox" name="allbox" onclick="CheckAll()" />
</div>       
	
		<select name="caozuo">
          <option selected="selected" value="0">操作类型</option>
          <option value="1">激活会员</option>
          <option value="2">禁用会员</option>
          <option value="3">批量删除</option>
        </select>

<input type="submit" name="button" id="button" value="提交"  class="btn"/>
        </form>

</div>
	
		
<div class="page">
<div><% Call PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right >")%></div>
</div>

<%
rs.close
set rs=Nothing
conn.close
set conn=nothing
%>
</div>

</div>
 <!--#include file="foot.asp"-->
</div>
</body>
</html>










