userset.jsp~71~
资源名称: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"><br />
- <h4 align="center">
- 用户信息设置
- </h4>
- <br />
- <p>
- <%
- String msg = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
- out.print(msg);
- String msg1 = (String )session.getAttribute("msg1");
- if(msg1!=null){
- out.print(msg1);
- session.removeAttribute("msg1");
- }
- 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")){
- String bm = "";
- boolean temp = true;
- String usql = "";
- if(pp.equals("com")){//普通权限
- temp = false;
- }else if(pp.equals("dep")){//部门权限
- usql = "select u.id,u.username,u.unmd5 "+
- "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 deparname='"+ud+"' group by u.id,u.username,u.unmd5";
- }else if(pp.equals("all")){//全局权限
- usql = "select id,username,unmd5 from [user]";
- }else{//没有权限
- temp = false;
- }
- if(temp){
- DBConn dbc = new DBConn();
- //应该在此添加权限字段以处理权限问题,如果有部门则应该用上面的SQL,没有则全部
- //out.print(usql);
- String[][] user = dbc.getArray(usql);
- if(user==null){
- out.print("系统没有用户!");
- }else{
- %>
- </p>
- <table width="95%" border="1">
- <tr>
- <td>用户名</td>
- <td>重置密码</td>
- <td>修改用户信息</td>
- <td>删除用户</td>
- </tr>
- <%for(int i = 0; i < user.length; i++){
- String un1 = user[i][2];
- %>
- <tr>
- <td><%=user[i][1] %></td>
- <td><a href="passwordReset.jsp?un=<%=un1 %>">重置密码</a></td>
- <td><a href="usermodify.jsp?un=<%=un1 %>">修改用户信息</a></td>
- <td><a href="userdelete.jsp?un=<%=un1 %>">删除用户</a></td>
- </tr>
- <%
- }
- %>
- </table>
- <%
- }
- }else{
- out.print("你没有权限查看这个页面!");
- }
- }else{
- response.sendRedirect("userlogin.jsp");
- }
- %>
- <p> </p>
- </body>
- </html>