📄 userlist.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="Conn.asp"-->
<!--#include file="SysCls/KS_CommonCls.asp"-->
<!--#include file="SysCls/KS_RefreshCls.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 0628 Free
'Copyright (C) 2005-2006 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New UserList
KSCls.Execute()
Set KSCls = Nothing
Class UserList
Private KSCMS
Private Sub Class_Initialize()
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Set KSCMS=Nothing
End Sub
Public Sub Execute()
Dim FileContent
Dim KMRFObj
Application(Cstr(KSCMS.SiteSN & "RefreshType")) = "UserList" '设置当前位置为会员列表
Set KMRFObj = New Refresh
'读出公告内容页对应的模板
FileContent = KMRFObj.LoadTemplate(9992)
If Trim(FileContent) = "" Then FileContent = "模板不存在!"
FileContent = KMRFObj.ReplaceGeneralLabelContent(FileContent) '替换通用标签
FileContent = KMRFObj.ReplaceLableFlag(KMRFObj.ReplaceAllLabel(FileContent))
FileContent = Replace(FileContent,"{$GetAllUserList}",GetUserList)
Set KMRFObj = Nothing
Response.Write FileContent
End Sub
Function GetUserList()
Dim CurrentPage,totalPut,RS,MaxPerPage,SqlStr,ListType,Param
ListType=KSCMS.ChkClng(KSCMS.G("ListType"))
MaxPerPage =20
If KSCMS.G("page") <> "" Then
CurrentPage = KSCMS.ChkClng(KSCMS.G("page"))
Else
CurrentPage = 1
End If
GetUserList= GetListTypeStr & " <table cellspacing=""1"" class=""table_border"" cellpadding=""4"" width=""100%"" align=""center"" bgcolor=""#ffffff"" border=""0"">" & vbnewline
GetUserList= GetUserList &" <tbody>" & vbnewline
GetUserList= GetUserList &" <tr class=""link_table_title"" height=""20"">" & vbnewline
GetUserList= GetUserList &" <td width=""9%"" align=""center"">用户名</td>" & vbnewline
GetUserList= GetUserList &" <td width=""14%"" align=""center"">会员组</td>" & vbnewline
GetUserList= GetUserList &" <td width=""5%"" align=""center"">性别</td>" & vbnewline
GetUserList= GetUserList &" <td width=""17%"" align=""center"" nowrap=""nowrap"">邮箱</td>" & vbnewline
GetUserList= GetUserList &" <td width=""24%"" align=""center"" nowrap=""nowrap"">主页</td>" & vbnewline
GetUserList= GetUserList &" <td width=""20%"" align=""center"" nowrap=""nowrap"">最后登录</td>" & vbnewline
GetUserList= GetUserList &" <td width=""11%"" align=""center"" nowrap=""nowrap"">登录数</td>" & vbnewline
GetUserList= GetUserList &" </tr>" & vbnewline
Set RS=Server.CreateObject("Adodb.Recordset")
If ListType=1 Then
Param="Order By UserID Desc"
ElseIF ListType=2 Then
Param="Order By LastLoginTime Desc"
ElseIF ListType=3 Then
Param="Order By LoginTimes Desc"
End IF
SqlStr="Select * From KS_User " & Param
RS.Open SqlStr,Conn,1,1
If Not RS.EOF Then
totalPut = RS.RecordCount
If CurrentPage < 1 Then
CurrentPage = 1
End If
If (CurrentPage - 1) * MaxPerPage > totalPut Then
If (totalPut Mod MaxPerPage) = 0 Then
CurrentPage = totalPut \ MaxPerPage
Else
CurrentPage = totalPut \ MaxPerPage + 1
End If
End If
If CurrentPage = 1 Then
GetUserList= GetUserList & showContent(RS,totalPut, MaxPerPage, CurrentPage,ListType)
Else
If (CurrentPage - 1) * MaxPerPage < totalPut Then
RS.Move (CurrentPage - 1) * MaxPerPage
GetUserList= GetUserList &showContent(RS,totalPut, MaxPerPage, CurrentPage,ListType)
Else
CurrentPage = 1
GetUserList= GetUserList &showContent(RS,totalPut, MaxPerPage, CurrentPage,ListType)
End If
End If
End If
GetUserList= GetUserList &" </tbody>" & vbnewline
GetUserList= GetUserList &" </table>" & vbnewline
RS.Close:Set RS=Nothing
End Function
Function ShowContent(RS,totalPut, MaxPerPage, CurrentPage,ListType)
Dim I,Privacy
Do While Not RS.Eof
Privacy=RS("Privacy")
ShowContent = ShowContent & "<tr height=""20""> " &vbNewLine
ShowContent = ShowContent & " <td style=""BORDER-RIGHT: #efefef 1px dotted; BORDER-LEFT: #efefef 1px dotted; BORDER-BOTTOM: #efefef 1px dotted"" align=""middle"" width=""9%""><a href=""ShowUser.asp?UserID=" & RS("UserID") & """ target=""_blank"">" & RS("UserName") & "</a></td>" & vbnewline
ShowContent = ShowContent & " <td style=""BORDER-RIGHT: #efefef 1px dotted; BORDER-BOTTOM: #efefef 1px dotted; text-align:center"">"& KSCMS.GetUserGroupName(RS("GroupID")) & "</td>" & vbcrlf
ShowContent = ShowContent & " <td style=""BORDER-RIGHT: #efefef 1px dotted; BORDER-BOTTOM: #efefef 1px dotted; text-align:center"">" & vbnewline
If Privacy=2 Then ShowContent = ShowContent & "保密" Else ShowContent = ShowContent & RS("Sex") &"</td>" & vbcrlf
ShowContent = ShowContent & " <td style=""BORDER-RIGHT: #efefef 1px dotted; BORDER-BOTTOM: #efefef 1px dotted"">" & vbcrlf
If Privacy=2 Then ShowContent = ShowContent & "保密" Else ShowContent = ShowContent & "<a href=""mailto:" & RS("Email") &""">" & RS("Email") & "</a>" & "</td>" & vbcrlf
ShowContent = ShowContent & " <td style=""BORDER-RIGHT: #efefef 1px dotted; BORDER-BOTTOM: #efefef 1px dotted;text-align:center"">" & vbcrlf
If Privacy=2 Then ShowContent = ShowContent & "保密" Else ShowContent = ShowContent & "<a href=""" & RS("HomePage") & """ target=""_blank"">" & RS("HomePage") & "</a>" & "</td>" & vbcrlf
ShowContent = ShowContent & " <td style=""BORDER-RIGHT: #efefef 1px dotted; BORDER-BOTTOM: #efefef 1px dotted;text-align:center"">" & vbcrlf
If Privacy=2 Then ShowContent = ShowContent & "保密" Else ShowContent = ShowContent & RS("LastLoginTime") & "</td>" & vbcrlf
ShowContent = ShowContent & " <td style=""BORDER-RIGHT: #efefef 1px dotted; BORDER-BOTTOM: #efefef 1px dotted;text-align:center"">" & vbcrlf
If Privacy=2 Then ShowContent = ShowContent & "保密" Else ShowContent = ShowContent & RS("LoginTimes") & "</td>" & vbcrlf
ShowContent = ShowContent & " </tr> " & vbcrlf
RS.MoveNext
I = I + 1
If I >= MaxPerPage Then Exit Do
Loop
ShowContent = ShowContent & "<tr><td colspan=7 align=""right"">" & vbcrlf
ShowContent = ShowContent & KSCMS.ShowPagePara(totalPut, MaxPerPage, "", True, "位", CurrentPage, "ListType=" & ListType)
ShowContent = ShowContent & "</td></tr>" & vbcrlf
End Function
Function GetListTypeStr()
GetListTypeStr="<div style=""height:25"" align=""center""><a href=""?ListType=1"">按会员ID排序</a> <a href=""?ListType=2"">按注册日期排序</a> <a href=""?ListType=3"">按登录次数排序</a></div>"
End Function
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -