?? admin_group.asp
字號:
<!--#include file="setup.asp"-->
<!--#include file="check.asp"-->
<%
Admin_header
'=====================================================================
' 軟件名稱:新云網站管理系統
' 當前版本:NewCloud Site Management System Version 2.1
' 文件名稱:admin_group.asp
' 更新日期:2004-11-20
' 官方網站:新云網絡(www.newasp.net) QQ:94022511
'=====================================================================
' Copyright 2002-2005 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" >用戶組管理 | <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 = " & Request("groupid")
Set Rs = Newasp.Execute(SQL)
GroupSet = Split(Rs("GroupSet"),"|||")
%>
<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")%>">
<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"%>> 否
<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"%>> 否
<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"%>> 否
<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"%>> 否
<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"%>> 否
<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>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -