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

📄 admin_group.asp

📁 小游戏网站演示www.4399.io 拥有4万条游戏数据
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="setup.asp"-->
<!--#include file="check.asp"-->
<%
Admin_header
'=====================================================================
' 软件名称:四博CMS网站管理系统 2008 sp3
' 当前版本:dincoo.com
' 文件名称:admin_group.asp
' 更新日期:2006-11-20
' 官方网站:新云网络(www.newasp.net) QQ:94022511
'=====================================================================
' Copyright 2003-2007 newasp.net - All Rights Reserved.
' newasp is a trademark of newasp.net
'=====================================================================
Dim GroupSetting,Action,i,strClass
Action = LCase(Request("action"))
If Not ChkAdmin("UserGroup") Then
	Server.Transfer("showerr.asp")
	Response.End
End If
select case Action
case "save" 
	call savegroup()
case "savedit" 
	call savedit()
case "del"
	call delgroup()
case "group" 
	call gradeinfo()
case "addgroup" 
	call addgroup()
case "editgroup"
	call editgroup()
case else
	call usergroup()
end select
If FoundErr = True Then
	ReturnError(ErrMsg)
End If
Admin_footer
SaveLogInfo(AdminName)
CloseConn
sub usergroup()
%>
<table width="98%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
<tr> 
<th height="23" colspan="4" >用户组管理&nbsp;&nbsp;|&nbsp;&nbsp;<a href="?action=addgroup"><font color=#FFFFFF><strong>[添加新用户组]</strong></font></a></th>
</tr>
<tr><td colspan=4 height=25 class="tablerow1"><B>说明</B>:<BR>
①在这里您可以设置各个用户组在系统中的默认权限,系统默认用户组不能删除和编辑用户等级;<BR>
②可以进行添加用户组操作并设置其权限,可以将其他组用户转移到该组,请到用户管理中进行相关操作;<BR>
③可以删除和编辑新添加的用户组,添加组时请填相应用户等级。<BR>
</td></tr>
<tr align=center>
<td height="23" width="30%" class=TableTitle><B>用户组</B></td>
<td height="23" width="20%" class=TableTitle><B>用户数量</B></td>
<td height="23" width="20%" class=TableTitle><B>编辑</B></td>
<td height="23" width="30%" class=TableTitle><B>用户等级</B></td>
</tr>
<%
dim trs
set rs=Newasp.execute("select * from NC_UserGroup order by groupid")
i = 0
do while not rs.eof
set trs=Newasp.execute("select count(userid) from [NC_user] where UserGrade="&rs("Grades"))
	If (i mod 2) = 0 Then
		strClass = "class=TableRow1"
	Else
		strClass = "class=TableRow2"
	End If
%>
<tr align=center>
<td height="23" <%=strClass%>><%=rs("GroupName")%></td>
<td height="23" <%=strClass%>><%if rs("Grades") = 0 Then%>匿名用户<%Else%><%=trs(0)%><%End If%></td>
<td height="23" <%=strClass%>><a href="?action=editgroup&groupid=<%=rs("groupid")%>">用户组设置</a><%if rs("groupid") => 6 then%> | <a href="?action=del&groupid=<%=rs("groupid")%>&Grade=<%=rs("Grades")%>" onclick="{if(confirm('此操作将删除本用户组\n 您确定执行的操作吗?')){return true;}return false;}">删除</a><%end if%></td>
<td height="23" <%=strClass%>><%=rs("Grades")%></td>
</tr>
<%
rs.movenext
i = i + 1
loop
rs.close
set rs=nothing
%>
</table><BR>
<%
end sub
Sub addgroup()
        Dim GroupNum
        Set Rs = CreateObject("Adodb.recordset")
        SQL = "select Max(groupid) from NC_UserGroup"
        Rs.Open SQL, Conn, 1, 1
        If Rs.EOF And Rs.bof Then
                GroupNum = 1
        Else
                GroupNum = Rs(0) + 1
        End If
        If IsNull(GroupNum) Then GroupNum = 1
        Rs.Close
%>
<table width="98%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
<tr> 
<th height="23" colspan="2" >添加新的用户组</th>
</tr>
<FORM METHOD=POST ACTION="admin_group.asp?action=save">
<input type="hidden" name="newgroupid" value="<% = GroupNum %>">
<tr><td colspan=2 height=25 class="tablerow1"><B>说明</B>:<BR>
①可以进行添加用户组操作并设置其权限,可以将其他组用户转移到该组,请到用户管理中进行相关操作;<BR>
②可以删除和编辑新添加的用户组,添加是请填写相应用户等级。<BR>
</td></tr>
<tr> 
<th colspan="2" >添加新的用户组</th>
</tr>
<tr>
<td width="60%" class=tablerow1>用户组名称</td>
<td width="40%" class=tablerow1><input size=35 name="GroupName" type=text></td>
</tr>
<script>function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}</script>
<tr>
<td class=tablerow1>用户组等级;请输入数字(数字越大级别越高)</td>
<td class=tablerow1><input size=10 name="Grades" type=text value=<%=conn.execute("Select max(Grades)from NC_UserGroup where Grades <> 999")(0)+1%>></td>
</tr>
<tr> 
<td class=tablerow1>
</td>
<td class=tablerow1>
<input type="button" name="Submit1" onclick="javascript:history.go(-1)" value="返回上一页" class=button> 
<input type="submit" name="submit" value="添加用户组" class=button></td>
</tr>
</FORM>
</table><BR>
<%
set rs=nothing
End Sub
Sub editgroup()
	Dim GroupSet
	SQL = "select groupid,GroupName,GroupSet,Grades from NC_UserGroup where groupid = " & CLng(Request("groupid"))
	Set Rs = Newasp.Execute(SQL)
	GroupSet = Split(Rs("GroupSet") & "0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||","|||")
%>
<table border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
  <tr> 
    <th colspan="2" >修改用户组</th>
  </tr>
  <form method=post action="admin_group.asp?action=savedit">
  <tr>
    <td colspan=2 height=25 class="tablerow1"><B>说明</B>:<BR>
    ①可以进行修改用户组操作并设置其权限,可以将其他组用户转移到该组,请到用户管理中进行相关操作;<BR>
    </td>
  </tr>
  <tr> 
    <th colspan="2">用户组设置</th>
  </tr>
  <tr>
    <td width="60%" class=tablerow1>用户组名称</td>
    <td width="40%" class=tablerow1><input size=35 name="GroupName" type=text value="<%=Rs("GroupName")%>"></td>
  </tr>
  <tr>
    <td class=tablerow2>用户组等级;请输入数字(<font color=blue>数字越大级别越高</font>)</td>
    <td class=tablerow2><input size=10 type=text value="<%=Rs("Grades")%>" disabled>
    <input size=10 name="Grades" type=hidden value="<%=Rs("Grades")%>">&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="admin_group.asp">返回用户组首页</a></td>
  </tr>
  <tr> 
    <th colspan="2" align=left>==用户基本使用设置</th>
  </tr>
  <tr>
    <td class=tablerow1>用户是否可以修改密码</td>
    <td class=tablerow1><input type=radio name="GroupSet(0)" value=0<%If CInt(GroupSet(0)) = 0 Then Response.Write " checked"%>> 否&nbsp;&nbsp;
      <input type=radio name="GroupSet(0)" value=1<%If CInt(GroupSet(0)) = 1 Then Response.Write " checked"%>> 是 </td>
  </tr>
  <tr>
    <td class=tablerow2>用户是否可以修改资料</td>
    <td class=tablerow2><input type=radio name="GroupSet(1)" value=0<%If CInt(GroupSet(1)) = 0 Then Response.Write " checked"%>> 否&nbsp;&nbsp;
      <input type=radio name="GroupSet(1)" value=1<%If CInt(GroupSet(1)) = 1 Then Response.Write " checked"%>> 是 </td>
  </tr>
  <tr>
    <td class=tablerow1>发布内容信息是否使用验证码</td>
    <td class=tablerow1><input type=radio name="GroupSet(2)" value=0<%If CInt(GroupSet(2)) = 0 Then Response.Write " checked"%>> 否&nbsp;&nbsp;
      <input type=radio name="GroupSet(2)" value=1<%If CInt(GroupSet(2)) = 1 Then Response.Write " checked"%>> 是 </td>
  </tr>
  <tr>
    <td class=tablerow2>是否可以使用收藏夹</td>
    <td class=tablerow2><input type=radio name="GroupSet(3)" value=0<%If CInt(GroupSet(3)) = 0 Then Response.Write " checked"%>> 否&nbsp;&nbsp;
      <input type=radio name="GroupSet(3)" value=1<%If CInt(GroupSet(3)) = 1 Then Response.Write " checked"%>> 是 </td>
  </tr>
  <tr>
    <td class=tablerow1>是否可以添加好友</td>
    <td class=tablerow1><input type=radio name="GroupSet(4)" value=0<%If CInt(GroupSet(4)) = 0 Then Response.Write " checked"%>> 否&nbsp;&nbsp;
      <input type=radio name="GroupSet(4)" value=1<%If CInt(GroupSet(4)) = 1 Then Response.Write " checked"%>> 是 </td>
  </tr>
  <tr>
    <td class=tablerow2>最多收藏多少条信息 -- 不限制请设置为0</td>
    <td class=tablerow2><input type=text name=GroupSet(5) size=10 value='<%=GroupSet(5)%>'></td>
  </tr>
  <tr>
    <td class=tablerow1>最多添加多少好友 -- 不限制请设置为0</td>
    <td class=tablerow1><input type=text name=GroupSet(6) size=10 value='<%=GroupSet(6)%>'></td>
  </tr>
  <tr> 
    <th colspan="2" align=left>==发布权限设置</th>
  </tr>
  <tr>
    <td class=tablerow1>可以发布文章</td>
    <td class=tablerow1><input type=radio name="GroupSet(7)" value=0<%If CInt(GroupSet(7)) = 0 Then Response.Write " checked"%>> 否&nbsp;&nbsp;
      <input type=radio name="GroupSet(7)" value=1<%If CInt(GroupSet(7)) = 1 Then Response.Write " checked"%>> 是 </td>
  </tr>
  <tr>
    <td class=tablerow2>可以管理自己发布的文章</td>
    <td class=tablerow2><input type=radio name="GroupSet(8)" value=0<%If CInt(GroupSet(8)) = 0 Then Response.Write " checked"%>> 否&nbsp;&nbsp;
      <input type=radio name="GroupSet(8)" value=1<%If CInt(GroupSet(8)) = 1 Then Response.Write " checked"%>> 是 </td>
  </tr>
  <tr>
    <td class=tablerow1>发布文章增加的点数</td>
    <td class=tablerow1><input type=text name=GroupSet(9) size=10 value='<%=GroupSet(9)%>'></td>
  </tr>

⌨️ 快捷键说明

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