usergroupmodify.jsp~67~
资源名称:bangong.rar [点击查看]
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:3k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=GBK" import="officeol.mc.tools.*" %>
- <%request.setCharacterEncoding("GBK"); %>
- <html>
- <head>
- <title>
- 天津市经贸委在线办公
- </title>
- </head>
- <body bgcolor="#ffffff">
- <h1>
- 用户组修改
- </h1>
- <a href="index.jsp">返回首页</a><br />
- <p>
- <%
- String message = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
- out.print(message);
- DBConn dbc = new DBConn();
- String ugmd5 = request.getParameter("ug");
- String dep = request.getParameter("dep");
- String usql = "select u.id as userid,u.username,d.deparname from [userdepar] as ud inner join [user] as u on u.id = ud.userid inner join [deparment] as d on d.id = ud.deparid and d.id = '"+dep+"' group by u.id,u.username,d.deparname";
- out.print(usql+"<br />");
- //注意添加权限SQL
- String[][] users = dbc.getArray(usql);
- String ugsql = "select ug.usergroup,ug.depid,u.id from usergroup as ug inner join [user] as u on ug.userid = u.id inner join deparment as d on ug.depid = d.id where ugmd5 = '"+
- ugmd5+"'";
- out.print(ugsql);
- String[][] ug = dbc.getArray(ugsql);
- if(users==null){
- out.print("系统没有用户!");
- }else if(dep==null){
- out.print("系统没用部门!");
- }else{
- %>
- <form name="form1" method="post" action="usergroupModAction.do">
- <table width="90%" border="1">
- <tr>
- <td><div align="center">用户组名</div></td>
- <td colspan="3"><div align="center">
- <%=ug[0][0] %>
- <input type="hidden" value="<%=ugmd5%>" name="ugmd5"/>
- </div></td>
- </tr>
- <tr>
- <td>用户组所属部门</td>
- <td colspan="3"><%=users[0][2] %>
- </td>
- </tr>
- <tr>
- <td colspan="4"><div align="left"> 用户组用户</div></td>
- </tr>
- <tr>
- <td><div align="center"> </div></td>
- <td><div align="center">用户名</div></td>
- <td><div align="center">用户所属部门</div></td>
- <td><div align="center"> </div></td>
- </tr>
- <%
- int len = 0;
- for(int i = 0; i < users.length; i++){
- len++;
- String check = "";
- for(int j = 0; j < ug.length; j++){
- if(users[i][0].equals(ug[j][2])){
- check = "checked="checked"";
- }
- }
- %>
- <tr>
- <td><div align="center">
- <input type="checkbox" name="user<%=i%>" value="<%=users[i][0]%>" <%=check%>>
- </div></td>
- <td><div align="center"><%=users[i][1] %></div></td>
- <td><div align="center"><%=users[i][2] %></div></td>
- <td><div align="center"> </div></td>
- </tr>
- <%
- }
- %>
- <tr>
- <td colspan="4"><div align="center">
- <input type="hidden" name="ulen" value="<%=len%>"/>
- <input type="submit" name="Submit" value="提交">
- </div></td>
- </tr>
- </table>
- </form>
- <%
- }
- %>
- </body>
- </html>