usergroupadds2.jsp~26~
资源名称:bangong.rar [点击查看]
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:2k
源码类别:
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 />
- 第二步,添加用户组用户
- <%
- String message = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
- out.print(message);
- DBConn dbc = new DBConn();
- String dep = request.getParameter("dep");
- String ug = request.getParameter("ugname");
- String usql = "select u.id,u.username,d.deparname from [user] as u inner join userdepar as ud 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,u.unmd5,d.deparname";
- out.print(usql);
- //注意添加权限SQL
- String[][] users = dbc.getArray(usql);
- String ugcheck =
- "select usergroup from usergroup where usergroup='" +
- ugname + "'";
- String[][] ugc = dbc.getArray(ugcheck);
- if(users==null){
- out.print("系统没有用户!");
- }else if(dep==null){
- out.print("系统没用部门!");
- }else{
- %>
- <form name="form1" method="post" action="usergroupAddAction.do">
- <table width="90%" border="1">
- <tr>
- <td><div align="center">用户组名</div></td>
- <td colspan="3"><div align="center">
- <%=ug %>
- <input type="hidden" name="ugname" value="<%=ug%>">
- </div></td>
- </tr>
- <tr>
- <td><div align="center">用户组所属部门</div></td>
- <td>
- <div align="center"><%=users[0][2] %></div>
- <input type="hidden" value="<%=dep%>" name="dep"/>
- </td>
- </tr>
- <tr>
- <td><div align="center"> 用户组用户</div></td>
- <td><div align="center"> </div></td>
- </tr>
- <tr>
- <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++;
- %>
- <tr>
- <td><div align="center">
- <input type="checkbox" name="user<%=i%>" value="<%=users[i][0]%>">
- </div></td>
- <td><div align="center"><%=users[i][1] %></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>