admin_group.asp
资源名称:txl.zip [点击查看]
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:15k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
HTML/CSS
- <!--#include file=conn.asp-->
- <!-- #include file="inc/const.asp" -->
- <title><%=txl_info(0)%>--管理页面</title>
- <!--#include file="inc/admin_css.asp"-->
- <meta NAME=GENERATOR Content="Microsoft FrontPage 3.0" CHARSET=GB2312>
- <BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
- <%
- if not supermaster or session("flag")="" then
- Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
- call txl_error()
- else
- call main()
- conn.close
- set conn=nothing
- end if
- sub main()
- if request("action")="save" then
- call savegroup()
- elseif request("action")="editgroup" then
- call editgroup()
- else
- call maingroup()
- end if
- end sub
- sub maingroup()
- %>
- <table width="95%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
- <tr>
- <th height="23" colspan="4" >用户组管理</th>
- </tr>
- <tr align=center>
- <td height="23" width="30%" class=txlHeaderBackgroundAlternate><B>用户组</B></td>
- <td height="23" width="20%" class=txlHeaderBackgroundAlternate><B>用户数量</B></td>
- <td height="23" width="20%" class=txlHeaderBackgroundAlternate><B>编辑</B></td>
- <td height="23" width="30%" class=txlHeaderBackgroundAlternate><B>列出用户</B></td>
- </tr>
- <%
- dim trs
- set rs=conn.execute("select * from usergroups order by usergroupID")
- do while not rs.eof
- set trs=conn.execute("select count(*) from [user] where UsergroupID="&rs("UsergroupID"))
- %>
- <tr align=center>
- <td height="23" width="30%" class="txlrow"><%=rs("groupname")%></td>
- <td height="23" width="20%" class="txlrow"><%=trs(0)%></td>
- <td height="23" width="20%" class="txlrow"><a href="?action=editgroup&groupid=<%=rs("usergroupID")%>">编辑</a></td>
- <td height="23" width="30%" class="txlrow"><a href="admin_user.asp?userSearch=10">列出所有用户</td>
- </tr>
- <%
- rs.movenext
- loop
- rs.close
- set rs=nothing
- %>
- <tr><td colspan=4 height=25 class="txlrow"><B>说明</B>:<BR>①可以对用户组名进行修改;<BR>②点击编辑,可以对相应用户组进行同学录权限的设置;<BR>③点击列出所有用户,可以查看相应组下的用户情况。</td></tr>
- </table>
- <%
- end sub
- sub editgroup()
- if not isnumeric(request("groupid")) then
- response.write "错误的参数!"
- exit sub
- end if
- if request("ClassAction")="yes" then
- dim GroupSetting
- if request.form("groupname")="" then
- response.write "请输入用户组名称!"
- exit sub
- end if
- GroupSetting=Request.Form("Cview") & "," & Request.Form("Ccard") & "," & Request.Form("Cuser") & "," & Request.Form("Cskin") & "," & Request.Form("Cdiary") & "," & Request.Form("Gview") & "," & Request.Form("Gpost") & "," & Request.Form("Greply") & "," & Request.Form("Bview") & "," & Request.Form("Btopic") & "," & Request.Form("Bbest") & "," & Request.Form("Bpost") & "," & Request.Form("Breply") & "," & Request.Form("Bedit") & "," & Request.Form("Bdel") & "," & Request.Form("Bpaper") & "," & Request.Form("Bmoney") & "," & Request.Form("Pview") & "," & Request.Form("Plook") & "," & Request.Form("Psend") & "," & Request.Form("Psay") & "," & Request.Form("Pedit") & "," & Request.Form("Pdel") & "," & Request.Form("Msend") & "," & Request.Form("Mmax") & "," & Request.Form("Msize") & "," & Request.Form("Mbox") & "," & Request.Form("Agbook") & "," & Request.Form("Abbs") & "," & Request.Form("Amana") & "," & Request.Form("Aphoto") & "," & Request.Form("Gedit") & "," & Request.Form("Gdel")
- Set rs= Server.CreateObject("ADODB.Recordset")
- sql="select * from usergroups where usergroupid="&request("groupid")
- rs.open sql,conn,1,3
- rs("groupname")=request.form("groupname")
- rs("groupsetting")=GroupSetting
- rs.update
- rs.close
- set rs=nothing
- response.write "修改成功!"
- else
- Dim reGroupSetting
- set rs=conn.execute("select * from usergroups where usergroupid="&request("groupid"))
- if rs.eof and rs.bof then
- response.write "未找到该用户组!"
- exit sub
- end if
- reGroupSetting=split(rs("GroupSetting"),",")
- %>
- <FORM METHOD=POST ACTION="?action=editgroup">
- <input type=hidden name="groupid" value="<%=request("groupid")%>">
- <table width="95%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
- <tr>
- <th height="23" colspan="2">编辑用户组:<%=rs("groupname")%></th>
- </tr>
- <tr>
- <td height="23" width="60%" class=txlrow>用户组名称</td>
- <td height="23" width="40%" class=txlrow><input size=35 name="groupname" type=text value="<%=rs("groupname")%>"></td>
- </tr>
- <tr>
- <th height="23" colspan="2" align=left>==查看权限</th>
- </tr>
- <tr>
- <td height="23" width="60%" class=txlrow>可以访问同学录</td>
- <td height="23" width="40%" class=txlrow><input name="Cview" type=radio value="0" <%if reGroupSetting(0)=0 then%>checked<%end if%>>是
English
