⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m_user.asp

📁 电子备课系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
						sDate = DateAdd ("d",-1*Abs(Keyword),Date())
						sDate = GetDateCode(sDate,0)
						sql = sql & " lastlogintime < '"&sDate& SqlGroup2 &"' ORDER BY userid DESC"
					End if
                    sGuide = sGuide & "“ <font color=red>" & Keyword & "</font> ”天内未登录的用户"
                    'New
                Case "email"
                    If is_sqldata = 1 Then
                        sql = "select  " & QryFields &"  from oblog_user where useremail like '%" & Keyword & "%' " & SqlGroup2 &" order by userID  desc"
                        sGuide = sGuide & "注册Email名中含有“ <font color=red>" & Keyword & "</font> ”的用户"
                    Else
                        sql = "select  " & QryFields &"  from oblog_user where useremail='" & Keyword & "' " & SqlGroup2 &" order by userID  desc"
                        sGuide = sGuide & "注册Email等于“ <font color=red>" & Keyword & "</font> ”的用户"
                    End If
                Case "regdate"
					sDate = keyword
                	Keyword=DeDateCode(keyword)
                	If Keyword<>"" Then
                        sql = "select  " & QryFields &"  from oblog_user where "
						If Is_Sqldata = 0 Then
							sql = sql & " datediff(" & G_Sql_d & ",adddate,'" & keyword & "')=0 " & SqlGroup2 &" Order By userid Desc "
						Else
							sql = sql & " adddate = '"&sDate&"' " & SqlGroup2&"  ORDER BY userid DESC "
						End if
                        sGuide = sGuide & "注册日期为“ <font color=red>" & Keyword & "</font> ”的用户"
              		End If
                Case "birthday"
					sDate = keyword
					Keyword=DeDateCode(keyword)
                	If Keyword<>"" Then
                        sql = "select  " & QryFields &"  from oblog_user where "
						If Is_Sqldata = 0 Then
							sql = sql & " datediff(" & G_Sql_d & ",birthday,'" & keyword & "')=0 " & SqlGroup2 &"  Order By userid Desc "
						Else
							sql = sql & " birthday = '"&sDate&"' " & SqlGroup2 &" ORDER BY userid DESC "
						End if
                        sGuide = sGuide & "生日为“ <font color=red>" & Keyword & "</font> ”的用户"
              		End If
                Case "regcity"
                	Dim aCity
					keyword=Replace (keyword,",",",")
                	If InStr(keyword,",")>0 Then
                		aCity=Split(keyword,",")
                		sql = "select  " & QryFields &"  from oblog_user where province='" & aCity(0)&"' And city='"& aCity(1)&"' " & SqlGroup2 &" order by userID  desc"
                        sGuide = sGuide & "所在地为“ <font color=red>" & Keyword & "</font> ”的用户"
                    End If
                End select
            End If
        Case Else
            sql = "select   " & QryFields &"  from oblog_user " & SqlGroup &" order by UserID desc"
            sGuide = sGuide & "最后注册的500个用户"
    End select

    If FoundErr = True Then Exit Sub
	If sql = "" Then Oblog.ShowMsg "格式不正确,请重试",""
'	OB_DEBUG sql,1
    If Not IsObject(Conn) Then link_database
    Set rs = Server.CreateObject("Adodb.RecordSet")
    rs.open sql, Conn, 1, 1
    If rs.EOF And rs.bof Then
        sGuide = sGuide & "(<font color=red>0</font>)"
        %>
        <div id="main_body">
		<ul class="main_top">
			<li class="main_top_left left"><%=sGuide%></li>
			<li class="main_top_right right"> </li>
		</ul>
		</div>
        <%
    Else
        G_P_AllRecords = rs.recordcount
        sGuide = sGuide & "(<font color=red>" & G_P_AllRecords & "</font>)"
        If G_P_This < 1 Then
            G_P_This = 1
        End If
        If (G_P_This - 1) * G_P_PerMax > G_P_AllRecords Then
            If (G_P_AllRecords Mod G_P_PerMax) = 0 Then
                G_P_This = G_P_AllRecords \ G_P_PerMax
            Else
                G_P_This = G_P_AllRecords \ G_P_PerMax + 1
            End If

        End If
        If G_P_This = 1 Then
            showContent
            Response.Write oblog.showpage(True, True, "个用户")
        Else
            If (G_P_This - 1) * G_P_PerMax < G_P_AllRecords Then
                rs.Move (G_P_This - 1) * G_P_PerMax
                Dim bookmark
                bookmark = rs.bookmark
                showContent
                Response.Write oblog.showpage(True, True, "个用户")
            Else
                G_P_This = 1
                showContent
                Response.Write oblog.showpage(True, True, "个用户")
            End If
        End If
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub showContent()
    Dim i
    i = 0
%>
<div id="main_body">
	<ul class="main_top">
		<li class="main_top_left left"><%=sGuide%></li>
		<li class="main_top_right right"> </li>
	</ul>
	<div class="main_content_rightbg">
		<div class="main_content_leftbg">
  <form name="myform" method="Post" action="m_user.asp" onsubmit="return confirm('确定要执行选定的操作吗?');">
<style type="text/css">
<!--
.border tr td {padding:3px 0!important;}
-->
</style>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" class="border">
  <tr class="title">
    <td align="center" width="28"><strong>选中</strong></td>
    <td align="center" width="44"><strong>ID</strong></td>
    <td align="center" width="58"><strong>用户头像</strong></td>
    <td align="center"><strong>用户名 用户组</strong></td>
<!--     <td align="center" width="58"><strong>邮箱认证</strong></td> -->
    <td align="center" width="100"><strong>注册时间 注册IP</strong></td>
    <td align="center" width="100"><strong>登录时间 登录IP</strong></td>
    <td align="center" width="58"><strong>登录数</strong></td>
    <td align="center" width="58"><strong>日志数</strong></td>
    <td align="center" width="70"><strong>审核 锁定</strong></td>
    <td align="center" width="100"><strong>操作</strong></td>
  </tr>
          <%do while not rs.EOF %>
  <tr class="title">
    <td align="center"><input name='UserID' type='checkbox' onclick="unselectall()" id="UserID" value='<%=cstr(rs("userID"))%>'></td>
    <td align="center" style="font-family:Century Gothic,verdana,tahoma,Arial,Helvetica,sans-serif;font-size:10px;font-weight:600;"><%=rs("userID")%></td>
    <td align="center"><a href="../blog.asp?name=<%=rs("userName")%>" target="_blank" title="点击访问该博客"><img src="<%=ProIco(rs("user_icon1"),1)%>" align="absmiddle" style="width:48px;height:48px;border:0;"></a></td>
    <td style="padding:0 0 0 3px!important;">
	<a href="../blog.asp?name=<%=rs("userName")%>" target="_blank" style="font-weight:400;"  title="点击访问该博客"><%=rs("userName")%></a>

	<span style="display:block;color:#217DBD;">
	<%=GetsubName(rs("user_group"),allGroups)%>
	</span>
	</td>
<!--     <td align="center">
            <%
		    select Case OB_IIF(rs("emailValid"),"0")
		    	Case "0"
		    		Response.Write "<font color=#FF6600>未认证</font>"
		    	Case "1"
		    		Response.Write "<font color=#009900>已认证</font>"
		    End select
    		%>
	</td> -->
    <td style="color:#999;font-family:tahoma,Arial,Helvetica,sans-serif;font-size:10px;padding:0 0 0 8px!important;">
	<%=OB_IIF(rs("adddate"),"&nbsp;") %>
	<br />
	<%=OB_IIF(rs("regip"),"&nbsp;") %>
	</td>
    <td style="color:#666;font-family:tahoma,Arial,Helvetica,sans-serif;font-size:10px;padding:0 0 0 8px!important;">
	<%=OB_IIF(rs("LastLoginTime"),"&nbsp;") %>
	<br />
	<%=OB_IIF(rs("lastloginip"),"-") %>
	</td>
    <td align="center"><strong><%=OB_IIF(rs("LoginTimes"),"0") %></strong></td>
    <td align="center"><strong><%=OB_IIF(rs("log_count"),"0") %></strong></td>
    <td align="center">
	<%
		    select Case OB_IIF(rs("user_level"),"6")
		    	Case "6"
		    		Response.Write "<span style=""color:#f00;font-weight:600;"">待审</span>"
		    	Case "7"
		    		Response.Write "<span style=""color:#090;font-weight:600;"">已审</span>"
		    End select
    %>&nbsp;
      <%
      If rs("user_level") = 6 Then
      	Response.Write "<span><a href='m_user.asp?Action=pass&UserID=" & rs("userID") & "' title=""通过审核"">审核</a></span>  "
      Else
      	Response.Write "<span><a href='m_user.asp?Action=unpass&UserID=" & rs("userID") & "' title=""取消审核"">取消</a></span>  "
      End If
        %>
	<br />
	  <%
      If rs("LockUser") = 1 Then
        Response.Write "<span style=""color:#f00;font-weight:600;"">已锁</span>  "
      Else
        Response.Write "<span style=""color:#090;font-weight:600;"">正常</span>  "
      End If
      %>
		<%
        If rs("LockUser") = 0 Then
            Response.Write "<a href='m_user.asp?Action=Lock&UserID=" & rs("userID") & "'>锁定</a>"
        Else
            Response.Write "<a href='m_user.asp?Action=UnLock&UserID=" & rs("userID") & "'>解锁</a>"
        End If
        %>
	</td>
    <td align="left">
		<%
        Response.Write "&nbsp;<a href='m_user.asp?Action=Modify&UserID=" & rs("userID") & "'>修改</a>&nbsp;"
        If CheckAccess("r_user_admin") Then
	        Response.Write "<a href='m_user.asp?Action=gouser2&username=" & rs("username") & "' target='blank'>进后台</a>&nbsp;"
	    End If
        Response.Write "<a href='m_user.asp?Action=Del&UserID=" & rs("userID") & "' onClick='return confirm(""确定要删除此用户吗?"");'>删除</a>&nbsp;"
        Response.Write "<br/>&nbsp;"
        Response.Write "<a href='m_user.asp?Action=rescore&UserID=" & rs("userID") & "'>修复用户</a>&nbsp;"
		If CheckAccess("r_user_admin") Then
			If rs("is_log_default_hidden") = 1 Then  
				Response.Write "<a href=""m_user.asp?Action=Unblock&UserID=" & rs("userID") & """ style=""color:red;"">前台解锁</a>&nbsp;"
			Else
				Response.Write "<a href=""m_user.asp?Action=block&UserID=" & rs("userID") & """ style=""color:green;"">前台屏蔽</a>&nbsp;"
			End If 
		End If 
        %>
	</td>
  </tr>
<%
    i = i + 1
    If i >= G_P_PerMax Then Exit Do
    rs.movenext
Loop
%>
        </table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
              选中本页显示的所有用户</td>
            <td> <strong>操作:</strong>
              <input name="Action" type="radio" value="Del" checked onClick="document.myform.User_Group.disabled=true">
              删除&nbsp;&nbsp;&nbsp;&nbsp;
              <input name="Action" type="radio" value="Move" onClick="document.myform.User_Group.disabled=false">移动到
              <select name="User_Group" id="User_Group" disabled>
                <%=sGroups%>
              </select>
              &nbsp;&nbsp;
              <input name="Action" type="radio" value="unpass" checked onClick="document.myform.User_Group.disabled=true">
              待审&nbsp;&nbsp;&nbsp;&nbsp;
              <input name="Action" type="radio" value="pass" checked onClick="document.myform.User_Group.disabled=true">
              审核&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="submit" name="Submit" value=" 执 行 "> </td>
  </tr>
</table>
</form>
		</div>
	</div>
	<ul class="main_end">
		<li class="main_end_left left"></li>
		<li class="main_end_right right"></li>
	</ul>
</div>
<%
End Sub


Sub Modify()
    Dim userid
    Dim rsUser, sqlUser
	Dim sql
    userid = Trim(Request("UserID"))
    If userid = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>参数不足!</li>"
        Exit Sub
    Else
        userid = CLng(userid)
    End If
    Set rsUser = Server.CreateObject("Adodb.RecordSet")
	sql = "userid,username,user_domain,user_domainroot,blogname"&str_domain&",user_classid,Question,Sex,userEmail,qq,Msn,User_Group,scores,user_upfiles_size,user_isbest,user_dir,LockUser,User_Level"
    sqlUser = "select "&sql&" from oblog_user where userID=" & userid
    If Not IsObject(Conn) Then link_database
    rsUser.open sqlUser, Conn, 1, 3
    If rsUser.bof And rsUser.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<br><li>找不到指定的用户!</li>"
        rsUser.Close
        Set rsUser = Nothing
        Exit Sub
    End If
%>
<div id="main_body">
	<ul class="main_top">
		<li class="main_top_left left">修改注册用户信息</li>
		<li class="main_top_right right"> </li>
	</ul>
	<div class="main_content_rightbg">
		<div class="main_content_leftbg">
<FORM name="Form1" action="m_user.asp" method="post">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
    <TR class="tdbg" >
      <TD width="40%">用户名:</TD>
      <TD width="60%"><%=rsUser("userName")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    </TR>
    <tr class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
      <td>用户域名:</td>
      <td><input name="user_domain" type="text" value="<%=oblog.filt_html(rsuser("user_domain"))%>" size=10 maxlength=20 /> <select name="user_domainroot" ><%=oblog.type_domainroot(rsuser("user_domainroot"),0)%></select></td>
    </tr>
    <tr class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
      <td>blog名:</td>
      <td><input name=blogname   type=text id="blogname" value="<%=rsuser("blogname")%>" size=30 maxlength=20></td>
    </tr>
    <%if true_domain=1 then%>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td>用户绑定的顶级域名:</td>
      <td><input name=custom_domain   type=text id="custom_domain" value="<%=rsuser("custom_domain")%>" size=30 maxlength=20></td>
    </tr>
    <%end if%>
    <tr class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
      <td>blog类别:</td>
      <td><select name="usertype" id="usertype">
          <%if rsUser("user_classid")<>"" then
      Response.Write (oblog.show_class("user", rsUser("user_classid"), 0))
      Else
      Response.Write (oblog.show_class("user", 0, 0))
      End If
      %>
        </select></td>
    </tr>
    <TR class="tdbg" >

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -