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

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. <script>
  14. function New(para_URL){var URL=new String(para_URL);window.open(URL,'','resizable,scrollbars')}
  15. function CheckRegName(){
  16. var Name=document.form.RegName.value;
  17. window.open("checkregname.jsp?RegName="+Name,"","width=200,height=20");
  18. }
  19. function check_checkbox(myitem,myvalue)
  20. {
  21.      var checkboxs = document.all.item(myitem);
  22.  
  23.  var myary = myvalue.split("|");
  24.  
  25.      if (checkboxs!=null)
  26.      {
  27.        for (i=0; i<checkboxs.length; i++)
  28.           {
  29.             if (checkboxs[i].type=="checkbox" )
  30.               {
  31. for (k=0; k<myary.length; k++) {
  32.  if (checkboxs[i].value==myary[k])
  33.                  checkboxs[i].checked = true
  34. }
  35.               }
  36.           }
  37.      }
  38. }
  39. </script>
  40. </head>
  41. <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="3">
  42. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  43. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  44. <%
  45. String priv="read";
  46. if (!privilege.isUserPrivValid(request,priv))
  47. {
  48. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  49. return;
  50. }
  51. %>
  52. <%@ include file="user_inc_menu_top.jsp" %>
  53. <div id="newdiv" name="newdiv">
  54. <%
  55. String username = privilege.getUser(request);
  56. if (!SecurityUtil.isValidSqlParam(username)) {
  57. out.print(StrUtil.Alert("参数非法!"));
  58. return;
  59. }
  60. UserMgr um = new UserMgr();
  61. UserDb user = um.getUserDb(username);
  62. if (user==null || !user.isLoaded()) {
  63. out.print(StrUtil.Alert_Back("该用户已不存在!"));
  64. return;
  65. }
  66. UserSetupDb usd = new UserSetupDb();
  67. usd = usd.getUserSetupDb(username);
  68. String op = ParamUtil.get(request, "op");
  69. if (op.equals("edit")) {
  70. int isMsgWinPopup = ParamUtil.getInt(request, "isMsgWinPopup");
  71. int isChatIconShow = ParamUtil.getInt(request, "isChatIconShow");
  72. int isChatSoundPlay = ParamUtil.getInt(request, "isChatSoundPlay");
  73. usd.setMsgWinPopup(isMsgWinPopup==1);
  74. usd.setChatIconShow(isChatIconShow==1);
  75. usd.setChatSoundPlay(isChatSoundPlay==1);
  76. usd.save();
  77. }
  78. %>
  79. <br>
  80. <table width=100% border=0 cellpadding=0 cellspacing=1 bgcolor="#CCCCCC">
  81.   <tr>
  82.     <td align=center bgcolor="#FFFFFF"><table border=0 cellpadding=0 cellspacing=0 width=100%>
  83.       <tr>
  84.         <td height=24 class="right-title">&nbsp;控制面板</td>
  85.       </tr>
  86.     </table>
  87.         <table width=100% border=0 cellpadding=2 cellspacing=0>
  88. <form name="form1" action="?op=edit" method="post">
  89.           <tr>
  90.             <td width="104" align=left class="stable">我的职级:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  91.             <td width="366" class="stable"><%
  92. com.redmoon.oa.basic.RankDb rd = new com.redmoon.oa.basic.RankDb();
  93. rd = rd.getRankDb(user.getRankCode());
  94. out.print(StrUtil.getNullString(rd.getName()));
  95. %>
  96.             &nbsp;&nbsp;&nbsp;</td>
  97.             <td width="447" class="stable"><a href="user_edit.jsp">修改个人信息</a></td>
  98.           </tr>
  99.           <tr class="stable">
  100.             <td height="22" align=left valign="top" class="stable">我的角色:</td>
  101.             <td height="22" align=left valign="top" class="stable"><%
  102. com.redmoon.oa.pvg.RoleDb[] rld = user.getRoles();
  103. int rolelen = 0;
  104. if (rd!=null)
  105. rolelen = rld.length;
  106. for (int k=0; k<rolelen; k++) {
  107. out.print(rld[k].getDesc() + "&nbsp;&nbsp;");
  108. }
  109. %>
  110.             &nbsp;</td>
  111.             <td height="22" align=left valign="top" class="stable">消息到来时是否弹出窗口:
  112. <select name="isMsgWinPopup">
  113. <option value="1" selected>是</option>
  114. <option value="0">否</option>
  115. </select>
  116. <script>
  117. form1.isMsgWinPopup.value = "<%=usd.isMsgWinPopup()?1:0%>";
  118. </script> </td>
  119.           </tr>
  120.           <tr class="stable">
  121.             <td height="22" align=left valign="top" class="stable">磁盘空间: </td>
  122.             <td height="22" align=left valign="top" class="stable"><%=user.getDiskSpaceAllowed()%>字节&nbsp;&nbsp;已用<%=user.getDiskSpaceUsed()%>字节</td>
  123.             <td height="22" align=left valign="top" class="stable">讨论信息到来时是否闪动图标:
  124.               <select name="isChatIconShow">
  125.                 <option value="1" selected>是</option>
  126.                 <option value="0">否</option>
  127.               </select>
  128. <script>
  129. form1.isChatIconShow.value = "<%=usd.isChatIconShow()?1:0%>";
  130. </script>   </td>
  131.           </tr>
  132.           <tr class="stable">
  133.             <td height="22" align=left valign="top" class="stable">论坛用户中心:</td>
  134.             <td height="22" align=left valign="top" class="stable"><a href="../jump.jsp?fromWhere=oa&toWhere=forum&action=usercenter" target="_blank">进入</a></td>
  135.             <td height="22" align=left valign="top" class="stable">讨论信息到来时是否声音提示:
  136.               <select name="isChatSoundPlay">
  137.                 <option value="1" selected>是</option>
  138.                 <option value="0">否</option>
  139.               </select>
  140. <script>
  141. form1.isChatSoundPlay.value = "<%=usd.isChatSoundPlay()?1:0%>";
  142. </script>     </td>
  143.           </tr>
  144.           <tr class="stable">
  145.             <td height="22" colspan="3" align=left valign="top" class="stable"><a href="desktop_setup.jsp">定制桌面</a></td>
  146.           </tr>
  147.           <tr class="stable">
  148.             <td height="22" colspan="3" align=center valign="top" class="stable"><input type="submit" name="Submit" value=" 确 定 "></td>
  149.           </tr>
  150.   </form>
  151.       </table></td>
  152.   </tr>
  153. </table>
  154. </body>
  155. <SCRIPT>
  156. function memberform_onsubmit()
  157. {
  158. if (memberform.RealName.value=="") {
  159. alert("请输入用户姓名");
  160. return false;
  161. }
  162. if (memberform.Password.value != memberform.Password2.value)
  163. {
  164. alert("两遍输入的口令不一致");
  165. memberform.Password.focus();
  166. return false;
  167. }
  168. return true;
  169. }
  170. </SCRIPT>
  171. </html>