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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import="com.redmoon.forum.person.*"%>
  3. <%@ page import="com.redmoon.forum.plugin.*"%>
  4. <%@ page import="com.redmoon.forum.*"%>
  5. <%@ page import="com.redmoon.forum.ui.*"%>
  6. <%@ page import="cn.js.fan.util.*"%>
  7. <%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="ltpos" %>
  8. <%
  9. String pos_boardcode = ParamUtil.get(request, "boardcode");
  10. if (!pos_boardcode.equals("")) {
  11. Leaf pos_curleaf = new Leaf();
  12. pos_curleaf = pos_curleaf.getLeaf(pos_boardcode);
  13. String pos_op = ParamUtil.get(request, "op");
  14. %>
  15. <table width='98%' height='25' border='0' class="tableframe_gray" align="center" cellpadding='0' cellspacing='0' rules='rows'>
  16. <tbody><tr><td align='left' bgcolor="#EBECED">
  17. &nbsp;<img src="<%=request.getContextPath()%>/forum/images/userinfo.gif" width="9" height="9">
  18. <span id="pos_root" name="pos_root" style="display:none"><%=pos_curleaf.getMenuString(request, pos_curleaf.getLeaf(Leaf.CODE_ROOT))%></span>
  19. <a><ltpos:Label res="res.label.forum.inc.position" key="cur_position"/></a>&nbsp;<a href="<%=request.getContextPath()%>/forum/index.jsp" onmouseover='showmenu(event, pos_root.innerHTML, 0)'>
  20. <ltpos:Label res="res.label.forum.inc.position" key="forum_home"/></a>&nbsp;<B>&raquo;</B> 
  21.             <%
  22.    String pCode = pos_curleaf.getParentCode();
  23. String plink = "";
  24.    while (!pCode.equals(Leaf.CODE_ROOT)) { 
  25. Leaf pleaf = pos_curleaf.getLeaf(pCode);
  26. // 防止当parentCode出错时,陷入死循环
  27. if (pleaf==null || !pleaf.isLoaded())
  28. break;
  29. %>
  30. <span id="posspan_<%=pleaf.getCode()%>" name="posspan_<%=pleaf.getCode()%>" style="display:none"><%=pos_curleaf.getMenuString(request, pleaf)%></span>
  31. <%
  32. if (pleaf.getType()==pleaf.TYPE_BOARD) {
  33. plink = "&nbsp;<a href='" + ForumPage.getListTopicPage(request, pCode) + "' onmousemove='showmenu(event, posspan_" + pleaf.getCode() + ".innerHTML, 0)'>" + pleaf.getName() + "</a>&nbsp;<B>&raquo;</B>" + plink;
  34. }
  35. else {
  36. plink = "&nbsp;<a href='index.jsp?boardField=" + StrUtil.UrlEncode(pCode) + "' onmousemove='showmenu(event, posspan_" + pleaf.getCode() + ".innerHTML, 0)'>" + pleaf.getName() + "</a>&nbsp;<B>&raquo;</B>" + plink;
  37.    }
  38.    pCode = pleaf.getParentCode();
  39.    }
  40.   %>
  41.   <%=plink%>&nbsp;<a href="<%=ForumPage.getListTopicPage(request, pos_boardcode)%>">   
  42.   <%
  43. out.print(pos_curleaf.getName());
  44.   %>
  45.   </a>
  46.   <%if (pos_op.equals("showelite")) {%>
  47.   <ltpos:Label res="res.label.forum.inc.position" key="elite_field"/>
  48.   <%}%> </td>
  49. </tr></tbody>
  50. </table>
  51. <%
  52. } else if (!com.redmoon.forum.Privilege.isUserLogin(request)) { 
  53. String posprivurl = request.getRequestURL() + "?" + request.getQueryString();
  54. %>
  55. <table width='98%' height='25' class="tableframe_gray" border='0' align="center" cellpadding='0' cellspacing='0' rules='rows'>
  56. <form action="<%=cn.js.fan.web.Global.getRootPath()%>/login.jsp" method=post>
  57. <tbody><tr><td align='left' bgcolor="#EBECED">
  58. &nbsp;<img src="<%=cn.js.fan.web.Global.getRootPath()%>/forum/images/userinfo.gif" width="9" height="9">&nbsp;<ltpos:Label res="res.label.forum.inc.position" key="user_name"/>
  59. <input maxlength=15 size=10 name="name">
  60. <ltpos:Label res="res.label.forum.inc.position" key="pwd"/>
  61. <input type=password maxlength=15 size=10 name="pwd">
  62. <%
  63.         com.redmoon.forum.Config cfg_pos = new com.redmoon.forum.Config();
  64.         if (cfg_pos.getBooleanProperty("forum.loginUseValidateCode")) {
  65. %>
  66. <ltpos:Label res="res.label.forum.inc.position" key="validate_code"/>
  67.         <input name="validateCode" type="text" size="1">
  68.         <img src='../validatecode.jsp' border="0" align="absmiddle" style="cursor:hand" onclick="this.src='../validatecode.jsp'" alt="<ltpos:Label res="res.label.forum.index" key="refresh_validatecode"/>" />
  69.         <%}%>
  70. <select name=covered>
  71.   <option value=0 selected type='checkbox' checked><ltpos:Label res="res.label.forum.inc.position" key="not_cover"/></option>
  72.   <option value=1><ltpos:Label res="res.label.forum.inc.position" key="cover"/></option>
  73.         </select> <input type='submit' name='Submit' value='<ltpos:Label res="res.label.forum.inc.position" key="commit"/>' class=singleboarder>
  74. <input type="hidden" name="privurl" value="<%=posprivurl%>">
  75. </td>
  76. </tr></tbody>
  77. </form>
  78. </table>
  79. <%}else{
  80. UserDb user = new UserDb();
  81. user = user.getUser(com.redmoon.forum.Privilege.getUser(request));
  82. %>
  83. <table width='98%' height='25' border='0' class="tableframe_gray" align="center" cellpadding='0' cellspacing='0' rules='rows'>
  84. <tbody><tr><td align='left' bgcolor="#EBECED">
  85. &nbsp;<img src="<%=cn.js.fan.web.Global.getRootPath()%>/forum/images/userinfo.gif" width="9" height="9">&nbsp;<ltpos:Label res="res.label.forum.inc.position" key="user_name"/> <%=user.getNick()%>&nbsp; &nbsp;<ltpos:Label res="res.label.forum.inc.position" key="welcome"/><%=user.getLevelDesc()%>&nbsp;&nbsp;<ltpos:Label res="res.label.forum.inc.position" key="exprience"/><%=user.getExperience()%>&nbsp;&nbsp;<ltpos:Label res="res.label.forum.inc.position" key="credit"/><%=user.getCredit()%>&nbsp;&nbsp;
  86. <%
  87. ScoreMgr sm_pos = new ScoreMgr();
  88. ScoreUnit su_pos = sm_pos.getScoreUnit("gold");
  89. out.print(su_pos.getName());
  90. %>:<%=user.getGold()%>
  91. </td>
  92. </tr></tbody>
  93. </table>
  94. <%}%>
  95. <iframe width=0 height=0 src="" id="hiddenframe"></iframe>
  96. <table width="98%"  border="0" align="center">
  97.   <tr>
  98.     <td height="10"></td>
  99.   </tr>
  100. </table>