header.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="cn.js.fan.web.*"%>
  4. <%@ page import="java.util.Vector"%>
  5. <%@ page import="java.util.Iterator"%>
  6. <%@ page import="com.redmoon.forum.ad.*"%>
  7. <%@ page import="com.redmoon.forum.ui.*"%>
  8. <%@ page import="com.redmoon.forum.security.*"%>
  9. <%@ page import="com.redmoon.forum.*"%>
  10. <%@ page import="com.redmoon.forum.Leaf"%>
  11. <%@ taglib uri="/WEB-INF/tlds/AdTag.tld" prefix="ad_header"%>
  12. <%
  13. if (ForumDb.getInstance().getStatus()==ForumDb.STATUS_STOP) {
  14. String hUrl = StrUtil.getUrl(request);
  15. // 防止进入info.jsp页面时反复redirect
  16. if (hUrl.indexOf("info.jsp")==-1) {
  17. response.sendRedirect(Global.getRootPath() + "/info.jsp?info=" + cn.js.fan.util.StrUtil.UrlEncode(ForumDb.getInstance().getReason()));
  18. return;
  19. }
  20. }
  21. %>
  22. <script language="JavaScript">
  23. function hopenWin(url,width,height) {
  24.   var newwin = window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,top=50,left=120,width="+width+",height="+height);
  25. }
  26. </script>
  27. <%
  28. com.redmoon.forum.security.IPMonitor ipm = new com.redmoon.forum.security.IPMonitor();
  29. String rootpath = request.getContextPath(); // 当运用于hopenWin中时,rootpath会为空字符串
  30. if (!ipm.isIPCanVisit(request.getRemoteAddr())) {
  31. String hUrl = StrUtil.getUrl(request);
  32. // 防止进入info.jsp页面时反复redirect
  33. if (hUrl.indexOf("info.jsp")==-1) {
  34. response.sendRedirect(rootpath + "/info.jsp?info=" + StrUtil.UrlEncode(SkinUtil.LoadString(request, "res.label.forum.inc.header", "ipvisitlist")));
  35. return;
  36. }
  37. }
  38. TimeConfig tc = new TimeConfig();
  39. if (tc.isVisitForbidden(request)) {
  40. String hUrl = StrUtil.getUrl(request);
  41. if (hUrl.indexOf("info.jsp")==-1) {
  42. String str = SkinUtil.LoadString(request, "res.label.forum.inc.header", "time_visit_forbid");
  43. str = StrUtil.format(str, new Object[] {tc.getProperty("forbidVisitTime1"), tc.getProperty("forbidVisitTime2")});
  44. response.sendRedirect(rootpath + "/info.jsp?info=" + StrUtil.UrlEncode(str));
  45. return;
  46. }
  47. }
  48. // String rootpath = Global.getRootPath(); // "http://" + Global.server + ":" + Global.port + "/" + Global.virtualPath; // "http://www.zjrj.cn";
  49. String hboardcode,hboardname;
  50. hboardcode = ParamUtil.get(request, "boardcode");
  51. hboardname = ParamUtil.get(request, "boardname");
  52. if (hboardcode==null)
  53. hboardcode = "";
  54. if (hboardname == null)
  55. hboardname = "";
  56. hboardname = cn.js.fan.util.StrUtil.UrlEncode(hboardname);
  57. String hSessionBoardCode = UserSession.getBoardCode(request);
  58. ThemeMgr tm = new ThemeMgr();
  59. Theme hTheme = tm.getTheme("default");
  60. if (!hSessionBoardCode.equals("")) {
  61. Leaf hleaf = new Leaf();
  62. hleaf = hleaf.getLeaf(hSessionBoardCode);
  63. String theme = "";
  64. if (hleaf!=null)
  65. theme = hleaf.getTheme();
  66. if (theme==null || theme.equals(""))
  67. ;
  68. else {
  69. Theme t = tm.getTheme(theme);
  70. if (t!=null) {
  71. hTheme = t;
  72. }
  73. }
  74. }
  75. %>
  76. <script language="JavaScript" src="<%=rootpath%>/forum/inc/main.js"></script>
  77. <table class="table_banner" width="98%" align="center" cellpadding="0" cellspacing="0">
  78.   <tr>
  79.     <td>
  80. <table width="100%"  border="0" cellpadding="0" cellspacing="0">
  81.       <tr>
  82.         <td height="0" bgcolor="#D0D0CF"></td>
  83.       </tr>
  84.       <tr>
  85.         <td height="<%=hTheme.getHeight()%>" background="<%=rootpath%><%=hTheme.getPath() + "/" + hTheme.getBanner()%>">
  86. <div align="center" style="width:100%;float:inherit; padding-left:250px; padding-top:10px; padding-bottom:10px; padding-right:20px">
  87. <ad_header:AdTag type="<%=AdDb.TYPE_HEADER%>" boardCode="<%=hSessionBoardCode%>"></ad_header:AdTag>
  88. </div>
  89. </td>
  90.       </tr>
  91.       <tr>
  92.         <td class="table_nav" height="22">
  93. <%
  94. SkinMgr hskmgr = new SkinMgr();
  95. Vector hv = hskmgr.getAllSkin();
  96. Iterator hir = hv.iterator();
  97. String hskinmenu = "";
  98. while (hir.hasNext()) {
  99. Skin hskin = (Skin) hir.next();
  100. if (hskinmenu.equals(""))
  101. hskinmenu += "<a href=" + rootpath + "/forum/userset.jsp?op=setSkin&skinCode=" + hskin.getCode() + ">" + hskin.getName() + "</option>";
  102. else
  103. hskinmenu += "<BR><a href=" + rootpath + "/forum/userset.jsp?op=setSkin&skinCode=" + hskin.getCode() + ">" + hskin.getName() + "</option>";
  104. }
  105. String hstatusmenu = "";
  106. hstatusmenu += "<a href=" + rootpath + "/forum/boardstatus.jsp?type=today_count>" + cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.inc.header", "today_count") + "</a>";
  107. hstatusmenu += "<a href=" + rootpath + "/forum/boardstatus.jsp?type=topic_count>" + cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.inc.header", "topic_count") + "</a>";
  108. hstatusmenu += "<a href=" + rootpath + "/forum/boardstatus.jsp?type=post_count>" + cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.inc.header", "post_count") + "</a>";
  109. hstatusmenu += "<a href=" + rootpath + "/forum/boardstatus.jsp?type=online>" + cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.inc.header", "online") + "</a>";
  110. hstatusmenu += "<a href=" + rootpath + "/forum/showonline.jsp>" + cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.inc.header", "online_detail") + "</a>";
  111. hstatusmenu += "<a href=" + rootpath + "/forum/score_rule.jsp>" + cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.score_rule", "score_rule") + "</a>";
  112. hstatusmenu += "<a href=" + rootpath + "/forum/rank.jsp>" + cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.inc.header", "rank") + "</a>";
  113. %>   
  114. &nbsp;<a class="nav" href='<%=rootpath%>/index.jsp'><lt:Label res="res.label.forum.inc.header" key="home"/></a> <img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle">&nbsp;<a class="nav" href='<%=rootpath%>/forum/index.jsp'><lt:Label res="res.label.forum.inc.header" key="forum"/></a><img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle" /> <a class="nav" href='<%=rootpath%>/door.jsp?privurl=<%=cn.js.fan.util.StrUtil.getUrl(request)%>'><lt:Label res="res.label.forum.inc.header" key="login"/></a>&nbsp;<img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle"> <a class="nav" href='<%=rootpath%>/usercenter.jsp'>
  115. <lt:Label res="res.label.forum.inc.header" key="user_center"/></a><img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle" /> <a class="nav" href='#' onmouseover='showmenu(event,&quot;<%=hskinmenu%>&quot;, 0)'><lt:Label res="res.label.forum.inc.header" key="style"/></a><img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle" />  <a class="nav" href='#' onmouseover="showmenu(event, '<%=hstatusmenu%>', 0)"><lt:Label res="res.label.forum.inc.header" key="forum_status"/></a>&nbsp;<img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle" />&nbsp;<a class="nav" href='<%=rootpath%>/listmember.jsp'><lt:Label res="res.label.forum.inc.header" key="member"/></a> <img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle"> <a class="nav" href='<%=rootpath%>/forum/search_do.jsp?selboard=allboard'><lt:Label res="res.label.forum.inc.header" key="new_tipic"/></a> <img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle"> <a class="nav" href='<%=rootpath%>/forum/treasure.jsp'><lt:Label res="res.label.forum.inc.header" key="treasure"/></a>&nbsp;<img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle"> <a class="nav" href='<%=rootpath%>/forum/search.jsp?boardcode=<%=hboardcode%>&boardname=<%=hboardname%>'><lt:Label res="res.label.forum.inc.header" key="search"/></a> <img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle" /> <a class="nav" href='javascript:hopenWin(&quot;<%=rootpath%>/message/message.jsp&quot;,320,260)'><lt:Label res="res.label.forum.inc.header" key="short_msg"/></a>
  116. <%if (Global.hasBlog) {%>
  117. <img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle" /> <a class="nav" href='<%=rootpath%>/blog/index.jsp'><lt:Label res="res.label.forum.inc.header" key="blog"/></a>
  118. <%}%>&nbsp;<img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle"> <a class="nav" href="<%=rootpath%>/prison.jsp"><lt:Label res="res.label.forum.inc.header" key="prision"/>
  119. </a> <img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle" /> <a class="nav" href="#" onclick="window.open('<%=rootpath%>/jump.jsp?fromWhere=forum&amp;toWhere=oa')">办公</a> <img src="<%=rootpath%>/forum/images/split.gif" width="7" height="18" align="absmiddle"> <a class="nav" href='<%=rootpath%>/exit.jsp'>
  120. <lt:Label res="res.label.forum.inc.header" key="exit"/></a> </td>
  121.       </tr>
  122.     </table>
  123. </td>
  124.   </tr>
  125. </table>
  126. <table width="98%"  border="0" align="center">
  127.   <tr>
  128.     <td height="10"></td>
  129.   </tr>
  130. </table>
  131. <div class=menuskin id=popmenu 
  132.       onmouseover="clearhidemenu();highlightmenu(event,'on')" 
  133.       onmouseout="highlightmenu(event,'off');dynamichide(event)" style="Z-index:100"></div>
  134. <iframe width=0 height=0 src="" id="hiddenframe"></iframe>