usergroupadd.jsp~53~
资源名称: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>
- <br />
- 第一步,添加用户组所属部门
- <%
- String message = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
- out.print(message);
- DBConn dbc = new DBConn();
- String un = (String)session.getAttribute("un");
- String uid = (String)session.getAttribute("uid");
- String ud = (String)session.getAttribute("ud");
- String udid = (String)session.getAttribute("udid");
- String[][] pope = (String[][])session.getAttribute("pope");
- PopedomCheck pc = new PopedomCheck();
- String pageType = "pope";
- String op = "add";
- if(un!=null && ud!=null&&pope!=null){
- if(pc.getPagePope(pageType,pope)){
- String fw = pc.getFanwei(pageType,op,pope);
- boolean temp = true;
- String add ="";
- System.out.println("fw"+fw);
- if(fw.equals("com")){//普通权限
- temp = false;
- }else if(fw.equals("dep")){//部门权限
- add = " where deparname = '"+ud+"'";
- }else if(fw.equals("all")){//全局权限
- }else{//没有权限
- temp = false;
- }
- if(temp){
- //String usql = "select u.id,u.username,d.deparname from [user] AS u inner join deparment AS d on u.deparment = d.id";
- //注意添加权限SQL
- //String[][] users = dbc.getArray(usql);
- //如果是某个部门则只能是这个部门,注意权限
- 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{
- out.print("你没有权限查看这个页面!");
- }
- }else{
- out.print("你没有权限查看这个页面!");
- }
- }else{
- out.print("请登录!");
- %>
- <br /><a href="userlogin.jsp" target="mainFrame">用户登录</a>
- <%
- }
- %>
- </body>
- </html>