usergroupadd.jsp
资源名称: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">
- <h4>
- 用户组添加
- </h4>
- <br />
- 第一步,添加用户组所属部门
- <%try{
- String message = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
- out.print(message);
- DBConn dbc = new DBConn();
- String ud = (String)session.getAttribute("UD");
- String udid = (String)session.getAttribute("UDID");
- String un = (String)session.getAttribute("UN");
- String uid = (String)session.getAttribute("UID");
- String pp = (String)session.getAttribute("POPE");
- String login = (String)session.getAttribute("LOGIN");
- if(login!=null&&login.equals("OK")){
- boolean temp = true;
- String add ="";
- System.out.println("fw "+pp);
- if(pp.equals("com")){//普通权限
- temp = false;
- }else if(pp.equals("dep")){//部门权限
- add = " where deparname = '"+ud+"'";
- }else if(pp.equals("all")){//全局权限
- }else{//没有权限
- temp = false;
- }
- if(temp){
- String dsql = "select * from deparment "+add;
- out.print(dsql);
- String[][] dep = dbc.getArray(dsql);
- if(dep==null){
- out.print("系统没用部门!");
- }else{
- %>
- <form name="form1" method="post" action="usergroupadds2.jsp">
- <table width="90%" border="1">
- <tr>
- <td><div align="center">用户组名</div></td>
- <td colspan="3"><div align="center">
- <input type="text" name="ugname">
- </div></td>
- </tr>
- <tr>
- <td>用户组所属部门</td>
- <td>
- <select name="dep">
- <%for(int i = 0; i < dep.length; i++){ %>
- <option value="<%=dep[i][0]%>"><%=dep[i][1] %></option>
- <%
- }
- %>
- </select></td>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="4"><div align="center">
- <input type="submit" name="Submit" value="提交">
- </div></td>
- </tr>
- </table>
- </form>
- <%
- }
- }else{
- response.sendRedirect("userlogin.jsp");
- }
- }
- }catch(Exception ex){
- ex.printStackTrace();
- }
- %>
- </body>
- </html>