⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchpost.jsp

📁 BBS-CS 天乙社区 是采用JSP+JavaBean+Servlet、Struts的MVC框架开发的一套网络虚拟社区系统。文件解压缩后有详细文件说明。
💻 JSP
字号:
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page import="com.laoer.bbscs.sysinfo.*"%>
<%@ page import="com.laoer.bbscs.bbs.business.*"%>
<%@ page import="com.laoer.bbscs.servlet.*"%>
<%@ page import="com.laoer.bbscs.db.*"%>
<%@ page import="com.laoer.bbscs.util.*"%>
<%@ page import="java.util.*"%>
<%
long starttime = Util.getaLongTime();
String sid = (String)request.getAttribute("sid");
UserSessionCheck myUserSessionCheck = (UserSessionCheck)request.getAttribute("myUserSessionCheck");
String headadv = (String)request.getAttribute("headadv");
String bid = (String)request.getAttribute("bid");
String pages = (String)request.getAttribute("pages");
BoardsInfo theBoards = (BoardsInfo)request.getAttribute("theBoards");
List myList = (List)request.getAttribute("plistlist");
Pages myPages = (Pages)request.getAttribute("myPages");
String pagebreakstr = (String)request.getAttribute("pagebreakstr");
String boardID = "";
String boardsname = "";
String eboardsname = "";
String bsmaster = "";
String boardgg = "";

boardID = bid;
boardsname = theBoards.getBoardsName();
eboardsname = theBoards.getBoardsEName();
boardgg = theBoards.getBulletin();
bsmaster = theBoards.getHTMLMaster(sid);

%>
<html:html locale="true">
<head>
<title><bean:message key="right.title"/></title>
<link rel=stylesheet type="text/css" href="css/<%=myUserSessionCheck.getUser().getUserInfo().getStyle()%>/css2.css">
<%//=Sys.getCSS(myUserSessionCheck.getUser().getUserInfo().getStyle(),2)%>
<script language=javascript>
<!--
//******************************默认设置定义******************************
tPopWait=50;		//停留tWait豪秒后显示提示
tPopShow=6000;		//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=90;		//提示框的透明度,百分比
fontcolor="#000000";
bgcolor="#EDEDED";
bordercolor="#007db5";
//bgcolor="#EDEDED";
//bordercolor="#007db5";

//******************************内部变量定义******************************
sPop=null;curShow=null;tFadeOut=null;tFadeIn=null;tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText {  background-color: " + bgcolor + ";color:" + fontcolor + "; border: 1px " + bordercolor + " solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");

function showPopupText()
{
  var o=event.srcElement;MouseX=event.x;MouseY=event.y;
  if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
    if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
  if(o.dypop!=sPop)
  {
    sPop=o.dypop;clearTimeout(curShow);clearTimeout(tFadeOut);clearTimeout(tFadeIn);clearTimeout(tFadeWaiting);
    if(sPop==null || sPop=="")
    {
      dypopLayer.innerHTML="";dypopLayer.style.filter="Alpha()";dypopLayer.filters.Alpha.opacity=0;
    }
    else
    {
      if(o.dyclass!=null) popStyle=o.dyclass
      else popStyle="cPopText";
        curShow=setTimeout("showIt()",tPopWait);
    }
  }
}

function showIt()
{
  dypopLayer.className=popStyle;dypopLayer.innerHTML=sPop;
  popWidth=dypopLayer.clientWidth;popHeight=dypopLayer.clientHeight;
  if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
  else popLeftAdjust=0;
  if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
  else popTopAdjust=0;
  dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
  dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
  dypopLayer.style.filter="Alpha(Opacity=0)";fadeOut();
}

function fadeOut()
{
  if(dypopLayer.filters.Alpha.opacity<popOpacity)
  { dypopLayer.filters.Alpha.opacity+=showPopStep;tFadeOut=setTimeout("fadeOut()",1); }
  else
  { dypopLayer.filters.Alpha.opacity=popOpacity;tFadeWaiting=setTimeout("fadeIn()",tPopShow); }
}

function fadeIn()
{
  if(dypopLayer.filters.Alpha.opacity>0)
  { dypopLayer.filters.Alpha.opacity-=1;tFadeIn=setTimeout("fadeIn()",1); }
}
document.onmouseover=showPopupText;
-->
</script>
<script>
function view(Url)
{
   popup=window.open(Url,"","left=30,top=30,width=500,height=200,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes, resizable=no");
}

function view1(Url)
{
   popup=window.open(Url,"","left=30,top=30,width=550,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes, resizable=no");
}
</script>
</head>

<body leftmargin="0" topmargin="0">
<%=headadv%>

<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1">
<form name="formt2" method="post" action="tiaozhuan.jsp">
<INPUT TYPE="hidden" name="bid" value="<%=bid%>">
<INPUT TYPE="hidden" name="pages" value="<%=pages%>">
<tr height='20'>
<td width="50%"><%=boardsname%>(<%=eboardsname%>)</td>
<td width="48%">
 <div align="right"><bean:message key="right.topictitle"/> <%=(Integer.parseInt(pages)-1)*myPages.getPerPageNum()+1%>-<%=(Integer.parseInt(pages)-1)*myPages.getPerPageNum()+myPages.getPerPageNum()%>,<bean:message key="right.totaltopic" arg0="<%=String.valueOf(myPages.getTotals())%>"/></div>
</td>
</tr>
</form>
</table>

<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1">
  <tr>
    <td width="50%" ><bean:message key="right.boardmaster"/><%out.print(bsmaster);%></td>
    <td width="48%" >
      <div align="right"><font color="#FF0000"><%=pagebreakstr%></font></div>
    </td>
  </tr>
</table>
<%
ForumInfo myForumInfo = null;
int flist = myList.size();
int n = 2;
String tclass = "";
%>
<table width=98% border=0 align=center cellpadding=1 cellspacing=1 style="table-layout:fixed;word-break:break-all">
<tr class='T1' height="20">
<td width=5%><div align=center><font color=#FFFFFF><bean:message key="right.re"/></font></div></td>
<td width=7%><div align=center><font color=#FFFFFF><bean:message key="right.face"/></font></div></td>
<td width=55%><div align=center><font color=#FFFFFF><bean:message key="right.topic"/></font></div></td>
<td width=20%><div align=center><font color=#FFFFFF><bean:message key="right.author"/></font></div></td>
<td width=11%><div align=center><font color=#FFFFFF><bean:message key="right.time"/></font></div></td>
</tr>
<%
for (int i = 0;i < flist;i++) {
  myForumInfo = (ForumInfo)myList.get(i);
  if ((i%n)==1) {
    tclass = "T3";
  }
  else {
    tclass = "T2";
  }
  String artSize = "";
  if (myForumInfo.getArtSize()<1024) {
    artSize = String.valueOf(myForumInfo.getArtSize());
  }
  else {
    artSize = (int)(myForumInfo.getArtSize()/1024) +"K";
  }
%>
<tr class='<%=tclass%>'>
<td width=5%><CENTER>
<%
if (myForumInfo.getReNum() == 0) {
  out.println(artSize);
}
else {
  out.println("<font color=#ff0000>[+"+ myForumInfo.getReNum() +"]<font>");
}
%>
</CENTER></td>
<td width=7%>&nbsp;<img src='images/<%=myForumInfo.getFace()%>.gif'>
<%
if (myForumInfo.getCanNotDel()==1) {
  out.print("<font color=#8f0000>&nbsp;M</font>");
}
%>
</td>
<td width=55%><span class=bt><a href='<%=Sys.getURL()%>readAction.do?sid=<%=sid%>&bid=<%=bid%>&recid=<%=myForumInfo.getID2()%>&pages=<%=pages%>' title ='<bean:message key="right.lastrename"/><%=myForumInfo.getLastPostUserName()%><br>
<bean:message key="right.lastretime"/><%=Util.fotmatDate6(new Date(myForumInfo.getLastTime()))%><br>
<bean:message key="right.click"/><%=myForumInfo.getClick()%>'><%=Util.stripslashes(myForumInfo.getTitle())%></a></span>
<%
out.print(Util.getPostPageBreakStr("readAction.do?sid="+sid+"&bid="+bid+"&recid="+myForumInfo.getID()+"&pages="+pages+"&inpages=",(myForumInfo.getReNum()+1),myPages.getPerPageNum()));
if (myForumInfo.getIsTop() == 1) {
%>
<img src='images/top.gif'title="<bean:message key="right.totop"/>" align=absbottom>
<%
}
if (myForumInfo.getHavePic() != 0) {
%>
 <font color=#FF0000><bean:message key="right.havepic"/></font>
<%
}
if (myForumInfo.getElite() != 0) {
%>
 <font color=#FF0000><bean:message key="right.isgood"/></font>
<%
}
%>
</td>
<td ALIGN=left nowrap><a href='<%=Sys.getURL()%>userInfoAction.do?sid=<%=sid%>&showtype=userID&uid=<%=myForumInfo.getUserID()%>'><%=myForumInfo.getNickName()%> <font color=#666666>[<%=myForumInfo.getUserName()%>]</font></a></td>
<td width=11%><CENTER><%=Util.fotmatDate6(new Date(myForumInfo.getPostTime()))%></CENTER></td></tr>
<%
 myForumInfo = null;
}
%>
</table>

<!-- 发表、翻页标志 -->
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="50%">&nbsp;</td>
    <td width="48%" >
      <div align="right"><font color="#FF0000"><%=pagebreakstr%></font>
</div>
</td>
  </tr>
</table>
<!-- 发表、翻页标志结束 -->
<%
long endtime = Util.getaLongTime();
%>
<CENTER><font color='#ff0000'><bean:message key="bbscs.pageruntime" arg0="<%=String.valueOf(endtime-starttime)%>"/></font></CENTER>
<%
theBoards = null;
myList = null;
myPages = null;
%>
</body>
</html:html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -