theme.jsp
上传用户:yuyunping
上传日期:2013-03-21
资源大小:1844k
文件大小:7k
源码类别:

Java书籍

开发平台:

Java

  1. <%@ page import ="net.acai.util.*,
  2.   net.acai.forum.*,
  3.   java.util.Hashtable"%>
  4. <%! 
  5. public String headLine(int forumID,String forumName,String forumLogo,String forumType,int files,String stats){
  6. StringBuffer buf=new StringBuffer();
  7. buf.append("<TABLE border=0 width="95%" align=center><TBODY><TR>"+
  8. "<TD vAlign=top width="30%"><img border=0 src="+forumLogo+"></TD>"+
  9. "<TD valign=middle align=top> &nbsp;&nbsp;<img src=pic/closedfold.gif border=0>&nbsp;&nbsp;<a href=index.jsp>"+forumName+"</a><br>");
  10. switch(files){
  11. case 1:
  12. buf.append("&nbsp;&nbsp;<img src=pic/bar.gif border=0 width=15 height=15><img src=pic/closedfold.gif border=0>&nbsp;&nbsp;"+stats);
  13. break;
  14. case 2:
  15. buf.append("&nbsp;&nbsp;<img src=pic/bar.gif border=0 width=15 height=15><img src=pic/closedfold.gif border=0>&nbsp;&nbsp;"+
  16. "<a href=list.jsp?forumID="+forumID+">"+forumType+"</a>"+ 
  17. "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=pic/bar.gif border=0 width=15 height=15><img src=pic/openfold.gif border=0>&nbsp;&nbsp;"+stats+"");
  18. break;
  19. }
  20. buf.append("<a name=top></a></TD></TR></TBODY></TABLE><br>");
  21. return buf.toString();
  22. }
  23. %>
  24. <%
  25. lastLogin="";
  26. userName=GCookie.getCookieValue(request,"UJBBUName","");
  27. userPassword=GCookie.getCookieValue(request,"UJBBUPSW","");
  28. if(!"".equals(userName)&&!"".equals(userPassword))
  29. try{
  30. User loginUser=SkinUtil.userLogin(userName,userPassword,4);
  31. int userClass=loginUser.getUserClass();
  32. lastLogin=loginUser.getLastLogin();
  33. foundUser=true;
  34. if(userClass==18)
  35. guibin=true;
  36. else if(userClass==19)
  37. forumMaster=true;
  38. else if(userClass==20)
  39. master=true;
  40. else
  41. foundUser=true;
  42. }
  43. catch(Exception e){
  44. foundUser=false;
  45. }
  46. if("".equals(lastLogin)) lastLogin=NDate;
  47. %>
  48. <html>
  49. <head>
  50. <meta NAME=GENERATOR Content="Microsoft FrontPage 4.0" CHARSET=GB2312>
  51. <title><%=forumName%>--<%=stats%></title>
  52. <link rel=stylesheet type=text/css href=forum.css>
  53. <style>
  54. TABLE {BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 1px; }
  55. TD {BORDER-RIGHT: 0px; BORDER-TOP: 0px; color: #000000; }
  56. </style>
  57. </head>
  58. <%@include file="js.jsp"%>
  59. <body bgcolor=#ffffff alink=#333333 vlink=#333333 link=#333333 topmargin=0>
  60. <script Language="JavaScript">
  61. //***********默认设置定义.*********************
  62. tPopWait=50;//停留tWait豪秒后显示提示。
  63. tPopShow=5000;//显示tShow豪秒后关闭提示
  64. showPopStep=20;
  65. popOpacity=99;
  66. //***************内部变量定义*****************
  67. sPop=null;
  68. curShow=null;
  69. tFadeOut=null;
  70. tFadeIn=null;
  71. tFadeWaiting=null;
  72. document.write("<style type='text/css'id='defaultPopStyle'>");
  73. document.write(".cPopText {  background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
  74. document.write("</style>");
  75. document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
  76. function showPopupText(){
  77. var o=event.srcElement;
  78. MouseX=event.x;
  79. MouseY=event.y;
  80. if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
  81.         if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
  82. if(o.dypop!=sPop) {
  83. sPop=o.dypop;
  84. clearTimeout(curShow);
  85. clearTimeout(tFadeOut);
  86. clearTimeout(tFadeIn);
  87. clearTimeout(tFadeWaiting);
  88. if(sPop==null || sPop=="") {
  89. dypopLayer.innerHTML="";
  90. dypopLayer.style.filter="Alpha()";
  91. dypopLayer.filters.Alpha.opacity=0;
  92. }
  93. else {
  94. if(o.dyclass!=null) popStyle=o.dyclass 
  95. else popStyle="cPopText";
  96. curShow=setTimeout("showIt()",tPopWait);
  97. }
  98. }
  99. }
  100. function showIt(){
  101. dypopLayer.className=popStyle;
  102. dypopLayer.innerHTML=sPop;
  103. popWidth=dypopLayer.clientWidth;
  104. popHeight=dypopLayer.clientHeight;
  105. if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
  106. else popLeftAdjust=0;
  107. if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
  108. else popTopAdjust=0;
  109. dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
  110. dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
  111. dypopLayer.style.filter="Alpha(Opacity=0)";
  112. fadeOut();
  113. }
  114. function fadeOut(){
  115. if(dypopLayer.filters.Alpha.opacity<popOpacity) {
  116. dypopLayer.filters.Alpha.opacity+=showPopStep;
  117. tFadeOut=setTimeout("fadeOut()",1);
  118. }
  119. else {
  120. dypopLayer.filters.Alpha.opacity=popOpacity;
  121. tFadeWaiting=setTimeout("fadeIn()",tPopShow);
  122. }
  123. }
  124. function fadeIn(){
  125. if(dypopLayer.filters.Alpha.opacity>0) {
  126. dypopLayer.filters.Alpha.opacity-=1;
  127. tFadeIn=setTimeout("fadeIn()",1);
  128. }
  129. }
  130. document.onmouseover=showPopupText;
  131. </script>
  132. <table width=95% align=center cellspacing=0 cellpadding=1  border=0 bgcolor="<%=tableBackColor%>">
  133. <tr><td>
  134. <table style=color:<%=tableFontColor%> width=100% cellspacing=0 cellpadding=4 border=0 >
  135. <tr bgcolor="<%=tableTitleColor%>">
  136. <td valign=middle ><FONT COLOR="<%=tableFontColor%>"> >> 
  137. <%
  138. if(userName.equals(""))
  139. out.println(""+(new String("欢迎您,".getBytes("ISO-8859-1"),"GBK"))+"<a href=login.jsp><FONT COLOR="+tableFontColor +">"+(new String("请先登陆".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a> | <a href=reg.jsp><FONT COLOR="+ tableFontColor +">"+(new String("注册".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a>");
  140. else
  141. out.println(""+(new String("欢迎您,".getBytes("ISO-8859-1"),"GBK"))+"<b>"+userName +"</b> "+(new String(":".getBytes("ISO-8859-1"),"GBK"))+"<a href=login.jsp><FONT COLOR="+ tableFontColor +">"+(new String("重登陆".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a> | <a href=mymodify.jsp?name="+ java.net.URLEncoder.encode(userName) +">"+
  142. "<FONT COLOR="+ tableFontColor +">"+(new String("更改信息".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a> | <a href="usersms.jsp?action=inbox" ><FONT COLOR="+ tableFontColor +">"+(new String("短消息".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a> | "+
  143. "<a href=favlist.jsp><FONT COLOR="+ tableFontColor +">"+(new String("收藏".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a>");
  144. out.println(" | <a href=toplist.jsp?orders=1 ><FONT COLOR="+ tableFontColor +">"+(new String("发贴排行".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a> | <a href=query.jsp?forumID="+forumID+"><FONT COLOR="+ tableFontColor +">"+(new String("搜索".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a>");
  145. out.println(" | <a href=help.jsp><FONT COLOR="+ tableFontColor +">"+(new String("帮助".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a> | <a href=logout.jsp><FONT COLOR="+ tableFontColor +">"+(new String("退出".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a>");
  146. if(master||forumMaster)
  147. out.println(" | <a href=elogin.jsp><FONT COLOR="+ tableFontColor +">"+(new String("管理".getBytes("ISO-8859-1"),"GBK"))+"</FONT></a>");
  148. out.println("</td><td valign=middle align=right><FONT COLOR="+ tableFontColor +
  149. "><a href='"+ forumURL +"'><img src=pic/gohome.gif border=0></a></FONT>"+
  150. "</td></tr></table></td></tr></table>"+
  151. "<center><iframe src="stat.jsp?stats="+stats+"" width="95%" height=25 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=NO></iframe></center>");
  152. %>