userview.jsp~43~
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:4k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=GBK" import="officeol.mc.tools.*" %>
  2. <%request.setCharacterEncoding("GBK"); %>
  3. <html>
  4. <head>
  5. <title>
  6. 天津市河东区经济贸易委员会内部办公网
  7. </title>
  8. </head>
  9. <body bgcolor="#ffffff">
  10. <h4>
  11. 用户修改
  12. </h4>
  13. <br />
  14. <%
  15. String message = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
  16. out.print(message);
  17. String un = (String)session.getAttribute("UN");
  18. String login = (String)session.getAttribute("LOGIN");
  19. DBConn dbc = new DBConn();
  20. if(login!=null&&login.equals("OK")){
  21.   String usql = "select * from [user] where username='"+un+"'";
  22.   String[][] user = dbc.getArray(usql);
  23.   String depsql = "select id,deparname from deparment";
  24.   String[][] depname = dbc.getArray(depsql);
  25.   %>
  26.   <form name="form1" method="post" action="userModAction.do">
  27.   <table width="90%" border="1">
  28.     <tr>
  29.       <td>
  30.         <div align="center">用户名</div></td>
  31.         <td><div align="center">
  32.           <%=user[0][1] %>
  33.           <input type="hidden" name="username" value="<%=un%>">
  34.           <input type="hidden" name="un" value="<%=user[0][1]%>"/>
  35. </div></td>
  36. <td><div align="center"></div></td>
  37.     </tr>
  38.     <tr>
  39.       <tr>
  40.         <td><div align="center">姓名</div></td>
  41.         <td><div align="center">
  42.           <input type="text" name="xm" value="<%=user[0][5]==null?"":user[0][5]%>"/>
  43. </div></td>
  44. <td><div align="center"></div></td>
  45.       </tr>
  46.       <tr>
  47.         <td><div align="center">性别</div></td>
  48.         <td><div align="center">
  49.         <%
  50.         String m = "";
  51.         String wm ="";
  52.         if(user[0][6]==null){
  53.           m = "checked="checked"";
  54.           wm = "";
  55.         }else{
  56.           if(user[0][6].equals("0")){
  57.             m = "checked="checked"";
  58.             wm = "";
  59.           }else{
  60.             wm = "checked="checked"";
  61.             m = "";
  62.           }
  63.         }
  64.         %>
  65.         <input type="radio" name="sex" <%=m%>  value="0" />男
  66.         <input type="radio" name="sex" <%=wm %> value="1"/>女
  67. </div></td>
  68. <td><div align="center"></div></td>
  69.       </tr>
  70.       <tr>
  71.         <td><div align="center"> 办公电话</div></td>
  72.         <td><div align="center">
  73.           <input type="text" name="tel" value="<%=user[0][7]==null?"":user[0][7]%>"/>
  74. </div></td>
  75. <td><div align="center"></div></td>
  76.       </tr>
  77.       <tr>
  78.         <td><div align="center"> 手机 </div></td>
  79.         <td><div align="center">
  80.           <input type="text" name="tel2" value="<%=user[0][9]==null?"":user[0][9]%>" />
  81. </div></td>
  82. <td><div align="center"></div></td>
  83.       </tr>
  84.       <tr>
  85.         <td><div align="center"> 邮箱 </div></td>
  86.         <td><div align="center">
  87.           <input type="text" name="email" value="<%=user[0][8]==null?"":user[0][8]%>"/>
  88. </div></td>
  89. <td><div align="center"></div></td>
  90.       </tr>
  91.       <td><div align="center"></div></td>
  92.       <tr>
  93.         <td colspan="3"><div align="center">
  94.           <input type="submit" name="Submit" value="提交">
  95. </div></td>
  96.       </tr>
  97.   </table>
  98.   </form>
  99.   <form action="pwdChangeAction.do" method="POST" name="form2">
  100.   <table width="90%" border="1">
  101.     <tr>
  102.       <td colspan="2"><div align="center">
  103.         修改密码<input type="hidden" value="<%=un%>" name="un" />
  104. </div></td>
  105. <td><div align="center"></div></td>
  106.     </tr>
  107.     <tr>
  108.       <td><div align="center">原密码 </div></td>
  109.       <td><div align="center">
  110.         <input type="password" name="pwd"/>
  111. </div></td>
  112. <td><div align="center"></div></td>
  113.     </tr>
  114.     <tr>
  115.       <td><div align="center">新密码 </div></td>
  116.       <td><div align="center">
  117.         <input type="password" name="pwd1"/>
  118. </div></td>
  119. <td><div align="center"></div></td>
  120.     </tr>
  121.     <tr>
  122.       <td><div align="center">确认密码 </div></td>
  123.       <td><div align="center">
  124.         <input type="password" name="pwd2"/>
  125. </div></td>
  126. <td><div align="center"></div></td>
  127.     </tr>
  128.     <tr>
  129.       <td colspan="2"><div align="center">
  130.         <input type="submit" value="提交" />
  131. </div></td>
  132. <td><div align="center"></div></td>
  133.     </tr>
  134.   </table>
  135.   </form>
  136.   <%
  137.   }else{
  138.    response.sendRedirect("userlogin.jsp");
  139. }
  140.  %>
  141. </body>
  142. </html>