<!--#include file="conn.asp"-->
<!--#include file="inc/cook2.asp"-->
<!--#include file="inc/dimflag.asp"-->
<!--#include file="inc/page.asp"-->
<!--#include file="top.asp"-->
<%
word=trim(request("word"))
if request("tid")="" then tid=0 else tid = int(Request("tid")) end if
canshu1="tid="&tid&""
canshu3="word="&word&"&"&canshu1&""
canshu2="page="&page&"&"&canshu3&""

select case action
case "del" 
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("delete from com_user where UserID="&id(i))
'conn.execute("delete from shopxp_action where UserID="&id(i))
next
response.Write "<script>location='?"&canshu1&"'</script>"


end select
%>
<div id="container">
<div class="top_but">
 <li class="left">&nbsp;</li>
 <li><img src="images/but_3.gif" alt="删除"  onclick="form1.action='?action=del&<%=canshu2%>'; ConfirmDel() "></li>
 <li><a href="?tid=<%=tid%>"><img src="images/but_7.gif" alt="全部" ></a></li>
 <li><img src="images/but_8.gif" alt="刷新" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" onClick="window.print() "/></li>
<form name="form_search" method="post" action="?<%=canshu1%>">
 <li class="right"><input name="word" type="text" id="word" class="s_b"><input type="image" name="Submit22" src="images/ss_b.gif" class="s_c" value="搜索" align="absmiddle"></li>
</form>
</div>

<%
set rs=server.CreateObject("adodb.recordset")
if word<>"" then
rs.open "select * from com_user com_news where username like'%"&trim(word)&"%' and niming="&tid&" order by adddate desc",conn,1,1
else
rs.open "select * from com_user where niming="&tid&" order by adddate desc",conn,1,1
end if
if rs.eof and rs.bof then                     
response.write conn_eof
else 
page1("20")
i=1	
%>
<%if word<>"" then%><div class="tablesearch">您搜索的关键字是：<font color=#ff6600><%=word%></font>，共搜索到 <%=rs.recordcount%> 条信息。 </div><%end if%>
<form name="form1" id="form1" method="post" action="?<%=canshu2%>">
<div class="tableAll titlebgcolor">
 <li style="width:30px"><input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form);" ></li>
 <li style="width:50px;">操作</li>
 <li style="width:200px;">会员帐号</li>
 <li style="width:80px;">登陆次数</li>
 <li style="width:150px;">注册时间</li>
</div>

<%
do while not rs.eof and i<=rs.pagesize
username=replace(rs("username"),word,"<font color=#ff6600>"&word&"</font>")
%>
<div class="tableAll trbgcolor">
 <li style="width:30px"><input type="checkbox" name="id"  value="<%=rs("userid")%>"></li>
 <li style="width:50px;"><%if tid=1 then%>编辑<%else%><a href=user_list.asp?id=<%=rs("userid")%>&<%=canshu2%>>编辑</a><%end if%></li>
 <li style="width:200px;"><%=username%></li>
 <li style="width:80px;"><%=rs("logins")%></li>
 <li style="width:150px;"><%=rs("adddate")%></li>
</div>
<%
i=i+1
rs.movenext
loop
%>

</form>

<div id="divStayTop" class="bottom titlebgcolor">
<%call page2(5,""&canshu3&"&")%>
</div>
<%
end if
rs.close
set rs=nothing
%>
	
</div>
<!--#include file="footer.asp"-->