<!--#include file="Access.asp"  -->
<!-- #include file="inc/functions.asp" -->
<!-- #include file="page_next.asp" -->

<% '搜索模块
act=request.querystring("act")
keywords=trim(request.form("keywords"))

if act="search" then
if keywords<>"" then
s_sql="select * from web_register  where [username] like '%"&keywords&"%' and admin_yes<>1 order by id desc"
else
s_sql="select * from web_register where admin_yes<>1 order by id desc"
end if
else
s_sql="select * from web_register where admin_yes<>1 order by id desc"
end if

%>

<script language="JavaScript">
<!--
function ask(msg) {
	if( msg=='' ) {
		msg='警告：删除后将不可恢复，可能造成意想不到后果？';
	}
	if (confirm(msg)) {
		return true;
	} else {
		return false;
	}
}
//-->
</script>
	<%
Call header()
%>

	<table cellpadding='3' cellspacing='1' border='0' class='tableBorder' align=center>
	<tr>
	  <th width="100%" height=25 class='tableHeaderText'>注册用户管理</th>
	
	<tr><td height="400" valign="top"  class='forumRow'><table width="95%" border="0" align="center" cellpadding="0" cellspacing="2">
          <tr>
            <td width="5%" height="30" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">编号</div></td>
            <td width="8%" height="30" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">用户名</div></td>
            <td width="4%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">性别</div></td>
            <td width="8%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">出生日期</div></td>
            <td width="8%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">电话/手机</div></td>
            <td width="14%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">电子邮件</div></td>
            <td width="6%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">登录次数</div></td>
            <td width="16%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">最近登录时间</div></td>
             <td width="7%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">审核</div></td>
			 <td width="15%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">注册时间</div></td>
            <td width="9%" bgcolor="#A5C6FC"><div align="center" style="font-weight: bold">操作</div></td>
          </tr>
<% '文章列表模块
strFileName="reg_list.asp" 
pageno=10000
set rs = server.CreateObject("adodb.recordset")
rs.Open (s_sql),cn,1,1
rscount=rs.recordcount
if not rs.eof and not rs.bof then
call showsql(pageno)
rs.move(rsno)
for p_i=1 to loopno
%>
<% if p_i mod 2 =0 then
class_style="forumRow"
else
class_style="forumRowHighLight"
end if%>
          <tr >
            <td   height="30" class='<%=class_style%>'><div align="center"><%=rs("id")%></div></td>
            <td class='<%=class_style%>' ><div align="center"><a href="#"><%=rs("username")%></a></div></td>
            <td class='<%=class_style%>' ><div align="center"><%=rs("sex")%></div></td>
            <td class='<%=class_style%>' ><div align="center"><%=rs("birth")%></div></td>
            <td class='<%=class_style%>' ><div align="center"><%=rs("tel")%></div></td>
            <td class='<%=class_style%>' ><div align="center"><%=rs("email")%></div></td>
			<td class='<%=class_style%>' ><div align="center"><%=rs("login_times")%></div></td>
			<td class='<%=class_style%>' ><div align="center"><%=rs("login_time")%></div></td>
			<td class='<%=class_style%>' ><div align="center"><a href="reg_check_yes.asp?id=<%=rs("id")%>&page=<%=page%>&act=<%=act%>&keywords=<%=keywords%>"><%if rs("check_yes")=1 then%>已审核<%else%><span style="color: #FF0000">未审核</span><% end if%></a></div></td>
			<td class='<%=class_style%>' ><div align="center"><%=rs("time")%></div></td>
			<td class='<%=class_style%>' >
            <div align="center"><a href="reg_view.asp?id=<%=rs("id")%>&page=<%=page%>&act=<%=act%>&keywords=<%=keywords%>">查看</a> | <a href="javascript:if(ask('警告：删除后将不可恢复，可能造成意想不到后果？')) location.href='reg_del.asp?id=<%=rs("id")%>&page=<%=page%>&act=<%=act%>&keywords=<%=keywords%>';">删除</a></div>				</td>
          </tr>
		  		  <%
		  rs.movenext
		  next
		  else
response.write "<div align='center'><span style='color: #FF0000'>暂无用户！</span></div>"
		  end if 
		  rs.close
		  set rs=nothing
		  %>
		    <tr  >
              <td height="35"  colspan="13" ><div align="center">
                <%call showpage(strFileName,rscount,pageno,false,true,"")%>
           </div></td>
		    </tr>
      </table></td>
	</tr>
	</table>

<%
Call DbconnEnd()
 %>