deparuseradd.jsp~66~
资源名称: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>
- <p>
- <%
- String message = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
- out.print(message);
- DBConn dbc = new DBConn();
- String dm = request.getParameter("dep");
- String depsql = "select id,deparname from deparment where dnmd5 ='"+dm+"' ";
- out.print(depsql+"<br />");
- String[][] dep = dbc.getArray(depsql);
- String unsql = "select * from [user] where deparment = 0 ";
- out.print(unsql+"<br />");
- String[][] un = dbc.getArray(unsql);
- String usql = "select ud.userid,u.username from userdepar as ud inner join [user] as u on ud.userid = u.id where deparid = "+dep[0][0]
- +" group by ud.userid,u.username";
- out.print(usql+"<br />");
- String[][] user = dbc.getArray(usql);
- %>
- </p>
- <a href="index.jsp">返回首页</a>
- <form name="form1" method="post" action="deparuserAddAction.do">
- <table width="90%" border="1">
- <tr>
- <td>部门</td>
- <td>
- <input type="hidden" name="dep" value="<%=dep[0][0] %>" />
- <%=dep[0][1] %>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="3">部门用户</td>
- </tr>
- <%
- int j = 0;
- if(user!=null){
- for(int i = 0; i < user.length; i++){
- j++;
- String check = "checked="checked"";
- %>
- <tr>
- <td>
- <input name="un<%=i%>" type="checkbox" value="<%=user[i][0] %>" <%=check%>/>
- </td>
- <td>
- <%=user[i][1] %>
- </td>
- <td> </td>
- </tr>
- <%
- }
- }
- for(int i = 0; i < un.length; i++){
- j++;
- %>
- <tr>
- <td>
- <input name="un<%=j%>" type="checkbox" value="<%=un[i][0] %>"/>
- </td>
- <td>
- <%=un[i][1] %>
- </td>
- <td> </td>
- </tr>
- <%
- }
- %>
- <tr>
- <td colspan="3">
- <input type="hidden" value="<%=j%>" name="j" />
- <input type="submit" name="Submit" value="提交">
- </td>
- </tr>
- </table>
- </form>
- <p> </p>
- </body>
- </html>