<!--#include file="../conn/conn.asp"-->
<!--#include file="../conn/nosql.asp"-->
<!--#include file="../conn/config.asp"-->
<!--#include file="../conn/page.asp"-->
<%if Not ChkPosturl then response.redirect ("login.asp")
if session("adminname")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if request("action")="uflag" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../index.asp")
end if
if id="" then 
response.write "<script language='javascript'>"
response.write "alert('非法操作！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if nosql(request("uflag"))=1 then
conn.execute("update [snsn_user] set uflag=1 where id="&id&"")
elseif nosql(request("uflag"))=2 then
conn.execute("update [snsn_user] set uflag=2 where id="&id&"")
elseif nosql(request("uflag"))=3 then
conn.execute("update [snsn_user] set uflag=3 where id="&id&"")
else
response.write "<script language='javascript'>"
response.write "alert('非法操作！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
response.write "<script language='javascript'>"
response.write "alert('操作成功，正在返回！');"
response.write"this.location.href='user.asp';</SCRIPT>"
response.end
end if
if request("action")="tj" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../index.asp")
end if
lx=nosql(request("lx"))
if lx="0" then
conn.execute("update [snsn_user] set tj=0 where id="&id&"")
elseif lx="1" then
conn.execute("update [snsn_user] set tj=1 where id="&id&"")
elseif lx="2" then
conn.execute("update [snsn_user] set tj=2 where id="&id&"")
end if
response.write "<script language='javascript'>"
response.write "alert('操作成功，正在返回！');"
response.write"this.location.href='user.asp';</SCRIPT>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../css.css" REL="stylesheet" TYPE="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="30%" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">用户管理</font></strong></td>
    <td width="70%" align="right">&nbsp;</td>
  </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="10"></td>
  </tr>
</table>

<TABLE width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" bgcolor="#BBD7FF" 退定文件夹中。\	???毎??style="border-collapse: collapse">
     <tr bgcolor="#e8f4ff">  <TD height="25">&nbsp;用户名</td>
       <TD width="120">&nbsp;主页状态</td>
	   <TD width="150">&nbsp;时间</td>
	   <TD width="150">&nbsp;邮箱</td>
	   <TD width="150">&nbsp;推荐</td>
       <TD width="50">&nbsp;删除</td>
       <%if request("action")="so" then
	   if nosql(request("txtitle"))<>"" then
txtitle=nosql(request("txtitle"))
else
Response.Redirect ("../index.asp")
end if
if isChkInteger(request("classid")) then
classid=request("classid")
else
Response.Redirect ("../index.asp")
end if
search=nosql(request("search"))
if search=1 then
sql="select * from snsn_user where homename like '%"&txtitle&"%'"
elseif search=2 then
sql="select * from snsn_user where username like '%"&txtitle&"%'"
elseif search=3 then
sql="select * from snsn_user where h_xxy like '%"&txtitle&"%'"
end if
if classid<>0 then
sql=sql&" and h_classid="&classid
end if
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1 

	   else
set rs=server.createobject("adodb.recordset") 
sql="select * from snsn_user  order by id desc"
rs.open sql,conn,1,1 
end if
if rs.eof or rs.bof then 
response.write "<p align='center'>对不起，没有您要查询的信息</p>" 
else
rs.PageSize =20 '每页记录条数
		iCount=rs.RecordCount '记录总数
		iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    	per_page=rs.PageSize
    
    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 x%> 
  <TR bgcolor="#FFFFFF" onMouseOver='JavaScript:this.style.backgroundColor="#FCFBF3"' onMouseOut='JavaScript:this.style.backgroundColor=""' height="20">
    <TD height="22"><span class="tmpstr1">&nbsp;</span><a href="user_s.asp?id=<%=rs("id")%>"><%=rs("username")%></a>
        <%if rs("idate")>=date()-1 then%>
        <span class="tmpstr1"><img src="/img/new.gif" width="30" height="10"></span>
    <%end if%></td>
    <TD bgcolor="#FFFFFF">&nbsp;<span class="style1"><%=rs("uflag")%></span>,<a href="?action=uflag&id=<%=rs("id")%>&uflag=1">1</a> <a href="?action=uflag&id=<%=rs("id")%>&uflag=2">2</a> <a href="?action=uflag&id=<%=rs("id")%>&uflag=3">3</a> <a href="javascript:;" onClick="window.open('/web/<%=rs("url")%>/index.asp?web_id=<%=rs("id")%>','cheng','scrollbars=no,resizable=no,width=920,height=565,menubar=no,top=10,left=10')" class=over>浏览</a></td>
    <TD>&nbsp;<%=rs("idate")%></td>
    <TD>&nbsp;<%=rs("email")%></td>
    <TD>&nbsp;
      <%if rs("tj")<>0 then%>
      <a href="?action=tj&lx=0&id=<%=rs("id")%>">无</a>
      <%end if%> <%if rs("tj")<>1 then%>
      <a href="?action=tj&lx=1&id=<%=rs("id")%>">本周之星</a>
      <%end if%> <%if rs("tj")<>2 then%>
      <a href="?action=tj&lx=2&id=<%=rs("id")%>">今日会员</a>
    <%end if%></td>
    <TD>&nbsp;<a href="user_del.asp?id=<%=rs("id")%>">删除</a></td>
  </TR>
<%RS.MoveNext
                  next
			      end if%>
</TABLE>
<TABLE width="90%" 
        border=0 align="center" cellPadding=4 cellSpacing=0>
  <TBODY>
    <TR>
      <TD class=M noWrap align=middle><%
					call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)
				  %></TD>
    </TR>
  </TBODY>
</TABLE>

<table border="0" align="center" cellpadding="0" cellspacing="0">
  <FORM action="?action=so" name=search_form onsubmit="javascript:if(doSearch()==false) return false;" method=post>
    <SCRIPT language=javascript>
//--检测登陆-->

	   function doSearch() {

	      var txtitle = trim(document.search_form.txtitle.value);

          if(txtitle == "") {
		    alert("请输入搜索关键字！");
			document.search_form.txtitle.focus();
		    return false;
		  } 
		 }

//-->
</SCRIPT><tr>
     
      <td width="60" align="center">搜索</td>
      <td>&nbsp;
          <input name=txtitle size=25 class="wenbenkuang"></td>
      <td>&nbsp;
          <select style="font-size: 9pt" name="search">
            <option value="1" selected>主页名称</option>
            <option value="2">站长名称</option>
            <option value="3">主页说明</option>
        </select></td>
      <td>&nbsp;
          <%Set rs1 = Server.CreateObject("ADODB.Recordset")

        rs1.open "select * from snsn_home_class order by id",conn,1,1
	if rs1.eof and rs1.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
          <select name="classid" size="1" id="classid"  class="wenbenkuang">
            <option selected value="0">所有分类</option>
            <option  value="<%=rs1("id")%>"><%=trim(rs1("h_class"))%></option>
            <% 
        rs1.movenext
        do while not rs1.eof
%>
            <option value="<%=rs1("id")%>"><%=trim(rs1("h_class"))%></option>
            <%
        rs1.movenext
        loop
	end if
        rs1.close
%>
        </select></td>
      <td width="60"><div align="center">
        <input name="Submit" type="submit" class="go-wenbenkuang" value="提交">
</div></td>
    </tr>
  </form>
</table>
</body>
</html>
