userview.jsp~49~
上传用户: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"><br />
  10. <h4 align="center">
  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="<%=user[0][4]%>">
  34.           <input type="hidden" name="un" value="<%=user[0][1]%>"/>
  35.           <input type="hidden" name="typpe" value="1" />
  36. </div></td>
  37. <td><div align="center"></div></td>
  38.     </tr>
  39.     <tr>
  40.       <tr>
  41.         <td><div align="center">姓名</div></td>
  42.         <td><div align="center">
  43.           <input type="text" name="xm" value="<%=user[0][5]==null?"":user[0][5]%>"/>
  44. </div></td>
  45. <td><div align="center"></div></td>
  46.       </tr>
  47.       <tr>
  48.         <td><div align="center">性别</div></td>
  49.         <td><div align="center">
  50.         <%
  51.         String m = "";
  52.         String wm ="";
  53.         if(user[0][6]==null){
  54.           m = "checked="checked"";
  55.           wm = "";
  56.         }else{
  57.           if(user[0][6].equals("0")){
  58.             m = "checked="checked"";
  59.             wm = "";
  60.           }else{
  61.             wm = "checked="checked"";
  62.             m = "";
  63.           }
  64.         }
  65.         %>
  66.         <input type="radio" name="sex" <%=m%>  value="0" />男
  67.         <input type="radio" name="sex" <%=wm %> value="1"/>女
  68. </div></td>
  69. <td><div align="center"></div></td>
  70.       </tr>
  71.       <tr>
  72.         <td><div align="center"> 办公电话</div></td>
  73.         <td><div align="center">
  74.           <input type="text" name="tel" value="<%=user[0][7]==null?"":user[0][7]%>"/>
  75. </div></td>
  76. <td><div align="center"></div></td>
  77.       </tr>
  78.       <tr>
  79.         <td><div align="center"> 手机 </div></td>
  80.         <td><div align="center">
  81.           <input type="text" name="tel2" value="<%=user[0][9]==null?"":user[0][9]%>" />
  82. </div></td>
  83. <td><div align="center"></div></td>
  84.       </tr>
  85.       <tr>
  86.         <td><div align="center"> 邮箱 </div></td>
  87.         <td><div align="center">
  88.           <input type="text" name="email" value="<%=user[0][8]==null?"":user[0][8]%>"/>
  89. </div></td>
  90. <td><div align="center"></div></td>
  91.       </tr>
  92.       <td><div align="center"></div></td>
  93.       <tr>
  94.         <td colspan="2"><div align="center">
  95.           <input type="submit" name="Submit" value="保存">
  96. </div></td>
  97.       </tr>
  98.   </table>
  99.   </form>
  100.   <form action="pwdChangeAction.do" method="POST" name="form2">
  101.   <table width="90%" border="1" align="center">
  102.     <tr>
  103.       <td><div align="center">
  104.         修改密码<input type="hidden" value="<%=un%>" name="un" />
  105. </div></td>
  106. <td><div align="center"></div></td>
  107.     </tr>
  108.     <tr>
  109.       <td><div align="center">原密码 </div></td>
  110.       <td><div align="center">
  111.         <input type="password" name="pwd"/>
  112. </div></td>
  113. <td><div align="center"></div></td>
  114.     </tr>
  115.     <tr>
  116.       <td><div align="center">新密码 </div></td>
  117.       <td><div align="center">
  118.         <input type="password" name="pwd1"/>
  119. </div></td>
  120. <td><div align="center"></div></td>
  121.     </tr>
  122.     <tr>
  123.       <td><div align="center">确认密码 </div></td>
  124.       <td><div align="center">
  125.         <input type="password" name="pwd2"/>
  126. </div></td>
  127. <td><div align="center"></div></td>
  128.     </tr>
  129.     <tr>
  130.       <td colspan="2"><div align="center">
  131.         <input type="submit" value="保存" />
  132. </div></td>
  133. <td><div align="center"></div></td>
  134.     </tr>
  135.   </table>
  136.   </form>
  137.   <%
  138.   }else{
  139.    response.sendRedirect("userlogin.jsp");
  140. }
  141.  %>
  142. </body>
  143. </html>