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

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="com.redmoon.blog.UserConfigDb"%>
  5. <%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
  6. <script language="JavaScript">
  7. function hopenWin(url,width,height)
  8. {
  9.   var newwin = window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,top=50,left=120,width="+width+",height="+height);
  10. }
  11. </script>
  12. <%
  13. String rootpath = request.getContextPath(); // 当运用于hopenWin中时,rootpath会为空字符串
  14. // String rootpath = Global.getRootPath(); // "http://" + Global.server + ":" + Global.port + "/" + Global.virtualPath; // "http://www.zjrj.cn";
  15. if (userName.equals("")) {
  16. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request,"res.label.blog.header","not_name")));
  17. return;
  18. }
  19. com.redmoon.forum.Privilege hpvg = new com.redmoon.forum.Privilege();
  20. com.redmoon.forum.person.UserMgr um = new com.redmoon.forum.person.UserMgr();
  21. UserConfigDb headerucd = new UserConfigDb();
  22. headerucd = headerucd.getUserConfigDb(userName);
  23. if (!headerucd.isLoaded()) {
  24. String str = SkinUtil.LoadString(request,"res.label.blog.header", "activate_blog_fail");
  25. str = StrUtil.format(str, new Object[] {um.getUser(userName).getNick()});
  26. %>
  27. <table width="400" border="0" align="center">
  28.   <tr>
  29.     <td align="center"><a href="user/userconfig_add.jsp"><%=str%></a></td>
  30.   </tr>
  31. </table>
  32. <%
  33. return;
  34. }
  35. if (!headerucd.isValid()) {
  36. String str = SkinUtil.LoadString(request,"res.label.blog.header", "blog_alert");
  37. str = StrUtil.format(str, new Object[] {um.getUser(userName).getNick()});
  38. out.print(StrUtil.makeErrMsg(str));
  39. return;
  40. }%>
  41. <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="0" class="table_banner">
  42.   <tr>
  43.     <td width="51%" height="22" ><span class="text_bold_16"><%=headerucd.getTitle()%> ( <%=headerucd.getSubtitle()%> )</span></td>
  44.     <td width="49%"><img src="<%=rootpath%>/blog/images/message.gif" border="0" /> <a href="javascript:hopenWin('<%=rootpath%>/message/send.jsp?receiver=<%=StrUtil.UrlEncode(userName)%>',320,260)"><lt:Label res="res.label.blog.header" key="message"/></a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<%=rootpath%>/blog/listphoto.jsp?userName=<%=StrUtil.UrlEncode(userName)%>"><lt:Label res="res.label.blog.header" key="album"/></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<%=rootpath%>/blog/myblog.jsp?userName=<%=StrUtil.UrlEncode(userName)%>"><lt:Label res="res.label.blog.header" key="return_column"/></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<%=rootpath%>/blog/user/frame.jsp?userName=<%=StrUtil.UrlEncode(userName)%>"><lt:Label res="res.label.blog.header" key="manage"/></a>&nbsp;&nbsp;|&nbsp;&nbsp;
  45. <%if (hpvg.isUserLogin(request)) {%>
  46. <a href="../exit.jsp?privurl=<%=StrUtil.getUrl(request)%>"><lt:Label res="res.label.blog.header" key="exit"/></a>
  47. <%}else{%>
  48. <a href="../door.jsp?privurl=<%=StrUtil.getUrl(request)%>"><lt:Label res="res.label.blog.header" key="login"/></a>
  49. <%}%>
  50. &nbsp;<a href="<%=rootpath%>/blog/index.jsp"><lt:Label res="res.label.blog.header" key="blog_first_page"/></a></td>
  51.   </tr>
  52.   <tr>
  53.     <td colspan="2"><span class="text_14"><%=headerucd.getNotice()%></span></td>
  54.   </tr>
  55.   <tr>
  56.     <td height="22" colspan="2" class="blog_banner_space"></td>
  57.   </tr>
  58. </table>