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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import="java.util.*"%>
  3. <%@ page import="com.redmoon.oa.person.*"%>
  4. <%@ page import="com.redmoon.oa.dept.*"%>
  5. <%@ page import="cn.js.fan.util.*"%>
  6. <%@ page import="cn.js.fan.security.*"%>
  7. <html>
  8. <head>
  9. <title>用户信息</title>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <link rel="stylesheet" href="common.css" type="text/css">
  12. <%@ include file="inc/nocache.jsp" %>
  13. </head>
  14. <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="3">
  15. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  16. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  17. <%
  18. String priv="read";
  19. if (!privilege.isUserPrivValid(request,priv))
  20. {
  21. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  22. return;
  23. }
  24. %>
  25. <div id="newdiv" name="newdiv">
  26. <%
  27. String username = ParamUtil.get(request, "userName");
  28. UserMgr um = new UserMgr();
  29. UserDb user = um.getUserDb(username);
  30. if (user==null || !user.isLoaded()) {
  31. out.print(StrUtil.Alert_Back("该用户已不存在!"));
  32. return;
  33. }
  34. %>
  35. <table width=98% align=center cellspacing=0 cellpadding=0 border=0>
  36.   <Form method="POST" action="user_edit_do.jsp"  name="memberform">
  37.     <tr>
  38.       <td bgcolor=#D3D3D3><table width=100% border=0 cellpadding=0 cellspacing=1 bgcolor="#CCCCCC">
  39.         <tr>
  40.           <td align=center bgcolor="#FFFFFF"><table width=100% border=0 cellpadding=0 cellspacing=0>
  41.                   <tr>
  42.                     <td height=24 bgcolor="#C4DAFF" class="stable"><b> <%=user.getRealName()%></b>&nbsp;个人资料&nbsp;&nbsp;
  43. </td>
  44.                   </tr>
  45.               </table>
  46.             <table width=100% border=0 cellpadding=2 cellspacing=0>
  47.                   <tr>
  48.                     <td width=102 height="25" align=right bgcolor="#eeeeee" class="stable"><div align="right">性别</div></td>
  49.                     <td width="297" height="25" class="stable"><% 
  50.   String strGender = "";
  51.   if (user.getGender()==0)
  52.    strGender = "男";
  53.   else
  54.    strGender = "女";
  55.   %>
  56.   <%=strGender%>   </td>
  57.                     <td width="115" height="28" bgcolor="#eeeeee" class="stable"><div align="right">婚姻状况</div></td>
  58.                     <td width="202" height="28" class=stable><%=user.getMarriaged()%></td>
  59.                   </tr>
  60.                   <tr>
  61.                     <td width=102 height="28" align=right bgcolor="#eeeeee" class="stable"><div align="right">出生日期</div></td>
  62.                     <td height="28" class="stable"><%
  63. Date bd = user.getBirthday();
  64. out.print(DateUtil.format(bd, "yyyy-MM-dd"));
  65.   %>
  66. </td>
  67.                     <td width="115" height="25" align="right" bgcolor="#eeeeee" class="stable"><div align="right">QQ</div></td>
  68.                     <td height="25" align="left" class=stable><%=user.getQQ()%>                    </td>
  69.                   </tr>
  70.                   <tr>
  71.                     <td width=102 height="25" align=right bgcolor="#eeeeee" class="stable"><div align="right">E-mail</div></td>
  72.                     <td height="25" class="stable"><%=StrUtil.getNullString(user.getEmail())%>                    </td>
  73.                     <td width=115 height="25" align="right" bgcolor="#eeeeee" class="stable">MSN</td>
  74.                     <td class=stable height="25"><%=StrUtil.getNullString(user.getMSN())%></td>
  75.                   </tr>
  76.                   <tr>
  77.                     <td width=102 height="25" align=right bgcolor="#eeeeee" class="stable"><div align="right">电话</div></td>
  78.                     <td height="25" class="stable"><%=StrUtil.getNullString(user.getPhone())%>                    </td>
  79.                     <td width=115 height="25" align="right" bgcolor="#eeeeee" class="stable"><div align="right">手机号码</div></td>
  80.                     <td class=stable height="25"><%=user.getMobile()%>                    </td>
  81.                   </tr>
  82.                   <tr>
  83.                     <td width=102 height="27" align=right bgcolor="#eeeeee" class="stable">省份</td>
  84.                     <td height="27" valign="top" class="stable">
  85.                         <%=StrUtil.getNullString(user.getState())%> </td>
  86.                     <td width="115" align="right" valign="top" bgcolor="#eeeeee" class="stable">城市<br></td>
  87.                     <td valign="top" class="stable"><%=StrUtil.getNullString(user.getCity())%></td>
  88.                   </tr>
  89.                   <tr>
  90.                     <td width=102 height="25" align=right bgcolor="#eeeeee" class="stable">地址/邮政地址</td>
  91.                     <td height="25" valign="top" class="stable"><%=StrUtil.getNullString(user.getAddress())%> </td>
  92.                     <td width="115" align="right" valign="top" bgcolor="#eeeeee" class="stable">邮政编码</td>
  93.                     <td valign="top" class="stable"><%=user.getPostCode()%></td>
  94.                   </tr>
  95.                   <tr>
  96.                     <td width=102 height="25" align=right bgcolor="#eeeeee" class="stable">身份证号码</td>
  97.                     <td height="25" class="stable"><%=StrUtil.getNullString(user.getIDCard())%></td>
  98.                     <td width="115" align="right" valign="top" bgcolor="#eeeeee" class="stable"> 兴趣爱好</td>
  99.                     <td valign="top" class="stable"><%=StrUtil.getNullString(user.getHobbies())%></td>
  100.                   </tr>
  101.               </table></td>
  102.         </tr>
  103.         
  104.       </table></td>
  105.     </tr>
  106.   </form>
  107. </table>
  108. </body>
  109. <SCRIPT>
  110. function VerifyInput()
  111. {
  112. var newDateObj = new Date()
  113. if (document.memberform.username.value == "")
  114. {
  115. alert("请输入您的用户名");
  116. document.memberform.username.focus();
  117. return false;
  118. }
  119. if (document.memberform.userpass.value == "")
  120. {
  121. alert("请输入您的密码");
  122. document.memberform.userpass.focus();
  123. return false;
  124. }
  125. if (document.memberform.userpass2.value == "")
  126. {
  127. alert("请重复您的密码");
  128. document.memberform.userpass2.focus();
  129. return false;
  130. }
  131. if (document.memberform.userpass.value != document.memberform.userpass2.value)
  132. {
  133. alert("两遍输入的口令不一致");
  134. document.memberform.userpass.focus();
  135. return false;
  136. }
  137. if (document.memberform.usermail.value == "")
  138. {
  139. alert("请输入您的EMAIL地址");
  140. document.memberform.usermail.focus();
  141. return false;
  142. }
  143. if (document.memberform.question.value == "")
  144. {
  145. alert("请输入提示问题");
  146. document.memberform.question.focus();
  147. return false;
  148. }
  149. if (document.memberform.answer.value == "")
  150. {
  151. alert("请输入答案");
  152. document.memberform.answer.focus();
  153. return false;
  154. }
  155. if (document.memberform.birthyear.value > 0)  {
  156. if (isNaN(document.memberform.birthyear.value) || document.memberform.birthyear.value > newDateObj.getFullYear()  || document.memberform.birthyear.value < 1900)
  157. {
  158. alert("请输入正确的出生年份");
  159. document.memberform.birthyear.focus();
  160. return false;
  161. }}
  162. return true;
  163. }
  164. </SCRIPT>
  165. </html>