<!--#include file="tgzcm_Conn.asp"-->
<!--#include file="tgzcm_Check.asp"-->
<!--#include file="../tgzcm.Cache/tgzcm.Admin.asp"-->
<!--#include file="../tgzcm.Cache/tgzcm.Html.asp"-->
<%
Dim action,class_id,class_bigid,server_id,shuxin_id,search_type,search_class,search_keyword,pagelink,order,startime,endtime, ListUrl,DataUrl
tgzcmPath = left(tgzcmpath,instrrev(tgzcmpath, "/")-1)'获取安装目录
tgzcmPath = left(tgzcmpath,instrrev(tgzcmpath, "/"))'获取安装目录
startime=Timer():sql="":S1="":S2="":S3=""
action=Trim(Request.QueryString("action"))
search_keyword=Trim(Request.QueryString("search_keyword"))'搜索关键字
page=PE_CLng(Request.QueryString("page")):If page<=0 or page="" Then page=1'初始化分页参数
Sub News_sql'作用：处理SQL查询语句   
    If action="search" Then
		 If tgzcm(4)="SQL" Then
		 sql="and uname like '%"&search_keyword&"%'"
		 Else'启用InStr,LCase函数过滤小日本
		 sql="and InStr(1,LCase(uname),LCase('"&search_keyword&"'),0)<>0"
		 End If
		 pagelink="tgzcm_user.asp?Action=search&search_type="&search_type&"&search_keyword="&search_keyword&"&" '分页路径
	Else
	    sql=""
	    pagelink="tgzcm_user.asp"'分页路径 
	End If
	sql = "Select * from tgzcm_user where uid>0 "&sql&" order by utime desc"
End Sub

Sub uservip()'验证会员收费信息
   if formatdatetime(rs("uvip"),2)=formatdatetime(rs("utime"),2) then
    Response.Write("非付费会员")
   Else
    Response.Write "付费到期："&formatdatetime(rs("uvip"),2)
   End if		
End Sub
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<TITLE>会员管理页面</TITLE>
<link href="skins/css/tgzcm_main.css" rel="stylesheet" type="text/css" />
<script language = "javaScript" src = "tgzcm_All.js" type="text/javascript"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<th colspan=9 style="text-align:center;"><table width="100%" border="0">
    <tr>
      <td><table width="611" border="0" align="left" cellpadding="0" cellspacing="0">
        <tr>
          <form method="get" action="tgzcm_user.asp">
            <input type="hidden" name="action" value="search">
            <td width="71" style="color: #990000; text-align:right;">会员搜索：</td>
            <td width="458"><input name="search_keyword" type="text" style="width:450px; text-align:left" onFocus="if(this.value=='关键字')this.value='';" value="用户名"></td>
            <td width="82"><input type="submit" name="Submit" value="提交搜索" /></td>
          </form>
        </tr>
      </table></td>
      </tr>
  </table>
<!-- --></th>
</tr>
<tr style="text-align:center;">
<td width="32" class="td2">选中</td>
<td width="37" class="td2">ID</td>
<td width="211" class="td2">用户名称</td>
<td width="139" class="td2">QQ号</td>
<td width="87"  class="td2">会员状态</td>
<td width="87"  class="td2">会员积分</td>
<td width="188"  class="td2">注册IP</td>
<td width="103"  class="td2">注册时间</td>
<td width="91" class="td2">常规操作</td>
</tr>
<form name='myform' method='Post' action=''>
<%
Set rs = Server.CreateObject("adodb.recordset")
Call News_sql
rs.Open sql, Conn, 1, 1
If not(rs.bof And rs.eof) Then
	rs.pagesize=tgzcmId(9)'每页数据
	rs.AbsolutePage=page
	m=rs.recordcount     '总记录
	n=rs.PageCount       '总页数
	z=rs.pagesize        '每页数量
	i=0
	Do While Not rs.eof and i<rs.pagesize
	i=i+1
%>
<tr bgcolor="#FFFFFF" onMouseOver="javascript:this.bgColor='#E3E1D7'" onMouseOut="javascript:this.bgColor='#FFFFFF'" style="text-align:center;">
  <td >
  <input name='allid' type='checkbox' value='<%=rs("uid")%>' style="border:none">  </td>
  <td ><%=rs("uid")%></td>
  <td style="text-align:left;"><a href="#" onClick="ops('tgzcm_user_info.asp?uid=<%=rs("uid")%>&action=userinfo','330','500');"><%=left(rs("uname"),50)%></a></td>
  <td ><%=Trim(rs("uqq"))%></td>
  <td ><% Call uservip()%></td>
  <td ><%=Clng(rs("ujf"))%></td>
  <td ><%=Trim(rs("uip"))%></td>
  <td ><%=formatdatetime(rs("utime"),2)%></td>
  <td ><A onClick="window.open ('tgzcm_user_info.asp?uid=<%=rs("uid")%>&action=usernext','go', 'height=330, width=500, top=218, left=263, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')" href="#">下线</A> <a href="tgzcm_User_save.asp?action=del&id=<%=rs("uid")%>" onClick="return confirm('删除后将不能恢复,确定要删除吗?');">删除</a></td>
  </tr>
<%
	rs.movenext  
	loop 
%>
<tr >

  <td colspan="9" class="td2" style="text-align:left; height:30px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this.form)' value='checkbox' style="border:none">
      全选
        <input name='submit1' type='submit' value='批量删除' onClick="document.myform.action='tgzcm_user_save.asp?action=del';">&nbsp;</td>
    </tr>
</table></td>
  </tr>
</form> 
<tr> 
<th colspan=9 style="text-align:center; padding:5px;"><%=ShowPage(pagelink&news,m, z, page, True, True, "条", False)%></th>
</tr>
</table>
<%
Else
    Call tgzcm_err_c("暂无数据！")
End If
rs.Close
Set rs=nothing
endtime=timer()
%>

</body>
</html>