address_modify.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:9k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "cn.js.fan.util.*"%>
  3. <%@ page import = "com.redmoon.oa.address.*"%>
  4. <html>
  5. <head>
  6. <title>编辑通讯录</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  8. <link rel="stylesheet" href="../common.css" type="text/css">
  9. </head>
  10. <body bgcolor="#FFFFFF" text="#000000" topmargin="5">
  11. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  12. <%@ include file="../inc/inc.jsp"%>
  13. <%
  14. String strtype = ParamUtil.get(request, "type");
  15. int type = AddressDb.TYPE_USER;
  16. if (!strtype.equals(""))
  17. type = Integer.parseInt(strtype);
  18. %>
  19. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  20. <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe">
  21.   <tr> 
  22.     <td width="100%" height="23" class="right-title"> 通 讯 录 编 
  23.       辑 </td>
  24.   </tr>
  25.   <tr> 
  26.     <td valign="top">
  27.         <%
  28. String priv="read";
  29. if (!privilege.isUserPrivValid(request,priv))
  30. {
  31. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  32. return;
  33. }
  34. int id = ParamUtil.getInt(request, "id");
  35. AddressDb addr = new AddressDb();
  36. addr = addr.getAddressDb(id);
  37. String person="",job="",tel="",mobile="",email="",address="",postalcode="",introduction="",business="";
  38. person = addr.getPerson();
  39. job = addr.getJob();
  40. tel = addr.getTel();
  41. mobile = addr.getMobile();
  42. email = addr.getEmail();
  43. address = addr.getAddress();
  44. postalcode = StrUtil.getNullString(addr.getPostalcode());
  45. if (postalcode.equals(""))
  46. postalcode = "&nbsp;";
  47. introduction = addr.getIntroduction();
  48. if (business.equals(""))
  49. business = "&nbsp;";
  50. %>      <form name="form1" action="address_edit_do.jsp?id=<%=id%>" method="post" onSubmit="">
  51.         <table width="95%" border="0" align="center" cellpadding="2" cellspacing="0" class="stable">
  52.         <tr>
  53.           <td height="21" colspan="4" align="left" bgcolor="#C4DAFF" class="stable"><strong>分组</strong></td>
  54.         </tr>
  55.         <tr>
  56.           <td height="19" align="center" bgcolor="#EEEEEE" class="stable">类别</td>
  57.           <td height="19" colspan="3" bgcolor="#EEEEEE"><%
  58.   String opts = "";
  59.   AddressTypeDb atd = new AddressTypeDb();
  60.   String who = privilege.getUser(request);
  61.   if (type==AddressDb.TYPE_PUBLIC)
  62. who = AddressTypeDb.PUBLIC;
  63.   String sql = "select id from address_type where USER_NAME=" + StrUtil.sqlstr(who);
  64.   Iterator ir = atd.list(sql).iterator();
  65.   while (ir.hasNext()) {
  66.  atd = (AddressTypeDb)ir.next();
  67.  opts += "<option value='" + atd.getId() + "'>" + atd.getName() + "</option>";
  68.   }
  69.    %>
  70.             <select name="typeId" id="typeId" >
  71.               <%=opts%>
  72.               </select>
  73.   <script>
  74.   form1.typeId.value = "<%=addr.getTypeId()%>";
  75.               </script> </td>
  76.         </tr>
  77.         <tr> 
  78.           <td height="21" colspan="4" align="left" bgcolor="#C4DAFF" class="stable"><strong>个人信息</strong></td>
  79.           </tr>
  80.           <tr> 
  81.             <td width="8%" height="19" align="center" bgcolor="#EEEEEE" class="stable">姓名</td>
  82.             <td width="46%" height="19" bgcolor="#EEEEEE"><input name="person" class="singleboarder" size=25 value="<%=person%>"> 
  83. <input name="type" type="hidden" value="<%=addr.getType()%>">
  84.             <input name="id" type="hidden" value="<%=addr.getId()%>"></td>
  85.           </tr>
  86.           <tr> 
  87.             <td height="19" align="center" bgcolor="#EEEEEE" class="stable">昵&nbsp;&nbsp;称</td>
  88.             <td height="19" colspan="3" bgcolor="#EEEEEE"><input name="nickname" class="singleboarder" size=35  value="<%=addr.getNickname()%>"></td>
  89.           </tr>
  90.           <tr bgcolor="#EEEEEE">
  91.             <td height="19" align="center" class="stable">部门 </td>
  92.             <td height="19" colspan="3" class="stable"><input name="department" class="singleboarder" size=35 value="<%=addr.getDepartment()%>"></td>
  93.           </tr>
  94.           <tr bgcolor="#EEEEEE">
  95.             <td height="19" align="center" class="stable">科室</td>
  96.             <td height="19" colspan="3" class="stable"><input name="company" class="singleboarder" size=35 value="<%=addr.getCompany()%>"></td>
  97.           </tr>
  98.   <tr bgcolor="#EEEEEE">
  99.             <td height="19" align="center" class="stable">职&nbsp;&nbsp;务</td>
  100.             <td height="19" colspan="3" class="stable"><input name="job" class="singleboarder" size=35 value="<%=addr.getJob()%>"></td>
  101.           </tr>
  102.           <tr bgcolor="#EEEEEE">
  103.             <td height="19" align="center" class="stable">办公室电话</td>
  104.             <td height="19" colspan="3" class="stable"><input name="operationPhone" class="singleboarder" size=35 value="<%=addr.getOperationPhone()%>"></td>
  105.           </tr>
  106.           <tr bgcolor="#EEEEEE">
  107.             <td height="19" align="center" class="stable">手机</td>
  108.             <td height="19" colspan="3" class="stable"><input name="mobile" class="singleboarder" size=35 value="<%=mobile%>"></td>
  109.           </tr>
  110.           <tr bgcolor="#EEEEEE">
  111.             <td height="19" align="center" class="stable">小灵通</td>
  112.             <td height="19" colspan="3" class="stable"><input name="beepPager" class="singleboarder" size=35 value="<%=addr.getBeepPager()%>"></td>
  113.           </tr>
  114.           <tr> 
  115.             <td height="19" align="center" bgcolor="#EEEEEE" class="stable">Email</td>
  116.             <td height="19" colspan="3" bgcolor="#EEEEEE"><input name="email" class="singleboarder" size=35  value="<%=addr.getEmail()%>"></td>
  117.           </tr>
  118.           <tr> 
  119.             <td height="19" align="center" bgcolor="#EEEEEE" class="stable">手机</td>
  120.             <td height="19" colspan="3" bgcolor="#EEEEEE"><input name="mobile" class="singleboarder" size=25 value="<%=mobile%>"></td>
  121.           </tr>
  122.           <tr bgcolor="#EEEEEE">
  123.             <td height="19" align="center" class="stable">住宅所在</td>
  124.             <td height="19" colspan="3" class="stable"><input name="street" class="singleboarder" size=35 value="<%=addr.getStreet()%>"></td>
  125.           </tr>
  126.           <tr>
  127.             <td height="19" align="center" bgcolor="#EEEEEE" class="stable">住宅电话</td>
  128.             <td height="19" colspan="3" bgcolor="#EEEEEE"><input name="tel" class="singleboarder" size=25 value="<%=addr.getTel()%>"></td>
  129.           </tr>
  130.           <tr bgcolor="#EEEEEE">
  131.             <td height="19" align="center" bgcolor="#EEEEEE" class="stable">住宅传真</td>
  132.             <td height="19" colspan="3" bgcolor="#EEEEEE" class="stable"><input name="fax" class="singleboarder" size=35 value="<%=addr.getFax()%>"></td>
  133.           </tr>
  134.           <tr bgcolor="#EEEEEE">
  135.             <td height="19" align="center" bgcolor="#EEEEEE" class="stable">QQ</td>
  136.             <td height="19" colspan="3" bgcolor="#EEEEEE" class="stable"><input name="QQ" class="singleboarder" size=35 value="<%=addr.getQQ()%>"></td>
  137.           </tr>
  138.           <tr bgcolor="#EEEEEE">
  139.             <td height="19" align="center" bgcolor="#EEEEEE" class="stable">MSN</td>
  140.             <td height="19" colspan="3" bgcolor="#EEEEEE" class="stable"><input name="MSN" class="singleboarder" size=35 value="<%=addr.getMSN()%>"></td>
  141.           </tr>
  142.           <tr bgcolor="#EEEEEE">
  143.             <td height="19" align="center" bgcolor="#EEEEEE" class="stable">网页</td>
  144.             <td height="19" colspan="3" bgcolor="#EEEEEE" class="stable"><input name="web" class="singleboarder" size=35 value="<%=addr.getWeb()%>"></td>
  145.           </tr>
  146.           <tr bgcolor="#EEEEEE">
  147.             <td height="19" align="center" class="stable">邮政编码</td>
  148.             <td height="19" colspan="3" class="stable"><input name="companyPostcode" class="singleboarder" size=35 value="<%=addr.getCompanyPostcode()%>"></td>
  149.           </tr>
  150.           <tr bgcolor="#EEEEEE">
  151.             <td height="19" align="center" class="stable">业务传真</td>
  152.             <td height="19" colspan="3" class="stable"><input name="operationFax" class="singleboarder" size=35 value="<%=addr.getOperationFax()%>"></td>
  153.           </tr>
  154.           <tr bgcolor="#EEEEEE">
  155.             <td height="19" align="center" class="stable">地&nbsp;&nbsp;址</td>
  156.             <td height="19" colspan="3" class="stable"><input name="address" class="singleboarder" size=45 value="<%=addr.getAddress()%>"></td>
  157.           </tr>
  158.           <tr bgcolor="#EEEEEE">
  159.             <td height="17" align="center" class="stable">附注</td>
  160.             <td height="17" colspan="3" class="stable"><textarea name=introduction cols="50" class="singleboarder" rows="8"><%=addr.getIntroduction()%> </textarea></td>
  161.           </tr>
  162.           <tr> 
  163.             <td colspan="4" align="center" class="stable"> <input name="submit" type=submit class="singleboarder" value="确 定"> 
  164.               &nbsp;&nbsp;&nbsp; <input name="reset" type=reset class="singleboarder" value="取 消">            </td>
  165.           </tr>
  166.     </table>
  167.         </form></td>
  168.   </tr>
  169. </table>
  170. </body>
  171. </html>