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

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. <h1>
  11. 用户修改
  12. </h1>
  13. <a href="index.jsp">返回首页</a><br />
  14. <%
  15. String message = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
  16. out.print(message);
  17. String un = request.getParameter("un");
  18. if(un==null){
  19.   request.setAttribute("msg","请选择要修改的用户!");
  20.   response.sendRedirect("userset.jsp");
  21. }
  22. DBConn dbc = new DBConn();
  23. String usql = "select * from [user] where unmd5='"+un+"'";
  24. String[][] user = dbc.getArray(usql);
  25. String depsql = "select id,deparname from deparment";
  26. String[][] depname = dbc.getArray(depsql);
  27. %>
  28. <form name="form1" method="post" action="userModAction.do">
  29.   <table width="90%" border="1">
  30.     <tr>
  31.       <td>
  32.       <div align="center">用户名</div></td>
  33.       <td><div align="center">
  34.       <%=user[0][1] %>
  35.         <input type="hidden" name="username" value="<%=un%>">
  36.         <input type="hidden" name="un" value="<%= user[0][1]==null?"":user[0][1]%>"/>
  37.       </div></td>
  38.       <td><div align="center"></div></td>
  39.     </tr>
  40.     <tr>
  41.     <tr>
  42.       <td><div align="center">姓名</div></td>
  43.       <td><div align="center">
  44.       <input type="text" name="xm" value="<%=user[0][5]%>"/>
  45.       </div></td>
  46.       <td><div align="center"></div></td>
  47.     </tr>
  48.      <tr>
  49.       <td><div align="center">性别</div></td>
  50.       <td><div align="center">
  51.       <%
  52.       String m = "";
  53.       String wm ="";
  54.       if(user[0][6]==null){
  55.          m = "checked="checked"";
  56.           wm = "";
  57.       }else{
  58.         if(user[0][6].equals("0")){
  59.           m = "checked="checked"";
  60.           wm = "";
  61.         }else{
  62.           wm = "checked="checked"";
  63.           m = "";
  64.         }
  65.       }
  66.       %>
  67.         <input type="radio" name="sex" <%=m%>  value="0" />男
  68.         <input type="radio" name="sex" <%=wm %> value="1"/>女
  69.       </div></td>
  70.       <td><div align="center"></div></td>
  71.     </tr>
  72.      <tr>
  73.       <td><div align="center"> 办公电话</div></td>
  74.       <td><div align="center">
  75.         <input type="text" name="tel" value="<%=user[0][7]%>"/>
  76.       </div></td>
  77.       <td><div align="center"></div></td>
  78.     </tr>
  79.      <tr>
  80.       <td><div align="center"> 手机 </div></td>
  81.       <td><div align="center">
  82.       <input type="text" name="tel2" value="<%=user[0][9]%>" />
  83.       </div></td>
  84.       <td><div align="center"></div></td>
  85.     </tr>
  86.      <tr>
  87.       <td><div align="center"> 邮箱 </div></td>
  88.       <td><div align="center">
  89.         <input type="text" name="email" value="<%=user[0][8]%>"/>
  90.       </div></td>
  91.       <td><div align="center"></div></td>
  92.     </tr>
  93.       <td><div align="center"></div></td>
  94.     <tr>
  95.       <td colspan="3"><div align="center">
  96.         <input type="submit" name="Submit" value="提交">
  97.       </div></td>
  98.     </tr>
  99.   </table>
  100. </form>
  101. </body>
  102. </html>